generated-configure.sh revision 2017:9f1ecdfae7fb
1101776Stjr#!/bin/bash
2101776Stjr#
3101776Stjr# ##########################################################
4101776Stjr# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5227753Stheraven# ##########################################################
6227753Stheraven#
7227753Stheraven#! /bin/sh
8227753Stheraven# Guess values for system-dependent variables and create Makefiles.
9227753Stheraven# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10101776Stjr#
11101776Stjr# Report bugs to <build-dev@openjdk.java.net>.
12101776Stjr#
13101776Stjr#
14101776Stjr# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15101776Stjr#
16101776Stjr#
17101776Stjr# This configure script is free software; the Free Software Foundation
18101776Stjr# gives unlimited permission to copy, distribute and modify it.
19101776Stjr## -------------------- ##
20101776Stjr## M4sh Initialization. ##
21101776Stjr## -------------------- ##
22101776Stjr
23101776Stjr# Be more Bourne compatible
24101776StjrDUALCASE=1; export DUALCASE # for MKS sh
25101776Stjrif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26101776Stjr  emulate sh
27101776Stjr  NULLCMD=:
28101776Stjr  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29101776Stjr  # is contrary to our usage.  Disable this feature.
30101776Stjr  alias -g '${1+"$@"}'='"$@"'
31101776Stjr  setopt NO_GLOB_SUBST
32101776Stjrelse
33101776Stjr  case `(set -o) 2>/dev/null` in #(
34101776Stjr  *posix*) :
35101776Stjr    set -o posix ;; #(
36101776Stjr  *) :
37101776Stjr     ;;
38227753Stheravenesac
39101776Stjrfi
40101776Stjr
41101776Stjr
42101776Stjras_nl='
43129705Stjr'
44129705Stjrexport as_nl
45101776Stjr# Printing a long string crashes Solaris 7 /usr/bin/printf.
46101776Stjras_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47104080Stjras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48101776Stjras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49101776Stjr# Prefer a ksh shell builtin over an external printf program on Solaris,
50101776Stjr# but without wasting forks for bash or zsh.
51101776Stjrif test -z "$BASH_VERSION$ZSH_VERSION" \
52101776Stjr    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53101776Stjr  as_echo='print -r --'
54101776Stjr  as_echo_n='print -rn --'
55227753Stheravenelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56227753Stheraven  as_echo='printf %s\n'
57227753Stheraven  as_echo_n='printf %s'
58227753Stheravenelse
59227753Stheraven  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60227753Stheraven    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_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
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655HOTSPOT_MAKE_ARGS
656LIBZIP_CAN_USE_MMAP
657LIBDL
658LIBM
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBZ
663USE_EXTERNAL_LIBPNG
664PNG_LIBS
665PNG_CFLAGS
666USE_EXTERNAL_LIBGIF
667USE_EXTERNAL_LIBJPEG
668LLVM_LIBS
669LLVM_LDFLAGS
670LLVM_CFLAGS
671LLVM_CONFIG
672LIBFFI_LIBS
673LIBFFI_CFLAGS
674ALSA_LIBS
675ALSA_CFLAGS
676FREETYPE_BUNDLE_LIB_PATH
677FREETYPE_LIBS
678FREETYPE_CFLAGS
679CUPS_CFLAGS
680X_EXTRA_LIBS
681X_LIBS
682X_PRE_LIBS
683X_CFLAGS
684XMKMF
685MSVCP_DLL
686MSVCR_DLL
687LIBCXX
688STATIC_CXX_SETTING
689FIXPATH_DETACH_FLAG
690FIXPATH
691GCOV_ENABLED
692STRIP_POLICY
693DEBUG_BINARIES
694ZIP_EXTERNAL_DEBUG_SYMBOLS
695COPY_DEBUG_SYMBOLS
696COMPILE_WITH_DEBUG_SYMBOLS
697CFLAGS_WARNINGS_ARE_ERRORS
698BUILD_CC_DISABLE_WARNING_PREFIX
699DISABLE_WARNING_PREFIX
700HOTSPOT_SET_WARNINGS_AS_ERRORS
701WARNINGS_AS_ERRORS
702COMPILER_SUPPORTS_TARGET_BITS_FLAG
703ZERO_ARCHFLAG
704LDFLAGS_TESTEXE
705LDFLAGS_TESTLIB
706LDFLAGS_HASH_STYLE
707LDFLAGS_CXX_JDK
708JDKEXE_LIBS
709JDKLIB_LIBS
710OPENJDK_BUILD_LDFLAGS_JDKEXE
711OPENJDK_BUILD_LDFLAGS_JDKLIB
712LDFLAGS_JDKEXE
713LDFLAGS_JDKLIB
714CXXFLAGS_TESTEXE
715CXXFLAGS_TESTLIB
716CFLAGS_TESTEXE
717CFLAGS_TESTLIB
718OPENJDK_BUILD_CXXFLAGS_JDKEXE
719OPENJDK_BUILD_CXXFLAGS_JDKLIB
720OPENJDK_BUILD_CFLAGS_JDKEXE
721OPENJDK_BUILD_CFLAGS_JDKLIB
722CXXFLAGS_JDKEXE
723CXXFLAGS_JDKLIB
724CFLAGS_JDKEXE
725CFLAGS_JDKLIB
726MACOSX_VERSION_MIN
727NO_LIFETIME_DSE_CFLAG
728NO_NULL_POINTER_CHECK_CFLAG
729CXXSTD_CXXFLAG
730CXX_O_FLAG_NONE
731CXX_O_FLAG_DEBUG
732CXX_O_FLAG_NORM
733CXX_O_FLAG_HI
734CXX_O_FLAG_HIGHEST
735C_O_FLAG_NONE
736C_O_FLAG_DEBUG
737C_O_FLAG_NORM
738C_O_FLAG_HI
739C_O_FLAG_HIGHEST
740CXXFLAGS_DEBUG_SYMBOLS
741CFLAGS_DEBUG_SYMBOLS
742CXX_FLAG_DEPS
743C_FLAG_DEPS
744SHARED_LIBRARY_FLAGS
745SET_SHARED_LIBRARY_MAPFILE
746SET_SHARED_LIBRARY_NAME
747SET_SHARED_LIBRARY_ORIGIN
748SET_EXECUTABLE_ORIGIN
749CXX_FLAG_REORDER
750C_FLAG_REORDER
751RC_FLAGS
752AR_OUT_OPTION
753LD_OUT_OPTION
754EXE_OUT_OPTION
755CC_OUT_OPTION
756STRIPFLAGS
757ARFLAGS
758COMPILER_BINDCMD_FILE_FLAG
759COMPILER_COMMAND_FILE_FLAG
760COMPILER_TARGET_BITS_FLAG
761JT_HOME
762JTREGEXE
763USING_BROKEN_SUSE_LD
764PACKAGE_PATH
765USE_CLANG
766HOTSPOT_LD
767HOTSPOT_CXX
768HOTSPOT_RC
769HOTSPOT_MT
770BUILD_AS
771BUILD_LDCXX
772BUILD_LD
773BUILD_STRIP
774BUILD_OBJCOPY
775BUILD_AR
776BUILD_NM
777BUILD_CXX
778BUILD_CC
779BUILD_SYSROOT_LDFLAGS
780BUILD_SYSROOT_CFLAGS
781ac_ct_OBJDUMP
782OBJDUMP
783ac_ct_OBJCOPY
784OBJCOPY
785ac_ct_NM
786ac_ct_STRIP
787GNM
788NM
789STRIP
790MSBUILD
791DUMPBIN
792RC
793MT
794LIPO
795ac_ct_AR
796AR
797AS
798LDCXX
799LD
800CXXCPP
801CPP
802CXX_VERSION_NUMBER
803CC_VERSION_NUMBER
804ac_ct_CXX
805CXXFLAGS
806CXX
807TOOLCHAIN_PATH_CXX
808POTENTIAL_CXX
809OBJEXT
810EXEEXT
811ac_ct_CC
812CPPFLAGS
813LDFLAGS
814CFLAGS
815CC
816TOOLCHAIN_PATH_CC
817POTENTIAL_CC
818TOOLCHAIN_VERSION
819VS_LIB
820VS_INCLUDE
821VS_PATH
822CYGWIN_LINK
823SYSROOT_LDFLAGS
824SYSROOT_CFLAGS
825LEGACY_EXTRA_LDFLAGS
826LEGACY_EXTRA_CXXFLAGS
827LEGACY_EXTRA_CFLAGS
828EXE_SUFFIX
829OBJ_SUFFIX
830STATIC_LIBRARY
831SHARED_LIBRARY
832STATIC_LIBRARY_SUFFIX
833SHARED_LIBRARY_SUFFIX
834LIBRARY_PREFIX
835TOOLCHAIN_TYPE
836STATIC_BUILD
837IMPORT_MODULES_MAKE
838IMPORT_MODULES_SRC
839IMPORT_MODULES_CONF
840IMPORT_MODULES_LIBS
841IMPORT_MODULES_CMDS
842IMPORT_MODULES_CLASSES
843BUILD_HOTSPOT
844HOTSPOT_DIST
845BUILD_OUTPUT
846JDK_TOPDIR
847NASHORN_TOPDIR
848HOTSPOT_TOPDIR
849JAXWS_TOPDIR
850JAXP_TOPDIR
851CORBA_TOPDIR
852LANGTOOLS_TOPDIR
853BUILD_JDK
854CREATE_BUILDJDK
855BOOT_JDK_BITS
856JAVAC_FLAGS
857BOOT_JDK_MODULAR
858BOOT_JDK_SOURCETARGET
859JARSIGNER
860JAR
861JAVAH
862JAVAC
863JAVA
864BOOT_JDK
865JAVA_CHECK
866JAVAC_CHECK
867VERSION_IS_GA
868VERSION_SHORT
869VERSION_STRING
870VERSION_NUMBER_FOUR_POSITIONS
871VERSION_NUMBER
872VERSION_OPT
873VERSION_BUILD
874VERSION_PRE
875VERSION_PATCH
876VERSION_SECURITY
877VERSION_MINOR
878VERSION_MAJOR
879MACOSX_BUNDLE_ID_BASE
880MACOSX_BUNDLE_NAME_BASE
881COMPANY_NAME
882JDK_RC_PLATFORM_NAME
883PRODUCT_SUFFIX
884PRODUCT_NAME
885LAUNCHER_NAME
886TEST_IN_BUILD
887JLINK_KEEP_PACKAGED_MODULES
888COPYRIGHT_YEAR
889COMPRESS_JARS
890INCLUDE_SA
891UNLIMITED_CRYPTO
892CACERTS_FILE
893BUILD_HEADLESS
894SUPPORT_HEADFUL
895SUPPORT_HEADLESS
896DEFAULT_MAKE_TARGET
897OS_VERSION_MICRO
898OS_VERSION_MINOR
899OS_VERSION_MAJOR
900PKG_CONFIG
901BASH_ARGS
902SETFILE
903CODESIGN
904XATTR
905DSYMUTIL
906IS_GNU_TIME
907PATCH
908TIME
909STAT
910HG
911READELF
912OTOOL
913LDD
914ZIP
915UNZIP
916FIND_DELETE
917OUTPUT_SYNC
918OUTPUT_SYNC_SUPPORTED
919CHECK_TOOLSDIR_MAKE
920CHECK_TOOLSDIR_GMAKE
921CHECK_MAKE
922CHECK_GMAKE
923MAKE
924PKGHANDLER
925CONFIGURESUPPORT_OUTPUTDIR
926OUTPUT_ROOT
927CONF_NAME
928SPEC
929SDKROOT
930XCODEBUILD
931BUILD_VARIANT_RELEASE
932DEBUG_CLASSFILES
933FASTDEBUG
934VARIANT
935DEBUG_LEVEL
936MACOSX_UNIVERSAL
937JVM_VARIANT_CORE
938JVM_VARIANT_ZEROSHARK
939JVM_VARIANT_ZERO
940JVM_VARIANT_MINIMAL1
941JVM_VARIANT_CLIENT
942JVM_VARIANT_SERVER
943JVM_VARIANTS
944JVM_INTERPRETER
945JDK_VARIANT
946SET_OPENJDK
947USERNAME
948CANONICAL_TOPDIR
949ORIGINAL_TOPDIR
950TOPDIR
951PATH_SEP
952ZERO_ARCHDEF
953DEFINE_CROSS_COMPILE_ARCH
954LP64
955OPENJDK_TARGET_OS_EXPORT_DIR
956OPENJDK_BUILD_CPU_JLI_CFLAGS
957OPENJDK_TARGET_CPU_JLI_CFLAGS
958OPENJDK_TARGET_CPU_OSARCH
959OPENJDK_TARGET_CPU_ISADIR
960OPENJDK_BUILD_CPU_LIBDIR
961OPENJDK_BUILD_CPU_LEGACY_LIB
962OPENJDK_BUILD_CPU_LEGACY
963OPENJDK_TARGET_CPU_LIBDIR
964OPENJDK_TARGET_CPU_LEGACY_LIB
965OPENJDK_TARGET_CPU_LEGACY
966REQUIRED_OS_VERSION
967REQUIRED_OS_NAME
968COMPILE_TYPE
969OPENJDK_TARGET_CPU_ENDIAN
970OPENJDK_TARGET_CPU_BITS
971OPENJDK_TARGET_CPU_ARCH
972OPENJDK_TARGET_CPU
973OPENJDK_TARGET_OS_ENV
974OPENJDK_TARGET_OS_TYPE
975OPENJDK_TARGET_OS
976OPENJDK_BUILD_CPU_ENDIAN
977OPENJDK_BUILD_CPU_BITS
978OPENJDK_BUILD_CPU_ARCH
979OPENJDK_BUILD_CPU
980OPENJDK_BUILD_OS_ENV
981OPENJDK_BUILD_OS_TYPE
982OPENJDK_BUILD_OS
983OPENJDK_BUILD_AUTOCONF_NAME
984OPENJDK_TARGET_AUTOCONF_NAME
985target_os
986target_vendor
987target_cpu
988target
989host_os
990host_vendor
991host_cpu
992host
993build_os
994build_vendor
995build_cpu
996build
997NICE
998CPIO
999DF
1000READLINK
1001CYGPATH
1002SED
1003FGREP
1004EGREP
1005GREP
1006AWK
1007XARGS
1008WHICH
1009WC
1010UNIQ
1011UNAME
1012TR
1013TOUCH
1014TEE
1015TAR
1016TAIL
1017SORT
1018SH
1019RMDIR
1020RM
1021PRINTF
1022NAWK
1023MV
1024MKTEMP
1025MKDIR
1026LS
1027LN
1028HEAD
1029FIND
1030FILE
1031EXPR
1032ECHO
1033DIRNAME
1034DIFF
1035DATE
1036CUT
1037CP
1038COMM
1039CMP
1040CHMOD
1041CAT
1042BASH
1043BASENAME
1044DATE_WHEN_CONFIGURED
1045ORIGINAL_PATH
1046CONFIGURE_COMMAND_LINE
1047target_alias
1048host_alias
1049build_alias
1050LIBS
1051ECHO_T
1052ECHO_N
1053ECHO_C
1054DEFS
1055mandir
1056localedir
1057libdir
1058psdir
1059pdfdir
1060dvidir
1061htmldir
1062infodir
1063docdir
1064oldincludedir
1065includedir
1066localstatedir
1067sharedstatedir
1068sysconfdir
1069datadir
1070datarootdir
1071libexecdir
1072sbindir
1073bindir
1074program_transform_name
1075prefix
1076exec_prefix
1077PACKAGE_URL
1078PACKAGE_BUGREPORT
1079PACKAGE_STRING
1080PACKAGE_VERSION
1081PACKAGE_TARNAME
1082PACKAGE_NAME
1083PATH_SEPARATOR
1084SHELL'
1085ac_subst_files=''
1086ac_user_opts='
1087enable_option_checking
1088with_target_bits
1089enable_openjdk_only
1090with_custom_make_dir
1091with_jdk_variant
1092with_jvm_interpreter
1093with_jvm_variants
1094enable_debug
1095with_debug_level
1096with_devkit
1097with_sys_root
1098with_sysroot
1099with_tools_dir
1100with_toolchain_path
1101with_extra_path
1102with_sdk_name
1103with_conf_name
1104with_output_sync
1105with_default_make_target
1106enable_headful
1107with_cacerts_file
1108enable_unlimited_crypto
1109with_copyright_year
1110enable_keep_packaged_modules
1111enable_hotspot_test_in_build
1112with_milestone
1113with_update_version
1114with_user_release_suffix
1115with_build_number
1116with_version_string
1117with_version_pre
1118with_version_opt
1119with_version_build
1120with_version_major
1121with_version_minor
1122with_version_security
1123with_version_patch
1124with_boot_jdk
1125with_build_jdk
1126with_add_source_root
1127with_override_source_root
1128with_adds_and_overrides
1129with_override_langtools
1130with_override_corba
1131with_override_jaxp
1132with_override_jaxws
1133with_override_hotspot
1134with_override_nashorn
1135with_override_jdk
1136with_import_hotspot
1137with_import_modules
1138enable_static_build
1139with_toolchain_type
1140with_extra_cflags
1141with_extra_cxxflags
1142with_extra_ldflags
1143with_toolchain_version
1144with_build_devkit
1145with_jtreg
1146enable_warnings_as_errors
1147with_native_debug_symbols
1148enable_debug_symbols
1149enable_zip_debug_info
1150enable_native_coverage
1151with_stdc__lib
1152with_msvcr_dll
1153with_msvcp_dll
1154with_x
1155with_cups
1156with_cups_include
1157with_freetype
1158with_freetype_include
1159with_freetype_lib
1160with_freetype_src
1161enable_freetype_bundling
1162with_alsa
1163with_alsa_include
1164with_alsa_lib
1165with_libffi
1166with_libffi_include
1167with_libffi_lib
1168with_libjpeg
1169with_giflib
1170with_libpng
1171with_zlib
1172with_lcms
1173with_dxsdk
1174with_dxsdk_lib
1175with_dxsdk_include
1176enable_jtreg_failure_handler
1177with_num_cores
1178with_memory_size
1179with_jobs
1180with_test_jobs
1181with_boot_jdk_jvmargs
1182with_sjavac_server_java
1183enable_sjavac
1184enable_javac_server
1185enable_icecc
1186enable_precompiled_headers
1187enable_ccache
1188with_ccache_dir
1189'
1190      ac_precious_vars='build_alias
1191host_alias
1192target_alias
1193BASENAME
1194BASH
1195CAT
1196CHMOD
1197CMP
1198COMM
1199CP
1200CUT
1201DATE
1202DIFF
1203DIRNAME
1204ECHO
1205EXPR
1206FILE
1207FIND
1208HEAD
1209LN
1210LS
1211MKDIR
1212MKTEMP
1213MV
1214NAWK
1215PRINTF
1216RM
1217RMDIR
1218SH
1219SORT
1220TAIL
1221TAR
1222TEE
1223TOUCH
1224TR
1225UNAME
1226UNIQ
1227WC
1228WHICH
1229XARGS
1230AWK
1231GREP
1232EGREP
1233FGREP
1234SED
1235CYGPATH
1236READLINK
1237DF
1238CPIO
1239NICE
1240MAKE
1241UNZIP
1242ZIP
1243LDD
1244OTOOL
1245READELF
1246HG
1247STAT
1248TIME
1249PATCH
1250DSYMUTIL
1251XATTR
1252CODESIGN
1253SETFILE
1254PKG_CONFIG
1255JAVA
1256JAVAC
1257JAVAH
1258JAR
1259JARSIGNER
1260CC
1261CFLAGS
1262LDFLAGS
1263LIBS
1264CPPFLAGS
1265CXX
1266CXXFLAGS
1267CCC
1268CPP
1269CXXCPP
1270AS
1271AR
1272LIPO
1273STRIP
1274NM
1275GNM
1276OBJCOPY
1277OBJDUMP
1278BUILD_CC
1279BUILD_CXX
1280BUILD_NM
1281BUILD_AR
1282BUILD_OBJCOPY
1283BUILD_STRIP
1284JTREGEXE
1285XMKMF
1286FREETYPE_CFLAGS
1287FREETYPE_LIBS
1288ALSA_CFLAGS
1289ALSA_LIBS
1290LIBFFI_CFLAGS
1291LIBFFI_LIBS
1292PNG_CFLAGS
1293PNG_LIBS
1294LCMS_CFLAGS
1295LCMS_LIBS
1296ICECC_CMD
1297ICECC_CREATE_ENV
1298ICECC_WRAPPER
1299CCACHE'
1300
1301
1302# Initialize some variables set by options.
1303ac_init_help=
1304ac_init_version=false
1305ac_unrecognized_opts=
1306ac_unrecognized_sep=
1307# The variables have the same names as the options, with
1308# dashes changed to underlines.
1309cache_file=/dev/null
1310exec_prefix=NONE
1311no_create=
1312no_recursion=
1313prefix=NONE
1314program_prefix=NONE
1315program_suffix=NONE
1316program_transform_name=s,x,x,
1317silent=
1318site=
1319srcdir=
1320verbose=
1321x_includes=NONE
1322x_libraries=NONE
1323
1324# Installation directory options.
1325# These are left unexpanded so users can "make install exec_prefix=/foo"
1326# and all the variables that are supposed to be based on exec_prefix
1327# by default will actually change.
1328# Use braces instead of parens because sh, perl, etc. also accept them.
1329# (The list follows the same order as the GNU Coding Standards.)
1330bindir='${exec_prefix}/bin'
1331sbindir='${exec_prefix}/sbin'
1332libexecdir='${exec_prefix}/libexec'
1333datarootdir='${prefix}/share'
1334datadir='${datarootdir}'
1335sysconfdir='${prefix}/etc'
1336sharedstatedir='${prefix}/com'
1337localstatedir='${prefix}/var'
1338includedir='${prefix}/include'
1339oldincludedir='/usr/include'
1340docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1341infodir='${datarootdir}/info'
1342htmldir='${docdir}'
1343dvidir='${docdir}'
1344pdfdir='${docdir}'
1345psdir='${docdir}'
1346libdir='${exec_prefix}/lib'
1347localedir='${datarootdir}/locale'
1348mandir='${datarootdir}/man'
1349
1350ac_prev=
1351ac_dashdash=
1352for ac_option
1353do
1354  # If the previous option needs an argument, assign it.
1355  if test -n "$ac_prev"; then
1356    eval $ac_prev=\$ac_option
1357    ac_prev=
1358    continue
1359  fi
1360
1361  case $ac_option in
1362  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1363  *=)   ac_optarg= ;;
1364  *)    ac_optarg=yes ;;
1365  esac
1366
1367  # Accept the important Cygnus configure options, so we can diagnose typos.
1368
1369  case $ac_dashdash$ac_option in
1370  --)
1371    ac_dashdash=yes ;;
1372
1373  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1374    ac_prev=bindir ;;
1375  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1376    bindir=$ac_optarg ;;
1377
1378  -build | --build | --buil | --bui | --bu)
1379    ac_prev=build_alias ;;
1380  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1381    build_alias=$ac_optarg ;;
1382
1383  -cache-file | --cache-file | --cache-fil | --cache-fi \
1384  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1385    ac_prev=cache_file ;;
1386  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1387  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1388    cache_file=$ac_optarg ;;
1389
1390  --config-cache | -C)
1391    cache_file=config.cache ;;
1392
1393  -datadir | --datadir | --datadi | --datad)
1394    ac_prev=datadir ;;
1395  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1396    datadir=$ac_optarg ;;
1397
1398  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1399  | --dataroo | --dataro | --datar)
1400    ac_prev=datarootdir ;;
1401  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1402  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1403    datarootdir=$ac_optarg ;;
1404
1405  -disable-* | --disable-*)
1406    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1407    # Reject names that are not valid shell variable names.
1408    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1409      as_fn_error $? "invalid feature name: $ac_useropt"
1410    ac_useropt_orig=$ac_useropt
1411    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1412    case $ac_user_opts in
1413      *"
1414"enable_$ac_useropt"
1415"*) ;;
1416      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1417	 ac_unrecognized_sep=', ';;
1418    esac
1419    eval enable_$ac_useropt=no ;;
1420
1421  -docdir | --docdir | --docdi | --doc | --do)
1422    ac_prev=docdir ;;
1423  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1424    docdir=$ac_optarg ;;
1425
1426  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1427    ac_prev=dvidir ;;
1428  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1429    dvidir=$ac_optarg ;;
1430
1431  -enable-* | --enable-*)
1432    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1433    # Reject names that are not valid shell variable names.
1434    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1435      as_fn_error $? "invalid feature name: $ac_useropt"
1436    ac_useropt_orig=$ac_useropt
1437    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1438    case $ac_user_opts in
1439      *"
1440"enable_$ac_useropt"
1441"*) ;;
1442      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1443	 ac_unrecognized_sep=', ';;
1444    esac
1445    eval enable_$ac_useropt=\$ac_optarg ;;
1446
1447  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1448  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1449  | --exec | --exe | --ex)
1450    ac_prev=exec_prefix ;;
1451  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1452  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1453  | --exec=* | --exe=* | --ex=*)
1454    exec_prefix=$ac_optarg ;;
1455
1456  -gas | --gas | --ga | --g)
1457    # Obsolete; use --with-gas.
1458    with_gas=yes ;;
1459
1460  -help | --help | --hel | --he | -h)
1461    ac_init_help=long ;;
1462  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1463    ac_init_help=recursive ;;
1464  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1465    ac_init_help=short ;;
1466
1467  -host | --host | --hos | --ho)
1468    ac_prev=host_alias ;;
1469  -host=* | --host=* | --hos=* | --ho=*)
1470    host_alias=$ac_optarg ;;
1471
1472  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1473    ac_prev=htmldir ;;
1474  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1475  | --ht=*)
1476    htmldir=$ac_optarg ;;
1477
1478  -includedir | --includedir | --includedi | --included | --include \
1479  | --includ | --inclu | --incl | --inc)
1480    ac_prev=includedir ;;
1481  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1482  | --includ=* | --inclu=* | --incl=* | --inc=*)
1483    includedir=$ac_optarg ;;
1484
1485  -infodir | --infodir | --infodi | --infod | --info | --inf)
1486    ac_prev=infodir ;;
1487  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1488    infodir=$ac_optarg ;;
1489
1490  -libdir | --libdir | --libdi | --libd)
1491    ac_prev=libdir ;;
1492  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1493    libdir=$ac_optarg ;;
1494
1495  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1496  | --libexe | --libex | --libe)
1497    ac_prev=libexecdir ;;
1498  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1499  | --libexe=* | --libex=* | --libe=*)
1500    libexecdir=$ac_optarg ;;
1501
1502  -localedir | --localedir | --localedi | --localed | --locale)
1503    ac_prev=localedir ;;
1504  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1505    localedir=$ac_optarg ;;
1506
1507  -localstatedir | --localstatedir | --localstatedi | --localstated \
1508  | --localstate | --localstat | --localsta | --localst | --locals)
1509    ac_prev=localstatedir ;;
1510  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1511  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1512    localstatedir=$ac_optarg ;;
1513
1514  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1515    ac_prev=mandir ;;
1516  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1517    mandir=$ac_optarg ;;
1518
1519  -nfp | --nfp | --nf)
1520    # Obsolete; use --without-fp.
1521    with_fp=no ;;
1522
1523  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1524  | --no-cr | --no-c | -n)
1525    no_create=yes ;;
1526
1527  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1528  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1529    no_recursion=yes ;;
1530
1531  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1532  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1533  | --oldin | --oldi | --old | --ol | --o)
1534    ac_prev=oldincludedir ;;
1535  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1536  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1537  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1538    oldincludedir=$ac_optarg ;;
1539
1540  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1541    ac_prev=prefix ;;
1542  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1543    prefix=$ac_optarg ;;
1544
1545  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1546  | --program-pre | --program-pr | --program-p)
1547    ac_prev=program_prefix ;;
1548  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1549  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1550    program_prefix=$ac_optarg ;;
1551
1552  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1553  | --program-suf | --program-su | --program-s)
1554    ac_prev=program_suffix ;;
1555  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1556  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1557    program_suffix=$ac_optarg ;;
1558
1559  -program-transform-name | --program-transform-name \
1560  | --program-transform-nam | --program-transform-na \
1561  | --program-transform-n | --program-transform- \
1562  | --program-transform | --program-transfor \
1563  | --program-transfo | --program-transf \
1564  | --program-trans | --program-tran \
1565  | --progr-tra | --program-tr | --program-t)
1566    ac_prev=program_transform_name ;;
1567  -program-transform-name=* | --program-transform-name=* \
1568  | --program-transform-nam=* | --program-transform-na=* \
1569  | --program-transform-n=* | --program-transform-=* \
1570  | --program-transform=* | --program-transfor=* \
1571  | --program-transfo=* | --program-transf=* \
1572  | --program-trans=* | --program-tran=* \
1573  | --progr-tra=* | --program-tr=* | --program-t=*)
1574    program_transform_name=$ac_optarg ;;
1575
1576  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1577    ac_prev=pdfdir ;;
1578  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1579    pdfdir=$ac_optarg ;;
1580
1581  -psdir | --psdir | --psdi | --psd | --ps)
1582    ac_prev=psdir ;;
1583  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1584    psdir=$ac_optarg ;;
1585
1586  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1587  | -silent | --silent | --silen | --sile | --sil)
1588    silent=yes ;;
1589
1590  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1591    ac_prev=sbindir ;;
1592  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1593  | --sbi=* | --sb=*)
1594    sbindir=$ac_optarg ;;
1595
1596  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1597  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1598  | --sharedst | --shareds | --shared | --share | --shar \
1599  | --sha | --sh)
1600    ac_prev=sharedstatedir ;;
1601  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1602  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1603  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1604  | --sha=* | --sh=*)
1605    sharedstatedir=$ac_optarg ;;
1606
1607  -site | --site | --sit)
1608    ac_prev=site ;;
1609  -site=* | --site=* | --sit=*)
1610    site=$ac_optarg ;;
1611
1612  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1613    ac_prev=srcdir ;;
1614  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1615    srcdir=$ac_optarg ;;
1616
1617  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1618  | --syscon | --sysco | --sysc | --sys | --sy)
1619    ac_prev=sysconfdir ;;
1620  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1621  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1622    sysconfdir=$ac_optarg ;;
1623
1624  -target | --target | --targe | --targ | --tar | --ta | --t)
1625    ac_prev=target_alias ;;
1626  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1627    target_alias=$ac_optarg ;;
1628
1629  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1630    verbose=yes ;;
1631
1632  -version | --version | --versio | --versi | --vers | -V)
1633    ac_init_version=: ;;
1634
1635  -with-* | --with-*)
1636    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1637    # Reject names that are not valid shell variable names.
1638    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1639      as_fn_error $? "invalid package name: $ac_useropt"
1640    ac_useropt_orig=$ac_useropt
1641    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1642    case $ac_user_opts in
1643      *"
1644"with_$ac_useropt"
1645"*) ;;
1646      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1647	 ac_unrecognized_sep=', ';;
1648    esac
1649    eval with_$ac_useropt=\$ac_optarg ;;
1650
1651  -without-* | --without-*)
1652    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1653    # Reject names that are not valid shell variable names.
1654    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1655      as_fn_error $? "invalid package name: $ac_useropt"
1656    ac_useropt_orig=$ac_useropt
1657    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1658    case $ac_user_opts in
1659      *"
1660"with_$ac_useropt"
1661"*) ;;
1662      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1663	 ac_unrecognized_sep=', ';;
1664    esac
1665    eval with_$ac_useropt=no ;;
1666
1667  --x)
1668    # Obsolete; use --with-x.
1669    with_x=yes ;;
1670
1671  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1672  | --x-incl | --x-inc | --x-in | --x-i)
1673    ac_prev=x_includes ;;
1674  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1675  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1676    x_includes=$ac_optarg ;;
1677
1678  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1679  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1680    ac_prev=x_libraries ;;
1681  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1682  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1683    x_libraries=$ac_optarg ;;
1684
1685  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1686Try \`$0 --help' for more information"
1687    ;;
1688
1689  *=*)
1690    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1691    # Reject names that are not valid shell variable names.
1692    case $ac_envvar in #(
1693      '' | [0-9]* | *[!_$as_cr_alnum]* )
1694      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1695    esac
1696    eval $ac_envvar=\$ac_optarg
1697    export $ac_envvar ;;
1698
1699  *)
1700    # FIXME: should be removed in autoconf 3.0.
1701    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1702    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1703      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1704    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1705    ;;
1706
1707  esac
1708done
1709
1710if test -n "$ac_prev"; then
1711  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1712  as_fn_error $? "missing argument to $ac_option"
1713fi
1714
1715if test -n "$ac_unrecognized_opts"; then
1716  case $enable_option_checking in
1717    no) ;;
1718    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1719    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1720  esac
1721fi
1722
1723# Check all directory arguments for consistency.
1724for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1725		datadir sysconfdir sharedstatedir localstatedir includedir \
1726		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1727		libdir localedir mandir
1728do
1729  eval ac_val=\$$ac_var
1730  # Remove trailing slashes.
1731  case $ac_val in
1732    */ )
1733      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1734      eval $ac_var=\$ac_val;;
1735  esac
1736  # Be sure to have absolute directory names.
1737  case $ac_val in
1738    [\\/$]* | ?:[\\/]* )  continue;;
1739    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1740  esac
1741  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1742done
1743
1744# There might be people who depend on the old broken behavior: `$host'
1745# used to hold the argument of --host etc.
1746# FIXME: To remove some day.
1747build=$build_alias
1748host=$host_alias
1749target=$target_alias
1750
1751# FIXME: To remove some day.
1752if test "x$host_alias" != x; then
1753  if test "x$build_alias" = x; then
1754    cross_compiling=maybe
1755  elif test "x$build_alias" != "x$host_alias"; then
1756    cross_compiling=yes
1757  fi
1758fi
1759
1760ac_tool_prefix=
1761test -n "$host_alias" && ac_tool_prefix=$host_alias-
1762
1763test "$silent" = yes && exec 6>/dev/null
1764
1765
1766ac_pwd=`pwd` && test -n "$ac_pwd" &&
1767ac_ls_di=`ls -di .` &&
1768ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1769  as_fn_error $? "working directory cannot be determined"
1770test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1771  as_fn_error $? "pwd does not report name of working directory"
1772
1773
1774# Find the source files, if location was not specified.
1775if test -z "$srcdir"; then
1776  ac_srcdir_defaulted=yes
1777  # Try the directory containing this script, then the parent directory.
1778  ac_confdir=`$as_dirname -- "$as_myself" ||
1779$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1780	 X"$as_myself" : 'X\(//\)[^/]' \| \
1781	 X"$as_myself" : 'X\(//\)$' \| \
1782	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1783$as_echo X"$as_myself" |
1784    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1785	    s//\1/
1786	    q
1787	  }
1788	  /^X\(\/\/\)[^/].*/{
1789	    s//\1/
1790	    q
1791	  }
1792	  /^X\(\/\/\)$/{
1793	    s//\1/
1794	    q
1795	  }
1796	  /^X\(\/\).*/{
1797	    s//\1/
1798	    q
1799	  }
1800	  s/.*/./; q'`
1801  srcdir=$ac_confdir
1802  if test ! -r "$srcdir/$ac_unique_file"; then
1803    srcdir=..
1804  fi
1805else
1806  ac_srcdir_defaulted=no
1807fi
1808if test ! -r "$srcdir/$ac_unique_file"; then
1809  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1810  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1811fi
1812ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1813ac_abs_confdir=`(
1814	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1815	pwd)`
1816# When building in place, set srcdir=.
1817if test "$ac_abs_confdir" = "$ac_pwd"; then
1818  srcdir=.
1819fi
1820# Remove unnecessary trailing slashes from srcdir.
1821# Double slashes in file names in object file debugging info
1822# mess up M-x gdb in Emacs.
1823case $srcdir in
1824*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1825esac
1826for ac_var in $ac_precious_vars; do
1827  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1828  eval ac_env_${ac_var}_value=\$${ac_var}
1829  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1830  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1831done
1832
1833#
1834# Report the --help message.
1835#
1836if test "$ac_init_help" = "long"; then
1837  # Omit some internal or obsolete options to make the list less imposing.
1838  # This message is too long to be a string in the A/UX 3.1 sh.
1839  cat <<_ACEOF
1840\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1841
1842Usage: $0 [OPTION]... [VAR=VALUE]...
1843
1844To assign environment variables (e.g., CC, CFLAGS...), specify them as
1845VAR=VALUE.  See below for descriptions of some of the useful variables.
1846
1847Defaults for the options are specified in brackets.
1848
1849Configuration:
1850  -h, --help              display this help and exit
1851      --help=short        display options specific to this package
1852      --help=recursive    display the short help of all the included packages
1853  -V, --version           display version information and exit
1854  -q, --quiet, --silent   do not print \`checking ...' messages
1855      --cache-file=FILE   cache test results in FILE [disabled]
1856  -C, --config-cache      alias for \`--cache-file=config.cache'
1857  -n, --no-create         do not create output files
1858      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1859
1860Installation directories:
1861  --prefix=PREFIX         install architecture-independent files in PREFIX
1862                          [$ac_default_prefix]
1863  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1864                          [PREFIX]
1865
1866By default, \`make install' will install all the files in
1867\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1868an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1869for instance \`--prefix=\$HOME'.
1870
1871For better control, use the options below.
1872
1873Fine tuning of the installation directories:
1874  --bindir=DIR            user executables [EPREFIX/bin]
1875  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1876  --libexecdir=DIR        program executables [EPREFIX/libexec]
1877  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1878  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1879  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1880  --libdir=DIR            object code libraries [EPREFIX/lib]
1881  --includedir=DIR        C header files [PREFIX/include]
1882  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1883  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1884  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1885  --infodir=DIR           info documentation [DATAROOTDIR/info]
1886  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1887  --mandir=DIR            man documentation [DATAROOTDIR/man]
1888  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1889  --htmldir=DIR           html documentation [DOCDIR]
1890  --dvidir=DIR            dvi documentation [DOCDIR]
1891  --pdfdir=DIR            pdf documentation [DOCDIR]
1892  --psdir=DIR             ps documentation [DOCDIR]
1893_ACEOF
1894
1895  cat <<\_ACEOF
1896
1897X features:
1898  --x-includes=DIR    X include files are in DIR
1899  --x-libraries=DIR   X library files are in DIR
1900
1901System types:
1902  --build=BUILD     configure for building on BUILD [guessed]
1903  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1904  --target=TARGET   configure for building compilers for TARGET [HOST]
1905_ACEOF
1906fi
1907
1908if test -n "$ac_init_help"; then
1909  case $ac_init_help in
1910     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1911   esac
1912  cat <<\_ACEOF
1913
1914Optional Features:
1915  --disable-option-checking  ignore unrecognized --enable/--with options
1916  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1917  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1918  --enable-openjdk-only   suppress building custom source even if present
1919                          [disabled]
1920  --enable-debug          set the debug level to fastdebug (shorthand for
1921                          --with-debug-level=fastdebug) [disabled]
1922  --disable-headful       disable building headful support (graphical UI
1923                          support) [enabled]
1924  --enable-unlimited-crypto
1925                          Enable unlimited crypto policy [disabled]
1926  --disable-keep-packaged-modules
1927                          Do not keep packaged modules in jdk image [enable]
1928  --enable-hotspot-test-in-build
1929                          run the Queens test after Hotspot build [disabled]
1930  --enable-static-build   enable static library build [disabled]
1931  --disable-warnings-as-errors
1932                          do not consider native warnings to be an error
1933                          [enabled]
1934  --enable-debug-symbols  Deprecated. Option is kept for backwards
1935                          compatibility and is ignored
1936  --enable-zip-debug-info Deprecated. Option is kept for backwards
1937                          compatibility and is ignored
1938  --enable-native-coverage
1939                          enable native compilation with code coverage
1940                          data[disabled]
1941  --disable-freetype-bundling
1942                          disable bundling of the freetype library with the
1943                          build result [enabled on Windows or when using
1944                          --with-freetype, disabled otherwise]
1945  --enable-jtreg-failure-handler
1946                          forces build of the jtreg failure handler to be
1947                          enabled, missing dependencies become fatal errors.
1948                          Default is auto, where the failure handler is built
1949                          if all dependencies are present and otherwise just
1950                          disabled.
1951  --enable-sjavac         use sjavac to do fast incremental compiles
1952                          [disabled]
1953  --disable-javac-server  disable javac server [enabled]
1954  --enable-icecc          enable distribted compilation of native code using
1955                          icecc/icecream [disabled]
1956  --disable-precompiled-headers
1957                          disable using precompiled headers when compiling C++
1958                          [enabled]
1959  --enable-ccache         enable using ccache to speed up recompilations
1960                          [disabled]
1961
1962Optional Packages:
1963  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1964  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1965  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1966                          support it), e.g. --with-target-bits=32 [guessed]
1967  --with-custom-make-dir  Deprecated. Option is kept for backwards
1968                          compatibility and is ignored
1969  --with-jdk-variant      JDK variant to build (normal) [normal]
1970  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1971  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1972                          client, minimal1, zero, zeroshark, core) [server]
1973  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1974                          optimized) [release]
1975  --with-devkit           use this devkit for compilers, tools and resources
1976  --with-sys-root         alias for --with-sysroot for backwards compatability
1977  --with-sysroot          use this directory as sysroot
1978  --with-tools-dir        alias for --with-toolchain-path for backwards
1979                          compatibility
1980  --with-toolchain-path   prepend these directories when searching for
1981                          toolchain binaries (compilers etc)
1982  --with-extra-path       prepend these directories to the default path
1983  --with-sdk-name         use the platform SDK of the given name. [macosx]
1984  --with-conf-name        use this as the name of the configuration [generated
1985                          from important configuration options]
1986  --with-output-sync      set make output sync type if supported by make.
1987                          [recurse]
1988  --with-default-make-target
1989                          set the default make target [exploded-image]
1990  --with-cacerts-file     specify alternative cacerts file
1991  --with-copyright-year   Set copyright year value for build [current year]
1992  --with-milestone        Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-update-version   Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-user-release-suffix
1997                          Deprecated. Option is kept for backwards
1998                          compatibility and is ignored
1999  --with-build-number     Deprecated. Option is kept for backwards
2000                          compatibility and is ignored
2001  --with-version-string   Set version string [calculated]
2002  --with-version-pre      Set the base part of the version 'PRE' field
2003                          (pre-release identifier) ['internal']
2004  --with-version-opt      Set version 'OPT' field (build metadata)
2005                          [<timestamp>.<user>.<dirname>]
2006  --with-version-build    Set version 'BUILD' field (build number) [not
2007                          specified]
2008  --with-version-major    Set version 'MAJOR' field (first number) [current
2009                          source value]
2010  --with-version-minor    Set version 'MINOR' field (second number) [current
2011                          source value]
2012  --with-version-security Set version 'SECURITY' field (third number) [current
2013                          source value]
2014  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2015                          specified]
2016  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2017  --with-build-jdk        path to JDK of same version as is being built[the
2018                          newly built JDK]
2019  --with-add-source-root  Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-override-source-root
2022                          Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-adds-and-overrides
2025                          Deprecated. Option is kept for backwards
2026                          compatibility and is ignored
2027  --with-override-langtools
2028                          Deprecated. Option is kept for backwards
2029                          compatibility and is ignored
2030  --with-override-corba   Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-override-jaxp    Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-override-jaxws   Deprecated. Option is kept for backwards
2035                          compatibility and is ignored
2036  --with-override-hotspot Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-override-nashorn Deprecated. Option is kept for backwards
2039                          compatibility and is ignored
2040  --with-override-jdk     Deprecated. Option is kept for backwards
2041                          compatibility and is ignored
2042  --with-import-hotspot   import hotspot binaries from this jdk image or
2043                          hotspot build dist dir instead of building from
2044                          source
2045  --with-import-modules   import a set of prebuilt modules either as a zip
2046                          file or an exploded directory
2047  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2048                          to show possible values [platform dependent]
2049  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2050  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2051  --with-extra-ldflags    extra flags to be used when linking jdk
2052  --with-toolchain-version
2053                          the version of the toolchain to look for, use
2054                          '--help' to show possible values [platform
2055                          dependent]
2056  --with-build-devkit     Devkit to use for the build platform toolchain
2057  --with-jtreg            Regression Test Harness [probed]
2058  --with-native-debug-symbols
2059                          set the native debug symbol configuration (none,
2060                          internal, external, zipped) [varying]
2061  --with-stdc++lib=<static>,<dynamic>,<default>
2062                          force linking of the C++ runtime on Linux to either
2063                          static or dynamic, default is static with dynamic as
2064                          fallback
2065  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2066                          (Windows only) [probed]
2067  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2068                          (Windows only) [probed]
2069  --with-x                use the X Window System
2070  --with-cups             specify prefix directory for the cups package
2071                          (expecting the headers under PATH/include)
2072  --with-cups-include     specify directory for the cups include files
2073  --with-freetype         specify prefix directory for the freetype package
2074                          (expecting the libraries under PATH/lib and the
2075                          headers under PATH/include)
2076  --with-freetype-include specify directory for the freetype include files
2077  --with-freetype-lib     specify directory for the freetype library
2078  --with-freetype-src     specify directory with freetype sources to
2079                          automatically build the library (experimental,
2080                          Windows-only)
2081  --with-alsa             specify prefix directory for the alsa package
2082                          (expecting the libraries under PATH/lib and the
2083                          headers under PATH/include)
2084  --with-alsa-include     specify directory for the alsa include files
2085  --with-alsa-lib         specify directory for the alsa library
2086  --with-libffi           specify prefix directory for the libffi package
2087                          (expecting the libraries under PATH/lib and the
2088                          headers under PATH/include)
2089  --with-libffi-include   specify directory for the libffi include files
2090  --with-libffi-lib       specify directory for the libffi library
2091  --with-libjpeg          use libjpeg from build system or OpenJDK source
2092                          (system, bundled) [bundled]
2093  --with-giflib           use giflib from build system or OpenJDK source
2094                          (system, bundled) [bundled]
2095  --with-libpng           use libpng from build system or OpenJDK source
2096                          (system, bundled) [bundled]
2097  --with-zlib             use zlib from build system or OpenJDK source
2098                          (system, bundled) [bundled]
2099  --with-lcms             use lcms2 from build system or OpenJDK source
2100                          (system, bundled) [bundled]
2101  --with-dxsdk            Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-dxsdk-include    Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-num-cores        number of cores in the build system, e.g.
2108                          --with-num-cores=8 [probed]
2109  --with-memory-size      memory (in MB) available in the build system, e.g.
2110                          --with-memory-size=1024 [probed]
2111  --with-jobs             number of parallel jobs to let make run [calculated
2112                          based on cores and memory]
2113  --with-test-jobs        number of parallel tests jobs to run [based on build
2114                          jobs]
2115  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2116                          invocations of boot JDK, overriding the default
2117                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2118                          -enableassertions"
2119  --with-sjavac-server-java
2120                          use this java binary for running the sjavac
2121                          background server [Boot JDK java]
2122  --with-ccache-dir       where to store ccache files [~/.ccache]
2123
2124Some influential environment variables:
2125  BASENAME    Override default value for BASENAME
2126  BASH        Override default value for BASH
2127  CAT         Override default value for CAT
2128  CHMOD       Override default value for CHMOD
2129  CMP         Override default value for CMP
2130  COMM        Override default value for COMM
2131  CP          Override default value for CP
2132  CUT         Override default value for CUT
2133  DATE        Override default value for DATE
2134  DIFF        Override default value for DIFF
2135  DIRNAME     Override default value for DIRNAME
2136  ECHO        Override default value for ECHO
2137  EXPR        Override default value for EXPR
2138  FILE        Override default value for FILE
2139  FIND        Override default value for FIND
2140  HEAD        Override default value for HEAD
2141  LN          Override default value for LN
2142  LS          Override default value for LS
2143  MKDIR       Override default value for MKDIR
2144  MKTEMP      Override default value for MKTEMP
2145  MV          Override default value for MV
2146  NAWK        Override default value for NAWK
2147  PRINTF      Override default value for PRINTF
2148  RM          Override default value for RM
2149  RMDIR       Override default value for RMDIR
2150  SH          Override default value for SH
2151  SORT        Override default value for SORT
2152  TAIL        Override default value for TAIL
2153  TAR         Override default value for TAR
2154  TEE         Override default value for TEE
2155  TOUCH       Override default value for TOUCH
2156  TR          Override default value for TR
2157  UNAME       Override default value for UNAME
2158  UNIQ        Override default value for UNIQ
2159  WC          Override default value for WC
2160  WHICH       Override default value for WHICH
2161  XARGS       Override default value for XARGS
2162  AWK         Override default value for AWK
2163  GREP        Override default value for GREP
2164  EGREP       Override default value for EGREP
2165  FGREP       Override default value for FGREP
2166  SED         Override default value for SED
2167  CYGPATH     Override default value for CYGPATH
2168  READLINK    Override default value for READLINK
2169  DF          Override default value for DF
2170  CPIO        Override default value for CPIO
2171  NICE        Override default value for NICE
2172  MAKE        Override default value for MAKE
2173  UNZIP       Override default value for UNZIP
2174  ZIP         Override default value for ZIP
2175  LDD         Override default value for LDD
2176  OTOOL       Override default value for OTOOL
2177  READELF     Override default value for READELF
2178  HG          Override default value for HG
2179  STAT        Override default value for STAT
2180  TIME        Override default value for TIME
2181  PATCH       Override default value for PATCH
2182  DSYMUTIL    Override default value for DSYMUTIL
2183  XATTR       Override default value for XATTR
2184  CODESIGN    Override default value for CODESIGN
2185  SETFILE     Override default value for SETFILE
2186  PKG_CONFIG  path to pkg-config utility
2187  JAVA        Override default value for JAVA
2188  JAVAC       Override default value for JAVAC
2189  JAVAH       Override default value for JAVAH
2190  JAR         Override default value for JAR
2191  JARSIGNER   Override default value for JARSIGNER
2192  CC          C compiler command
2193  CFLAGS      C compiler flags
2194  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2195              nonstandard directory <lib dir>
2196  LIBS        libraries to pass to the linker, e.g. -l<library>
2197  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2198              you have headers in a nonstandard directory <include dir>
2199  CXX         C++ compiler command
2200  CXXFLAGS    C++ compiler flags
2201  CPP         C preprocessor
2202  CXXCPP      C++ preprocessor
2203  AS          Override default value for AS
2204  AR          Override default value for AR
2205  LIPO        Override default value for LIPO
2206  STRIP       Override default value for STRIP
2207  NM          Override default value for NM
2208  GNM         Override default value for GNM
2209  OBJCOPY     Override default value for OBJCOPY
2210  OBJDUMP     Override default value for OBJDUMP
2211  BUILD_CC    Override default value for BUILD_CC
2212  BUILD_CXX   Override default value for BUILD_CXX
2213  BUILD_NM    Override default value for BUILD_NM
2214  BUILD_AR    Override default value for BUILD_AR
2215  BUILD_OBJCOPY
2216              Override default value for BUILD_OBJCOPY
2217  BUILD_STRIP Override default value for BUILD_STRIP
2218  JTREGEXE    Override default value for JTREGEXE
2219  XMKMF       Path to xmkmf, Makefile generator for X Window System
2220  FREETYPE_CFLAGS
2221              C compiler flags for FREETYPE, overriding pkg-config
2222  FREETYPE_LIBS
2223              linker flags for FREETYPE, overriding pkg-config
2224  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2225  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2226  LIBFFI_CFLAGS
2227              C compiler flags for LIBFFI, overriding pkg-config
2228  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2229  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2230  PNG_LIBS    linker flags for PNG, overriding pkg-config
2231  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2232  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2233  ICECC_CMD   Override default value for ICECC_CMD
2234  ICECC_CREATE_ENV
2235              Override default value for ICECC_CREATE_ENV
2236  ICECC_WRAPPER
2237              Override default value for ICECC_WRAPPER
2238  CCACHE      Override default value for CCACHE
2239
2240Use these variables to override the choices made by `configure' or to help
2241it to find libraries and programs with nonstandard names/locations.
2242
2243Report bugs to <build-dev@openjdk.java.net>.
2244OpenJDK home page: <http://openjdk.java.net>.
2245_ACEOF
2246ac_status=$?
2247fi
2248
2249if test "$ac_init_help" = "recursive"; then
2250  # If there are subdirs, report their specific --help.
2251  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2252    test -d "$ac_dir" ||
2253      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2254      continue
2255    ac_builddir=.
2256
2257case "$ac_dir" in
2258.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2259*)
2260  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2261  # A ".." for each directory in $ac_dir_suffix.
2262  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2263  case $ac_top_builddir_sub in
2264  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2265  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2266  esac ;;
2267esac
2268ac_abs_top_builddir=$ac_pwd
2269ac_abs_builddir=$ac_pwd$ac_dir_suffix
2270# for backward compatibility:
2271ac_top_builddir=$ac_top_build_prefix
2272
2273case $srcdir in
2274  .)  # We are building in place.
2275    ac_srcdir=.
2276    ac_top_srcdir=$ac_top_builddir_sub
2277    ac_abs_top_srcdir=$ac_pwd ;;
2278  [\\/]* | ?:[\\/]* )  # Absolute name.
2279    ac_srcdir=$srcdir$ac_dir_suffix;
2280    ac_top_srcdir=$srcdir
2281    ac_abs_top_srcdir=$srcdir ;;
2282  *) # Relative name.
2283    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2284    ac_top_srcdir=$ac_top_build_prefix$srcdir
2285    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2286esac
2287ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2288
2289    cd "$ac_dir" || { ac_status=$?; continue; }
2290    # Check for guested configure.
2291    if test -f "$ac_srcdir/configure.gnu"; then
2292      echo &&
2293      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2294    elif test -f "$ac_srcdir/configure"; then
2295      echo &&
2296      $SHELL "$ac_srcdir/configure" --help=recursive
2297    else
2298      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2299    fi || ac_status=$?
2300    cd "$ac_pwd" || { ac_status=$?; break; }
2301  done
2302fi
2303
2304test -n "$ac_init_help" && exit $ac_status
2305if $ac_init_version; then
2306  cat <<\_ACEOF
2307OpenJDK configure jdk9
2308generated by GNU Autoconf 2.69
2309
2310Copyright (C) 2012 Free Software Foundation, Inc.
2311This configure script is free software; the Free Software Foundation
2312gives unlimited permission to copy, distribute and modify it.
2313_ACEOF
2314  exit
2315fi
2316
2317## ------------------------ ##
2318## Autoconf initialization. ##
2319## ------------------------ ##
2320
2321# ac_fn_c_try_compile LINENO
2322# --------------------------
2323# Try to compile conftest.$ac_ext, and return whether this succeeded.
2324ac_fn_c_try_compile ()
2325{
2326  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327  rm -f conftest.$ac_objext
2328  if { { ac_try="$ac_compile"
2329case "(($ac_try" in
2330  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2331  *) ac_try_echo=$ac_try;;
2332esac
2333eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2334$as_echo "$ac_try_echo"; } >&5
2335  (eval "$ac_compile") 2>conftest.err
2336  ac_status=$?
2337  if test -s conftest.err; then
2338    grep -v '^ *+' conftest.err >conftest.er1
2339    cat conftest.er1 >&5
2340    mv -f conftest.er1 conftest.err
2341  fi
2342  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2343  test $ac_status = 0; } && {
2344	 test -z "$ac_c_werror_flag" ||
2345	 test ! -s conftest.err
2346       } && test -s conftest.$ac_objext; then :
2347  ac_retval=0
2348else
2349  $as_echo "$as_me: failed program was:" >&5
2350sed 's/^/| /' conftest.$ac_ext >&5
2351
2352	ac_retval=1
2353fi
2354  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2355  as_fn_set_status $ac_retval
2356
2357} # ac_fn_c_try_compile
2358
2359# ac_fn_cxx_try_compile LINENO
2360# ----------------------------
2361# Try to compile conftest.$ac_ext, and return whether this succeeded.
2362ac_fn_cxx_try_compile ()
2363{
2364  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365  rm -f conftest.$ac_objext
2366  if { { ac_try="$ac_compile"
2367case "(($ac_try" in
2368  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2369  *) ac_try_echo=$ac_try;;
2370esac
2371eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2372$as_echo "$ac_try_echo"; } >&5
2373  (eval "$ac_compile") 2>conftest.err
2374  ac_status=$?
2375  if test -s conftest.err; then
2376    grep -v '^ *+' conftest.err >conftest.er1
2377    cat conftest.er1 >&5
2378    mv -f conftest.er1 conftest.err
2379  fi
2380  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2381  test $ac_status = 0; } && {
2382	 test -z "$ac_cxx_werror_flag" ||
2383	 test ! -s conftest.err
2384       } && test -s conftest.$ac_objext; then :
2385  ac_retval=0
2386else
2387  $as_echo "$as_me: failed program was:" >&5
2388sed 's/^/| /' conftest.$ac_ext >&5
2389
2390	ac_retval=1
2391fi
2392  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2393  as_fn_set_status $ac_retval
2394
2395} # ac_fn_cxx_try_compile
2396
2397# ac_fn_c_try_cpp LINENO
2398# ----------------------
2399# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2400ac_fn_c_try_cpp ()
2401{
2402  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403  if { { ac_try="$ac_cpp conftest.$ac_ext"
2404case "(($ac_try" in
2405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2406  *) ac_try_echo=$ac_try;;
2407esac
2408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2409$as_echo "$ac_try_echo"; } >&5
2410  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2411  ac_status=$?
2412  if test -s conftest.err; then
2413    grep -v '^ *+' conftest.err >conftest.er1
2414    cat conftest.er1 >&5
2415    mv -f conftest.er1 conftest.err
2416  fi
2417  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2418  test $ac_status = 0; } > conftest.i && {
2419	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2420	 test ! -s conftest.err
2421       }; then :
2422  ac_retval=0
2423else
2424  $as_echo "$as_me: failed program was:" >&5
2425sed 's/^/| /' conftest.$ac_ext >&5
2426
2427    ac_retval=1
2428fi
2429  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2430  as_fn_set_status $ac_retval
2431
2432} # ac_fn_c_try_cpp
2433
2434# ac_fn_cxx_try_cpp LINENO
2435# ------------------------
2436# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2437ac_fn_cxx_try_cpp ()
2438{
2439  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2440  if { { ac_try="$ac_cpp conftest.$ac_ext"
2441case "(($ac_try" in
2442  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2443  *) ac_try_echo=$ac_try;;
2444esac
2445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2446$as_echo "$ac_try_echo"; } >&5
2447  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2448  ac_status=$?
2449  if test -s conftest.err; then
2450    grep -v '^ *+' conftest.err >conftest.er1
2451    cat conftest.er1 >&5
2452    mv -f conftest.er1 conftest.err
2453  fi
2454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2455  test $ac_status = 0; } > conftest.i && {
2456	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2457	 test ! -s conftest.err
2458       }; then :
2459  ac_retval=0
2460else
2461  $as_echo "$as_me: failed program was:" >&5
2462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464    ac_retval=1
2465fi
2466  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2467  as_fn_set_status $ac_retval
2468
2469} # ac_fn_cxx_try_cpp
2470
2471# ac_fn_c_try_link LINENO
2472# -----------------------
2473# Try to link conftest.$ac_ext, and return whether this succeeded.
2474ac_fn_c_try_link ()
2475{
2476  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477  rm -f conftest.$ac_objext conftest$ac_exeext
2478  if { { ac_try="$ac_link"
2479case "(($ac_try" in
2480  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2481  *) ac_try_echo=$ac_try;;
2482esac
2483eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2484$as_echo "$ac_try_echo"; } >&5
2485  (eval "$ac_link") 2>conftest.err
2486  ac_status=$?
2487  if test -s conftest.err; then
2488    grep -v '^ *+' conftest.err >conftest.er1
2489    cat conftest.er1 >&5
2490    mv -f conftest.er1 conftest.err
2491  fi
2492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2493  test $ac_status = 0; } && {
2494	 test -z "$ac_c_werror_flag" ||
2495	 test ! -s conftest.err
2496       } && test -s conftest$ac_exeext && {
2497	 test "$cross_compiling" = yes ||
2498	 test -x conftest$ac_exeext
2499       }; then :
2500  ac_retval=0
2501else
2502  $as_echo "$as_me: failed program was:" >&5
2503sed 's/^/| /' conftest.$ac_ext >&5
2504
2505	ac_retval=1
2506fi
2507  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2508  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2509  # interfere with the next link command; also delete a directory that is
2510  # left behind by Apple's compiler.  We do this before executing the actions.
2511  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2512  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2513  as_fn_set_status $ac_retval
2514
2515} # ac_fn_c_try_link
2516
2517# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2518# ---------------------------------------------------------
2519# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2520# the include files in INCLUDES and setting the cache variable VAR
2521# accordingly.
2522ac_fn_cxx_check_header_mongrel ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  if eval \${$3+:} false; then :
2526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527$as_echo_n "checking for $2... " >&6; }
2528if eval \${$3+:} false; then :
2529  $as_echo_n "(cached) " >&6
2530fi
2531eval ac_res=\$$3
2532	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533$as_echo "$ac_res" >&6; }
2534else
2535  # Is the header compilable?
2536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2537$as_echo_n "checking $2 usability... " >&6; }
2538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2539/* end confdefs.h.  */
2540$4
2541#include <$2>
2542_ACEOF
2543if ac_fn_cxx_try_compile "$LINENO"; then :
2544  ac_header_compiler=yes
2545else
2546  ac_header_compiler=no
2547fi
2548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2550$as_echo "$ac_header_compiler" >&6; }
2551
2552# Is the header present?
2553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2554$as_echo_n "checking $2 presence... " >&6; }
2555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2556/* end confdefs.h.  */
2557#include <$2>
2558_ACEOF
2559if ac_fn_cxx_try_cpp "$LINENO"; then :
2560  ac_header_preproc=yes
2561else
2562  ac_header_preproc=no
2563fi
2564rm -f conftest.err conftest.i conftest.$ac_ext
2565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2566$as_echo "$ac_header_preproc" >&6; }
2567
2568# So?  What about this header?
2569case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2570  yes:no: )
2571    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2572$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2573    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2574$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2575    ;;
2576  no:yes:* )
2577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2578$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2579    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2580$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2582$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2583    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2584$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2585    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2586$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2587( $as_echo "## ----------------------------------------- ##
2588## Report this to build-dev@openjdk.java.net ##
2589## ----------------------------------------- ##"
2590     ) | sed "s/^/$as_me: WARNING:     /" >&2
2591    ;;
2592esac
2593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594$as_echo_n "checking for $2... " >&6; }
2595if eval \${$3+:} false; then :
2596  $as_echo_n "(cached) " >&6
2597else
2598  eval "$3=\$ac_header_compiler"
2599fi
2600eval ac_res=\$$3
2601	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2602$as_echo "$ac_res" >&6; }
2603fi
2604  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2605
2606} # ac_fn_cxx_check_header_mongrel
2607
2608# ac_fn_cxx_try_run LINENO
2609# ------------------------
2610# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2611# that executables *can* be run.
2612ac_fn_cxx_try_run ()
2613{
2614  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2615  if { { ac_try="$ac_link"
2616case "(($ac_try" in
2617  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2618  *) ac_try_echo=$ac_try;;
2619esac
2620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2621$as_echo "$ac_try_echo"; } >&5
2622  (eval "$ac_link") 2>&5
2623  ac_status=$?
2624  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2625  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2626  { { case "(($ac_try" in
2627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2628  *) ac_try_echo=$ac_try;;
2629esac
2630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2631$as_echo "$ac_try_echo"; } >&5
2632  (eval "$ac_try") 2>&5
2633  ac_status=$?
2634  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2635  test $ac_status = 0; }; }; then :
2636  ac_retval=0
2637else
2638  $as_echo "$as_me: program exited with status $ac_status" >&5
2639       $as_echo "$as_me: failed program was:" >&5
2640sed 's/^/| /' conftest.$ac_ext >&5
2641
2642       ac_retval=$ac_status
2643fi
2644  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2645  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2646  as_fn_set_status $ac_retval
2647
2648} # ac_fn_cxx_try_run
2649
2650# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2651# ---------------------------------------------------------
2652# Tests whether HEADER exists and can be compiled using the include files in
2653# INCLUDES, setting the cache variable VAR accordingly.
2654ac_fn_cxx_check_header_compile ()
2655{
2656  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2657  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2658$as_echo_n "checking for $2... " >&6; }
2659if eval \${$3+:} false; then :
2660  $as_echo_n "(cached) " >&6
2661else
2662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2663/* end confdefs.h.  */
2664$4
2665#include <$2>
2666_ACEOF
2667if ac_fn_cxx_try_compile "$LINENO"; then :
2668  eval "$3=yes"
2669else
2670  eval "$3=no"
2671fi
2672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2673fi
2674eval ac_res=\$$3
2675	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2676$as_echo "$ac_res" >&6; }
2677  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2678
2679} # ac_fn_cxx_check_header_compile
2680
2681# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2682# ----------------------------------------------
2683# Tries to find the compile-time value of EXPR in a program that includes
2684# INCLUDES, setting VAR accordingly. Returns whether the value could be
2685# computed
2686ac_fn_cxx_compute_int ()
2687{
2688  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2689  if test "$cross_compiling" = yes; then
2690    # Depending upon the size, compute the lo and hi bounds.
2691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h.  */
2693$4
2694int
2695main ()
2696{
2697static int test_array [1 - 2 * !(($2) >= 0)];
2698test_array [0] = 0;
2699return test_array [0];
2700
2701  ;
2702  return 0;
2703}
2704_ACEOF
2705if ac_fn_cxx_try_compile "$LINENO"; then :
2706  ac_lo=0 ac_mid=0
2707  while :; do
2708    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2709/* end confdefs.h.  */
2710$4
2711int
2712main ()
2713{
2714static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2715test_array [0] = 0;
2716return test_array [0];
2717
2718  ;
2719  return 0;
2720}
2721_ACEOF
2722if ac_fn_cxx_try_compile "$LINENO"; then :
2723  ac_hi=$ac_mid; break
2724else
2725  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2726			if test $ac_lo -le $ac_mid; then
2727			  ac_lo= ac_hi=
2728			  break
2729			fi
2730			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733  done
2734else
2735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736/* end confdefs.h.  */
2737$4
2738int
2739main ()
2740{
2741static int test_array [1 - 2 * !(($2) < 0)];
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=-1 ac_mid=-1
2751  while :; do
2752    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2753/* end confdefs.h.  */
2754$4
2755int
2756main ()
2757{
2758static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2759test_array [0] = 0;
2760return test_array [0];
2761
2762  ;
2763  return 0;
2764}
2765_ACEOF
2766if ac_fn_cxx_try_compile "$LINENO"; then :
2767  ac_lo=$ac_mid; break
2768else
2769  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2770			if test $ac_mid -le $ac_hi; then
2771			  ac_lo= ac_hi=
2772			  break
2773			fi
2774			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2775fi
2776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2777  done
2778else
2779  ac_lo= ac_hi=
2780fi
2781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2782fi
2783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2784# Binary search between lo and hi bounds.
2785while test "x$ac_lo" != "x$ac_hi"; do
2786  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2788/* end confdefs.h.  */
2789$4
2790int
2791main ()
2792{
2793static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2794test_array [0] = 0;
2795return test_array [0];
2796
2797  ;
2798  return 0;
2799}
2800_ACEOF
2801if ac_fn_cxx_try_compile "$LINENO"; then :
2802  ac_hi=$ac_mid
2803else
2804  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2805fi
2806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2807done
2808case $ac_lo in #((
2809?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2810'') ac_retval=1 ;;
2811esac
2812  else
2813    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h.  */
2815$4
2816static long int longval () { return $2; }
2817static unsigned long int ulongval () { return $2; }
2818#include <stdio.h>
2819#include <stdlib.h>
2820int
2821main ()
2822{
2823
2824  FILE *f = fopen ("conftest.val", "w");
2825  if (! f)
2826    return 1;
2827  if (($2) < 0)
2828    {
2829      long int i = longval ();
2830      if (i != ($2))
2831	return 1;
2832      fprintf (f, "%ld", i);
2833    }
2834  else
2835    {
2836      unsigned long int i = ulongval ();
2837      if (i != ($2))
2838	return 1;
2839      fprintf (f, "%lu", i);
2840    }
2841  /* Do not output a trailing newline, as this causes \r\n confusion
2842     on some platforms.  */
2843  return ferror (f) || fclose (f) != 0;
2844
2845  ;
2846  return 0;
2847}
2848_ACEOF
2849if ac_fn_cxx_try_run "$LINENO"; then :
2850  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2851else
2852  ac_retval=1
2853fi
2854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2855  conftest.$ac_objext conftest.beam conftest.$ac_ext
2856rm -f conftest.val
2857
2858  fi
2859  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2860  as_fn_set_status $ac_retval
2861
2862} # ac_fn_cxx_compute_int
2863
2864# ac_fn_cxx_try_link LINENO
2865# -------------------------
2866# Try to link conftest.$ac_ext, and return whether this succeeded.
2867ac_fn_cxx_try_link ()
2868{
2869  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2870  rm -f conftest.$ac_objext conftest$ac_exeext
2871  if { { ac_try="$ac_link"
2872case "(($ac_try" in
2873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874  *) ac_try_echo=$ac_try;;
2875esac
2876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2877$as_echo "$ac_try_echo"; } >&5
2878  (eval "$ac_link") 2>conftest.err
2879  ac_status=$?
2880  if test -s conftest.err; then
2881    grep -v '^ *+' conftest.err >conftest.er1
2882    cat conftest.er1 >&5
2883    mv -f conftest.er1 conftest.err
2884  fi
2885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2886  test $ac_status = 0; } && {
2887	 test -z "$ac_cxx_werror_flag" ||
2888	 test ! -s conftest.err
2889       } && test -s conftest$ac_exeext && {
2890	 test "$cross_compiling" = yes ||
2891	 test -x conftest$ac_exeext
2892       }; then :
2893  ac_retval=0
2894else
2895  $as_echo "$as_me: failed program was:" >&5
2896sed 's/^/| /' conftest.$ac_ext >&5
2897
2898	ac_retval=1
2899fi
2900  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2901  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2902  # interfere with the next link command; also delete a directory that is
2903  # left behind by Apple's compiler.  We do this before executing the actions.
2904  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2905  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2906  as_fn_set_status $ac_retval
2907
2908} # ac_fn_cxx_try_link
2909
2910# ac_fn_cxx_check_func LINENO FUNC VAR
2911# ------------------------------------
2912# Tests whether FUNC exists, setting the cache variable VAR accordingly
2913ac_fn_cxx_check_func ()
2914{
2915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2917$as_echo_n "checking for $2... " >&6; }
2918if eval \${$3+:} false; then :
2919  $as_echo_n "(cached) " >&6
2920else
2921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2922/* end confdefs.h.  */
2923/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2924   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2925#define $2 innocuous_$2
2926
2927/* System header to define __stub macros and hopefully few prototypes,
2928    which can conflict with char $2 (); below.
2929    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2930    <limits.h> exists even on freestanding compilers.  */
2931
2932#ifdef __STDC__
2933# include <limits.h>
2934#else
2935# include <assert.h>
2936#endif
2937
2938#undef $2
2939
2940/* Override any GCC internal prototype to avoid an error.
2941   Use char because int might match the return type of a GCC
2942   builtin and then its argument prototype would still apply.  */
2943#ifdef __cplusplus
2944extern "C"
2945#endif
2946char $2 ();
2947/* The GNU C library defines this for functions which it implements
2948    to always fail with ENOSYS.  Some functions are actually named
2949    something starting with __ and the normal name is an alias.  */
2950#if defined __stub_$2 || defined __stub___$2
2951choke me
2952#endif
2953
2954int
2955main ()
2956{
2957return $2 ();
2958  ;
2959  return 0;
2960}
2961_ACEOF
2962if ac_fn_cxx_try_link "$LINENO"; then :
2963  eval "$3=yes"
2964else
2965  eval "$3=no"
2966fi
2967rm -f core conftest.err conftest.$ac_objext \
2968    conftest$ac_exeext conftest.$ac_ext
2969fi
2970eval ac_res=\$$3
2971	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2972$as_echo "$ac_res" >&6; }
2973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2974
2975} # ac_fn_cxx_check_func
2976
2977# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2978# -------------------------------------------------------
2979# Tests whether HEADER exists and can be compiled using the include files in
2980# INCLUDES, setting the cache variable VAR accordingly.
2981ac_fn_c_check_header_compile ()
2982{
2983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2985$as_echo_n "checking for $2... " >&6; }
2986if eval \${$3+:} false; then :
2987  $as_echo_n "(cached) " >&6
2988else
2989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2990/* end confdefs.h.  */
2991$4
2992#include <$2>
2993_ACEOF
2994if ac_fn_c_try_compile "$LINENO"; then :
2995  eval "$3=yes"
2996else
2997  eval "$3=no"
2998fi
2999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3000fi
3001eval ac_res=\$$3
3002	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3003$as_echo "$ac_res" >&6; }
3004  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3005
3006} # ac_fn_c_check_header_compile
3007cat >config.log <<_ACEOF
3008This file contains any messages produced by compilers while
3009running configure, to aid debugging if configure makes a mistake.
3010
3011It was created by OpenJDK $as_me jdk9, which was
3012generated by GNU Autoconf 2.69.  Invocation command line was
3013
3014  $ $0 $@
3015
3016_ACEOF
3017exec 5>>config.log
3018{
3019cat <<_ASUNAME
3020## --------- ##
3021## Platform. ##
3022## --------- ##
3023
3024hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3025uname -m = `(uname -m) 2>/dev/null || echo unknown`
3026uname -r = `(uname -r) 2>/dev/null || echo unknown`
3027uname -s = `(uname -s) 2>/dev/null || echo unknown`
3028uname -v = `(uname -v) 2>/dev/null || echo unknown`
3029
3030/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3031/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3032
3033/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3034/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3035/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3036/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3037/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3038/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3039/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3040
3041_ASUNAME
3042
3043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3044for as_dir in $PATH
3045do
3046  IFS=$as_save_IFS
3047  test -z "$as_dir" && as_dir=.
3048    $as_echo "PATH: $as_dir"
3049  done
3050IFS=$as_save_IFS
3051
3052} >&5
3053
3054cat >&5 <<_ACEOF
3055
3056
3057## ----------- ##
3058## Core tests. ##
3059## ----------- ##
3060
3061_ACEOF
3062
3063
3064# Keep a trace of the command line.
3065# Strip out --no-create and --no-recursion so they do not pile up.
3066# Strip out --silent because we don't want to record it for future runs.
3067# Also quote any args containing shell meta-characters.
3068# Make two passes to allow for proper duplicate-argument suppression.
3069ac_configure_args=
3070ac_configure_args0=
3071ac_configure_args1=
3072ac_must_keep_next=false
3073for ac_pass in 1 2
3074do
3075  for ac_arg
3076  do
3077    case $ac_arg in
3078    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3079    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3080    | -silent | --silent | --silen | --sile | --sil)
3081      continue ;;
3082    *\'*)
3083      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3084    esac
3085    case $ac_pass in
3086    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3087    2)
3088      as_fn_append ac_configure_args1 " '$ac_arg'"
3089      if test $ac_must_keep_next = true; then
3090	ac_must_keep_next=false # Got value, back to normal.
3091      else
3092	case $ac_arg in
3093	  *=* | --config-cache | -C | -disable-* | --disable-* \
3094	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3095	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3096	  | -with-* | --with-* | -without-* | --without-* | --x)
3097	    case "$ac_configure_args0 " in
3098	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3099	    esac
3100	    ;;
3101	  -* ) ac_must_keep_next=true ;;
3102	esac
3103      fi
3104      as_fn_append ac_configure_args " '$ac_arg'"
3105      ;;
3106    esac
3107  done
3108done
3109{ ac_configure_args0=; unset ac_configure_args0;}
3110{ ac_configure_args1=; unset ac_configure_args1;}
3111
3112# When interrupted or exit'd, cleanup temporary files, and complete
3113# config.log.  We remove comments because anyway the quotes in there
3114# would cause problems or look ugly.
3115# WARNING: Use '\'' to represent an apostrophe within the trap.
3116# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3117trap 'exit_status=$?
3118  # Save into config.log some information that might help in debugging.
3119  {
3120    echo
3121
3122    $as_echo "## ---------------- ##
3123## Cache variables. ##
3124## ---------------- ##"
3125    echo
3126    # The following way of writing the cache mishandles newlines in values,
3127(
3128  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3129    eval ac_val=\$$ac_var
3130    case $ac_val in #(
3131    *${as_nl}*)
3132      case $ac_var in #(
3133      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3134$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3135      esac
3136      case $ac_var in #(
3137      _ | IFS | as_nl) ;; #(
3138      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3139      *) { eval $ac_var=; unset $ac_var;} ;;
3140      esac ;;
3141    esac
3142  done
3143  (set) 2>&1 |
3144    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3145    *${as_nl}ac_space=\ *)
3146      sed -n \
3147	"s/'\''/'\''\\\\'\'''\''/g;
3148	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3149      ;; #(
3150    *)
3151      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3152      ;;
3153    esac |
3154    sort
3155)
3156    echo
3157
3158    $as_echo "## ----------------- ##
3159## Output variables. ##
3160## ----------------- ##"
3161    echo
3162    for ac_var in $ac_subst_vars
3163    do
3164      eval ac_val=\$$ac_var
3165      case $ac_val in
3166      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3167      esac
3168      $as_echo "$ac_var='\''$ac_val'\''"
3169    done | sort
3170    echo
3171
3172    if test -n "$ac_subst_files"; then
3173      $as_echo "## ------------------- ##
3174## File substitutions. ##
3175## ------------------- ##"
3176      echo
3177      for ac_var in $ac_subst_files
3178      do
3179	eval ac_val=\$$ac_var
3180	case $ac_val in
3181	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3182	esac
3183	$as_echo "$ac_var='\''$ac_val'\''"
3184      done | sort
3185      echo
3186    fi
3187
3188    if test -s confdefs.h; then
3189      $as_echo "## ----------- ##
3190## confdefs.h. ##
3191## ----------- ##"
3192      echo
3193      cat confdefs.h
3194      echo
3195    fi
3196    test "$ac_signal" != 0 &&
3197      $as_echo "$as_me: caught signal $ac_signal"
3198    $as_echo "$as_me: exit $exit_status"
3199  } >&5
3200  rm -f core *.core core.conftest.* &&
3201    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3202    exit $exit_status
3203' 0
3204for ac_signal in 1 2 13 15; do
3205  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3206done
3207ac_signal=0
3208
3209# confdefs.h avoids OS command line length limits that DEFS can exceed.
3210rm -f -r conftest* confdefs.h
3211
3212$as_echo "/* confdefs.h */" > confdefs.h
3213
3214# Predefined preprocessor variables.
3215
3216cat >>confdefs.h <<_ACEOF
3217#define PACKAGE_NAME "$PACKAGE_NAME"
3218_ACEOF
3219
3220cat >>confdefs.h <<_ACEOF
3221#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3222_ACEOF
3223
3224cat >>confdefs.h <<_ACEOF
3225#define PACKAGE_VERSION "$PACKAGE_VERSION"
3226_ACEOF
3227
3228cat >>confdefs.h <<_ACEOF
3229#define PACKAGE_STRING "$PACKAGE_STRING"
3230_ACEOF
3231
3232cat >>confdefs.h <<_ACEOF
3233#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3234_ACEOF
3235
3236cat >>confdefs.h <<_ACEOF
3237#define PACKAGE_URL "$PACKAGE_URL"
3238_ACEOF
3239
3240
3241# Let the site file select an alternate cache file if it wants to.
3242# Prefer an explicitly selected file to automatically selected ones.
3243ac_site_file1=NONE
3244ac_site_file2=NONE
3245if test -n "$CONFIG_SITE"; then
3246  # We do not want a PATH search for config.site.
3247  case $CONFIG_SITE in #((
3248    -*)  ac_site_file1=./$CONFIG_SITE;;
3249    */*) ac_site_file1=$CONFIG_SITE;;
3250    *)   ac_site_file1=./$CONFIG_SITE;;
3251  esac
3252elif test "x$prefix" != xNONE; then
3253  ac_site_file1=$prefix/share/config.site
3254  ac_site_file2=$prefix/etc/config.site
3255else
3256  ac_site_file1=$ac_default_prefix/share/config.site
3257  ac_site_file2=$ac_default_prefix/etc/config.site
3258fi
3259for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3260do
3261  test "x$ac_site_file" = xNONE && continue
3262  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3263    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3264$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3265    sed 's/^/| /' "$ac_site_file" >&5
3266    . "$ac_site_file" \
3267      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3269as_fn_error $? "failed to load site script $ac_site_file
3270See \`config.log' for more details" "$LINENO" 5; }
3271  fi
3272done
3273
3274if test -r "$cache_file"; then
3275  # Some versions of bash will fail to source /dev/null (special files
3276  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3277  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3278    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3279$as_echo "$as_me: loading cache $cache_file" >&6;}
3280    case $cache_file in
3281      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3282      *)                      . "./$cache_file";;
3283    esac
3284  fi
3285else
3286  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3287$as_echo "$as_me: creating cache $cache_file" >&6;}
3288  >$cache_file
3289fi
3290
3291# Check that the precious variables saved in the cache have kept the same
3292# value.
3293ac_cache_corrupted=false
3294for ac_var in $ac_precious_vars; do
3295  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3296  eval ac_new_set=\$ac_env_${ac_var}_set
3297  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3298  eval ac_new_val=\$ac_env_${ac_var}_value
3299  case $ac_old_set,$ac_new_set in
3300    set,)
3301      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3302$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3303      ac_cache_corrupted=: ;;
3304    ,set)
3305      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3306$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3307      ac_cache_corrupted=: ;;
3308    ,);;
3309    *)
3310      if test "x$ac_old_val" != "x$ac_new_val"; then
3311	# differences in whitespace do not lead to failure.
3312	ac_old_val_w=`echo x $ac_old_val`
3313	ac_new_val_w=`echo x $ac_new_val`
3314	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3315	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3316$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3317	  ac_cache_corrupted=:
3318	else
3319	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3320$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3321	  eval $ac_var=\$ac_old_val
3322	fi
3323	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3324$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3325	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3326$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3327      fi;;
3328  esac
3329  # Pass precious variables to config.status.
3330  if test "$ac_new_set" = set; then
3331    case $ac_new_val in
3332    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3333    *) ac_arg=$ac_var=$ac_new_val ;;
3334    esac
3335    case " $ac_configure_args " in
3336      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3337      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3338    esac
3339  fi
3340done
3341if $ac_cache_corrupted; then
3342  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3344  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3345$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3346  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3347fi
3348## -------------------- ##
3349## Main body of script. ##
3350## -------------------- ##
3351
3352ac_ext=c
3353ac_cpp='$CPP $CPPFLAGS'
3354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3356ac_compiler_gnu=$ac_cv_c_compiler_gnu
3357
3358
3359
3360ac_aux_dir=
3361for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3362  if test -f "$ac_dir/install-sh"; then
3363    ac_aux_dir=$ac_dir
3364    ac_install_sh="$ac_aux_dir/install-sh -c"
3365    break
3366  elif test -f "$ac_dir/install.sh"; then
3367    ac_aux_dir=$ac_dir
3368    ac_install_sh="$ac_aux_dir/install.sh -c"
3369    break
3370  elif test -f "$ac_dir/shtool"; then
3371    ac_aux_dir=$ac_dir
3372    ac_install_sh="$ac_aux_dir/shtool install -c"
3373    break
3374  fi
3375done
3376if test -z "$ac_aux_dir"; then
3377  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
3378fi
3379
3380# These three variables are undocumented and unsupported,
3381# and are intended to be withdrawn in a future Autoconf release.
3382# They can cause serious problems if a builder's source tree is in a directory
3383# whose full name contains unusual characters.
3384ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3385ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3386ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3387
3388
3389# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3390
3391#
3392# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3393# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3394#
3395# This code is free software; you can redistribute it and/or modify it
3396# under the terms of the GNU General Public License version 2 only, as
3397# published by the Free Software Foundation.  Oracle designates this
3398# particular file as subject to the "Classpath" exception as provided
3399# by Oracle in the LICENSE file that accompanied this code.
3400#
3401# This code is distributed in the hope that it will be useful, but WITHOUT
3402# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3403# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3404# version 2 for more details (a copy is included in the LICENSE file that
3405# accompanied this code).
3406#
3407# You should have received a copy of the GNU General Public License version
3408# 2 along with this work; if not, write to the Free Software Foundation,
3409# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3410#
3411# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3412# or visit www.oracle.com if you need additional information or have any
3413# questions.
3414#
3415
3416#
3417# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3418#
3419# This program is free software; you can redistribute it and/or modify
3420# it under the terms of the GNU General Public License as published by
3421# the Free Software Foundation; either version 2 of the License, or
3422# (at your option) any later version.
3423#
3424# This program is distributed in the hope that it will be useful, but
3425# WITHOUT ANY WARRANTY; without even the implied warranty of
3426# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3427# General Public License for more details.
3428#
3429# You should have received a copy of the GNU General Public License
3430# along with this program; if not, write to the Free Software
3431# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3432#
3433# As a special exception to the GNU General Public License, if you
3434# distribute this file as part of a program that contains a
3435# configuration script generated by Autoconf, you may include it under
3436# the same distribution terms that you use for the rest of that program.
3437
3438# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3439# ----------------------------------
3440# PKG_PROG_PKG_CONFIG
3441
3442# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3443#
3444# Check to see whether a particular set of modules exists.  Similar
3445# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3446#
3447#
3448# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3449# this or PKG_CHECK_MODULES is called, or make sure to call
3450# PKG_CHECK_EXISTS manually
3451# --------------------------------------------------------------
3452
3453
3454
3455# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3456# ---------------------------------------------
3457# _PKG_CONFIG
3458
3459# _PKG_SHORT_ERRORS_SUPPORTED
3460# -----------------------------
3461# _PKG_SHORT_ERRORS_SUPPORTED
3462
3463
3464# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3465# [ACTION-IF-NOT-FOUND])
3466#
3467#
3468# Note that if there is a possibility the first call to
3469# PKG_CHECK_MODULES might not happen, you should be sure to include an
3470# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3471#
3472#
3473# --------------------------------------------------------------
3474# PKG_CHECK_MODULES
3475
3476
3477# Include these first...
3478#
3479# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3480# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3481#
3482# This code is free software; you can redistribute it and/or modify it
3483# under the terms of the GNU General Public License version 2 only, as
3484# published by the Free Software Foundation.  Oracle designates this
3485# particular file as subject to the "Classpath" exception as provided
3486# by Oracle in the LICENSE file that accompanied this code.
3487#
3488# This code is distributed in the hope that it will be useful, but WITHOUT
3489# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3490# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3491# version 2 for more details (a copy is included in the LICENSE file that
3492# accompanied this code).
3493#
3494# You should have received a copy of the GNU General Public License version
3495# 2 along with this work; if not, write to the Free Software Foundation,
3496# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3497#
3498# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3499# or visit www.oracle.com if you need additional information or have any
3500# questions.
3501#
3502
3503# Create a function/macro that takes a series of named arguments. The call is
3504# similar to AC_DEFUN, but the setup of the function looks like this:
3505# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3506# ... do something
3507#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3508# ])
3509# A star (*) in front of a named argument means that it is required and it's
3510# presence will be verified. To pass e.g. the first value as a normal indexed
3511# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3512# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3513# "ARG_FOO".
3514#
3515# The generated function can be called like this:
3516# MYFUNC(FOO: [foo-val],
3517#     BAR: [
3518#         $ECHO hello world
3519#     ])
3520# Note that the argument value must start on the same line as the argument name.
3521#
3522# Argument 1: Name of the function to define
3523# Argument 2: List of legal named arguments, with a * prefix for required arguments
3524# Argument 3: Argument array to treat as named, typically $@
3525# Argument 4: The main function body
3526
3527
3528# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3529# If so, then append $1 to $2 \
3530# Also set JVM_ARG_OK to true/false depending on outcome.
3531
3532
3533# Appends a string to a path variable, only adding the : when needed.
3534
3535
3536# Prepends a string to a path variable, only adding the : when needed.
3537
3538
3539# This will make sure the given variable points to a full and proper
3540# path. This means:
3541# 1) There will be no spaces in the path. On unix platforms,
3542#    spaces in the path will result in an error. On Windows,
3543#    the path will be rewritten using short-style to be space-free.
3544# 2) The path will be absolute, and it will be in unix-style (on
3545#     cygwin).
3546# $1: The name of the variable to fix
3547
3548
3549# This will make sure the given variable points to a executable
3550# with a full and proper path. This means:
3551# 1) There will be no spaces in the path. On unix platforms,
3552#    spaces in the path will result in an error. On Windows,
3553#    the path will be rewritten using short-style to be space-free.
3554# 2) The path will be absolute, and it will be in unix-style (on
3555#     cygwin).
3556# Any arguments given to the executable is preserved.
3557# If the input variable does not have a directory specification, then
3558# it need to be in the PATH.
3559# $1: The name of the variable to fix
3560
3561
3562
3563
3564# Register a --with argument but mark it as deprecated
3565# $1: The name of the with argument to deprecate, not including --with-
3566
3567
3568# Register a --enable argument but mark it as deprecated
3569# $1: The name of the with argument to deprecate, not including --enable-
3570# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3571# $3: Messages to user.
3572
3573
3574
3575
3576# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3577# $1: variable to check
3578
3579
3580# Check that there are no unprocessed overridden variables left.
3581# If so, they are an incorrect argument and we will exit with an error.
3582
3583
3584# Setup a tool for the given variable. If correctly specified by the user,
3585# use that value, otherwise search for the tool using the supplied code snippet.
3586# $1: variable to set
3587# $2: code snippet to call to look for the tool
3588# $3: code snippet to call if variable was used to find tool
3589
3590
3591# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3592# $1: variable to set
3593# $2: executable name (or list of names) to look for
3594
3595
3596# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3597# $1: variable to set
3598# $2: executable name (or list of names) to look for
3599
3600
3601# Like BASIC_PATH_PROGS but fails if no tool was found.
3602# $1: variable to set
3603# $2: executable name (or list of names) to look for
3604
3605
3606# Like BASIC_SETUP_TOOL but fails if no tool was found.
3607# $1: variable to set
3608# $2: autoconf macro to call to look for the special tool
3609
3610
3611# Setup the most fundamental tools that relies on not much else to set up,
3612# but is used by much of the early bootstrap code.
3613
3614
3615# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3616
3617
3618# Evaluates platform specific overrides for devkit variables.
3619# $1: Name of variable
3620
3621
3622
3623
3624
3625
3626#%%% Simple tools %%%
3627
3628# Check if we have found a usable version of make
3629# $1: the path to a potential make binary (or empty)
3630# $2: the description on how we found this
3631
3632
3633
3634
3635# Goes looking for a usable version of GNU make.
3636
3637
3638
3639
3640
3641
3642# Check if build directory is on local disk. If not possible to determine,
3643# we prefer to claim it's local.
3644# Argument 1: directory to test
3645# Argument 2: what to do if it is on local disk
3646# Argument 3: what to do otherwise (remote disk or failure)
3647
3648
3649# Check that source files have basic read permissions set. This might
3650# not be the case in cygwin in certain conditions.
3651
3652
3653
3654
3655# Check for support for specific options in bash
3656
3657
3658################################################################################
3659#
3660# Default make target
3661#
3662
3663
3664# Code to run after AC_OUTPUT
3665
3666
3667#
3668# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3669# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3670#
3671# This code is free software; you can redistribute it and/or modify it
3672# under the terms of the GNU General Public License version 2 only, as
3673# published by the Free Software Foundation.  Oracle designates this
3674# particular file as subject to the "Classpath" exception as provided
3675# by Oracle in the LICENSE file that accompanied this code.
3676#
3677# This code is distributed in the hope that it will be useful, but WITHOUT
3678# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3679# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3680# version 2 for more details (a copy is included in the LICENSE file that
3681# accompanied this code).
3682#
3683# You should have received a copy of the GNU General Public License version
3684# 2 along with this work; if not, write to the Free Software Foundation,
3685# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3686#
3687# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3688# or visit www.oracle.com if you need additional information or have any
3689# questions.
3690#
3691
3692
3693
3694
3695
3696# Helper function which possibly converts a path using DOS-style short mode.
3697# If so, the updated path is stored in $new_path.
3698# $1: The path to check
3699
3700
3701# Helper function which possibly converts a path using DOS-style short mode.
3702# If so, the updated path is stored in $new_path.
3703# $1: The path to check
3704
3705
3706# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3707# and could probably be heavily simplified. However, all changes in this
3708# area tend to need lot of testing in different scenarios, and in lack of
3709# proper unit testing, cleaning this up has not been deemed worth the effort
3710# at the moment.
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3721
3722
3723
3724
3725# ... then the rest
3726#
3727# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729#
3730# This code is free software; you can redistribute it and/or modify it
3731# under the terms of the GNU General Public License version 2 only, as
3732# published by the Free Software Foundation.  Oracle designates this
3733# particular file as subject to the "Classpath" exception as provided
3734# by Oracle in the LICENSE file that accompanied this code.
3735#
3736# This code is distributed in the hope that it will be useful, but WITHOUT
3737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739# version 2 for more details (a copy is included in the LICENSE file that
3740# accompanied this code).
3741#
3742# You should have received a copy of the GNU General Public License version
3743# 2 along with this work; if not, write to the Free Software Foundation,
3744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745#
3746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747# or visit www.oracle.com if you need additional information or have any
3748# questions.
3749#
3750
3751########################################################################
3752# This file handles detection of the Boot JDK. The Boot JDK detection
3753# process has been developed as a response to solve a complex real-world
3754# problem. Initially, it was simple, but it has grown as platform after
3755# platform, idiosyncracy after idiosyncracy has been supported.
3756#
3757# The basic idea is this:
3758# 1) You need an acceptable *) JDK to use as a Boot JDK
3759# 2) There are several ways to locate a JDK, that are mostly platform
3760#    dependent **)
3761# 3) You can have multiple JDKs installed
3762# 4) If possible, configure should try to dig out an acceptable JDK
3763#    automatically, without having to resort to command-line options
3764#
3765# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3766#     javac) and not a JRE, etc.
3767#
3768# **) On Windows we typically use a well-known path.
3769#     On MacOSX we typically use the tool java_home.
3770#     On Linux we typically find javac in the $PATH, and then follow a
3771#     chain of symlinks that often ends up in a real JDK.
3772#
3773# This leads to the code where we check in different ways to locate a
3774# JDK, and if one is found, check if it is acceptable. If not, we print
3775# our reasons for rejecting it (useful when debugging non-working
3776# configure situations) and continue checking the next one.
3777########################################################################
3778
3779# Execute the check given as argument, and verify the result
3780# If the Boot JDK was previously found, do nothing
3781# $1 A command line (typically autoconf macro) to execute
3782
3783
3784# Test: Is bootjdk explicitely set by command line arguments?
3785
3786
3787# Test: Is $JAVA_HOME set?
3788
3789
3790# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3791
3792
3793# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3794# $1: Argument to the java_home binary (optional)
3795
3796
3797# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3798
3799
3800# Look for a jdk in the given path. If there are multiple, try to select the newest.
3801# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3802# $1 = Path to directory containing jdk installations.
3803# $2 = String to append to the found JDK directory to get the proper JDK home
3804
3805
3806# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3807# environmental variable as base for where to look.
3808# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3809
3810
3811# Test: Is there a JDK installed in default, well-known locations?
3812
3813
3814# Check that a command-line tool in the Boot JDK is correct
3815# $1 = name of variable to assign
3816# $2 = name of binary
3817
3818
3819###############################################################################
3820#
3821# We need a Boot JDK to bootstrap the build.
3822#
3823
3824
3825
3826
3827
3828# BUILD_JDK: the location of the latest JDK that can run
3829#   on the host system and supports the target class file version
3830#   generated in this JDK build.  This variable should only be
3831#   used after the launchers are built.
3832#
3833
3834# Execute the check given as argument, and verify the result.
3835# If the JDK was previously found, do nothing.
3836# $1 A command line (typically autoconf macro) to execute
3837
3838
3839# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3840# is different than the host system doing the build (e.g. cross-compilation),
3841# a special BUILD_JDK is built as part of the build process.  An external
3842# prebuilt BUILD_JDK can also be supplied.
3843
3844
3845#
3846# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3847# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3848#
3849# This code is free software; you can redistribute it and/or modify it
3850# under the terms of the GNU General Public License version 2 only, as
3851# published by the Free Software Foundation.  Oracle designates this
3852# particular file as subject to the "Classpath" exception as provided
3853# by Oracle in the LICENSE file that accompanied this code.
3854#
3855# This code is distributed in the hope that it will be useful, but WITHOUT
3856# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3857# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3858# version 2 for more details (a copy is included in the LICENSE file that
3859# accompanied this code).
3860#
3861# You should have received a copy of the GNU General Public License version
3862# 2 along with this work; if not, write to the Free Software Foundation,
3863# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3864#
3865# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3866# or visit www.oracle.com if you need additional information or have any
3867# questions.
3868#
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886################################################################################
3887#
3888# Runs icecc-create-env once and prints the error if it fails
3889#
3890# $1: arguments to icecc-create-env
3891# $2: log file
3892#
3893
3894
3895################################################################################
3896#
3897# Optionally enable distributed compilation of native code using icecc/icecream
3898#
3899
3900
3901
3902
3903
3904
3905
3906#
3907# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3908# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3909#
3910# This code is free software; you can redistribute it and/or modify it
3911# under the terms of the GNU General Public License version 2 only, as
3912# published by the Free Software Foundation.  Oracle designates this
3913# particular file as subject to the "Classpath" exception as provided
3914# by Oracle in the LICENSE file that accompanied this code.
3915#
3916# This code is distributed in the hope that it will be useful, but WITHOUT
3917# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3918# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3919# version 2 for more details (a copy is included in the LICENSE file that
3920# accompanied this code).
3921#
3922# You should have received a copy of the GNU General Public License version
3923# 2 along with this work; if not, write to the Free Software Foundation,
3924# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3925#
3926# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3927# or visit www.oracle.com if you need additional information or have any
3928# questions.
3929#
3930
3931# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3932# corresponding configure arguments instead
3933
3934
3935# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3936# that configure can use them while detecting compilers.
3937# TOOLCHAIN_TYPE is available here.
3938# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3939
3940
3941
3942
3943
3944
3945# Documentation on common flags used for solstudio in HIGHEST.
3946#
3947# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3948#          done with care, there are some assumptions below that need to
3949#          be understood about the use of pointers, and IEEE behavior.
3950#
3951# -fns: Use non-standard floating point mode (not IEEE 754)
3952# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3953# -fsingle: Use single precision floating point with 'float'
3954# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3955#   (Source with excessing pointer casting and data access with mixed
3956#    pointer types are not recommended)
3957# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3958#   (If you expect perfect errno behavior, do not use this)
3959# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3960# -xrestrict: Pointer parameters to functions do not overlap
3961#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3962#    If you pass in multiple pointers to the same data, do not use this)
3963# -xlibmil: Inline some library routines
3964#   (If you expect perfect errno behavior, do not use this)
3965# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3966#   (If you expect perfect errno behavior, do not use this)
3967#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3968
3969    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3970    # Bug?
3971    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3972    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3973    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3974    #fi
3975
3976
3977
3978
3979
3980# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3981#                                  IF_FALSE: [RUN-IF-FALSE])
3982# ------------------------------------------------------------
3983# Check that the C compiler supports an argument
3984
3985
3986
3987
3988# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3989#                                    IF_FALSE: [RUN-IF-FALSE])
3990# ------------------------------------------------------------
3991# Check that the C++ compiler supports an argument
3992
3993
3994
3995
3996# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3997#                                IF_FALSE: [RUN-IF-FALSE])
3998# ------------------------------------------------------------
3999# Check that the C and C++ compilers support an argument
4000
4001
4002
4003
4004# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4005#                                   IF_FALSE: [RUN-IF-FALSE])
4006# ------------------------------------------------------------
4007# Check that the linker support an argument
4008
4009
4010
4011
4012
4013
4014
4015
4016#
4017# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4018# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4019#
4020# This code is free software; you can redistribute it and/or modify it
4021# under the terms of the GNU General Public License version 2 only, as
4022# published by the Free Software Foundation.  Oracle designates this
4023# particular file as subject to the "Classpath" exception as provided
4024# by Oracle in the LICENSE file that accompanied this code.
4025#
4026# This code is distributed in the hope that it will be useful, but WITHOUT
4027# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4028# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4029# version 2 for more details (a copy is included in the LICENSE file that
4030# accompanied this code).
4031#
4032# You should have received a copy of the GNU General Public License version
4033# 2 along with this work; if not, write to the Free Software Foundation,
4034# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4035#
4036# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4037# or visit www.oracle.com if you need additional information or have any
4038# questions.
4039#
4040
4041
4042
4043
4044
4045cygwin_help() {
4046  case $1 in
4047    unzip)
4048      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4049      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4050      ;;
4051    zip)
4052      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4053      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4054      ;;
4055    make)
4056      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4057      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4058      ;;
4059    freetype)
4060      HELP_MSG="
4061The freetype library can now be build during the configure process.
4062Download the freetype sources and unpack them into an arbitrary directory:
4063
4064wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4065tar -xzf freetype-2.5.3.tar.gz
4066
4067Then run configure with '--with-freetype-src=<freetype_src>'. This will
4068automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4069builds or into '<freetype_src>/lib32' for 32-bit builds.
4070Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4071and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4072
4073Alternatively you can unpack the sources like this to use the default directory:
4074
4075tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4076      ;;
4077  esac
4078}
4079
4080msys_help() {
4081  PKGHANDLER_COMMAND=""
4082}
4083
4084apt_help() {
4085  case $1 in
4086    reduced)
4087      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4088    devkit)
4089      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4090    openjdk)
4091      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4092    alsa)
4093      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4094    cups)
4095      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4096    freetype)
4097      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4098    ffi)
4099      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4100    x11)
4101      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4102    ccache)
4103      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4104  esac
4105}
4106
4107yum_help() {
4108  case $1 in
4109    devkit)
4110      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4111    openjdk)
4112      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4113    alsa)
4114      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4115    cups)
4116      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4117    freetype)
4118      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4119    x11)
4120      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4121    ccache)
4122      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4123  esac
4124}
4125
4126port_help() {
4127  PKGHANDLER_COMMAND=""
4128}
4129
4130pkgutil_help() {
4131  PKGHANDLER_COMMAND=""
4132}
4133
4134pkgadd_help() {
4135  PKGHANDLER_COMMAND=""
4136}
4137
4138# This function will check if we're called from the "configure" wrapper while
4139# printing --help. If so, we will print out additional information that can
4140# only be extracted within the autoconf script, and then exit. This must be
4141# called at the very beginning in configure.ac.
4142
4143
4144
4145
4146
4147
4148#
4149# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4150# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4151#
4152# This code is free software; you can redistribute it and/or modify it
4153# under the terms of the GNU General Public License version 2 only, as
4154# published by the Free Software Foundation.  Oracle designates this
4155# particular file as subject to the "Classpath" exception as provided
4156# by Oracle in the LICENSE file that accompanied this code.
4157#
4158# This code is distributed in the hope that it will be useful, but WITHOUT
4159# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4160# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4161# version 2 for more details (a copy is included in the LICENSE file that
4162# accompanied this code).
4163#
4164# You should have received a copy of the GNU General Public License version
4165# 2 along with this work; if not, write to the Free Software Foundation,
4166# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4167#
4168# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4169# or visit www.oracle.com if you need additional information or have any
4170# questions.
4171#
4172
4173###############################################################################
4174# Check which interpreter of the JVM we want to build.
4175# Currently we have:
4176#    template: Template interpreter (the default)
4177#    cpp     : C++ interpreter
4178
4179
4180###############################################################################
4181# Check which variants of the JVM that we want to build.
4182# Currently we have:
4183#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4184#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4185#    minimal1: reduced form of client with optional VM services and features stripped out
4186#    zero: no machine code interpreter, no compiler
4187#    zeroshark: zero interpreter and shark/llvm compiler backend
4188#    core: interpreter only, no compiler (only works on some platforms)
4189
4190
4191
4192###############################################################################
4193# Setup legacy vars/targets and new vars to deal with different debug levels.
4194#
4195#    release: no debug information, all optimizations, no asserts.
4196#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4197#    fastdebug: debug information (-g), all optimizations, all asserts
4198#    slowdebug: debug information (-g), no optimizations, all asserts
4199#
4200
4201
4202
4203
4204
4205
4206#
4207# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4208# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4209#
4210# This code is free software; you can redistribute it and/or modify it
4211# under the terms of the GNU General Public License version 2 only, as
4212# published by the Free Software Foundation.  Oracle designates this
4213# particular file as subject to the "Classpath" exception as provided
4214# by Oracle in the LICENSE file that accompanied this code.
4215#
4216# This code is distributed in the hope that it will be useful, but WITHOUT
4217# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4218# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4219# version 2 for more details (a copy is included in the LICENSE file that
4220# accompanied this code).
4221#
4222# You should have received a copy of the GNU General Public License version
4223# 2 along with this work; if not, write to the Free Software Foundation,
4224# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4225#
4226# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4227# or visit www.oracle.com if you need additional information or have any
4228# questions.
4229#
4230
4231###############################################################################
4232# Check which variant of the JDK that we want to build.
4233# Currently we have:
4234#    normal:   standard edition
4235# but the custom make system may add other variants
4236#
4237# Effectively the JDK variant gives a name to a specific set of
4238# modules to compile into the JDK.
4239
4240
4241###############################################################################
4242# Set the debug level
4243#    release: no debug information, all optimizations, no asserts.
4244#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4245#    fastdebug: debug information (-g), all optimizations, all asserts
4246#    slowdebug: debug information (-g), no optimizations, all asserts
4247
4248
4249###############################################################################
4250#
4251# Should we build only OpenJDK even if closed sources are present?
4252#
4253
4254
4255
4256
4257###############################################################################
4258#
4259# Enable or disable the elliptic curve crypto implementation
4260#
4261
4262
4263
4264
4265################################################################################
4266#
4267# Gcov coverage data for hotspot
4268#
4269
4270
4271################################################################################
4272#
4273# Static build support.  When enabled will generate static
4274# libraries instead of shared libraries for all JDK libs.
4275#
4276
4277
4278################################################################################
4279#
4280# jlink options.
4281# We always keep packaged modules in JDK image.
4282#
4283
4284
4285################################################################################
4286#
4287# Check if building of the jtreg failure handler should be enabled.
4288#
4289
4290
4291#
4292# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4294#
4295# This code is free software; you can redistribute it and/or modify it
4296# under the terms of the GNU General Public License version 2 only, as
4297# published by the Free Software Foundation.  Oracle designates this
4298# particular file as subject to the "Classpath" exception as provided
4299# by Oracle in the LICENSE file that accompanied this code.
4300#
4301# This code is distributed in the hope that it will be useful, but WITHOUT
4302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4304# version 2 for more details (a copy is included in the LICENSE file that
4305# accompanied this code).
4306#
4307# You should have received a copy of the GNU General Public License version
4308# 2 along with this work; if not, write to the Free Software Foundation,
4309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4310#
4311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4312# or visit www.oracle.com if you need additional information or have any
4313# questions.
4314#
4315
4316###############################################################################
4317#
4318# Setup version numbers
4319#
4320
4321# Verify that a given string represents a valid version number, and assign it
4322# to a variable.
4323
4324# Argument 1: the variable to assign to
4325# Argument 2: the value given by the user
4326
4327
4328
4329
4330#
4331# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4332# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4333#
4334# This code is free software; you can redistribute it and/or modify it
4335# under the terms of the GNU General Public License version 2 only, as
4336# published by the Free Software Foundation.  Oracle designates this
4337# particular file as subject to the "Classpath" exception as provided
4338# by Oracle in the LICENSE file that accompanied this code.
4339#
4340# This code is distributed in the hope that it will be useful, but WITHOUT
4341# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4342# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4343# version 2 for more details (a copy is included in the LICENSE file that
4344# accompanied this code).
4345#
4346# You should have received a copy of the GNU General Public License version
4347# 2 along with this work; if not, write to the Free Software Foundation,
4348# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4349#
4350# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4351# or visit www.oracle.com if you need additional information or have any
4352# questions.
4353#
4354
4355# Major library component reside in separate files.
4356#
4357# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4358# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4359#
4360# This code is free software; you can redistribute it and/or modify it
4361# under the terms of the GNU General Public License version 2 only, as
4362# published by the Free Software Foundation.  Oracle designates this
4363# particular file as subject to the "Classpath" exception as provided
4364# by Oracle in the LICENSE file that accompanied this code.
4365#
4366# This code is distributed in the hope that it will be useful, but WITHOUT
4367# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4368# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4369# version 2 for more details (a copy is included in the LICENSE file that
4370# accompanied this code).
4371#
4372# You should have received a copy of the GNU General Public License version
4373# 2 along with this work; if not, write to the Free Software Foundation,
4374# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4375#
4376# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4377# or visit www.oracle.com if you need additional information or have any
4378# questions.
4379#
4380
4381################################################################################
4382# Setup alsa (Advanced Linux Sound Architecture)
4383################################################################################
4384
4385
4386#
4387# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4388# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4389#
4390# This code is free software; you can redistribute it and/or modify it
4391# under the terms of the GNU General Public License version 2 only, as
4392# published by the Free Software Foundation.  Oracle designates this
4393# particular file as subject to the "Classpath" exception as provided
4394# by Oracle in the LICENSE file that accompanied this code.
4395#
4396# This code is distributed in the hope that it will be useful, but WITHOUT
4397# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4398# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4399# version 2 for more details (a copy is included in the LICENSE file that
4400# accompanied this code).
4401#
4402# You should have received a copy of the GNU General Public License version
4403# 2 along with this work; if not, write to the Free Software Foundation,
4404# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4405#
4406# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4407# or visit www.oracle.com if you need additional information or have any
4408# questions.
4409#
4410
4411################################################################################
4412# Setup bundled libraries.
4413#
4414# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4415# OpenJDK repository. Default is to use these libraries as bundled, but they
4416# might be replaced by en external version by the user.
4417################################################################################
4418
4419
4420################################################################################
4421# Setup libjpeg
4422################################################################################
4423
4424
4425################################################################################
4426# Setup giflib
4427################################################################################
4428
4429
4430################################################################################
4431# Setup libpng
4432################################################################################
4433
4434
4435################################################################################
4436# Setup zlib
4437################################################################################
4438
4439
4440################################################################################
4441# Setup lcms (Little CMS)
4442################################################################################
4443
4444
4445#
4446# Copyright (c) 2011, 2016, 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 cups (Common Unix Printing System)
4472################################################################################
4473
4474
4475#
4476# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4477# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4478#
4479# This code is free software; you can redistribute it and/or modify it
4480# under the terms of the GNU General Public License version 2 only, as
4481# published by the Free Software Foundation.  Oracle designates this
4482# particular file as subject to the "Classpath" exception as provided
4483# by Oracle in the LICENSE file that accompanied this code.
4484#
4485# This code is distributed in the hope that it will be useful, but WITHOUT
4486# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4487# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4488# version 2 for more details (a copy is included in the LICENSE file that
4489# accompanied this code).
4490#
4491# You should have received a copy of the GNU General Public License version
4492# 2 along with this work; if not, write to the Free Software Foundation,
4493# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4494#
4495# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496# or visit www.oracle.com if you need additional information or have any
4497# questions.
4498#
4499
4500################################################################################
4501# Setup libffi (Foreign Function Interface)
4502################################################################################
4503
4504
4505#
4506# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4508#
4509# This code is free software; you can redistribute it and/or modify it
4510# under the terms of the GNU General Public License version 2 only, as
4511# published by the Free Software Foundation.  Oracle designates this
4512# particular file as subject to the "Classpath" exception as provided
4513# by Oracle in the LICENSE file that accompanied this code.
4514#
4515# This code is distributed in the hope that it will be useful, but WITHOUT
4516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4518# version 2 for more details (a copy is included in the LICENSE file that
4519# accompanied this code).
4520#
4521# You should have received a copy of the GNU General Public License version
4522# 2 along with this work; if not, write to the Free Software Foundation,
4523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4524#
4525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4526# or visit www.oracle.com if you need additional information or have any
4527# questions.
4528#
4529
4530################################################################################
4531# Build the freetype lib from source
4532################################################################################
4533
4534
4535################################################################################
4536# Check if a potential freeype library match is correct and usable
4537################################################################################
4538
4539
4540################################################################################
4541# Setup freetype (The FreeType2 font rendering library)
4542################################################################################
4543
4544
4545#
4546# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4547# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4548#
4549# This code is free software; you can redistribute it and/or modify it
4550# under the terms of the GNU General Public License version 2 only, as
4551# published by the Free Software Foundation.  Oracle designates this
4552# particular file as subject to the "Classpath" exception as provided
4553# by Oracle in the LICENSE file that accompanied this code.
4554#
4555# This code is distributed in the hope that it will be useful, but WITHOUT
4556# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4557# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4558# version 2 for more details (a copy is included in the LICENSE file that
4559# accompanied this code).
4560#
4561# You should have received a copy of the GNU General Public License version
4562# 2 along with this work; if not, write to the Free Software Foundation,
4563# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4564#
4565# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4566# or visit www.oracle.com if you need additional information or have any
4567# questions.
4568#
4569
4570################################################################################
4571# Setup the standard C/C++ runtime libraries.
4572#
4573# Most importantly, determine if stdc++ should be linked statically or
4574# dynamically.
4575################################################################################
4576
4577
4578#
4579# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4581#
4582# This code is free software; you can redistribute it and/or modify it
4583# under the terms of the GNU General Public License version 2 only, as
4584# published by the Free Software Foundation.  Oracle designates this
4585# particular file as subject to the "Classpath" exception as provided
4586# by Oracle in the LICENSE file that accompanied this code.
4587#
4588# This code is distributed in the hope that it will be useful, but WITHOUT
4589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4591# version 2 for more details (a copy is included in the LICENSE file that
4592# accompanied this code).
4593#
4594# You should have received a copy of the GNU General Public License version
4595# 2 along with this work; if not, write to the Free Software Foundation,
4596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4597#
4598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4599# or visit www.oracle.com if you need additional information or have any
4600# questions.
4601#
4602
4603################################################################################
4604# Setup X11 Windows system
4605################################################################################
4606
4607
4608
4609################################################################################
4610# Determine which libraries are needed for this configuration
4611################################################################################
4612
4613
4614################################################################################
4615# Parse library options, and setup needed libraries
4616################################################################################
4617
4618
4619################################################################################
4620# Setup llvm (Low-Level VM)
4621################################################################################
4622
4623
4624################################################################################
4625# Setup various libraries, typically small system libraries
4626################################################################################
4627
4628
4629#
4630# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4631# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4632#
4633# This code is free software; you can redistribute it and/or modify it
4634# under the terms of the GNU General Public License version 2 only, as
4635# published by the Free Software Foundation.  Oracle designates this
4636# particular file as subject to the "Classpath" exception as provided
4637# by Oracle in the LICENSE file that accompanied this code.
4638#
4639# This code is distributed in the hope that it will be useful, but WITHOUT
4640# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4641# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4642# version 2 for more details (a copy is included in the LICENSE file that
4643# accompanied this code).
4644#
4645# You should have received a copy of the GNU General Public License version
4646# 2 along with this work; if not, write to the Free Software Foundation,
4647# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4648#
4649# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4650# or visit www.oracle.com if you need additional information or have any
4651# questions.
4652#
4653
4654# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4655# Converts autoconf style CPU name to OpenJDK style, into
4656# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4657
4658
4659# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4660# Converts autoconf style OS name to OpenJDK style, into
4661# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4662
4663
4664# Expects $host_os $host_cpu $build_os and $build_cpu
4665# and $with_target_bits to have been setup!
4666#
4667# Translate the standard triplet(quadruplet) definition
4668# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4669# OPENJDK_BUILD_OS, etc.
4670
4671
4672# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4673# accordingly. Must be done after setting up build and target system, but before
4674# doing anything else with these values.
4675
4676
4677# Setup the legacy variables, for controlling the old makefiles.
4678#
4679
4680
4681
4682
4683#%%% Build and target systems %%%
4684
4685
4686
4687
4688# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4689# Add -mX to various FLAGS variables.
4690
4691
4692
4693
4694
4695
4696#
4697# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4698# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4699#
4700# This code is free software; you can redistribute it and/or modify it
4701# under the terms of the GNU General Public License version 2 only, as
4702# published by the Free Software Foundation.  Oracle designates this
4703# particular file as subject to the "Classpath" exception as provided
4704# by Oracle in the LICENSE file that accompanied this code.
4705#
4706# This code is distributed in the hope that it will be useful, but WITHOUT
4707# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4708# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4709# version 2 for more details (a copy is included in the LICENSE file that
4710# accompanied this code).
4711#
4712# You should have received a copy of the GNU General Public License version
4713# 2 along with this work; if not, write to the Free Software Foundation,
4714# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4715#
4716# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4717# or visit www.oracle.com if you need additional information or have any
4718# questions.
4719#
4720
4721
4722
4723
4724
4725
4726
4727################################################################################
4728# Define a mechanism for importing extra prebuilt modules
4729#
4730
4731
4732
4733#
4734# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4735# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4736#
4737# This code is free software; you can redistribute it and/or modify it
4738# under the terms of the GNU General Public License version 2 only, as
4739# published by the Free Software Foundation.  Oracle designates this
4740# particular file as subject to the "Classpath" exception as provided
4741# by Oracle in the LICENSE file that accompanied this code.
4742#
4743# This code is distributed in the hope that it will be useful, but WITHOUT
4744# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4745# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4746# version 2 for more details (a copy is included in the LICENSE file that
4747# accompanied this code).
4748#
4749# You should have received a copy of the GNU General Public License version
4750# 2 along with this work; if not, write to the Free Software Foundation,
4751# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4752#
4753# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4754# or visit www.oracle.com if you need additional information or have any
4755# questions.
4756#
4757
4758########################################################################
4759# This file is responsible for detecting, verifying and setting up the
4760# toolchain, i.e. the compiler, linker and related utilities. It will setup
4761# proper paths to the binaries, but it will not setup any flags.
4762#
4763# The binaries used is determined by the toolchain type, which is the family of
4764# compilers and related tools that are used.
4765########################################################################
4766
4767
4768# All valid toolchains, regardless of platform (used by help.m4)
4769VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4770
4771# These toolchains are valid on different platforms
4772VALID_TOOLCHAINS_linux="gcc clang"
4773VALID_TOOLCHAINS_solaris="solstudio"
4774VALID_TOOLCHAINS_macosx="gcc clang"
4775VALID_TOOLCHAINS_aix="xlc"
4776VALID_TOOLCHAINS_windows="microsoft"
4777
4778# Toolchain descriptions
4779TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4780TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4781TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4782TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4783TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4784
4785# Minimum supported versions, empty means unspecified
4786TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4787TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4788TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4789TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4790TOOLCHAIN_MINIMUM_VERSION_xlc=""
4791
4792# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4793# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4794
4795
4796# Check if the configured compiler (C and C++) is of a specific version or
4797# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4798#
4799# Arguments:
4800#   VERSION:   The version string to check against the found version
4801#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4802#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4803
4804
4805
4806
4807# Setup a number of variables describing how native output files are
4808# named on this platform/toolchain.
4809
4810
4811# Determine which toolchain type to use, and make sure it is valid for this
4812# platform. Setup various information about the selected toolchain.
4813
4814
4815# Before we start detecting the toolchain executables, we might need some
4816# special setup, e.g. additional paths etc.
4817
4818
4819# Restore path, etc
4820
4821
4822# Check if a compiler is of the toolchain type we expect, and save the version
4823# information from it. If the compiler does not match the expected type,
4824# this function will abort using AC_MSG_ERROR. If it matches, the version will
4825# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4826# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4827#
4828# $1 = compiler to test (CC or CXX)
4829# $2 = human readable name of compiler (C or C++)
4830
4831
4832# Try to locate the given C or C++ compiler in the path, or otherwise.
4833#
4834# $1 = compiler to test (CC or CXX)
4835# $2 = human readable name of compiler (C or C++)
4836# $3 = list of compiler names to search for
4837
4838
4839# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4840# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4841# archiver (AR). Verify that the compilers are correct according to the
4842# toolchain type.
4843
4844
4845# Setup additional tools that is considered a part of the toolchain, but not the
4846# core part. Many of these are highly platform-specific and do not exist,
4847# and/or are not needed on all platforms.
4848
4849
4850# Setup the build tools (i.e, the compiler and linker used to build programs
4851# that should be run on the build platform, not the target platform, as a build
4852# helper). Since the non-cross-compile case uses the normal, target compilers
4853# for this, we can only do this after these have been setup.
4854
4855
4856# Setup legacy variables that are still needed as alternative ways to refer to
4857# parts of the toolchain.
4858
4859
4860# Do some additional checks on the detected tools.
4861
4862
4863# Setup the JTReg Regression Test Harness.
4864
4865
4866#
4867# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4868# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4869#
4870# This code is free software; you can redistribute it and/or modify it
4871# under the terms of the GNU General Public License version 2 only, as
4872# published by the Free Software Foundation.  Oracle designates this
4873# particular file as subject to the "Classpath" exception as provided
4874# by Oracle in the LICENSE file that accompanied this code.
4875#
4876# This code is distributed in the hope that it will be useful, but WITHOUT
4877# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4878# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4879# version 2 for more details (a copy is included in the LICENSE file that
4880# accompanied this code).
4881#
4882# You should have received a copy of the GNU General Public License version
4883# 2 along with this work; if not, write to the Free Software Foundation,
4884# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4885#
4886# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4887# or visit www.oracle.com if you need additional information or have any
4888# questions.
4889#
4890
4891################################################################################
4892# The order of these defines the priority by which we try to find them.
4893VALID_VS_VERSIONS="2013 2012 2010"
4894
4895VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4896VS_VERSION_INTERNAL_2010=100
4897VS_MSVCR_2010=msvcr100.dll
4898# We don't use msvcp on Visual Studio 2010
4899#VS_MSVCP_2010=msvcp100.dll
4900VS_ENVVAR_2010="VS100COMNTOOLS"
4901VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4902VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4903VS_VS_PLATFORM_NAME_2010="v100"
4904VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4905
4906VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4907VS_VERSION_INTERNAL_2012=110
4908VS_MSVCR_2012=msvcr110.dll
4909VS_MSVCP_2012=msvcp110.dll
4910VS_ENVVAR_2012="VS110COMNTOOLS"
4911VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4912VS_SDK_INSTALLDIR_2012=
4913VS_VS_PLATFORM_NAME_2012="v110"
4914VS_SDK_PLATFORM_NAME_2012=
4915
4916VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4917VS_VERSION_INTERNAL_2013=120
4918VS_MSVCR_2013=msvcr120.dll
4919VS_MSVCP_2013=msvcp120.dll
4920VS_ENVVAR_2013="VS120COMNTOOLS"
4921VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4922VS_SDK_INSTALLDIR_2013=
4923VS_VS_PLATFORM_NAME_2013="v120"
4924VS_SDK_PLATFORM_NAME_2013=
4925
4926################################################################################
4927
4928
4929
4930################################################################################
4931
4932
4933
4934################################################################################
4935# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4936# build environment and assigns it to VS_ENV_CMD
4937
4938
4939################################################################################
4940
4941
4942
4943################################################################################
4944# Check if the VS env variables were setup prior to running configure.
4945# If not, then find vcvarsall.bat and run it automatically, and integrate
4946# the set env variables into the spec file.
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961# This line needs to be here, verbatim, after all includes and the dummy hook
4962# definitions. It is replaced with custom functionality when building
4963# custom sources.
4964#CUSTOM_AUTOCONF_INCLUDE
4965
4966# Do not change or remove the following line, it is needed for consistency checks:
4967DATE_WHEN_GENERATED=1460713327
4968
4969###############################################################################
4970#
4971# Initialization / Boot-strapping
4972#
4973# The bootstrapping process needs to solve the "chicken or the egg" problem,
4974# thus it jumps back and forth, each time gaining something needed later on.
4975#
4976###############################################################################
4977
4978# If we are requested to print additional help, do that and then exit.
4979# This must be the very first call.
4980
4981  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
4982
4983    # Print available toolchains
4984    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4985    $PRINTF "Which are valid to use depends on the build platform.\n"
4986    for toolchain in $VALID_TOOLCHAINS_all; do
4987      # Use indirect variable referencing
4988      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4989      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4990      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4991    done
4992
4993    # And now exit directly
4994    exit 0
4995  fi
4996
4997
4998# Basic initialization that must happen first of all in the normal process.
4999
5000  # Save the original command line. This is passed to us by the wrapper configure script.
5001
5002  # Save the path variable before it gets changed
5003  ORIGINAL_PATH="$PATH"
5004
5005  DATE_WHEN_CONFIGURED=`LANG=C date`
5006
5007  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5008$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5010$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5011
5012
5013  # Start with tools that do not need have cross compilation support
5014  # and can be expected to be found in the default PATH. These tools are
5015  # used by configure.
5016
5017  # First are all the simple required tools.
5018
5019
5020
5021  # Publish this variable in the help.
5022
5023
5024  if [ -z "${BASENAME+x}" ]; then
5025    # The variable is not set by user, try to locate tool using the code snippet
5026    for ac_prog in basename
5027do
5028  # Extract the first word of "$ac_prog", so it can be a program name with args.
5029set dummy $ac_prog; ac_word=$2
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
5032if ${ac_cv_path_BASENAME+:} false; then :
5033  $as_echo_n "(cached) " >&6
5034else
5035  case $BASENAME in
5036  [\\/]* | ?:[\\/]*)
5037  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5038  ;;
5039  *)
5040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in $PATH
5042do
5043  IFS=$as_save_IFS
5044  test -z "$as_dir" && as_dir=.
5045    for ac_exec_ext in '' $ac_executable_extensions; do
5046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5047    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049    break 2
5050  fi
5051done
5052  done
5053IFS=$as_save_IFS
5054
5055  ;;
5056esac
5057fi
5058BASENAME=$ac_cv_path_BASENAME
5059if test -n "$BASENAME"; then
5060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5061$as_echo "$BASENAME" >&6; }
5062else
5063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
5065fi
5066
5067
5068  test -n "$BASENAME" && break
5069done
5070
5071  else
5072    # The variable is set, but is it from the command line or the environment?
5073
5074    # Try to remove the string !BASENAME! from our list.
5075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5077      # If it failed, the variable was not from the command line. Ignore it,
5078      # but warn the user (except for BASH, which is always set by the calling BASH).
5079      if test "xBASENAME" != xBASH; then
5080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5081$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5082      fi
5083      # Try to locate tool using the code snippet
5084      for ac_prog in basename
5085do
5086  # Extract the first word of "$ac_prog", so it can be a program name with args.
5087set dummy $ac_prog; ac_word=$2
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
5090if ${ac_cv_path_BASENAME+:} false; then :
5091  $as_echo_n "(cached) " >&6
5092else
5093  case $BASENAME in
5094  [\\/]* | ?:[\\/]*)
5095  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5096  ;;
5097  *)
5098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101  IFS=$as_save_IFS
5102  test -z "$as_dir" && as_dir=.
5103    for ac_exec_ext in '' $ac_executable_extensions; do
5104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107    break 2
5108  fi
5109done
5110  done
5111IFS=$as_save_IFS
5112
5113  ;;
5114esac
5115fi
5116BASENAME=$ac_cv_path_BASENAME
5117if test -n "$BASENAME"; then
5118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5119$as_echo "$BASENAME" >&6; }
5120else
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
5123fi
5124
5125
5126  test -n "$BASENAME" && break
5127done
5128
5129    else
5130      # If it succeeded, then it was overridden by the user. We will use it
5131      # for the tool.
5132
5133      # First remove it from the list of overridden variables, so we can test
5134      # for unknown variables in the end.
5135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5136
5137      # Check if we try to supply an empty value
5138      if test "x$BASENAME" = x; then
5139        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5140$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5141        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5142$as_echo_n "checking for BASENAME... " >&6; }
5143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5144$as_echo "disabled" >&6; }
5145      else
5146        # Check if the provided tool contains a complete path.
5147        tool_specified="$BASENAME"
5148        tool_basename="${tool_specified##*/}"
5149        if test "x$tool_basename" = "x$tool_specified"; then
5150          # A command without a complete path is provided, search $PATH.
5151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5152$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5153          # Extract the first word of "$tool_basename", so it can be a program name with args.
5154set dummy $tool_basename; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_BASENAME+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $BASENAME in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183BASENAME=$ac_cv_path_BASENAME
5184if test -n "$BASENAME"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5186$as_echo "$BASENAME" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193          if test "x$BASENAME" = x; then
5194            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5195          fi
5196        else
5197          # Otherwise we believe it is a complete path. Use it as it is.
5198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5199$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5200          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5201$as_echo_n "checking for BASENAME... " >&6; }
5202          if test ! -x "$tool_specified"; then
5203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5204$as_echo "not found" >&6; }
5205            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5206          fi
5207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5208$as_echo "$tool_specified" >&6; }
5209        fi
5210      fi
5211    fi
5212
5213  fi
5214
5215
5216
5217  if test "x$BASENAME" = x; then
5218    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5219  fi
5220
5221
5222
5223
5224
5225  # Publish this variable in the help.
5226
5227
5228  if [ -z "${BASH+x}" ]; then
5229    # The variable is not set by user, try to locate tool using the code snippet
5230    for ac_prog in bash
5231do
5232  # Extract the first word of "$ac_prog", so it can be a program name with args.
5233set dummy $ac_prog; ac_word=$2
5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5235$as_echo_n "checking for $ac_word... " >&6; }
5236if ${ac_cv_path_BASH+:} false; then :
5237  $as_echo_n "(cached) " >&6
5238else
5239  case $BASH in
5240  [\\/]* | ?:[\\/]*)
5241  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5242  ;;
5243  *)
5244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247  IFS=$as_save_IFS
5248  test -z "$as_dir" && as_dir=.
5249    for ac_exec_ext in '' $ac_executable_extensions; do
5250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5251    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5253    break 2
5254  fi
5255done
5256  done
5257IFS=$as_save_IFS
5258
5259  ;;
5260esac
5261fi
5262BASH=$ac_cv_path_BASH
5263if test -n "$BASH"; then
5264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5265$as_echo "$BASH" >&6; }
5266else
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
5269fi
5270
5271
5272  test -n "$BASH" && break
5273done
5274
5275  else
5276    # The variable is set, but is it from the command line or the environment?
5277
5278    # Try to remove the string !BASH! from our list.
5279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5281      # If it failed, the variable was not from the command line. Ignore it,
5282      # but warn the user (except for BASH, which is always set by the calling BASH).
5283      if test "xBASH" != xBASH; then
5284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5285$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5286      fi
5287      # Try to locate tool using the code snippet
5288      for ac_prog in bash
5289do
5290  # Extract the first word of "$ac_prog", so it can be a program name with args.
5291set dummy $ac_prog; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASH+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASH in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASH=$ac_cv_path_BASH
5321if test -n "$BASH"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5323$as_echo "$BASH" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330  test -n "$BASH" && break
5331done
5332
5333    else
5334      # If it succeeded, then it was overridden by the user. We will use it
5335      # for the tool.
5336
5337      # First remove it from the list of overridden variables, so we can test
5338      # for unknown variables in the end.
5339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5340
5341      # Check if we try to supply an empty value
5342      if test "x$BASH" = x; then
5343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5344$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5346$as_echo_n "checking for BASH... " >&6; }
5347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5348$as_echo "disabled" >&6; }
5349      else
5350        # Check if the provided tool contains a complete path.
5351        tool_specified="$BASH"
5352        tool_basename="${tool_specified##*/}"
5353        if test "x$tool_basename" = "x$tool_specified"; then
5354          # A command without a complete path is provided, search $PATH.
5355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5356$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5357          # Extract the first word of "$tool_basename", so it can be a program name with args.
5358set dummy $tool_basename; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_BASH+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $BASH in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387BASH=$ac_cv_path_BASH
5388if test -n "$BASH"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5390$as_echo "$BASH" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397          if test "x$BASH" = x; then
5398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5399          fi
5400        else
5401          # Otherwise we believe it is a complete path. Use it as it is.
5402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5403$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5405$as_echo_n "checking for BASH... " >&6; }
5406          if test ! -x "$tool_specified"; then
5407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5408$as_echo "not found" >&6; }
5409            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5410          fi
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5412$as_echo "$tool_specified" >&6; }
5413        fi
5414      fi
5415    fi
5416
5417  fi
5418
5419
5420
5421  if test "x$BASH" = x; then
5422    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5423  fi
5424
5425
5426
5427
5428
5429  # Publish this variable in the help.
5430
5431
5432  if [ -z "${CAT+x}" ]; then
5433    # The variable is not set by user, try to locate tool using the code snippet
5434    for ac_prog in cat
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_CAT+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $CAT in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466CAT=$ac_cv_path_CAT
5467if test -n "$CAT"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5469$as_echo "$CAT" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$CAT" && break
5477done
5478
5479  else
5480    # The variable is set, but is it from the command line or the environment?
5481
5482    # Try to remove the string !CAT! from our list.
5483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5485      # If it failed, the variable was not from the command line. Ignore it,
5486      # but warn the user (except for BASH, which is always set by the calling BASH).
5487      if test "xCAT" != xBASH; then
5488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5489$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5490      fi
5491      # Try to locate tool using the code snippet
5492      for ac_prog in cat
5493do
5494  # Extract the first word of "$ac_prog", so it can be a program name with args.
5495set dummy $ac_prog; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_CAT+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $CAT in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524CAT=$ac_cv_path_CAT
5525if test -n "$CAT"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5527$as_echo "$CAT" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534  test -n "$CAT" && break
5535done
5536
5537    else
5538      # If it succeeded, then it was overridden by the user. We will use it
5539      # for the tool.
5540
5541      # First remove it from the list of overridden variables, so we can test
5542      # for unknown variables in the end.
5543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5544
5545      # Check if we try to supply an empty value
5546      if test "x$CAT" = x; then
5547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5548$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5550$as_echo_n "checking for CAT... " >&6; }
5551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5552$as_echo "disabled" >&6; }
5553      else
5554        # Check if the provided tool contains a complete path.
5555        tool_specified="$CAT"
5556        tool_basename="${tool_specified##*/}"
5557        if test "x$tool_basename" = "x$tool_specified"; then
5558          # A command without a complete path is provided, search $PATH.
5559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5560$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5561          # Extract the first word of "$tool_basename", so it can be a program name with args.
5562set dummy $tool_basename; ac_word=$2
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564$as_echo_n "checking for $ac_word... " >&6; }
5565if ${ac_cv_path_CAT+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568  case $CAT in
5569  [\\/]* | ?:[\\/]*)
5570  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5571  ;;
5572  *)
5573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576  IFS=$as_save_IFS
5577  test -z "$as_dir" && as_dir=.
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582    break 2
5583  fi
5584done
5585  done
5586IFS=$as_save_IFS
5587
5588  ;;
5589esac
5590fi
5591CAT=$ac_cv_path_CAT
5592if test -n "$CAT"; then
5593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5594$as_echo "$CAT" >&6; }
5595else
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597$as_echo "no" >&6; }
5598fi
5599
5600
5601          if test "x$CAT" = x; then
5602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5603          fi
5604        else
5605          # Otherwise we believe it is a complete path. Use it as it is.
5606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5607$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5609$as_echo_n "checking for CAT... " >&6; }
5610          if test ! -x "$tool_specified"; then
5611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5612$as_echo "not found" >&6; }
5613            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5614          fi
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5616$as_echo "$tool_specified" >&6; }
5617        fi
5618      fi
5619    fi
5620
5621  fi
5622
5623
5624
5625  if test "x$CAT" = x; then
5626    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5627  fi
5628
5629
5630
5631
5632
5633  # Publish this variable in the help.
5634
5635
5636  if [ -z "${CHMOD+x}" ]; then
5637    # The variable is not set by user, try to locate tool using the code snippet
5638    for ac_prog in chmod
5639do
5640  # Extract the first word of "$ac_prog", so it can be a program name with args.
5641set dummy $ac_prog; ac_word=$2
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
5644if ${ac_cv_path_CHMOD+:} false; then :
5645  $as_echo_n "(cached) " >&6
5646else
5647  case $CHMOD in
5648  [\\/]* | ?:[\\/]*)
5649  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5650  ;;
5651  *)
5652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655  IFS=$as_save_IFS
5656  test -z "$as_dir" && as_dir=.
5657    for ac_exec_ext in '' $ac_executable_extensions; do
5658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661    break 2
5662  fi
5663done
5664  done
5665IFS=$as_save_IFS
5666
5667  ;;
5668esac
5669fi
5670CHMOD=$ac_cv_path_CHMOD
5671if test -n "$CHMOD"; then
5672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5673$as_echo "$CHMOD" >&6; }
5674else
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680  test -n "$CHMOD" && break
5681done
5682
5683  else
5684    # The variable is set, but is it from the command line or the environment?
5685
5686    # Try to remove the string !CHMOD! from our list.
5687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5689      # If it failed, the variable was not from the command line. Ignore it,
5690      # but warn the user (except for BASH, which is always set by the calling BASH).
5691      if test "xCHMOD" != xBASH; then
5692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5693$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5694      fi
5695      # Try to locate tool using the code snippet
5696      for ac_prog in chmod
5697do
5698  # Extract the first word of "$ac_prog", so it can be a program name with args.
5699set dummy $ac_prog; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CHMOD+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CHMOD in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CHMOD=$ac_cv_path_CHMOD
5729if test -n "$CHMOD"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5731$as_echo "$CHMOD" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738  test -n "$CHMOD" && break
5739done
5740
5741    else
5742      # If it succeeded, then it was overridden by the user. We will use it
5743      # for the tool.
5744
5745      # First remove it from the list of overridden variables, so we can test
5746      # for unknown variables in the end.
5747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5748
5749      # Check if we try to supply an empty value
5750      if test "x$CHMOD" = x; then
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5752$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5754$as_echo_n "checking for CHMOD... " >&6; }
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5756$as_echo "disabled" >&6; }
5757      else
5758        # Check if the provided tool contains a complete path.
5759        tool_specified="$CHMOD"
5760        tool_basename="${tool_specified##*/}"
5761        if test "x$tool_basename" = "x$tool_specified"; then
5762          # A command without a complete path is provided, search $PATH.
5763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5764$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5765          # Extract the first word of "$tool_basename", so it can be a program name with args.
5766set dummy $tool_basename; ac_word=$2
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if ${ac_cv_path_CHMOD+:} false; then :
5770  $as_echo_n "(cached) " >&6
5771else
5772  case $CHMOD in
5773  [\\/]* | ?:[\\/]*)
5774  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5775  ;;
5776  *)
5777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780  IFS=$as_save_IFS
5781  test -z "$as_dir" && as_dir=.
5782    for ac_exec_ext in '' $ac_executable_extensions; do
5783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786    break 2
5787  fi
5788done
5789  done
5790IFS=$as_save_IFS
5791
5792  ;;
5793esac
5794fi
5795CHMOD=$ac_cv_path_CHMOD
5796if test -n "$CHMOD"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5798$as_echo "$CHMOD" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805          if test "x$CHMOD" = x; then
5806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5807          fi
5808        else
5809          # Otherwise we believe it is a complete path. Use it as it is.
5810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5811$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5813$as_echo_n "checking for CHMOD... " >&6; }
5814          if test ! -x "$tool_specified"; then
5815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5816$as_echo "not found" >&6; }
5817            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5818          fi
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5820$as_echo "$tool_specified" >&6; }
5821        fi
5822      fi
5823    fi
5824
5825  fi
5826
5827
5828
5829  if test "x$CHMOD" = x; then
5830    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5831  fi
5832
5833
5834
5835
5836
5837  # Publish this variable in the help.
5838
5839
5840  if [ -z "${CMP+x}" ]; then
5841    # The variable is not set by user, try to locate tool using the code snippet
5842    for ac_prog in cmp
5843do
5844  # Extract the first word of "$ac_prog", so it can be a program name with args.
5845set dummy $ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_path_CMP+:} false; then :
5849  $as_echo_n "(cached) " >&6
5850else
5851  case $CMP in
5852  [\\/]* | ?:[\\/]*)
5853  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5854  ;;
5855  *)
5856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859  IFS=$as_save_IFS
5860  test -z "$as_dir" && as_dir=.
5861    for ac_exec_ext in '' $ac_executable_extensions; do
5862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5863    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865    break 2
5866  fi
5867done
5868  done
5869IFS=$as_save_IFS
5870
5871  ;;
5872esac
5873fi
5874CMP=$ac_cv_path_CMP
5875if test -n "$CMP"; then
5876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5877$as_echo "$CMP" >&6; }
5878else
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884  test -n "$CMP" && break
5885done
5886
5887  else
5888    # The variable is set, but is it from the command line or the environment?
5889
5890    # Try to remove the string !CMP! from our list.
5891    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5892    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5893      # If it failed, the variable was not from the command line. Ignore it,
5894      # but warn the user (except for BASH, which is always set by the calling BASH).
5895      if test "xCMP" != xBASH; then
5896        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5897$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5898      fi
5899      # Try to locate tool using the code snippet
5900      for ac_prog in cmp
5901do
5902  # Extract the first word of "$ac_prog", so it can be a program name with args.
5903set dummy $ac_prog; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CMP+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CMP in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CMP=$ac_cv_path_CMP
5933if test -n "$CMP"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5935$as_echo "$CMP" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942  test -n "$CMP" && break
5943done
5944
5945    else
5946      # If it succeeded, then it was overridden by the user. We will use it
5947      # for the tool.
5948
5949      # First remove it from the list of overridden variables, so we can test
5950      # for unknown variables in the end.
5951      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5952
5953      # Check if we try to supply an empty value
5954      if test "x$CMP" = x; then
5955        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5956$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5958$as_echo_n "checking for CMP... " >&6; }
5959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5960$as_echo "disabled" >&6; }
5961      else
5962        # Check if the provided tool contains a complete path.
5963        tool_specified="$CMP"
5964        tool_basename="${tool_specified##*/}"
5965        if test "x$tool_basename" = "x$tool_specified"; then
5966          # A command without a complete path is provided, search $PATH.
5967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5968$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5969          # Extract the first word of "$tool_basename", so it can be a program name with args.
5970set dummy $tool_basename; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CMP+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CMP in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CMP=$ac_cv_path_CMP
6000if test -n "$CMP"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6002$as_echo "$CMP" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009          if test "x$CMP" = x; then
6010            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011          fi
6012        else
6013          # Otherwise we believe it is a complete path. Use it as it is.
6014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6015$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6016          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6017$as_echo_n "checking for CMP... " >&6; }
6018          if test ! -x "$tool_specified"; then
6019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020$as_echo "not found" >&6; }
6021            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6022          fi
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024$as_echo "$tool_specified" >&6; }
6025        fi
6026      fi
6027    fi
6028
6029  fi
6030
6031
6032
6033  if test "x$CMP" = x; then
6034    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6035  fi
6036
6037
6038
6039
6040
6041  # Publish this variable in the help.
6042
6043
6044  if [ -z "${COMM+x}" ]; then
6045    # The variable is not set by user, try to locate tool using the code snippet
6046    for ac_prog in comm
6047do
6048  # Extract the first word of "$ac_prog", so it can be a program name with args.
6049set dummy $ac_prog; ac_word=$2
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6051$as_echo_n "checking for $ac_word... " >&6; }
6052if ${ac_cv_path_COMM+:} false; then :
6053  $as_echo_n "(cached) " >&6
6054else
6055  case $COMM in
6056  [\\/]* | ?:[\\/]*)
6057  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6058  ;;
6059  *)
6060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063  IFS=$as_save_IFS
6064  test -z "$as_dir" && as_dir=.
6065    for ac_exec_ext in '' $ac_executable_extensions; do
6066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6067    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069    break 2
6070  fi
6071done
6072  done
6073IFS=$as_save_IFS
6074
6075  ;;
6076esac
6077fi
6078COMM=$ac_cv_path_COMM
6079if test -n "$COMM"; then
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6081$as_echo "$COMM" >&6; }
6082else
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088  test -n "$COMM" && break
6089done
6090
6091  else
6092    # The variable is set, but is it from the command line or the environment?
6093
6094    # Try to remove the string !COMM! from our list.
6095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6097      # If it failed, the variable was not from the command line. Ignore it,
6098      # but warn the user (except for BASH, which is always set by the calling BASH).
6099      if test "xCOMM" != xBASH; then
6100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6101$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6102      fi
6103      # Try to locate tool using the code snippet
6104      for ac_prog in comm
6105do
6106  # Extract the first word of "$ac_prog", so it can be a program name with args.
6107set dummy $ac_prog; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_COMM+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $COMM in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136COMM=$ac_cv_path_COMM
6137if test -n "$COMM"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6139$as_echo "$COMM" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146  test -n "$COMM" && break
6147done
6148
6149    else
6150      # If it succeeded, then it was overridden by the user. We will use it
6151      # for the tool.
6152
6153      # First remove it from the list of overridden variables, so we can test
6154      # for unknown variables in the end.
6155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6156
6157      # Check if we try to supply an empty value
6158      if test "x$COMM" = x; then
6159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6160$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6162$as_echo_n "checking for COMM... " >&6; }
6163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6164$as_echo "disabled" >&6; }
6165      else
6166        # Check if the provided tool contains a complete path.
6167        tool_specified="$COMM"
6168        tool_basename="${tool_specified##*/}"
6169        if test "x$tool_basename" = "x$tool_specified"; then
6170          # A command without a complete path is provided, search $PATH.
6171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6172$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6173          # Extract the first word of "$tool_basename", so it can be a program name with args.
6174set dummy $tool_basename; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_path_COMM+:} false; then :
6178  $as_echo_n "(cached) " >&6
6179else
6180  case $COMM in
6181  [\\/]* | ?:[\\/]*)
6182  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6183  ;;
6184  *)
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6192    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6194    break 2
6195  fi
6196done
6197  done
6198IFS=$as_save_IFS
6199
6200  ;;
6201esac
6202fi
6203COMM=$ac_cv_path_COMM
6204if test -n "$COMM"; then
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6206$as_echo "$COMM" >&6; }
6207else
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213          if test "x$COMM" = x; then
6214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6215          fi
6216        else
6217          # Otherwise we believe it is a complete path. Use it as it is.
6218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6219$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6221$as_echo_n "checking for COMM... " >&6; }
6222          if test ! -x "$tool_specified"; then
6223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6224$as_echo "not found" >&6; }
6225            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6226          fi
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6228$as_echo "$tool_specified" >&6; }
6229        fi
6230      fi
6231    fi
6232
6233  fi
6234
6235
6236
6237  if test "x$COMM" = x; then
6238    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6239  fi
6240
6241
6242
6243
6244
6245  # Publish this variable in the help.
6246
6247
6248  if [ -z "${CP+x}" ]; then
6249    # The variable is not set by user, try to locate tool using the code snippet
6250    for ac_prog in cp
6251do
6252  # Extract the first word of "$ac_prog", so it can be a program name with args.
6253set dummy $ac_prog; ac_word=$2
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255$as_echo_n "checking for $ac_word... " >&6; }
6256if ${ac_cv_path_CP+:} false; then :
6257  $as_echo_n "(cached) " >&6
6258else
6259  case $CP in
6260  [\\/]* | ?:[\\/]*)
6261  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6262  ;;
6263  *)
6264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267  IFS=$as_save_IFS
6268  test -z "$as_dir" && as_dir=.
6269    for ac_exec_ext in '' $ac_executable_extensions; do
6270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273    break 2
6274  fi
6275done
6276  done
6277IFS=$as_save_IFS
6278
6279  ;;
6280esac
6281fi
6282CP=$ac_cv_path_CP
6283if test -n "$CP"; then
6284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6285$as_echo "$CP" >&6; }
6286else
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
6289fi
6290
6291
6292  test -n "$CP" && break
6293done
6294
6295  else
6296    # The variable is set, but is it from the command line or the environment?
6297
6298    # Try to remove the string !CP! from our list.
6299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6301      # If it failed, the variable was not from the command line. Ignore it,
6302      # but warn the user (except for BASH, which is always set by the calling BASH).
6303      if test "xCP" != xBASH; then
6304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6305$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6306      fi
6307      # Try to locate tool using the code snippet
6308      for ac_prog in cp
6309do
6310  # Extract the first word of "$ac_prog", so it can be a program name with args.
6311set dummy $ac_prog; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_CP+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $CP in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340CP=$ac_cv_path_CP
6341if test -n "$CP"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6343$as_echo "$CP" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350  test -n "$CP" && break
6351done
6352
6353    else
6354      # If it succeeded, then it was overridden by the user. We will use it
6355      # for the tool.
6356
6357      # First remove it from the list of overridden variables, so we can test
6358      # for unknown variables in the end.
6359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6360
6361      # Check if we try to supply an empty value
6362      if test "x$CP" = x; then
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6364$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6366$as_echo_n "checking for CP... " >&6; }
6367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6368$as_echo "disabled" >&6; }
6369      else
6370        # Check if the provided tool contains a complete path.
6371        tool_specified="$CP"
6372        tool_basename="${tool_specified##*/}"
6373        if test "x$tool_basename" = "x$tool_specified"; then
6374          # A command without a complete path is provided, search $PATH.
6375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6376$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6377          # Extract the first word of "$tool_basename", so it can be a program name with args.
6378set dummy $tool_basename; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_CP+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CP in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CP=$ac_cv_path_CP
6408if test -n "$CP"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6410$as_echo "$CP" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417          if test "x$CP" = x; then
6418            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6419          fi
6420        else
6421          # Otherwise we believe it is a complete path. Use it as it is.
6422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6423$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6424          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6425$as_echo_n "checking for CP... " >&6; }
6426          if test ! -x "$tool_specified"; then
6427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6428$as_echo "not found" >&6; }
6429            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6430          fi
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6432$as_echo "$tool_specified" >&6; }
6433        fi
6434      fi
6435    fi
6436
6437  fi
6438
6439
6440
6441  if test "x$CP" = x; then
6442    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6443  fi
6444
6445
6446
6447
6448
6449  # Publish this variable in the help.
6450
6451
6452  if [ -z "${CUT+x}" ]; then
6453    # The variable is not set by user, try to locate tool using the code snippet
6454    for ac_prog in cut
6455do
6456  # Extract the first word of "$ac_prog", so it can be a program name with args.
6457set dummy $ac_prog; ac_word=$2
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459$as_echo_n "checking for $ac_word... " >&6; }
6460if ${ac_cv_path_CUT+:} false; then :
6461  $as_echo_n "(cached) " >&6
6462else
6463  case $CUT in
6464  [\\/]* | ?:[\\/]*)
6465  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6466  ;;
6467  *)
6468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469for as_dir in $PATH
6470do
6471  IFS=$as_save_IFS
6472  test -z "$as_dir" && as_dir=.
6473    for ac_exec_ext in '' $ac_executable_extensions; do
6474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6475    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477    break 2
6478  fi
6479done
6480  done
6481IFS=$as_save_IFS
6482
6483  ;;
6484esac
6485fi
6486CUT=$ac_cv_path_CUT
6487if test -n "$CUT"; then
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6489$as_echo "$CUT" >&6; }
6490else
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495
6496  test -n "$CUT" && break
6497done
6498
6499  else
6500    # The variable is set, but is it from the command line or the environment?
6501
6502    # Try to remove the string !CUT! from our list.
6503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6505      # If it failed, the variable was not from the command line. Ignore it,
6506      # but warn the user (except for BASH, which is always set by the calling BASH).
6507      if test "xCUT" != xBASH; then
6508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6509$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6510      fi
6511      # Try to locate tool using the code snippet
6512      for ac_prog in cut
6513do
6514  # Extract the first word of "$ac_prog", so it can be a program name with args.
6515set dummy $ac_prog; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CUT+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CUT in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CUT=$ac_cv_path_CUT
6545if test -n "$CUT"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6547$as_echo "$CUT" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554  test -n "$CUT" && break
6555done
6556
6557    else
6558      # If it succeeded, then it was overridden by the user. We will use it
6559      # for the tool.
6560
6561      # First remove it from the list of overridden variables, so we can test
6562      # for unknown variables in the end.
6563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6564
6565      # Check if we try to supply an empty value
6566      if test "x$CUT" = x; then
6567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6568$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6570$as_echo_n "checking for CUT... " >&6; }
6571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6572$as_echo "disabled" >&6; }
6573      else
6574        # Check if the provided tool contains a complete path.
6575        tool_specified="$CUT"
6576        tool_basename="${tool_specified##*/}"
6577        if test "x$tool_basename" = "x$tool_specified"; then
6578          # A command without a complete path is provided, search $PATH.
6579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6580$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6581          # Extract the first word of "$tool_basename", so it can be a program name with args.
6582set dummy $tool_basename; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_CUT+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $CUT in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611CUT=$ac_cv_path_CUT
6612if test -n "$CUT"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6614$as_echo "$CUT" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621          if test "x$CUT" = x; then
6622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6623          fi
6624        else
6625          # Otherwise we believe it is a complete path. Use it as it is.
6626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6627$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6629$as_echo_n "checking for CUT... " >&6; }
6630          if test ! -x "$tool_specified"; then
6631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6632$as_echo "not found" >&6; }
6633            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6634          fi
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6636$as_echo "$tool_specified" >&6; }
6637        fi
6638      fi
6639    fi
6640
6641  fi
6642
6643
6644
6645  if test "x$CUT" = x; then
6646    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6647  fi
6648
6649
6650
6651
6652
6653  # Publish this variable in the help.
6654
6655
6656  if [ -z "${DATE+x}" ]; then
6657    # The variable is not set by user, try to locate tool using the code snippet
6658    for ac_prog in date
6659do
6660  # Extract the first word of "$ac_prog", so it can be a program name with args.
6661set dummy $ac_prog; ac_word=$2
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6663$as_echo_n "checking for $ac_word... " >&6; }
6664if ${ac_cv_path_DATE+:} false; then :
6665  $as_echo_n "(cached) " >&6
6666else
6667  case $DATE in
6668  [\\/]* | ?:[\\/]*)
6669  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6670  ;;
6671  *)
6672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6673for as_dir in $PATH
6674do
6675  IFS=$as_save_IFS
6676  test -z "$as_dir" && as_dir=.
6677    for ac_exec_ext in '' $ac_executable_extensions; do
6678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6679    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6681    break 2
6682  fi
6683done
6684  done
6685IFS=$as_save_IFS
6686
6687  ;;
6688esac
6689fi
6690DATE=$ac_cv_path_DATE
6691if test -n "$DATE"; then
6692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6693$as_echo "$DATE" >&6; }
6694else
6695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696$as_echo "no" >&6; }
6697fi
6698
6699
6700  test -n "$DATE" && break
6701done
6702
6703  else
6704    # The variable is set, but is it from the command line or the environment?
6705
6706    # Try to remove the string !DATE! from our list.
6707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6709      # If it failed, the variable was not from the command line. Ignore it,
6710      # but warn the user (except for BASH, which is always set by the calling BASH).
6711      if test "xDATE" != xBASH; then
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6713$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6714      fi
6715      # Try to locate tool using the code snippet
6716      for ac_prog in date
6717do
6718  # Extract the first word of "$ac_prog", so it can be a program name with args.
6719set dummy $ac_prog; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_DATE+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $DATE in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748DATE=$ac_cv_path_DATE
6749if test -n "$DATE"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6751$as_echo "$DATE" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758  test -n "$DATE" && break
6759done
6760
6761    else
6762      # If it succeeded, then it was overridden by the user. We will use it
6763      # for the tool.
6764
6765      # First remove it from the list of overridden variables, so we can test
6766      # for unknown variables in the end.
6767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6768
6769      # Check if we try to supply an empty value
6770      if test "x$DATE" = x; then
6771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6772$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6774$as_echo_n "checking for DATE... " >&6; }
6775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6776$as_echo "disabled" >&6; }
6777      else
6778        # Check if the provided tool contains a complete path.
6779        tool_specified="$DATE"
6780        tool_basename="${tool_specified##*/}"
6781        if test "x$tool_basename" = "x$tool_specified"; then
6782          # A command without a complete path is provided, search $PATH.
6783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6784$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6785          # Extract the first word of "$tool_basename", so it can be a program name with args.
6786set dummy $tool_basename; ac_word=$2
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788$as_echo_n "checking for $ac_word... " >&6; }
6789if ${ac_cv_path_DATE+:} false; then :
6790  $as_echo_n "(cached) " >&6
6791else
6792  case $DATE in
6793  [\\/]* | ?:[\\/]*)
6794  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6795  ;;
6796  *)
6797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798for as_dir in $PATH
6799do
6800  IFS=$as_save_IFS
6801  test -z "$as_dir" && as_dir=.
6802    for ac_exec_ext in '' $ac_executable_extensions; do
6803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806    break 2
6807  fi
6808done
6809  done
6810IFS=$as_save_IFS
6811
6812  ;;
6813esac
6814fi
6815DATE=$ac_cv_path_DATE
6816if test -n "$DATE"; then
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6818$as_echo "$DATE" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823
6824
6825          if test "x$DATE" = x; then
6826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6827          fi
6828        else
6829          # Otherwise we believe it is a complete path. Use it as it is.
6830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6831$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6833$as_echo_n "checking for DATE... " >&6; }
6834          if test ! -x "$tool_specified"; then
6835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6836$as_echo "not found" >&6; }
6837            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6838          fi
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6840$as_echo "$tool_specified" >&6; }
6841        fi
6842      fi
6843    fi
6844
6845  fi
6846
6847
6848
6849  if test "x$DATE" = x; then
6850    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6851  fi
6852
6853
6854
6855
6856
6857  # Publish this variable in the help.
6858
6859
6860  if [ -z "${DIFF+x}" ]; then
6861    # The variable is not set by user, try to locate tool using the code snippet
6862    for ac_prog in gdiff diff
6863do
6864  # Extract the first word of "$ac_prog", so it can be a program name with args.
6865set dummy $ac_prog; ac_word=$2
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867$as_echo_n "checking for $ac_word... " >&6; }
6868if ${ac_cv_path_DIFF+:} false; then :
6869  $as_echo_n "(cached) " >&6
6870else
6871  case $DIFF in
6872  [\\/]* | ?:[\\/]*)
6873  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6874  ;;
6875  *)
6876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6877for as_dir in $PATH
6878do
6879  IFS=$as_save_IFS
6880  test -z "$as_dir" && as_dir=.
6881    for ac_exec_ext in '' $ac_executable_extensions; do
6882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6883    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6885    break 2
6886  fi
6887done
6888  done
6889IFS=$as_save_IFS
6890
6891  ;;
6892esac
6893fi
6894DIFF=$ac_cv_path_DIFF
6895if test -n "$DIFF"; then
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6897$as_echo "$DIFF" >&6; }
6898else
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6900$as_echo "no" >&6; }
6901fi
6902
6903
6904  test -n "$DIFF" && break
6905done
6906
6907  else
6908    # The variable is set, but is it from the command line or the environment?
6909
6910    # Try to remove the string !DIFF! from our list.
6911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6913      # If it failed, the variable was not from the command line. Ignore it,
6914      # but warn the user (except for BASH, which is always set by the calling BASH).
6915      if test "xDIFF" != xBASH; then
6916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6917$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6918      fi
6919      # Try to locate tool using the code snippet
6920      for ac_prog in gdiff diff
6921do
6922  # Extract the first word of "$ac_prog", so it can be a program name with args.
6923set dummy $ac_prog; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DIFF+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DIFF in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DIFF=$ac_cv_path_DIFF
6953if test -n "$DIFF"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6955$as_echo "$DIFF" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962  test -n "$DIFF" && break
6963done
6964
6965    else
6966      # If it succeeded, then it was overridden by the user. We will use it
6967      # for the tool.
6968
6969      # First remove it from the list of overridden variables, so we can test
6970      # for unknown variables in the end.
6971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6972
6973      # Check if we try to supply an empty value
6974      if test "x$DIFF" = x; then
6975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6976$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6978$as_echo_n "checking for DIFF... " >&6; }
6979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6980$as_echo "disabled" >&6; }
6981      else
6982        # Check if the provided tool contains a complete path.
6983        tool_specified="$DIFF"
6984        tool_basename="${tool_specified##*/}"
6985        if test "x$tool_basename" = "x$tool_specified"; then
6986          # A command without a complete path is provided, search $PATH.
6987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6988$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6989          # Extract the first word of "$tool_basename", so it can be a program name with args.
6990set dummy $tool_basename; ac_word=$2
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992$as_echo_n "checking for $ac_word... " >&6; }
6993if ${ac_cv_path_DIFF+:} false; then :
6994  $as_echo_n "(cached) " >&6
6995else
6996  case $DIFF in
6997  [\\/]* | ?:[\\/]*)
6998  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6999  ;;
7000  *)
7001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002for as_dir in $PATH
7003do
7004  IFS=$as_save_IFS
7005  test -z "$as_dir" && as_dir=.
7006    for ac_exec_ext in '' $ac_executable_extensions; do
7007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7008    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010    break 2
7011  fi
7012done
7013  done
7014IFS=$as_save_IFS
7015
7016  ;;
7017esac
7018fi
7019DIFF=$ac_cv_path_DIFF
7020if test -n "$DIFF"; then
7021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7022$as_echo "$DIFF" >&6; }
7023else
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025$as_echo "no" >&6; }
7026fi
7027
7028
7029          if test "x$DIFF" = x; then
7030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7031          fi
7032        else
7033          # Otherwise we believe it is a complete path. Use it as it is.
7034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7035$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7037$as_echo_n "checking for DIFF... " >&6; }
7038          if test ! -x "$tool_specified"; then
7039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7040$as_echo "not found" >&6; }
7041            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7042          fi
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7044$as_echo "$tool_specified" >&6; }
7045        fi
7046      fi
7047    fi
7048
7049  fi
7050
7051
7052
7053  if test "x$DIFF" = x; then
7054    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7055  fi
7056
7057
7058
7059
7060
7061  # Publish this variable in the help.
7062
7063
7064  if [ -z "${DIRNAME+x}" ]; then
7065    # The variable is not set by user, try to locate tool using the code snippet
7066    for ac_prog in dirname
7067do
7068  # Extract the first word of "$ac_prog", so it can be a program name with args.
7069set dummy $ac_prog; ac_word=$2
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071$as_echo_n "checking for $ac_word... " >&6; }
7072if ${ac_cv_path_DIRNAME+:} false; then :
7073  $as_echo_n "(cached) " >&6
7074else
7075  case $DIRNAME in
7076  [\\/]* | ?:[\\/]*)
7077  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7078  ;;
7079  *)
7080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081for as_dir in $PATH
7082do
7083  IFS=$as_save_IFS
7084  test -z "$as_dir" && as_dir=.
7085    for ac_exec_ext in '' $ac_executable_extensions; do
7086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089    break 2
7090  fi
7091done
7092  done
7093IFS=$as_save_IFS
7094
7095  ;;
7096esac
7097fi
7098DIRNAME=$ac_cv_path_DIRNAME
7099if test -n "$DIRNAME"; then
7100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7101$as_echo "$DIRNAME" >&6; }
7102else
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104$as_echo "no" >&6; }
7105fi
7106
7107
7108  test -n "$DIRNAME" && break
7109done
7110
7111  else
7112    # The variable is set, but is it from the command line or the environment?
7113
7114    # Try to remove the string !DIRNAME! from our list.
7115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7117      # If it failed, the variable was not from the command line. Ignore it,
7118      # but warn the user (except for BASH, which is always set by the calling BASH).
7119      if test "xDIRNAME" != xBASH; then
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7121$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7122      fi
7123      # Try to locate tool using the code snippet
7124      for ac_prog in dirname
7125do
7126  # Extract the first word of "$ac_prog", so it can be a program name with args.
7127set dummy $ac_prog; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIRNAME+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIRNAME in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIRNAME=$ac_cv_path_DIRNAME
7157if test -n "$DIRNAME"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7159$as_echo "$DIRNAME" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166  test -n "$DIRNAME" && break
7167done
7168
7169    else
7170      # If it succeeded, then it was overridden by the user. We will use it
7171      # for the tool.
7172
7173      # First remove it from the list of overridden variables, so we can test
7174      # for unknown variables in the end.
7175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7176
7177      # Check if we try to supply an empty value
7178      if test "x$DIRNAME" = x; then
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7180$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7182$as_echo_n "checking for DIRNAME... " >&6; }
7183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7184$as_echo "disabled" >&6; }
7185      else
7186        # Check if the provided tool contains a complete path.
7187        tool_specified="$DIRNAME"
7188        tool_basename="${tool_specified##*/}"
7189        if test "x$tool_basename" = "x$tool_specified"; then
7190          # A command without a complete path is provided, search $PATH.
7191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7192$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7193          # Extract the first word of "$tool_basename", so it can be a program name with args.
7194set dummy $tool_basename; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_DIRNAME+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $DIRNAME in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223DIRNAME=$ac_cv_path_DIRNAME
7224if test -n "$DIRNAME"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7226$as_echo "$DIRNAME" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233          if test "x$DIRNAME" = x; then
7234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7235          fi
7236        else
7237          # Otherwise we believe it is a complete path. Use it as it is.
7238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7239$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7241$as_echo_n "checking for DIRNAME... " >&6; }
7242          if test ! -x "$tool_specified"; then
7243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7244$as_echo "not found" >&6; }
7245            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7246          fi
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7248$as_echo "$tool_specified" >&6; }
7249        fi
7250      fi
7251    fi
7252
7253  fi
7254
7255
7256
7257  if test "x$DIRNAME" = x; then
7258    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7259  fi
7260
7261
7262
7263
7264
7265  # Publish this variable in the help.
7266
7267
7268  if [ -z "${ECHO+x}" ]; then
7269    # The variable is not set by user, try to locate tool using the code snippet
7270    for ac_prog in echo
7271do
7272  # Extract the first word of "$ac_prog", so it can be a program name with args.
7273set dummy $ac_prog; ac_word=$2
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7275$as_echo_n "checking for $ac_word... " >&6; }
7276if ${ac_cv_path_ECHO+:} false; then :
7277  $as_echo_n "(cached) " >&6
7278else
7279  case $ECHO in
7280  [\\/]* | ?:[\\/]*)
7281  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7282  ;;
7283  *)
7284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285for as_dir in $PATH
7286do
7287  IFS=$as_save_IFS
7288  test -z "$as_dir" && as_dir=.
7289    for ac_exec_ext in '' $ac_executable_extensions; do
7290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7291    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7293    break 2
7294  fi
7295done
7296  done
7297IFS=$as_save_IFS
7298
7299  ;;
7300esac
7301fi
7302ECHO=$ac_cv_path_ECHO
7303if test -n "$ECHO"; then
7304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7305$as_echo "$ECHO" >&6; }
7306else
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7308$as_echo "no" >&6; }
7309fi
7310
7311
7312  test -n "$ECHO" && break
7313done
7314
7315  else
7316    # The variable is set, but is it from the command line or the environment?
7317
7318    # Try to remove the string !ECHO! from our list.
7319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7321      # If it failed, the variable was not from the command line. Ignore it,
7322      # but warn the user (except for BASH, which is always set by the calling BASH).
7323      if test "xECHO" != xBASH; then
7324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7325$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7326      fi
7327      # Try to locate tool using the code snippet
7328      for ac_prog in echo
7329do
7330  # Extract the first word of "$ac_prog", so it can be a program name with args.
7331set dummy $ac_prog; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_ECHO+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $ECHO in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360ECHO=$ac_cv_path_ECHO
7361if test -n "$ECHO"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7363$as_echo "$ECHO" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370  test -n "$ECHO" && break
7371done
7372
7373    else
7374      # If it succeeded, then it was overridden by the user. We will use it
7375      # for the tool.
7376
7377      # First remove it from the list of overridden variables, so we can test
7378      # for unknown variables in the end.
7379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7380
7381      # Check if we try to supply an empty value
7382      if test "x$ECHO" = x; then
7383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7384$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7386$as_echo_n "checking for ECHO... " >&6; }
7387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7388$as_echo "disabled" >&6; }
7389      else
7390        # Check if the provided tool contains a complete path.
7391        tool_specified="$ECHO"
7392        tool_basename="${tool_specified##*/}"
7393        if test "x$tool_basename" = "x$tool_specified"; then
7394          # A command without a complete path is provided, search $PATH.
7395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7396$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7397          # Extract the first word of "$tool_basename", so it can be a program name with args.
7398set dummy $tool_basename; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_ECHO+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $ECHO in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427ECHO=$ac_cv_path_ECHO
7428if test -n "$ECHO"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7430$as_echo "$ECHO" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437          if test "x$ECHO" = x; then
7438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7439          fi
7440        else
7441          # Otherwise we believe it is a complete path. Use it as it is.
7442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7443$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7445$as_echo_n "checking for ECHO... " >&6; }
7446          if test ! -x "$tool_specified"; then
7447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7448$as_echo "not found" >&6; }
7449            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7450          fi
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7452$as_echo "$tool_specified" >&6; }
7453        fi
7454      fi
7455    fi
7456
7457  fi
7458
7459
7460
7461  if test "x$ECHO" = x; then
7462    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7463  fi
7464
7465
7466
7467
7468
7469  # Publish this variable in the help.
7470
7471
7472  if [ -z "${EXPR+x}" ]; then
7473    # The variable is not set by user, try to locate tool using the code snippet
7474    for ac_prog in expr
7475do
7476  # Extract the first word of "$ac_prog", so it can be a program name with args.
7477set dummy $ac_prog; ac_word=$2
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
7480if ${ac_cv_path_EXPR+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483  case $EXPR in
7484  [\\/]* | ?:[\\/]*)
7485  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7486  ;;
7487  *)
7488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491  IFS=$as_save_IFS
7492  test -z "$as_dir" && as_dir=.
7493    for ac_exec_ext in '' $ac_executable_extensions; do
7494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7495    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7497    break 2
7498  fi
7499done
7500  done
7501IFS=$as_save_IFS
7502
7503  ;;
7504esac
7505fi
7506EXPR=$ac_cv_path_EXPR
7507if test -n "$EXPR"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7509$as_echo "$EXPR" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514
7515
7516  test -n "$EXPR" && break
7517done
7518
7519  else
7520    # The variable is set, but is it from the command line or the environment?
7521
7522    # Try to remove the string !EXPR! from our list.
7523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7525      # If it failed, the variable was not from the command line. Ignore it,
7526      # but warn the user (except for BASH, which is always set by the calling BASH).
7527      if test "xEXPR" != xBASH; then
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7529$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7530      fi
7531      # Try to locate tool using the code snippet
7532      for ac_prog in expr
7533do
7534  # Extract the first word of "$ac_prog", so it can be a program name with args.
7535set dummy $ac_prog; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_EXPR+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $EXPR in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564EXPR=$ac_cv_path_EXPR
7565if test -n "$EXPR"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7567$as_echo "$EXPR" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574  test -n "$EXPR" && break
7575done
7576
7577    else
7578      # If it succeeded, then it was overridden by the user. We will use it
7579      # for the tool.
7580
7581      # First remove it from the list of overridden variables, so we can test
7582      # for unknown variables in the end.
7583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7584
7585      # Check if we try to supply an empty value
7586      if test "x$EXPR" = x; then
7587        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7588$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7590$as_echo_n "checking for EXPR... " >&6; }
7591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7592$as_echo "disabled" >&6; }
7593      else
7594        # Check if the provided tool contains a complete path.
7595        tool_specified="$EXPR"
7596        tool_basename="${tool_specified##*/}"
7597        if test "x$tool_basename" = "x$tool_specified"; then
7598          # A command without a complete path is provided, search $PATH.
7599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7600$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7601          # Extract the first word of "$tool_basename", so it can be a program name with args.
7602set dummy $tool_basename; ac_word=$2
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7604$as_echo_n "checking for $ac_word... " >&6; }
7605if ${ac_cv_path_EXPR+:} false; then :
7606  $as_echo_n "(cached) " >&6
7607else
7608  case $EXPR in
7609  [\\/]* | ?:[\\/]*)
7610  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7611  ;;
7612  *)
7613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614for as_dir in $PATH
7615do
7616  IFS=$as_save_IFS
7617  test -z "$as_dir" && as_dir=.
7618    for ac_exec_ext in '' $ac_executable_extensions; do
7619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7620    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7622    break 2
7623  fi
7624done
7625  done
7626IFS=$as_save_IFS
7627
7628  ;;
7629esac
7630fi
7631EXPR=$ac_cv_path_EXPR
7632if test -n "$EXPR"; then
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7634$as_echo "$EXPR" >&6; }
7635else
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637$as_echo "no" >&6; }
7638fi
7639
7640
7641          if test "x$EXPR" = x; then
7642            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7643          fi
7644        else
7645          # Otherwise we believe it is a complete path. Use it as it is.
7646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7647$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7649$as_echo_n "checking for EXPR... " >&6; }
7650          if test ! -x "$tool_specified"; then
7651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7652$as_echo "not found" >&6; }
7653            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7654          fi
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7656$as_echo "$tool_specified" >&6; }
7657        fi
7658      fi
7659    fi
7660
7661  fi
7662
7663
7664
7665  if test "x$EXPR" = x; then
7666    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7667  fi
7668
7669
7670
7671
7672
7673  # Publish this variable in the help.
7674
7675
7676  if [ -z "${FILE+x}" ]; then
7677    # The variable is not set by user, try to locate tool using the code snippet
7678    for ac_prog in file
7679do
7680  # Extract the first word of "$ac_prog", so it can be a program name with args.
7681set dummy $ac_prog; ac_word=$2
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7683$as_echo_n "checking for $ac_word... " >&6; }
7684if ${ac_cv_path_FILE+:} false; then :
7685  $as_echo_n "(cached) " >&6
7686else
7687  case $FILE in
7688  [\\/]* | ?:[\\/]*)
7689  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7690  ;;
7691  *)
7692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7693for as_dir in $PATH
7694do
7695  IFS=$as_save_IFS
7696  test -z "$as_dir" && as_dir=.
7697    for ac_exec_ext in '' $ac_executable_extensions; do
7698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7699    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7701    break 2
7702  fi
7703done
7704  done
7705IFS=$as_save_IFS
7706
7707  ;;
7708esac
7709fi
7710FILE=$ac_cv_path_FILE
7711if test -n "$FILE"; then
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7713$as_echo "$FILE" >&6; }
7714else
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
7717fi
7718
7719
7720  test -n "$FILE" && break
7721done
7722
7723  else
7724    # The variable is set, but is it from the command line or the environment?
7725
7726    # Try to remove the string !FILE! from our list.
7727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7729      # If it failed, the variable was not from the command line. Ignore it,
7730      # but warn the user (except for BASH, which is always set by the calling BASH).
7731      if test "xFILE" != xBASH; then
7732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7733$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7734      fi
7735      # Try to locate tool using the code snippet
7736      for ac_prog in file
7737do
7738  # Extract the first word of "$ac_prog", so it can be a program name with args.
7739set dummy $ac_prog; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_FILE+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $FILE in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768FILE=$ac_cv_path_FILE
7769if test -n "$FILE"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7771$as_echo "$FILE" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778  test -n "$FILE" && break
7779done
7780
7781    else
7782      # If it succeeded, then it was overridden by the user. We will use it
7783      # for the tool.
7784
7785      # First remove it from the list of overridden variables, so we can test
7786      # for unknown variables in the end.
7787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7788
7789      # Check if we try to supply an empty value
7790      if test "x$FILE" = x; then
7791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7792$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7794$as_echo_n "checking for FILE... " >&6; }
7795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7796$as_echo "disabled" >&6; }
7797      else
7798        # Check if the provided tool contains a complete path.
7799        tool_specified="$FILE"
7800        tool_basename="${tool_specified##*/}"
7801        if test "x$tool_basename" = "x$tool_specified"; then
7802          # A command without a complete path is provided, search $PATH.
7803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7804$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7805          # Extract the first word of "$tool_basename", so it can be a program name with args.
7806set dummy $tool_basename; ac_word=$2
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7808$as_echo_n "checking for $ac_word... " >&6; }
7809if ${ac_cv_path_FILE+:} false; then :
7810  $as_echo_n "(cached) " >&6
7811else
7812  case $FILE in
7813  [\\/]* | ?:[\\/]*)
7814  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7815  ;;
7816  *)
7817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822    for ac_exec_ext in '' $ac_executable_extensions; do
7823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7824    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7826    break 2
7827  fi
7828done
7829  done
7830IFS=$as_save_IFS
7831
7832  ;;
7833esac
7834fi
7835FILE=$ac_cv_path_FILE
7836if test -n "$FILE"; then
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7838$as_echo "$FILE" >&6; }
7839else
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
7842fi
7843
7844
7845          if test "x$FILE" = x; then
7846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7847          fi
7848        else
7849          # Otherwise we believe it is a complete path. Use it as it is.
7850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7851$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7853$as_echo_n "checking for FILE... " >&6; }
7854          if test ! -x "$tool_specified"; then
7855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7856$as_echo "not found" >&6; }
7857            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7858          fi
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7860$as_echo "$tool_specified" >&6; }
7861        fi
7862      fi
7863    fi
7864
7865  fi
7866
7867
7868
7869  if test "x$FILE" = x; then
7870    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7871  fi
7872
7873
7874
7875
7876
7877  # Publish this variable in the help.
7878
7879
7880  if [ -z "${FIND+x}" ]; then
7881    # The variable is not set by user, try to locate tool using the code snippet
7882    for ac_prog in find
7883do
7884  # Extract the first word of "$ac_prog", so it can be a program name with args.
7885set dummy $ac_prog; ac_word=$2
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887$as_echo_n "checking for $ac_word... " >&6; }
7888if ${ac_cv_path_FIND+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  case $FIND in
7892  [\\/]* | ?:[\\/]*)
7893  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7894  ;;
7895  *)
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  test -z "$as_dir" && as_dir=.
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911  ;;
7912esac
7913fi
7914FIND=$ac_cv_path_FIND
7915if test -n "$FIND"; then
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7917$as_echo "$FIND" >&6; }
7918else
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920$as_echo "no" >&6; }
7921fi
7922
7923
7924  test -n "$FIND" && break
7925done
7926
7927  else
7928    # The variable is set, but is it from the command line or the environment?
7929
7930    # Try to remove the string !FIND! from our list.
7931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7933      # If it failed, the variable was not from the command line. Ignore it,
7934      # but warn the user (except for BASH, which is always set by the calling BASH).
7935      if test "xFIND" != xBASH; then
7936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7937$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7938      fi
7939      # Try to locate tool using the code snippet
7940      for ac_prog in find
7941do
7942  # Extract the first word of "$ac_prog", so it can be a program name with args.
7943set dummy $ac_prog; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FIND+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FIND in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FIND=$ac_cv_path_FIND
7973if test -n "$FIND"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7975$as_echo "$FIND" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982  test -n "$FIND" && break
7983done
7984
7985    else
7986      # If it succeeded, then it was overridden by the user. We will use it
7987      # for the tool.
7988
7989      # First remove it from the list of overridden variables, so we can test
7990      # for unknown variables in the end.
7991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7992
7993      # Check if we try to supply an empty value
7994      if test "x$FIND" = x; then
7995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7996$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7998$as_echo_n "checking for FIND... " >&6; }
7999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8000$as_echo "disabled" >&6; }
8001      else
8002        # Check if the provided tool contains a complete path.
8003        tool_specified="$FIND"
8004        tool_basename="${tool_specified##*/}"
8005        if test "x$tool_basename" = "x$tool_specified"; then
8006          # A command without a complete path is provided, search $PATH.
8007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8008$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8009          # Extract the first word of "$tool_basename", so it can be a program name with args.
8010set dummy $tool_basename; ac_word=$2
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if ${ac_cv_path_FIND+:} false; then :
8014  $as_echo_n "(cached) " >&6
8015else
8016  case $FIND in
8017  [\\/]* | ?:[\\/]*)
8018  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8019  ;;
8020  *)
8021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024  IFS=$as_save_IFS
8025  test -z "$as_dir" && as_dir=.
8026    for ac_exec_ext in '' $ac_executable_extensions; do
8027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8028    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030    break 2
8031  fi
8032done
8033  done
8034IFS=$as_save_IFS
8035
8036  ;;
8037esac
8038fi
8039FIND=$ac_cv_path_FIND
8040if test -n "$FIND"; then
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8042$as_echo "$FIND" >&6; }
8043else
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049          if test "x$FIND" = x; then
8050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8051          fi
8052        else
8053          # Otherwise we believe it is a complete path. Use it as it is.
8054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8055$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8057$as_echo_n "checking for FIND... " >&6; }
8058          if test ! -x "$tool_specified"; then
8059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8060$as_echo "not found" >&6; }
8061            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8062          fi
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8064$as_echo "$tool_specified" >&6; }
8065        fi
8066      fi
8067    fi
8068
8069  fi
8070
8071
8072
8073  if test "x$FIND" = x; then
8074    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8075  fi
8076
8077
8078
8079
8080
8081  # Publish this variable in the help.
8082
8083
8084  if [ -z "${HEAD+x}" ]; then
8085    # The variable is not set by user, try to locate tool using the code snippet
8086    for ac_prog in head
8087do
8088  # Extract the first word of "$ac_prog", so it can be a program name with args.
8089set dummy $ac_prog; ac_word=$2
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091$as_echo_n "checking for $ac_word... " >&6; }
8092if ${ac_cv_path_HEAD+:} false; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  case $HEAD in
8096  [\\/]* | ?:[\\/]*)
8097  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8098  ;;
8099  *)
8100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101for as_dir in $PATH
8102do
8103  IFS=$as_save_IFS
8104  test -z "$as_dir" && as_dir=.
8105    for ac_exec_ext in '' $ac_executable_extensions; do
8106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8107    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8109    break 2
8110  fi
8111done
8112  done
8113IFS=$as_save_IFS
8114
8115  ;;
8116esac
8117fi
8118HEAD=$ac_cv_path_HEAD
8119if test -n "$HEAD"; then
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8121$as_echo "$HEAD" >&6; }
8122else
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124$as_echo "no" >&6; }
8125fi
8126
8127
8128  test -n "$HEAD" && break
8129done
8130
8131  else
8132    # The variable is set, but is it from the command line or the environment?
8133
8134    # Try to remove the string !HEAD! from our list.
8135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8137      # If it failed, the variable was not from the command line. Ignore it,
8138      # but warn the user (except for BASH, which is always set by the calling BASH).
8139      if test "xHEAD" != xBASH; then
8140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8141$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8142      fi
8143      # Try to locate tool using the code snippet
8144      for ac_prog in head
8145do
8146  # Extract the first word of "$ac_prog", so it can be a program name with args.
8147set dummy $ac_prog; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_HEAD+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $HEAD in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176HEAD=$ac_cv_path_HEAD
8177if test -n "$HEAD"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8179$as_echo "$HEAD" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186  test -n "$HEAD" && break
8187done
8188
8189    else
8190      # If it succeeded, then it was overridden by the user. We will use it
8191      # for the tool.
8192
8193      # First remove it from the list of overridden variables, so we can test
8194      # for unknown variables in the end.
8195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8196
8197      # Check if we try to supply an empty value
8198      if test "x$HEAD" = x; then
8199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8200$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8202$as_echo_n "checking for HEAD... " >&6; }
8203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8204$as_echo "disabled" >&6; }
8205      else
8206        # Check if the provided tool contains a complete path.
8207        tool_specified="$HEAD"
8208        tool_basename="${tool_specified##*/}"
8209        if test "x$tool_basename" = "x$tool_specified"; then
8210          # A command without a complete path is provided, search $PATH.
8211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8212$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8213          # Extract the first word of "$tool_basename", so it can be a program name with args.
8214set dummy $tool_basename; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_HEAD+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $HEAD in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243HEAD=$ac_cv_path_HEAD
8244if test -n "$HEAD"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8246$as_echo "$HEAD" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253          if test "x$HEAD" = x; then
8254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8255          fi
8256        else
8257          # Otherwise we believe it is a complete path. Use it as it is.
8258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8259$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8261$as_echo_n "checking for HEAD... " >&6; }
8262          if test ! -x "$tool_specified"; then
8263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8264$as_echo "not found" >&6; }
8265            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8266          fi
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8268$as_echo "$tool_specified" >&6; }
8269        fi
8270      fi
8271    fi
8272
8273  fi
8274
8275
8276
8277  if test "x$HEAD" = x; then
8278    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8279  fi
8280
8281
8282
8283
8284
8285  # Publish this variable in the help.
8286
8287
8288  if [ -z "${LN+x}" ]; then
8289    # The variable is not set by user, try to locate tool using the code snippet
8290    for ac_prog in ln
8291do
8292  # Extract the first word of "$ac_prog", so it can be a program name with args.
8293set dummy $ac_prog; ac_word=$2
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
8296if ${ac_cv_path_LN+:} false; then :
8297  $as_echo_n "(cached) " >&6
8298else
8299  case $LN in
8300  [\\/]* | ?:[\\/]*)
8301  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8302  ;;
8303  *)
8304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307  IFS=$as_save_IFS
8308  test -z "$as_dir" && as_dir=.
8309    for ac_exec_ext in '' $ac_executable_extensions; do
8310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313    break 2
8314  fi
8315done
8316  done
8317IFS=$as_save_IFS
8318
8319  ;;
8320esac
8321fi
8322LN=$ac_cv_path_LN
8323if test -n "$LN"; then
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8325$as_echo "$LN" >&6; }
8326else
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
8329fi
8330
8331
8332  test -n "$LN" && break
8333done
8334
8335  else
8336    # The variable is set, but is it from the command line or the environment?
8337
8338    # Try to remove the string !LN! from our list.
8339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8341      # If it failed, the variable was not from the command line. Ignore it,
8342      # but warn the user (except for BASH, which is always set by the calling BASH).
8343      if test "xLN" != xBASH; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8345$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8346      fi
8347      # Try to locate tool using the code snippet
8348      for ac_prog in ln
8349do
8350  # Extract the first word of "$ac_prog", so it can be a program name with args.
8351set dummy $ac_prog; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_LN+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $LN in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380LN=$ac_cv_path_LN
8381if test -n "$LN"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8383$as_echo "$LN" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390  test -n "$LN" && break
8391done
8392
8393    else
8394      # If it succeeded, then it was overridden by the user. We will use it
8395      # for the tool.
8396
8397      # First remove it from the list of overridden variables, so we can test
8398      # for unknown variables in the end.
8399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8400
8401      # Check if we try to supply an empty value
8402      if test "x$LN" = x; then
8403        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8404$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8406$as_echo_n "checking for LN... " >&6; }
8407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8408$as_echo "disabled" >&6; }
8409      else
8410        # Check if the provided tool contains a complete path.
8411        tool_specified="$LN"
8412        tool_basename="${tool_specified##*/}"
8413        if test "x$tool_basename" = "x$tool_specified"; then
8414          # A command without a complete path is provided, search $PATH.
8415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8416$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8417          # Extract the first word of "$tool_basename", so it can be a program name with args.
8418set dummy $tool_basename; ac_word=$2
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420$as_echo_n "checking for $ac_word... " >&6; }
8421if ${ac_cv_path_LN+:} false; then :
8422  $as_echo_n "(cached) " >&6
8423else
8424  case $LN in
8425  [\\/]* | ?:[\\/]*)
8426  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8427  ;;
8428  *)
8429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444  ;;
8445esac
8446fi
8447LN=$ac_cv_path_LN
8448if test -n "$LN"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8450$as_echo "$LN" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456
8457          if test "x$LN" = x; then
8458            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8459          fi
8460        else
8461          # Otherwise we believe it is a complete path. Use it as it is.
8462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8463$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8464          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8465$as_echo_n "checking for LN... " >&6; }
8466          if test ! -x "$tool_specified"; then
8467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8468$as_echo "not found" >&6; }
8469            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8470          fi
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8472$as_echo "$tool_specified" >&6; }
8473        fi
8474      fi
8475    fi
8476
8477  fi
8478
8479
8480
8481  if test "x$LN" = x; then
8482    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8483  fi
8484
8485
8486
8487
8488
8489  # Publish this variable in the help.
8490
8491
8492  if [ -z "${LS+x}" ]; then
8493    # The variable is not set by user, try to locate tool using the code snippet
8494    for ac_prog in ls
8495do
8496  # Extract the first word of "$ac_prog", so it can be a program name with args.
8497set dummy $ac_prog; ac_word=$2
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8499$as_echo_n "checking for $ac_word... " >&6; }
8500if ${ac_cv_path_LS+:} false; then :
8501  $as_echo_n "(cached) " >&6
8502else
8503  case $LS in
8504  [\\/]* | ?:[\\/]*)
8505  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8506  ;;
8507  *)
8508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8509for as_dir in $PATH
8510do
8511  IFS=$as_save_IFS
8512  test -z "$as_dir" && as_dir=.
8513    for ac_exec_ext in '' $ac_executable_extensions; do
8514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8515    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8517    break 2
8518  fi
8519done
8520  done
8521IFS=$as_save_IFS
8522
8523  ;;
8524esac
8525fi
8526LS=$ac_cv_path_LS
8527if test -n "$LS"; then
8528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8529$as_echo "$LS" >&6; }
8530else
8531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8532$as_echo "no" >&6; }
8533fi
8534
8535
8536  test -n "$LS" && break
8537done
8538
8539  else
8540    # The variable is set, but is it from the command line or the environment?
8541
8542    # Try to remove the string !LS! from our list.
8543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8545      # If it failed, the variable was not from the command line. Ignore it,
8546      # but warn the user (except for BASH, which is always set by the calling BASH).
8547      if test "xLS" != xBASH; then
8548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8549$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8550      fi
8551      # Try to locate tool using the code snippet
8552      for ac_prog in ls
8553do
8554  # Extract the first word of "$ac_prog", so it can be a program name with args.
8555set dummy $ac_prog; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_LS+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $LS in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584LS=$ac_cv_path_LS
8585if test -n "$LS"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8587$as_echo "$LS" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594  test -n "$LS" && break
8595done
8596
8597    else
8598      # If it succeeded, then it was overridden by the user. We will use it
8599      # for the tool.
8600
8601      # First remove it from the list of overridden variables, so we can test
8602      # for unknown variables in the end.
8603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8604
8605      # Check if we try to supply an empty value
8606      if test "x$LS" = x; then
8607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8608$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8610$as_echo_n "checking for LS... " >&6; }
8611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8612$as_echo "disabled" >&6; }
8613      else
8614        # Check if the provided tool contains a complete path.
8615        tool_specified="$LS"
8616        tool_basename="${tool_specified##*/}"
8617        if test "x$tool_basename" = "x$tool_specified"; then
8618          # A command without a complete path is provided, search $PATH.
8619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8620$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8621          # Extract the first word of "$tool_basename", so it can be a program name with args.
8622set dummy $tool_basename; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_LS+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $LS in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651LS=$ac_cv_path_LS
8652if test -n "$LS"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8654$as_echo "$LS" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661          if test "x$LS" = x; then
8662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8663          fi
8664        else
8665          # Otherwise we believe it is a complete path. Use it as it is.
8666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8667$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8669$as_echo_n "checking for LS... " >&6; }
8670          if test ! -x "$tool_specified"; then
8671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8672$as_echo "not found" >&6; }
8673            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8674          fi
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8676$as_echo "$tool_specified" >&6; }
8677        fi
8678      fi
8679    fi
8680
8681  fi
8682
8683
8684
8685  if test "x$LS" = x; then
8686    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8687  fi
8688
8689
8690
8691
8692
8693  # Publish this variable in the help.
8694
8695
8696  if [ -z "${MKDIR+x}" ]; then
8697    # The variable is not set by user, try to locate tool using the code snippet
8698    for ac_prog in mkdir
8699do
8700  # Extract the first word of "$ac_prog", so it can be a program name with args.
8701set dummy $ac_prog; ac_word=$2
8702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8703$as_echo_n "checking for $ac_word... " >&6; }
8704if ${ac_cv_path_MKDIR+:} false; then :
8705  $as_echo_n "(cached) " >&6
8706else
8707  case $MKDIR in
8708  [\\/]* | ?:[\\/]*)
8709  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8710  ;;
8711  *)
8712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $PATH
8714do
8715  IFS=$as_save_IFS
8716  test -z "$as_dir" && as_dir=.
8717    for ac_exec_ext in '' $ac_executable_extensions; do
8718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8719    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8721    break 2
8722  fi
8723done
8724  done
8725IFS=$as_save_IFS
8726
8727  ;;
8728esac
8729fi
8730MKDIR=$ac_cv_path_MKDIR
8731if test -n "$MKDIR"; then
8732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8733$as_echo "$MKDIR" >&6; }
8734else
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8736$as_echo "no" >&6; }
8737fi
8738
8739
8740  test -n "$MKDIR" && break
8741done
8742
8743  else
8744    # The variable is set, but is it from the command line or the environment?
8745
8746    # Try to remove the string !MKDIR! from our list.
8747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8749      # If it failed, the variable was not from the command line. Ignore it,
8750      # but warn the user (except for BASH, which is always set by the calling BASH).
8751      if test "xMKDIR" != xBASH; then
8752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8753$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8754      fi
8755      # Try to locate tool using the code snippet
8756      for ac_prog in mkdir
8757do
8758  # Extract the first word of "$ac_prog", so it can be a program name with args.
8759set dummy $ac_prog; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_MKDIR+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $MKDIR in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788MKDIR=$ac_cv_path_MKDIR
8789if test -n "$MKDIR"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8791$as_echo "$MKDIR" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798  test -n "$MKDIR" && break
8799done
8800
8801    else
8802      # If it succeeded, then it was overridden by the user. We will use it
8803      # for the tool.
8804
8805      # First remove it from the list of overridden variables, so we can test
8806      # for unknown variables in the end.
8807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8808
8809      # Check if we try to supply an empty value
8810      if test "x$MKDIR" = x; then
8811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8812$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8814$as_echo_n "checking for MKDIR... " >&6; }
8815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8816$as_echo "disabled" >&6; }
8817      else
8818        # Check if the provided tool contains a complete path.
8819        tool_specified="$MKDIR"
8820        tool_basename="${tool_specified##*/}"
8821        if test "x$tool_basename" = "x$tool_specified"; then
8822          # A command without a complete path is provided, search $PATH.
8823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8824$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8825          # Extract the first word of "$tool_basename", so it can be a program name with args.
8826set dummy $tool_basename; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_MKDIR+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $MKDIR in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855MKDIR=$ac_cv_path_MKDIR
8856if test -n "$MKDIR"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8858$as_echo "$MKDIR" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865          if test "x$MKDIR" = x; then
8866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8867          fi
8868        else
8869          # Otherwise we believe it is a complete path. Use it as it is.
8870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8871$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8873$as_echo_n "checking for MKDIR... " >&6; }
8874          if test ! -x "$tool_specified"; then
8875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8876$as_echo "not found" >&6; }
8877            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8878          fi
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8880$as_echo "$tool_specified" >&6; }
8881        fi
8882      fi
8883    fi
8884
8885  fi
8886
8887
8888
8889  if test "x$MKDIR" = x; then
8890    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8891  fi
8892
8893
8894
8895
8896
8897  # Publish this variable in the help.
8898
8899
8900  if [ -z "${MKTEMP+x}" ]; then
8901    # The variable is not set by user, try to locate tool using the code snippet
8902    for ac_prog in mktemp
8903do
8904  # Extract the first word of "$ac_prog", so it can be a program name with args.
8905set dummy $ac_prog; ac_word=$2
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if ${ac_cv_path_MKTEMP+:} false; then :
8909  $as_echo_n "(cached) " >&6
8910else
8911  case $MKTEMP in
8912  [\\/]* | ?:[\\/]*)
8913  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8914  ;;
8915  *)
8916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931  ;;
8932esac
8933fi
8934MKTEMP=$ac_cv_path_MKTEMP
8935if test -n "$MKTEMP"; then
8936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8937$as_echo "$MKTEMP" >&6; }
8938else
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
8941fi
8942
8943
8944  test -n "$MKTEMP" && break
8945done
8946
8947  else
8948    # The variable is set, but is it from the command line or the environment?
8949
8950    # Try to remove the string !MKTEMP! from our list.
8951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8953      # If it failed, the variable was not from the command line. Ignore it,
8954      # but warn the user (except for BASH, which is always set by the calling BASH).
8955      if test "xMKTEMP" != xBASH; then
8956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8957$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8958      fi
8959      # Try to locate tool using the code snippet
8960      for ac_prog in mktemp
8961do
8962  # Extract the first word of "$ac_prog", so it can be a program name with args.
8963set dummy $ac_prog; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_MKTEMP+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $MKTEMP in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992MKTEMP=$ac_cv_path_MKTEMP
8993if test -n "$MKTEMP"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8995$as_echo "$MKTEMP" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002  test -n "$MKTEMP" && break
9003done
9004
9005    else
9006      # If it succeeded, then it was overridden by the user. We will use it
9007      # for the tool.
9008
9009      # First remove it from the list of overridden variables, so we can test
9010      # for unknown variables in the end.
9011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9012
9013      # Check if we try to supply an empty value
9014      if test "x$MKTEMP" = x; then
9015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9016$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9018$as_echo_n "checking for MKTEMP... " >&6; }
9019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9020$as_echo "disabled" >&6; }
9021      else
9022        # Check if the provided tool contains a complete path.
9023        tool_specified="$MKTEMP"
9024        tool_basename="${tool_specified##*/}"
9025        if test "x$tool_basename" = "x$tool_specified"; then
9026          # A command without a complete path is provided, search $PATH.
9027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9028$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9029          # Extract the first word of "$tool_basename", so it can be a program name with args.
9030set dummy $tool_basename; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_MKTEMP+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $MKTEMP in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059MKTEMP=$ac_cv_path_MKTEMP
9060if test -n "$MKTEMP"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9062$as_echo "$MKTEMP" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069          if test "x$MKTEMP" = x; then
9070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9071          fi
9072        else
9073          # Otherwise we believe it is a complete path. Use it as it is.
9074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9075$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9077$as_echo_n "checking for MKTEMP... " >&6; }
9078          if test ! -x "$tool_specified"; then
9079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9080$as_echo "not found" >&6; }
9081            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9082          fi
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9084$as_echo "$tool_specified" >&6; }
9085        fi
9086      fi
9087    fi
9088
9089  fi
9090
9091
9092
9093  if test "x$MKTEMP" = x; then
9094    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9095  fi
9096
9097
9098
9099
9100
9101  # Publish this variable in the help.
9102
9103
9104  if [ -z "${MV+x}" ]; then
9105    # The variable is not set by user, try to locate tool using the code snippet
9106    for ac_prog in mv
9107do
9108  # Extract the first word of "$ac_prog", so it can be a program name with args.
9109set dummy $ac_prog; ac_word=$2
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9111$as_echo_n "checking for $ac_word... " >&6; }
9112if ${ac_cv_path_MV+:} false; then :
9113  $as_echo_n "(cached) " >&6
9114else
9115  case $MV in
9116  [\\/]* | ?:[\\/]*)
9117  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9118  ;;
9119  *)
9120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9121for as_dir in $PATH
9122do
9123  IFS=$as_save_IFS
9124  test -z "$as_dir" && as_dir=.
9125    for ac_exec_ext in '' $ac_executable_extensions; do
9126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9127    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9129    break 2
9130  fi
9131done
9132  done
9133IFS=$as_save_IFS
9134
9135  ;;
9136esac
9137fi
9138MV=$ac_cv_path_MV
9139if test -n "$MV"; then
9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9141$as_echo "$MV" >&6; }
9142else
9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
9145fi
9146
9147
9148  test -n "$MV" && break
9149done
9150
9151  else
9152    # The variable is set, but is it from the command line or the environment?
9153
9154    # Try to remove the string !MV! from our list.
9155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9157      # If it failed, the variable was not from the command line. Ignore it,
9158      # but warn the user (except for BASH, which is always set by the calling BASH).
9159      if test "xMV" != xBASH; then
9160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9161$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9162      fi
9163      # Try to locate tool using the code snippet
9164      for ac_prog in mv
9165do
9166  # Extract the first word of "$ac_prog", so it can be a program name with args.
9167set dummy $ac_prog; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_MV+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $MV in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196MV=$ac_cv_path_MV
9197if test -n "$MV"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9199$as_echo "$MV" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206  test -n "$MV" && break
9207done
9208
9209    else
9210      # If it succeeded, then it was overridden by the user. We will use it
9211      # for the tool.
9212
9213      # First remove it from the list of overridden variables, so we can test
9214      # for unknown variables in the end.
9215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9216
9217      # Check if we try to supply an empty value
9218      if test "x$MV" = x; then
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9220$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9222$as_echo_n "checking for MV... " >&6; }
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9224$as_echo "disabled" >&6; }
9225      else
9226        # Check if the provided tool contains a complete path.
9227        tool_specified="$MV"
9228        tool_basename="${tool_specified##*/}"
9229        if test "x$tool_basename" = "x$tool_specified"; then
9230          # A command without a complete path is provided, search $PATH.
9231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9232$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9233          # Extract the first word of "$tool_basename", so it can be a program name with args.
9234set dummy $tool_basename; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_MV+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $MV in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263MV=$ac_cv_path_MV
9264if test -n "$MV"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9266$as_echo "$MV" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273          if test "x$MV" = x; then
9274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9275          fi
9276        else
9277          # Otherwise we believe it is a complete path. Use it as it is.
9278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9279$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9281$as_echo_n "checking for MV... " >&6; }
9282          if test ! -x "$tool_specified"; then
9283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9284$as_echo "not found" >&6; }
9285            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9286          fi
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9288$as_echo "$tool_specified" >&6; }
9289        fi
9290      fi
9291    fi
9292
9293  fi
9294
9295
9296
9297  if test "x$MV" = x; then
9298    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9299  fi
9300
9301
9302
9303
9304
9305  # Publish this variable in the help.
9306
9307
9308  if [ -z "${NAWK+x}" ]; then
9309    # The variable is not set by user, try to locate tool using the code snippet
9310    for ac_prog in nawk gawk awk
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_NAWK+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $NAWK in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342NAWK=$ac_cv_path_NAWK
9343if test -n "$NAWK"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9345$as_echo "$NAWK" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$NAWK" && break
9353done
9354
9355  else
9356    # The variable is set, but is it from the command line or the environment?
9357
9358    # Try to remove the string !NAWK! from our list.
9359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9361      # If it failed, the variable was not from the command line. Ignore it,
9362      # but warn the user (except for BASH, which is always set by the calling BASH).
9363      if test "xNAWK" != xBASH; then
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9365$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9366      fi
9367      # Try to locate tool using the code snippet
9368      for ac_prog in nawk gawk awk
9369do
9370  # Extract the first word of "$ac_prog", so it can be a program name with args.
9371set dummy $ac_prog; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_NAWK+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $NAWK in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400NAWK=$ac_cv_path_NAWK
9401if test -n "$NAWK"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9403$as_echo "$NAWK" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410  test -n "$NAWK" && break
9411done
9412
9413    else
9414      # If it succeeded, then it was overridden by the user. We will use it
9415      # for the tool.
9416
9417      # First remove it from the list of overridden variables, so we can test
9418      # for unknown variables in the end.
9419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9420
9421      # Check if we try to supply an empty value
9422      if test "x$NAWK" = x; then
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9424$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9426$as_echo_n "checking for NAWK... " >&6; }
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9428$as_echo "disabled" >&6; }
9429      else
9430        # Check if the provided tool contains a complete path.
9431        tool_specified="$NAWK"
9432        tool_basename="${tool_specified##*/}"
9433        if test "x$tool_basename" = "x$tool_specified"; then
9434          # A command without a complete path is provided, search $PATH.
9435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9436$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9437          # Extract the first word of "$tool_basename", so it can be a program name with args.
9438set dummy $tool_basename; ac_word=$2
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9440$as_echo_n "checking for $ac_word... " >&6; }
9441if ${ac_cv_path_NAWK+:} false; then :
9442  $as_echo_n "(cached) " >&6
9443else
9444  case $NAWK in
9445  [\\/]* | ?:[\\/]*)
9446  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9447  ;;
9448  *)
9449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450for as_dir in $PATH
9451do
9452  IFS=$as_save_IFS
9453  test -z "$as_dir" && as_dir=.
9454    for ac_exec_ext in '' $ac_executable_extensions; do
9455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458    break 2
9459  fi
9460done
9461  done
9462IFS=$as_save_IFS
9463
9464  ;;
9465esac
9466fi
9467NAWK=$ac_cv_path_NAWK
9468if test -n "$NAWK"; then
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9470$as_echo "$NAWK" >&6; }
9471else
9472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
9474fi
9475
9476
9477          if test "x$NAWK" = x; then
9478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9479          fi
9480        else
9481          # Otherwise we believe it is a complete path. Use it as it is.
9482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9483$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9485$as_echo_n "checking for NAWK... " >&6; }
9486          if test ! -x "$tool_specified"; then
9487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9488$as_echo "not found" >&6; }
9489            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9490          fi
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9492$as_echo "$tool_specified" >&6; }
9493        fi
9494      fi
9495    fi
9496
9497  fi
9498
9499
9500
9501  if test "x$NAWK" = x; then
9502    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9503  fi
9504
9505
9506
9507
9508
9509  # Publish this variable in the help.
9510
9511
9512  if [ -z "${PRINTF+x}" ]; then
9513    # The variable is not set by user, try to locate tool using the code snippet
9514    for ac_prog in printf
9515do
9516  # Extract the first word of "$ac_prog", so it can be a program name with args.
9517set dummy $ac_prog; ac_word=$2
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519$as_echo_n "checking for $ac_word... " >&6; }
9520if ${ac_cv_path_PRINTF+:} false; then :
9521  $as_echo_n "(cached) " >&6
9522else
9523  case $PRINTF in
9524  [\\/]* | ?:[\\/]*)
9525  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9526  ;;
9527  *)
9528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529for as_dir in $PATH
9530do
9531  IFS=$as_save_IFS
9532  test -z "$as_dir" && as_dir=.
9533    for ac_exec_ext in '' $ac_executable_extensions; do
9534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537    break 2
9538  fi
9539done
9540  done
9541IFS=$as_save_IFS
9542
9543  ;;
9544esac
9545fi
9546PRINTF=$ac_cv_path_PRINTF
9547if test -n "$PRINTF"; then
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9549$as_echo "$PRINTF" >&6; }
9550else
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553fi
9554
9555
9556  test -n "$PRINTF" && break
9557done
9558
9559  else
9560    # The variable is set, but is it from the command line or the environment?
9561
9562    # Try to remove the string !PRINTF! from our list.
9563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9565      # If it failed, the variable was not from the command line. Ignore it,
9566      # but warn the user (except for BASH, which is always set by the calling BASH).
9567      if test "xPRINTF" != xBASH; then
9568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9569$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9570      fi
9571      # Try to locate tool using the code snippet
9572      for ac_prog in printf
9573do
9574  # Extract the first word of "$ac_prog", so it can be a program name with args.
9575set dummy $ac_prog; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_PRINTF+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $PRINTF in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604PRINTF=$ac_cv_path_PRINTF
9605if test -n "$PRINTF"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9607$as_echo "$PRINTF" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614  test -n "$PRINTF" && break
9615done
9616
9617    else
9618      # If it succeeded, then it was overridden by the user. We will use it
9619      # for the tool.
9620
9621      # First remove it from the list of overridden variables, so we can test
9622      # for unknown variables in the end.
9623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9624
9625      # Check if we try to supply an empty value
9626      if test "x$PRINTF" = x; then
9627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9628$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9630$as_echo_n "checking for PRINTF... " >&6; }
9631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9632$as_echo "disabled" >&6; }
9633      else
9634        # Check if the provided tool contains a complete path.
9635        tool_specified="$PRINTF"
9636        tool_basename="${tool_specified##*/}"
9637        if test "x$tool_basename" = "x$tool_specified"; then
9638          # A command without a complete path is provided, search $PATH.
9639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9640$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9641          # Extract the first word of "$tool_basename", so it can be a program name with args.
9642set dummy $tool_basename; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_PRINTF+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $PRINTF in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671PRINTF=$ac_cv_path_PRINTF
9672if test -n "$PRINTF"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9674$as_echo "$PRINTF" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681          if test "x$PRINTF" = x; then
9682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9683          fi
9684        else
9685          # Otherwise we believe it is a complete path. Use it as it is.
9686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9687$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9689$as_echo_n "checking for PRINTF... " >&6; }
9690          if test ! -x "$tool_specified"; then
9691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9692$as_echo "not found" >&6; }
9693            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9694          fi
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9696$as_echo "$tool_specified" >&6; }
9697        fi
9698      fi
9699    fi
9700
9701  fi
9702
9703
9704
9705  if test "x$PRINTF" = x; then
9706    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9707  fi
9708
9709
9710
9711
9712
9713  # Publish this variable in the help.
9714
9715
9716  if [ -z "${RM+x}" ]; then
9717    # The variable is not set by user, try to locate tool using the code snippet
9718    for ac_prog in rm
9719do
9720  # Extract the first word of "$ac_prog", so it can be a program name with args.
9721set dummy $ac_prog; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_RM+:} false; then :
9725  $as_echo_n "(cached) " >&6
9726else
9727  case $RM in
9728  [\\/]* | ?:[\\/]*)
9729  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9730  ;;
9731  *)
9732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735  IFS=$as_save_IFS
9736  test -z "$as_dir" && as_dir=.
9737    for ac_exec_ext in '' $ac_executable_extensions; do
9738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741    break 2
9742  fi
9743done
9744  done
9745IFS=$as_save_IFS
9746
9747  ;;
9748esac
9749fi
9750RM=$ac_cv_path_RM
9751if test -n "$RM"; then
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9753$as_echo "$RM" >&6; }
9754else
9755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760  test -n "$RM" && break
9761done
9762
9763  else
9764    # The variable is set, but is it from the command line or the environment?
9765
9766    # Try to remove the string !RM! from our list.
9767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9769      # If it failed, the variable was not from the command line. Ignore it,
9770      # but warn the user (except for BASH, which is always set by the calling BASH).
9771      if test "xRM" != xBASH; then
9772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9773$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9774      fi
9775      # Try to locate tool using the code snippet
9776      for ac_prog in rm
9777do
9778  # Extract the first word of "$ac_prog", so it can be a program name with args.
9779set dummy $ac_prog; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_RM+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $RM in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808RM=$ac_cv_path_RM
9809if test -n "$RM"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9811$as_echo "$RM" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818  test -n "$RM" && break
9819done
9820
9821    else
9822      # If it succeeded, then it was overridden by the user. We will use it
9823      # for the tool.
9824
9825      # First remove it from the list of overridden variables, so we can test
9826      # for unknown variables in the end.
9827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9828
9829      # Check if we try to supply an empty value
9830      if test "x$RM" = x; then
9831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9832$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9834$as_echo_n "checking for RM... " >&6; }
9835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9836$as_echo "disabled" >&6; }
9837      else
9838        # Check if the provided tool contains a complete path.
9839        tool_specified="$RM"
9840        tool_basename="${tool_specified##*/}"
9841        if test "x$tool_basename" = "x$tool_specified"; then
9842          # A command without a complete path is provided, search $PATH.
9843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9844$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9845          # Extract the first word of "$tool_basename", so it can be a program name with args.
9846set dummy $tool_basename; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if ${ac_cv_path_RM+:} false; then :
9850  $as_echo_n "(cached) " >&6
9851else
9852  case $RM in
9853  [\\/]* | ?:[\\/]*)
9854  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9855  ;;
9856  *)
9857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860  IFS=$as_save_IFS
9861  test -z "$as_dir" && as_dir=.
9862    for ac_exec_ext in '' $ac_executable_extensions; do
9863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9864    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866    break 2
9867  fi
9868done
9869  done
9870IFS=$as_save_IFS
9871
9872  ;;
9873esac
9874fi
9875RM=$ac_cv_path_RM
9876if test -n "$RM"; then
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9878$as_echo "$RM" >&6; }
9879else
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882fi
9883
9884
9885          if test "x$RM" = x; then
9886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9887          fi
9888        else
9889          # Otherwise we believe it is a complete path. Use it as it is.
9890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9891$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9893$as_echo_n "checking for RM... " >&6; }
9894          if test ! -x "$tool_specified"; then
9895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9896$as_echo "not found" >&6; }
9897            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9898          fi
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9900$as_echo "$tool_specified" >&6; }
9901        fi
9902      fi
9903    fi
9904
9905  fi
9906
9907
9908
9909  if test "x$RM" = x; then
9910    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9911  fi
9912
9913
9914
9915
9916
9917  # Publish this variable in the help.
9918
9919
9920  if [ -z "${RMDIR+x}" ]; then
9921    # The variable is not set by user, try to locate tool using the code snippet
9922    for ac_prog in rmdir
9923do
9924  # Extract the first word of "$ac_prog", so it can be a program name with args.
9925set dummy $ac_prog; ac_word=$2
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9927$as_echo_n "checking for $ac_word... " >&6; }
9928if ${ac_cv_path_RMDIR+:} false; then :
9929  $as_echo_n "(cached) " >&6
9930else
9931  case $RMDIR in
9932  [\\/]* | ?:[\\/]*)
9933  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9934  ;;
9935  *)
9936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9937for as_dir in $PATH
9938do
9939  IFS=$as_save_IFS
9940  test -z "$as_dir" && as_dir=.
9941    for ac_exec_ext in '' $ac_executable_extensions; do
9942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9943    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9945    break 2
9946  fi
9947done
9948  done
9949IFS=$as_save_IFS
9950
9951  ;;
9952esac
9953fi
9954RMDIR=$ac_cv_path_RMDIR
9955if test -n "$RMDIR"; then
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9957$as_echo "$RMDIR" >&6; }
9958else
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9960$as_echo "no" >&6; }
9961fi
9962
9963
9964  test -n "$RMDIR" && break
9965done
9966
9967  else
9968    # The variable is set, but is it from the command line or the environment?
9969
9970    # Try to remove the string !RMDIR! from our list.
9971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9973      # If it failed, the variable was not from the command line. Ignore it,
9974      # but warn the user (except for BASH, which is always set by the calling BASH).
9975      if test "xRMDIR" != xBASH; then
9976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9977$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9978      fi
9979      # Try to locate tool using the code snippet
9980      for ac_prog in rmdir
9981do
9982  # Extract the first word of "$ac_prog", so it can be a program name with args.
9983set dummy $ac_prog; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_RMDIR+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $RMDIR in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012RMDIR=$ac_cv_path_RMDIR
10013if test -n "$RMDIR"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10015$as_echo "$RMDIR" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022  test -n "$RMDIR" && break
10023done
10024
10025    else
10026      # If it succeeded, then it was overridden by the user. We will use it
10027      # for the tool.
10028
10029      # First remove it from the list of overridden variables, so we can test
10030      # for unknown variables in the end.
10031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10032
10033      # Check if we try to supply an empty value
10034      if test "x$RMDIR" = x; then
10035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10036$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10038$as_echo_n "checking for RMDIR... " >&6; }
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10040$as_echo "disabled" >&6; }
10041      else
10042        # Check if the provided tool contains a complete path.
10043        tool_specified="$RMDIR"
10044        tool_basename="${tool_specified##*/}"
10045        if test "x$tool_basename" = "x$tool_specified"; then
10046          # A command without a complete path is provided, search $PATH.
10047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10048$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10049          # Extract the first word of "$tool_basename", so it can be a program name with args.
10050set dummy $tool_basename; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_RMDIR+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $RMDIR in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079RMDIR=$ac_cv_path_RMDIR
10080if test -n "$RMDIR"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10082$as_echo "$RMDIR" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089          if test "x$RMDIR" = x; then
10090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10091          fi
10092        else
10093          # Otherwise we believe it is a complete path. Use it as it is.
10094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10095$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10097$as_echo_n "checking for RMDIR... " >&6; }
10098          if test ! -x "$tool_specified"; then
10099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10100$as_echo "not found" >&6; }
10101            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10102          fi
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10104$as_echo "$tool_specified" >&6; }
10105        fi
10106      fi
10107    fi
10108
10109  fi
10110
10111
10112
10113  if test "x$RMDIR" = x; then
10114    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10115  fi
10116
10117
10118
10119
10120
10121  # Publish this variable in the help.
10122
10123
10124  if [ -z "${SH+x}" ]; then
10125    # The variable is not set by user, try to locate tool using the code snippet
10126    for ac_prog in sh
10127do
10128  # Extract the first word of "$ac_prog", so it can be a program name with args.
10129set dummy $ac_prog; ac_word=$2
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10131$as_echo_n "checking for $ac_word... " >&6; }
10132if ${ac_cv_path_SH+:} false; then :
10133  $as_echo_n "(cached) " >&6
10134else
10135  case $SH in
10136  [\\/]* | ?:[\\/]*)
10137  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10138  ;;
10139  *)
10140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10141for as_dir in $PATH
10142do
10143  IFS=$as_save_IFS
10144  test -z "$as_dir" && as_dir=.
10145    for ac_exec_ext in '' $ac_executable_extensions; do
10146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10147    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10149    break 2
10150  fi
10151done
10152  done
10153IFS=$as_save_IFS
10154
10155  ;;
10156esac
10157fi
10158SH=$ac_cv_path_SH
10159if test -n "$SH"; then
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10161$as_echo "$SH" >&6; }
10162else
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168  test -n "$SH" && break
10169done
10170
10171  else
10172    # The variable is set, but is it from the command line or the environment?
10173
10174    # Try to remove the string !SH! from our list.
10175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10177      # If it failed, the variable was not from the command line. Ignore it,
10178      # but warn the user (except for BASH, which is always set by the calling BASH).
10179      if test "xSH" != xBASH; then
10180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10181$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10182      fi
10183      # Try to locate tool using the code snippet
10184      for ac_prog in sh
10185do
10186  # Extract the first word of "$ac_prog", so it can be a program name with args.
10187set dummy $ac_prog; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_SH+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $SH in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216SH=$ac_cv_path_SH
10217if test -n "$SH"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10219$as_echo "$SH" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226  test -n "$SH" && break
10227done
10228
10229    else
10230      # If it succeeded, then it was overridden by the user. We will use it
10231      # for the tool.
10232
10233      # First remove it from the list of overridden variables, so we can test
10234      # for unknown variables in the end.
10235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10236
10237      # Check if we try to supply an empty value
10238      if test "x$SH" = x; then
10239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10240$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10242$as_echo_n "checking for SH... " >&6; }
10243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10244$as_echo "disabled" >&6; }
10245      else
10246        # Check if the provided tool contains a complete path.
10247        tool_specified="$SH"
10248        tool_basename="${tool_specified##*/}"
10249        if test "x$tool_basename" = "x$tool_specified"; then
10250          # A command without a complete path is provided, search $PATH.
10251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10252$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10253          # Extract the first word of "$tool_basename", so it can be a program name with args.
10254set dummy $tool_basename; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_SH+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $SH in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283SH=$ac_cv_path_SH
10284if test -n "$SH"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10286$as_echo "$SH" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293          if test "x$SH" = x; then
10294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10295          fi
10296        else
10297          # Otherwise we believe it is a complete path. Use it as it is.
10298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10299$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10301$as_echo_n "checking for SH... " >&6; }
10302          if test ! -x "$tool_specified"; then
10303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10304$as_echo "not found" >&6; }
10305            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10306          fi
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10308$as_echo "$tool_specified" >&6; }
10309        fi
10310      fi
10311    fi
10312
10313  fi
10314
10315
10316
10317  if test "x$SH" = x; then
10318    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10319  fi
10320
10321
10322
10323
10324
10325  # Publish this variable in the help.
10326
10327
10328  if [ -z "${SORT+x}" ]; then
10329    # The variable is not set by user, try to locate tool using the code snippet
10330    for ac_prog in sort
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_SORT+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $SORT in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362SORT=$ac_cv_path_SORT
10363if test -n "$SORT"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10365$as_echo "$SORT" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372  test -n "$SORT" && break
10373done
10374
10375  else
10376    # The variable is set, but is it from the command line or the environment?
10377
10378    # Try to remove the string !SORT! from our list.
10379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10381      # If it failed, the variable was not from the command line. Ignore it,
10382      # but warn the user (except for BASH, which is always set by the calling BASH).
10383      if test "xSORT" != xBASH; then
10384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10385$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10386      fi
10387      # Try to locate tool using the code snippet
10388      for ac_prog in sort
10389do
10390  # Extract the first word of "$ac_prog", so it can be a program name with args.
10391set dummy $ac_prog; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_SORT+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $SORT in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420SORT=$ac_cv_path_SORT
10421if test -n "$SORT"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10423$as_echo "$SORT" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430  test -n "$SORT" && break
10431done
10432
10433    else
10434      # If it succeeded, then it was overridden by the user. We will use it
10435      # for the tool.
10436
10437      # First remove it from the list of overridden variables, so we can test
10438      # for unknown variables in the end.
10439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10440
10441      # Check if we try to supply an empty value
10442      if test "x$SORT" = x; then
10443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10444$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10446$as_echo_n "checking for SORT... " >&6; }
10447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10448$as_echo "disabled" >&6; }
10449      else
10450        # Check if the provided tool contains a complete path.
10451        tool_specified="$SORT"
10452        tool_basename="${tool_specified##*/}"
10453        if test "x$tool_basename" = "x$tool_specified"; then
10454          # A command without a complete path is provided, search $PATH.
10455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10456$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10457          # Extract the first word of "$tool_basename", so it can be a program name with args.
10458set dummy $tool_basename; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_SORT+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $SORT in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487SORT=$ac_cv_path_SORT
10488if test -n "$SORT"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10490$as_echo "$SORT" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497          if test "x$SORT" = x; then
10498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10499          fi
10500        else
10501          # Otherwise we believe it is a complete path. Use it as it is.
10502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10503$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10505$as_echo_n "checking for SORT... " >&6; }
10506          if test ! -x "$tool_specified"; then
10507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10508$as_echo "not found" >&6; }
10509            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10510          fi
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10512$as_echo "$tool_specified" >&6; }
10513        fi
10514      fi
10515    fi
10516
10517  fi
10518
10519
10520
10521  if test "x$SORT" = x; then
10522    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10523  fi
10524
10525
10526
10527
10528
10529  # Publish this variable in the help.
10530
10531
10532  if [ -z "${TAIL+x}" ]; then
10533    # The variable is not set by user, try to locate tool using the code snippet
10534    for ac_prog in tail
10535do
10536  # Extract the first word of "$ac_prog", so it can be a program name with args.
10537set dummy $ac_prog; ac_word=$2
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539$as_echo_n "checking for $ac_word... " >&6; }
10540if ${ac_cv_path_TAIL+:} false; then :
10541  $as_echo_n "(cached) " >&6
10542else
10543  case $TAIL in
10544  [\\/]* | ?:[\\/]*)
10545  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10546  ;;
10547  *)
10548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10549for as_dir in $PATH
10550do
10551  IFS=$as_save_IFS
10552  test -z "$as_dir" && as_dir=.
10553    for ac_exec_ext in '' $ac_executable_extensions; do
10554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10555    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10557    break 2
10558  fi
10559done
10560  done
10561IFS=$as_save_IFS
10562
10563  ;;
10564esac
10565fi
10566TAIL=$ac_cv_path_TAIL
10567if test -n "$TAIL"; then
10568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10569$as_echo "$TAIL" >&6; }
10570else
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573fi
10574
10575
10576  test -n "$TAIL" && break
10577done
10578
10579  else
10580    # The variable is set, but is it from the command line or the environment?
10581
10582    # Try to remove the string !TAIL! from our list.
10583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10585      # If it failed, the variable was not from the command line. Ignore it,
10586      # but warn the user (except for BASH, which is always set by the calling BASH).
10587      if test "xTAIL" != xBASH; then
10588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10589$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10590      fi
10591      # Try to locate tool using the code snippet
10592      for ac_prog in tail
10593do
10594  # Extract the first word of "$ac_prog", so it can be a program name with args.
10595set dummy $ac_prog; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_TAIL+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $TAIL in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624TAIL=$ac_cv_path_TAIL
10625if test -n "$TAIL"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10627$as_echo "$TAIL" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634  test -n "$TAIL" && break
10635done
10636
10637    else
10638      # If it succeeded, then it was overridden by the user. We will use it
10639      # for the tool.
10640
10641      # First remove it from the list of overridden variables, so we can test
10642      # for unknown variables in the end.
10643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10644
10645      # Check if we try to supply an empty value
10646      if test "x$TAIL" = x; then
10647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10648$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10650$as_echo_n "checking for TAIL... " >&6; }
10651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10652$as_echo "disabled" >&6; }
10653      else
10654        # Check if the provided tool contains a complete path.
10655        tool_specified="$TAIL"
10656        tool_basename="${tool_specified##*/}"
10657        if test "x$tool_basename" = "x$tool_specified"; then
10658          # A command without a complete path is provided, search $PATH.
10659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10660$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10661          # Extract the first word of "$tool_basename", so it can be a program name with args.
10662set dummy $tool_basename; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_TAIL+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $TAIL in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691TAIL=$ac_cv_path_TAIL
10692if test -n "$TAIL"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10694$as_echo "$TAIL" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701          if test "x$TAIL" = x; then
10702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10703          fi
10704        else
10705          # Otherwise we believe it is a complete path. Use it as it is.
10706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10707$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10709$as_echo_n "checking for TAIL... " >&6; }
10710          if test ! -x "$tool_specified"; then
10711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10712$as_echo "not found" >&6; }
10713            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10714          fi
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10716$as_echo "$tool_specified" >&6; }
10717        fi
10718      fi
10719    fi
10720
10721  fi
10722
10723
10724
10725  if test "x$TAIL" = x; then
10726    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10727  fi
10728
10729
10730
10731
10732
10733  # Publish this variable in the help.
10734
10735
10736  if [ -z "${TAR+x}" ]; then
10737    # The variable is not set by user, try to locate tool using the code snippet
10738    for ac_prog in tar
10739do
10740  # Extract the first word of "$ac_prog", so it can be a program name with args.
10741set dummy $ac_prog; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_TAR+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $TAR in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770TAR=$ac_cv_path_TAR
10771if test -n "$TAR"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10773$as_echo "$TAR" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780  test -n "$TAR" && break
10781done
10782
10783  else
10784    # The variable is set, but is it from the command line or the environment?
10785
10786    # Try to remove the string !TAR! from our list.
10787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10789      # If it failed, the variable was not from the command line. Ignore it,
10790      # but warn the user (except for BASH, which is always set by the calling BASH).
10791      if test "xTAR" != xBASH; then
10792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10793$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10794      fi
10795      # Try to locate tool using the code snippet
10796      for ac_prog in tar
10797do
10798  # Extract the first word of "$ac_prog", so it can be a program name with args.
10799set dummy $ac_prog; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_TAR+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $TAR in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828TAR=$ac_cv_path_TAR
10829if test -n "$TAR"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10831$as_echo "$TAR" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838  test -n "$TAR" && break
10839done
10840
10841    else
10842      # If it succeeded, then it was overridden by the user. We will use it
10843      # for the tool.
10844
10845      # First remove it from the list of overridden variables, so we can test
10846      # for unknown variables in the end.
10847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10848
10849      # Check if we try to supply an empty value
10850      if test "x$TAR" = x; then
10851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10852$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10854$as_echo_n "checking for TAR... " >&6; }
10855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10856$as_echo "disabled" >&6; }
10857      else
10858        # Check if the provided tool contains a complete path.
10859        tool_specified="$TAR"
10860        tool_basename="${tool_specified##*/}"
10861        if test "x$tool_basename" = "x$tool_specified"; then
10862          # A command without a complete path is provided, search $PATH.
10863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10864$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10865          # Extract the first word of "$tool_basename", so it can be a program name with args.
10866set dummy $tool_basename; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_TAR+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $TAR in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895TAR=$ac_cv_path_TAR
10896if test -n "$TAR"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10898$as_echo "$TAR" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905          if test "x$TAR" = x; then
10906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10907          fi
10908        else
10909          # Otherwise we believe it is a complete path. Use it as it is.
10910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10911$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10913$as_echo_n "checking for TAR... " >&6; }
10914          if test ! -x "$tool_specified"; then
10915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10916$as_echo "not found" >&6; }
10917            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10918          fi
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10920$as_echo "$tool_specified" >&6; }
10921        fi
10922      fi
10923    fi
10924
10925  fi
10926
10927
10928
10929  if test "x$TAR" = x; then
10930    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10931  fi
10932
10933
10934
10935
10936
10937  # Publish this variable in the help.
10938
10939
10940  if [ -z "${TEE+x}" ]; then
10941    # The variable is not set by user, try to locate tool using the code snippet
10942    for ac_prog in tee
10943do
10944  # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
10948if ${ac_cv_path_TEE+:} false; then :
10949  $as_echo_n "(cached) " >&6
10950else
10951  case $TEE in
10952  [\\/]* | ?:[\\/]*)
10953  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10954  ;;
10955  *)
10956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  test -z "$as_dir" && as_dir=.
10961    for ac_exec_ext in '' $ac_executable_extensions; do
10962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10963    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10965    break 2
10966  fi
10967done
10968  done
10969IFS=$as_save_IFS
10970
10971  ;;
10972esac
10973fi
10974TEE=$ac_cv_path_TEE
10975if test -n "$TEE"; then
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10977$as_echo "$TEE" >&6; }
10978else
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984  test -n "$TEE" && break
10985done
10986
10987  else
10988    # The variable is set, but is it from the command line or the environment?
10989
10990    # Try to remove the string !TEE! from our list.
10991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10993      # If it failed, the variable was not from the command line. Ignore it,
10994      # but warn the user (except for BASH, which is always set by the calling BASH).
10995      if test "xTEE" != xBASH; then
10996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10997$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10998      fi
10999      # Try to locate tool using the code snippet
11000      for ac_prog in tee
11001do
11002  # Extract the first word of "$ac_prog", so it can be a program name with args.
11003set dummy $ac_prog; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_TEE+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $TEE in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032TEE=$ac_cv_path_TEE
11033if test -n "$TEE"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11035$as_echo "$TEE" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042  test -n "$TEE" && break
11043done
11044
11045    else
11046      # If it succeeded, then it was overridden by the user. We will use it
11047      # for the tool.
11048
11049      # First remove it from the list of overridden variables, so we can test
11050      # for unknown variables in the end.
11051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11052
11053      # Check if we try to supply an empty value
11054      if test "x$TEE" = x; then
11055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11056$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11058$as_echo_n "checking for TEE... " >&6; }
11059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11060$as_echo "disabled" >&6; }
11061      else
11062        # Check if the provided tool contains a complete path.
11063        tool_specified="$TEE"
11064        tool_basename="${tool_specified##*/}"
11065        if test "x$tool_basename" = "x$tool_specified"; then
11066          # A command without a complete path is provided, search $PATH.
11067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11068$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11069          # Extract the first word of "$tool_basename", so it can be a program name with args.
11070set dummy $tool_basename; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_TEE+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $TEE in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099TEE=$ac_cv_path_TEE
11100if test -n "$TEE"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11102$as_echo "$TEE" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109          if test "x$TEE" = x; then
11110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11111          fi
11112        else
11113          # Otherwise we believe it is a complete path. Use it as it is.
11114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11115$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11117$as_echo_n "checking for TEE... " >&6; }
11118          if test ! -x "$tool_specified"; then
11119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11120$as_echo "not found" >&6; }
11121            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11122          fi
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11124$as_echo "$tool_specified" >&6; }
11125        fi
11126      fi
11127    fi
11128
11129  fi
11130
11131
11132
11133  if test "x$TEE" = x; then
11134    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11135  fi
11136
11137
11138
11139
11140
11141  # Publish this variable in the help.
11142
11143
11144  if [ -z "${TOUCH+x}" ]; then
11145    # The variable is not set by user, try to locate tool using the code snippet
11146    for ac_prog in touch
11147do
11148  # Extract the first word of "$ac_prog", so it can be a program name with args.
11149set dummy $ac_prog; ac_word=$2
11150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11151$as_echo_n "checking for $ac_word... " >&6; }
11152if ${ac_cv_path_TOUCH+:} false; then :
11153  $as_echo_n "(cached) " >&6
11154else
11155  case $TOUCH in
11156  [\\/]* | ?:[\\/]*)
11157  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11158  ;;
11159  *)
11160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11161for as_dir in $PATH
11162do
11163  IFS=$as_save_IFS
11164  test -z "$as_dir" && as_dir=.
11165    for ac_exec_ext in '' $ac_executable_extensions; do
11166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11167    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11169    break 2
11170  fi
11171done
11172  done
11173IFS=$as_save_IFS
11174
11175  ;;
11176esac
11177fi
11178TOUCH=$ac_cv_path_TOUCH
11179if test -n "$TOUCH"; then
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11181$as_echo "$TOUCH" >&6; }
11182else
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184$as_echo "no" >&6; }
11185fi
11186
11187
11188  test -n "$TOUCH" && break
11189done
11190
11191  else
11192    # The variable is set, but is it from the command line or the environment?
11193
11194    # Try to remove the string !TOUCH! from our list.
11195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11197      # If it failed, the variable was not from the command line. Ignore it,
11198      # but warn the user (except for BASH, which is always set by the calling BASH).
11199      if test "xTOUCH" != xBASH; then
11200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11201$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11202      fi
11203      # Try to locate tool using the code snippet
11204      for ac_prog in touch
11205do
11206  # Extract the first word of "$ac_prog", so it can be a program name with args.
11207set dummy $ac_prog; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TOUCH+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TOUCH in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TOUCH=$ac_cv_path_TOUCH
11237if test -n "$TOUCH"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11239$as_echo "$TOUCH" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246  test -n "$TOUCH" && break
11247done
11248
11249    else
11250      # If it succeeded, then it was overridden by the user. We will use it
11251      # for the tool.
11252
11253      # First remove it from the list of overridden variables, so we can test
11254      # for unknown variables in the end.
11255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11256
11257      # Check if we try to supply an empty value
11258      if test "x$TOUCH" = x; then
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11260$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11262$as_echo_n "checking for TOUCH... " >&6; }
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11264$as_echo "disabled" >&6; }
11265      else
11266        # Check if the provided tool contains a complete path.
11267        tool_specified="$TOUCH"
11268        tool_basename="${tool_specified##*/}"
11269        if test "x$tool_basename" = "x$tool_specified"; then
11270          # A command without a complete path is provided, search $PATH.
11271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11272$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11273          # Extract the first word of "$tool_basename", so it can be a program name with args.
11274set dummy $tool_basename; ac_word=$2
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11276$as_echo_n "checking for $ac_word... " >&6; }
11277if ${ac_cv_path_TOUCH+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  case $TOUCH in
11281  [\\/]* | ?:[\\/]*)
11282  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11283  ;;
11284  *)
11285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300  ;;
11301esac
11302fi
11303TOUCH=$ac_cv_path_TOUCH
11304if test -n "$TOUCH"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11306$as_echo "$TOUCH" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313          if test "x$TOUCH" = x; then
11314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11315          fi
11316        else
11317          # Otherwise we believe it is a complete path. Use it as it is.
11318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11319$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11321$as_echo_n "checking for TOUCH... " >&6; }
11322          if test ! -x "$tool_specified"; then
11323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11324$as_echo "not found" >&6; }
11325            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11326          fi
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11328$as_echo "$tool_specified" >&6; }
11329        fi
11330      fi
11331    fi
11332
11333  fi
11334
11335
11336
11337  if test "x$TOUCH" = x; then
11338    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11339  fi
11340
11341
11342
11343
11344
11345  # Publish this variable in the help.
11346
11347
11348  if [ -z "${TR+x}" ]; then
11349    # The variable is not set by user, try to locate tool using the code snippet
11350    for ac_prog in tr
11351do
11352  # Extract the first word of "$ac_prog", so it can be a program name with args.
11353set dummy $ac_prog; ac_word=$2
11354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11355$as_echo_n "checking for $ac_word... " >&6; }
11356if ${ac_cv_path_TR+:} false; then :
11357  $as_echo_n "(cached) " >&6
11358else
11359  case $TR in
11360  [\\/]* | ?:[\\/]*)
11361  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11362  ;;
11363  *)
11364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11365for as_dir in $PATH
11366do
11367  IFS=$as_save_IFS
11368  test -z "$as_dir" && as_dir=.
11369    for ac_exec_ext in '' $ac_executable_extensions; do
11370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11371    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11373    break 2
11374  fi
11375done
11376  done
11377IFS=$as_save_IFS
11378
11379  ;;
11380esac
11381fi
11382TR=$ac_cv_path_TR
11383if test -n "$TR"; then
11384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11385$as_echo "$TR" >&6; }
11386else
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
11389fi
11390
11391
11392  test -n "$TR" && break
11393done
11394
11395  else
11396    # The variable is set, but is it from the command line or the environment?
11397
11398    # Try to remove the string !TR! from our list.
11399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11401      # If it failed, the variable was not from the command line. Ignore it,
11402      # but warn the user (except for BASH, which is always set by the calling BASH).
11403      if test "xTR" != xBASH; then
11404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11405$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11406      fi
11407      # Try to locate tool using the code snippet
11408      for ac_prog in tr
11409do
11410  # Extract the first word of "$ac_prog", so it can be a program name with args.
11411set dummy $ac_prog; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TR=$ac_cv_path_TR
11441if test -n "$TR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11443$as_echo "$TR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450  test -n "$TR" && break
11451done
11452
11453    else
11454      # If it succeeded, then it was overridden by the user. We will use it
11455      # for the tool.
11456
11457      # First remove it from the list of overridden variables, so we can test
11458      # for unknown variables in the end.
11459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11460
11461      # Check if we try to supply an empty value
11462      if test "x$TR" = x; then
11463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11464$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11466$as_echo_n "checking for TR... " >&6; }
11467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11468$as_echo "disabled" >&6; }
11469      else
11470        # Check if the provided tool contains a complete path.
11471        tool_specified="$TR"
11472        tool_basename="${tool_specified##*/}"
11473        if test "x$tool_basename" = "x$tool_specified"; then
11474          # A command without a complete path is provided, search $PATH.
11475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11476$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11477          # Extract the first word of "$tool_basename", so it can be a program name with args.
11478set dummy $tool_basename; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_path_TR+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  case $TR in
11485  [\\/]* | ?:[\\/]*)
11486  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11487  ;;
11488  *)
11489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504  ;;
11505esac
11506fi
11507TR=$ac_cv_path_TR
11508if test -n "$TR"; then
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11510$as_echo "$TR" >&6; }
11511else
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514fi
11515
11516
11517          if test "x$TR" = x; then
11518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11519          fi
11520        else
11521          # Otherwise we believe it is a complete path. Use it as it is.
11522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11523$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11525$as_echo_n "checking for TR... " >&6; }
11526          if test ! -x "$tool_specified"; then
11527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11528$as_echo "not found" >&6; }
11529            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11530          fi
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11532$as_echo "$tool_specified" >&6; }
11533        fi
11534      fi
11535    fi
11536
11537  fi
11538
11539
11540
11541  if test "x$TR" = x; then
11542    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11543  fi
11544
11545
11546
11547
11548
11549  # Publish this variable in the help.
11550
11551
11552  if [ -z "${UNAME+x}" ]; then
11553    # The variable is not set by user, try to locate tool using the code snippet
11554    for ac_prog in uname
11555do
11556  # Extract the first word of "$ac_prog", so it can be a program name with args.
11557set dummy $ac_prog; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_UNAME+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $UNAME in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586UNAME=$ac_cv_path_UNAME
11587if test -n "$UNAME"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11589$as_echo "$UNAME" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596  test -n "$UNAME" && break
11597done
11598
11599  else
11600    # The variable is set, but is it from the command line or the environment?
11601
11602    # Try to remove the string !UNAME! from our list.
11603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11605      # If it failed, the variable was not from the command line. Ignore it,
11606      # but warn the user (except for BASH, which is always set by the calling BASH).
11607      if test "xUNAME" != xBASH; then
11608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11609$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11610      fi
11611      # Try to locate tool using the code snippet
11612      for ac_prog in uname
11613do
11614  # Extract the first word of "$ac_prog", so it can be a program name with args.
11615set dummy $ac_prog; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_UNAME+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $UNAME in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644UNAME=$ac_cv_path_UNAME
11645if test -n "$UNAME"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11647$as_echo "$UNAME" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654  test -n "$UNAME" && break
11655done
11656
11657    else
11658      # If it succeeded, then it was overridden by the user. We will use it
11659      # for the tool.
11660
11661      # First remove it from the list of overridden variables, so we can test
11662      # for unknown variables in the end.
11663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11664
11665      # Check if we try to supply an empty value
11666      if test "x$UNAME" = x; then
11667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11668$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11670$as_echo_n "checking for UNAME... " >&6; }
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11672$as_echo "disabled" >&6; }
11673      else
11674        # Check if the provided tool contains a complete path.
11675        tool_specified="$UNAME"
11676        tool_basename="${tool_specified##*/}"
11677        if test "x$tool_basename" = "x$tool_specified"; then
11678          # A command without a complete path is provided, search $PATH.
11679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11680$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11681          # Extract the first word of "$tool_basename", so it can be a program name with args.
11682set dummy $tool_basename; ac_word=$2
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11684$as_echo_n "checking for $ac_word... " >&6; }
11685if ${ac_cv_path_UNAME+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  case $UNAME in
11689  [\\/]* | ?:[\\/]*)
11690  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11691  ;;
11692  *)
11693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696  IFS=$as_save_IFS
11697  test -z "$as_dir" && as_dir=.
11698    for ac_exec_ext in '' $ac_executable_extensions; do
11699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11700    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11702    break 2
11703  fi
11704done
11705  done
11706IFS=$as_save_IFS
11707
11708  ;;
11709esac
11710fi
11711UNAME=$ac_cv_path_UNAME
11712if test -n "$UNAME"; then
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11714$as_echo "$UNAME" >&6; }
11715else
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718fi
11719
11720
11721          if test "x$UNAME" = x; then
11722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11723          fi
11724        else
11725          # Otherwise we believe it is a complete path. Use it as it is.
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11727$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11729$as_echo_n "checking for UNAME... " >&6; }
11730          if test ! -x "$tool_specified"; then
11731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11732$as_echo "not found" >&6; }
11733            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11734          fi
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11736$as_echo "$tool_specified" >&6; }
11737        fi
11738      fi
11739    fi
11740
11741  fi
11742
11743
11744
11745  if test "x$UNAME" = x; then
11746    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11747  fi
11748
11749
11750
11751
11752
11753  # Publish this variable in the help.
11754
11755
11756  if [ -z "${UNIQ+x}" ]; then
11757    # The variable is not set by user, try to locate tool using the code snippet
11758    for ac_prog in uniq
11759do
11760  # Extract the first word of "$ac_prog", so it can be a program name with args.
11761set dummy $ac_prog; ac_word=$2
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11763$as_echo_n "checking for $ac_word... " >&6; }
11764if ${ac_cv_path_UNIQ+:} false; then :
11765  $as_echo_n "(cached) " >&6
11766else
11767  case $UNIQ in
11768  [\\/]* | ?:[\\/]*)
11769  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11770  ;;
11771  *)
11772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11773for as_dir in $PATH
11774do
11775  IFS=$as_save_IFS
11776  test -z "$as_dir" && as_dir=.
11777    for ac_exec_ext in '' $ac_executable_extensions; do
11778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11779    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11781    break 2
11782  fi
11783done
11784  done
11785IFS=$as_save_IFS
11786
11787  ;;
11788esac
11789fi
11790UNIQ=$ac_cv_path_UNIQ
11791if test -n "$UNIQ"; then
11792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11793$as_echo "$UNIQ" >&6; }
11794else
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796$as_echo "no" >&6; }
11797fi
11798
11799
11800  test -n "$UNIQ" && break
11801done
11802
11803  else
11804    # The variable is set, but is it from the command line or the environment?
11805
11806    # Try to remove the string !UNIQ! from our list.
11807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11809      # If it failed, the variable was not from the command line. Ignore it,
11810      # but warn the user (except for BASH, which is always set by the calling BASH).
11811      if test "xUNIQ" != xBASH; then
11812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11813$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11814      fi
11815      # Try to locate tool using the code snippet
11816      for ac_prog in uniq
11817do
11818  # Extract the first word of "$ac_prog", so it can be a program name with args.
11819set dummy $ac_prog; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_UNIQ+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $UNIQ in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848UNIQ=$ac_cv_path_UNIQ
11849if test -n "$UNIQ"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11851$as_echo "$UNIQ" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858  test -n "$UNIQ" && break
11859done
11860
11861    else
11862      # If it succeeded, then it was overridden by the user. We will use it
11863      # for the tool.
11864
11865      # First remove it from the list of overridden variables, so we can test
11866      # for unknown variables in the end.
11867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11868
11869      # Check if we try to supply an empty value
11870      if test "x$UNIQ" = x; then
11871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11872$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11874$as_echo_n "checking for UNIQ... " >&6; }
11875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11876$as_echo "disabled" >&6; }
11877      else
11878        # Check if the provided tool contains a complete path.
11879        tool_specified="$UNIQ"
11880        tool_basename="${tool_specified##*/}"
11881        if test "x$tool_basename" = "x$tool_specified"; then
11882          # A command without a complete path is provided, search $PATH.
11883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11884$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11885          # Extract the first word of "$tool_basename", so it can be a program name with args.
11886set dummy $tool_basename; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_UNIQ+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $UNIQ in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915UNIQ=$ac_cv_path_UNIQ
11916if test -n "$UNIQ"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11918$as_echo "$UNIQ" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925          if test "x$UNIQ" = x; then
11926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11927          fi
11928        else
11929          # Otherwise we believe it is a complete path. Use it as it is.
11930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11931$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11933$as_echo_n "checking for UNIQ... " >&6; }
11934          if test ! -x "$tool_specified"; then
11935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11936$as_echo "not found" >&6; }
11937            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11938          fi
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11940$as_echo "$tool_specified" >&6; }
11941        fi
11942      fi
11943    fi
11944
11945  fi
11946
11947
11948
11949  if test "x$UNIQ" = x; then
11950    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11951  fi
11952
11953
11954
11955
11956
11957  # Publish this variable in the help.
11958
11959
11960  if [ -z "${WC+x}" ]; then
11961    # The variable is not set by user, try to locate tool using the code snippet
11962    for ac_prog in wc
11963do
11964  # Extract the first word of "$ac_prog", so it can be a program name with args.
11965set dummy $ac_prog; ac_word=$2
11966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11967$as_echo_n "checking for $ac_word... " >&6; }
11968if ${ac_cv_path_WC+:} false; then :
11969  $as_echo_n "(cached) " >&6
11970else
11971  case $WC in
11972  [\\/]* | ?:[\\/]*)
11973  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11974  ;;
11975  *)
11976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11977for as_dir in $PATH
11978do
11979  IFS=$as_save_IFS
11980  test -z "$as_dir" && as_dir=.
11981    for ac_exec_ext in '' $ac_executable_extensions; do
11982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11983    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11985    break 2
11986  fi
11987done
11988  done
11989IFS=$as_save_IFS
11990
11991  ;;
11992esac
11993fi
11994WC=$ac_cv_path_WC
11995if test -n "$WC"; then
11996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11997$as_echo "$WC" >&6; }
11998else
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
12001fi
12002
12003
12004  test -n "$WC" && break
12005done
12006
12007  else
12008    # The variable is set, but is it from the command line or the environment?
12009
12010    # Try to remove the string !WC! from our list.
12011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12013      # If it failed, the variable was not from the command line. Ignore it,
12014      # but warn the user (except for BASH, which is always set by the calling BASH).
12015      if test "xWC" != xBASH; then
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12017$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12018      fi
12019      # Try to locate tool using the code snippet
12020      for ac_prog in wc
12021do
12022  # Extract the first word of "$ac_prog", so it can be a program name with args.
12023set dummy $ac_prog; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_WC+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $WC in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052WC=$ac_cv_path_WC
12053if test -n "$WC"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12055$as_echo "$WC" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062  test -n "$WC" && break
12063done
12064
12065    else
12066      # If it succeeded, then it was overridden by the user. We will use it
12067      # for the tool.
12068
12069      # First remove it from the list of overridden variables, so we can test
12070      # for unknown variables in the end.
12071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12072
12073      # Check if we try to supply an empty value
12074      if test "x$WC" = x; then
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12076$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12078$as_echo_n "checking for WC... " >&6; }
12079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12080$as_echo "disabled" >&6; }
12081      else
12082        # Check if the provided tool contains a complete path.
12083        tool_specified="$WC"
12084        tool_basename="${tool_specified##*/}"
12085        if test "x$tool_basename" = "x$tool_specified"; then
12086          # A command without a complete path is provided, search $PATH.
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12088$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12089          # Extract the first word of "$tool_basename", so it can be a program name with args.
12090set dummy $tool_basename; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_WC+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $WC in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119WC=$ac_cv_path_WC
12120if test -n "$WC"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12122$as_echo "$WC" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129          if test "x$WC" = x; then
12130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12131          fi
12132        else
12133          # Otherwise we believe it is a complete path. Use it as it is.
12134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12135$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12137$as_echo_n "checking for WC... " >&6; }
12138          if test ! -x "$tool_specified"; then
12139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12140$as_echo "not found" >&6; }
12141            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12142          fi
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12144$as_echo "$tool_specified" >&6; }
12145        fi
12146      fi
12147    fi
12148
12149  fi
12150
12151
12152
12153  if test "x$WC" = x; then
12154    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12155  fi
12156
12157
12158
12159
12160
12161  # Publish this variable in the help.
12162
12163
12164  if [ -z "${WHICH+x}" ]; then
12165    # The variable is not set by user, try to locate tool using the code snippet
12166    for ac_prog in which
12167do
12168  # Extract the first word of "$ac_prog", so it can be a program name with args.
12169set dummy $ac_prog; ac_word=$2
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12171$as_echo_n "checking for $ac_word... " >&6; }
12172if ${ac_cv_path_WHICH+:} false; then :
12173  $as_echo_n "(cached) " >&6
12174else
12175  case $WHICH in
12176  [\\/]* | ?:[\\/]*)
12177  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12178  ;;
12179  *)
12180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181for as_dir in $PATH
12182do
12183  IFS=$as_save_IFS
12184  test -z "$as_dir" && as_dir=.
12185    for ac_exec_ext in '' $ac_executable_extensions; do
12186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12187    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12189    break 2
12190  fi
12191done
12192  done
12193IFS=$as_save_IFS
12194
12195  ;;
12196esac
12197fi
12198WHICH=$ac_cv_path_WHICH
12199if test -n "$WHICH"; then
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12201$as_echo "$WHICH" >&6; }
12202else
12203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12204$as_echo "no" >&6; }
12205fi
12206
12207
12208  test -n "$WHICH" && break
12209done
12210
12211  else
12212    # The variable is set, but is it from the command line or the environment?
12213
12214    # Try to remove the string !WHICH! from our list.
12215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12217      # If it failed, the variable was not from the command line. Ignore it,
12218      # but warn the user (except for BASH, which is always set by the calling BASH).
12219      if test "xWHICH" != xBASH; then
12220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12221$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12222      fi
12223      # Try to locate tool using the code snippet
12224      for ac_prog in which
12225do
12226  # Extract the first word of "$ac_prog", so it can be a program name with args.
12227set dummy $ac_prog; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_WHICH+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $WHICH in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256WHICH=$ac_cv_path_WHICH
12257if test -n "$WHICH"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12259$as_echo "$WHICH" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266  test -n "$WHICH" && break
12267done
12268
12269    else
12270      # If it succeeded, then it was overridden by the user. We will use it
12271      # for the tool.
12272
12273      # First remove it from the list of overridden variables, so we can test
12274      # for unknown variables in the end.
12275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12276
12277      # Check if we try to supply an empty value
12278      if test "x$WHICH" = x; then
12279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12280$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12282$as_echo_n "checking for WHICH... " >&6; }
12283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12284$as_echo "disabled" >&6; }
12285      else
12286        # Check if the provided tool contains a complete path.
12287        tool_specified="$WHICH"
12288        tool_basename="${tool_specified##*/}"
12289        if test "x$tool_basename" = "x$tool_specified"; then
12290          # A command without a complete path is provided, search $PATH.
12291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12292$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12293          # Extract the first word of "$tool_basename", so it can be a program name with args.
12294set dummy $tool_basename; ac_word=$2
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12296$as_echo_n "checking for $ac_word... " >&6; }
12297if ${ac_cv_path_WHICH+:} false; then :
12298  $as_echo_n "(cached) " >&6
12299else
12300  case $WHICH in
12301  [\\/]* | ?:[\\/]*)
12302  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12303  ;;
12304  *)
12305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12306for as_dir in $PATH
12307do
12308  IFS=$as_save_IFS
12309  test -z "$as_dir" && as_dir=.
12310    for ac_exec_ext in '' $ac_executable_extensions; do
12311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12312    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12314    break 2
12315  fi
12316done
12317  done
12318IFS=$as_save_IFS
12319
12320  ;;
12321esac
12322fi
12323WHICH=$ac_cv_path_WHICH
12324if test -n "$WHICH"; then
12325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12326$as_echo "$WHICH" >&6; }
12327else
12328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330fi
12331
12332
12333          if test "x$WHICH" = x; then
12334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12335          fi
12336        else
12337          # Otherwise we believe it is a complete path. Use it as it is.
12338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12339$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12341$as_echo_n "checking for WHICH... " >&6; }
12342          if test ! -x "$tool_specified"; then
12343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12344$as_echo "not found" >&6; }
12345            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12346          fi
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12348$as_echo "$tool_specified" >&6; }
12349        fi
12350      fi
12351    fi
12352
12353  fi
12354
12355
12356
12357  if test "x$WHICH" = x; then
12358    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12359  fi
12360
12361
12362
12363
12364
12365  # Publish this variable in the help.
12366
12367
12368  if [ -z "${XARGS+x}" ]; then
12369    # The variable is not set by user, try to locate tool using the code snippet
12370    for ac_prog in xargs
12371do
12372  # Extract the first word of "$ac_prog", so it can be a program name with args.
12373set dummy $ac_prog; ac_word=$2
12374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12375$as_echo_n "checking for $ac_word... " >&6; }
12376if ${ac_cv_path_XARGS+:} false; then :
12377  $as_echo_n "(cached) " >&6
12378else
12379  case $XARGS in
12380  [\\/]* | ?:[\\/]*)
12381  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12382  ;;
12383  *)
12384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12385for as_dir in $PATH
12386do
12387  IFS=$as_save_IFS
12388  test -z "$as_dir" && as_dir=.
12389    for ac_exec_ext in '' $ac_executable_extensions; do
12390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12391    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12393    break 2
12394  fi
12395done
12396  done
12397IFS=$as_save_IFS
12398
12399  ;;
12400esac
12401fi
12402XARGS=$ac_cv_path_XARGS
12403if test -n "$XARGS"; then
12404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12405$as_echo "$XARGS" >&6; }
12406else
12407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408$as_echo "no" >&6; }
12409fi
12410
12411
12412  test -n "$XARGS" && break
12413done
12414
12415  else
12416    # The variable is set, but is it from the command line or the environment?
12417
12418    # Try to remove the string !XARGS! from our list.
12419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12421      # If it failed, the variable was not from the command line. Ignore it,
12422      # but warn the user (except for BASH, which is always set by the calling BASH).
12423      if test "xXARGS" != xBASH; then
12424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12425$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12426      fi
12427      # Try to locate tool using the code snippet
12428      for ac_prog in xargs
12429do
12430  # Extract the first word of "$ac_prog", so it can be a program name with args.
12431set dummy $ac_prog; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_XARGS+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $XARGS in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460XARGS=$ac_cv_path_XARGS
12461if test -n "$XARGS"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12463$as_echo "$XARGS" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470  test -n "$XARGS" && break
12471done
12472
12473    else
12474      # If it succeeded, then it was overridden by the user. We will use it
12475      # for the tool.
12476
12477      # First remove it from the list of overridden variables, so we can test
12478      # for unknown variables in the end.
12479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12480
12481      # Check if we try to supply an empty value
12482      if test "x$XARGS" = x; then
12483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12484$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12486$as_echo_n "checking for XARGS... " >&6; }
12487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12488$as_echo "disabled" >&6; }
12489      else
12490        # Check if the provided tool contains a complete path.
12491        tool_specified="$XARGS"
12492        tool_basename="${tool_specified##*/}"
12493        if test "x$tool_basename" = "x$tool_specified"; then
12494          # A command without a complete path is provided, search $PATH.
12495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12496$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12497          # Extract the first word of "$tool_basename", so it can be a program name with args.
12498set dummy $tool_basename; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_XARGS+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $XARGS in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527XARGS=$ac_cv_path_XARGS
12528if test -n "$XARGS"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12530$as_echo "$XARGS" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537          if test "x$XARGS" = x; then
12538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539          fi
12540        else
12541          # Otherwise we believe it is a complete path. Use it as it is.
12542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12543$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12545$as_echo_n "checking for XARGS... " >&6; }
12546          if test ! -x "$tool_specified"; then
12547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548$as_echo "not found" >&6; }
12549            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12550          fi
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552$as_echo "$tool_specified" >&6; }
12553        fi
12554      fi
12555    fi
12556
12557  fi
12558
12559
12560
12561  if test "x$XARGS" = x; then
12562    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12563  fi
12564
12565
12566
12567  # Then required tools that require some special treatment.
12568
12569
12570  # Publish this variable in the help.
12571
12572
12573  if [ -z "${AWK+x}" ]; then
12574    # The variable is not set by user, try to locate tool using the code snippet
12575    for ac_prog in gawk mawk nawk awk
12576do
12577  # Extract the first word of "$ac_prog", so it can be a program name with args.
12578set dummy $ac_prog; ac_word=$2
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12580$as_echo_n "checking for $ac_word... " >&6; }
12581if ${ac_cv_prog_AWK+:} false; then :
12582  $as_echo_n "(cached) " >&6
12583else
12584  if test -n "$AWK"; then
12585  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12586else
12587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12588for as_dir in $PATH
12589do
12590  IFS=$as_save_IFS
12591  test -z "$as_dir" && as_dir=.
12592    for ac_exec_ext in '' $ac_executable_extensions; do
12593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12594    ac_cv_prog_AWK="$ac_prog"
12595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12596    break 2
12597  fi
12598done
12599  done
12600IFS=$as_save_IFS
12601
12602fi
12603fi
12604AWK=$ac_cv_prog_AWK
12605if test -n "$AWK"; then
12606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12607$as_echo "$AWK" >&6; }
12608else
12609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12610$as_echo "no" >&6; }
12611fi
12612
12613
12614  test -n "$AWK" && break
12615done
12616
12617  else
12618    # The variable is set, but is it from the command line or the environment?
12619
12620    # Try to remove the string !AWK! from our list.
12621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12623      # If it failed, the variable was not from the command line. Ignore it,
12624      # but warn the user (except for BASH, which is always set by the calling BASH).
12625      if test "xAWK" != xBASH; then
12626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12627$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12628      fi
12629      # Try to locate tool using the code snippet
12630      for ac_prog in gawk mawk nawk awk
12631do
12632  # Extract the first word of "$ac_prog", so it can be a program name with args.
12633set dummy $ac_prog; ac_word=$2
12634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12635$as_echo_n "checking for $ac_word... " >&6; }
12636if ${ac_cv_prog_AWK+:} false; then :
12637  $as_echo_n "(cached) " >&6
12638else
12639  if test -n "$AWK"; then
12640  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12641else
12642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12643for as_dir in $PATH
12644do
12645  IFS=$as_save_IFS
12646  test -z "$as_dir" && as_dir=.
12647    for ac_exec_ext in '' $ac_executable_extensions; do
12648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12649    ac_cv_prog_AWK="$ac_prog"
12650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12651    break 2
12652  fi
12653done
12654  done
12655IFS=$as_save_IFS
12656
12657fi
12658fi
12659AWK=$ac_cv_prog_AWK
12660if test -n "$AWK"; then
12661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12662$as_echo "$AWK" >&6; }
12663else
12664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12665$as_echo "no" >&6; }
12666fi
12667
12668
12669  test -n "$AWK" && break
12670done
12671
12672    else
12673      # If it succeeded, then it was overridden by the user. We will use it
12674      # for the tool.
12675
12676      # First remove it from the list of overridden variables, so we can test
12677      # for unknown variables in the end.
12678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12679
12680      # Check if we try to supply an empty value
12681      if test "x$AWK" = x; then
12682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12683$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12685$as_echo_n "checking for AWK... " >&6; }
12686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12687$as_echo "disabled" >&6; }
12688      else
12689        # Check if the provided tool contains a complete path.
12690        tool_specified="$AWK"
12691        tool_basename="${tool_specified##*/}"
12692        if test "x$tool_basename" = "x$tool_specified"; then
12693          # A command without a complete path is provided, search $PATH.
12694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12695$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12696          # Extract the first word of "$tool_basename", so it can be a program name with args.
12697set dummy $tool_basename; ac_word=$2
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12699$as_echo_n "checking for $ac_word... " >&6; }
12700if ${ac_cv_path_AWK+:} false; then :
12701  $as_echo_n "(cached) " >&6
12702else
12703  case $AWK in
12704  [\\/]* | ?:[\\/]*)
12705  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12706  ;;
12707  *)
12708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12709for as_dir in $PATH
12710do
12711  IFS=$as_save_IFS
12712  test -z "$as_dir" && as_dir=.
12713    for ac_exec_ext in '' $ac_executable_extensions; do
12714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12715    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12717    break 2
12718  fi
12719done
12720  done
12721IFS=$as_save_IFS
12722
12723  ;;
12724esac
12725fi
12726AWK=$ac_cv_path_AWK
12727if test -n "$AWK"; then
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12729$as_echo "$AWK" >&6; }
12730else
12731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12732$as_echo "no" >&6; }
12733fi
12734
12735
12736          if test "x$AWK" = x; then
12737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12738          fi
12739        else
12740          # Otherwise we believe it is a complete path. Use it as it is.
12741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12742$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12744$as_echo_n "checking for AWK... " >&6; }
12745          if test ! -x "$tool_specified"; then
12746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12747$as_echo "not found" >&6; }
12748            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12749          fi
12750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12751$as_echo "$tool_specified" >&6; }
12752        fi
12753      fi
12754    fi
12755
12756  fi
12757
12758
12759  if test "x$AWK" = x; then
12760    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12761  fi
12762
12763
12764
12765
12766  # Publish this variable in the help.
12767
12768
12769  if [ -z "${GREP+x}" ]; then
12770    # The variable is not set by user, try to locate tool using the code snippet
12771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12772$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12773if ${ac_cv_path_GREP+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  if test -z "$GREP"; then
12777  ac_path_GREP_found=false
12778  # Loop through the user's path and test for each of PROGNAME-LIST
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_prog in grep ggrep; do
12785    for ac_exec_ext in '' $ac_executable_extensions; do
12786      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12787      as_fn_executable_p "$ac_path_GREP" || continue
12788# Check for GNU ac_path_GREP and select it if it is found.
12789  # Check for GNU $ac_path_GREP
12790case `"$ac_path_GREP" --version 2>&1` in
12791*GNU*)
12792  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12793*)
12794  ac_count=0
12795  $as_echo_n 0123456789 >"conftest.in"
12796  while :
12797  do
12798    cat "conftest.in" "conftest.in" >"conftest.tmp"
12799    mv "conftest.tmp" "conftest.in"
12800    cp "conftest.in" "conftest.nl"
12801    $as_echo 'GREP' >> "conftest.nl"
12802    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12803    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12804    as_fn_arith $ac_count + 1 && ac_count=$as_val
12805    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12806      # Best one so far, save it but keep looking for a better one
12807      ac_cv_path_GREP="$ac_path_GREP"
12808      ac_path_GREP_max=$ac_count
12809    fi
12810    # 10*(2^10) chars as input seems more than enough
12811    test $ac_count -gt 10 && break
12812  done
12813  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12814esac
12815
12816      $ac_path_GREP_found && break 3
12817    done
12818  done
12819  done
12820IFS=$as_save_IFS
12821  if test -z "$ac_cv_path_GREP"; then
12822    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12823  fi
12824else
12825  ac_cv_path_GREP=$GREP
12826fi
12827
12828fi
12829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12830$as_echo "$ac_cv_path_GREP" >&6; }
12831 GREP="$ac_cv_path_GREP"
12832
12833
12834  else
12835    # The variable is set, but is it from the command line or the environment?
12836
12837    # Try to remove the string !GREP! from our list.
12838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12840      # If it failed, the variable was not from the command line. Ignore it,
12841      # but warn the user (except for BASH, which is always set by the calling BASH).
12842      if test "xGREP" != xBASH; then
12843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12844$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12845      fi
12846      # Try to locate tool using the code snippet
12847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12848$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12849if ${ac_cv_path_GREP+:} false; then :
12850  $as_echo_n "(cached) " >&6
12851else
12852  if test -z "$GREP"; then
12853  ac_path_GREP_found=false
12854  # Loop through the user's path and test for each of PROGNAME-LIST
12855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12856for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12857do
12858  IFS=$as_save_IFS
12859  test -z "$as_dir" && as_dir=.
12860    for ac_prog in grep ggrep; do
12861    for ac_exec_ext in '' $ac_executable_extensions; do
12862      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12863      as_fn_executable_p "$ac_path_GREP" || continue
12864# Check for GNU ac_path_GREP and select it if it is found.
12865  # Check for GNU $ac_path_GREP
12866case `"$ac_path_GREP" --version 2>&1` in
12867*GNU*)
12868  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12869*)
12870  ac_count=0
12871  $as_echo_n 0123456789 >"conftest.in"
12872  while :
12873  do
12874    cat "conftest.in" "conftest.in" >"conftest.tmp"
12875    mv "conftest.tmp" "conftest.in"
12876    cp "conftest.in" "conftest.nl"
12877    $as_echo 'GREP' >> "conftest.nl"
12878    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12879    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12880    as_fn_arith $ac_count + 1 && ac_count=$as_val
12881    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12882      # Best one so far, save it but keep looking for a better one
12883      ac_cv_path_GREP="$ac_path_GREP"
12884      ac_path_GREP_max=$ac_count
12885    fi
12886    # 10*(2^10) chars as input seems more than enough
12887    test $ac_count -gt 10 && break
12888  done
12889  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12890esac
12891
12892      $ac_path_GREP_found && break 3
12893    done
12894  done
12895  done
12896IFS=$as_save_IFS
12897  if test -z "$ac_cv_path_GREP"; then
12898    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12899  fi
12900else
12901  ac_cv_path_GREP=$GREP
12902fi
12903
12904fi
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12906$as_echo "$ac_cv_path_GREP" >&6; }
12907 GREP="$ac_cv_path_GREP"
12908
12909
12910    else
12911      # If it succeeded, then it was overridden by the user. We will use it
12912      # for the tool.
12913
12914      # First remove it from the list of overridden variables, so we can test
12915      # for unknown variables in the end.
12916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12917
12918      # Check if we try to supply an empty value
12919      if test "x$GREP" = x; then
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12921$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12923$as_echo_n "checking for GREP... " >&6; }
12924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12925$as_echo "disabled" >&6; }
12926      else
12927        # Check if the provided tool contains a complete path.
12928        tool_specified="$GREP"
12929        tool_basename="${tool_specified##*/}"
12930        if test "x$tool_basename" = "x$tool_specified"; then
12931          # A command without a complete path is provided, search $PATH.
12932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12933$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12934          # Extract the first word of "$tool_basename", so it can be a program name with args.
12935set dummy $tool_basename; ac_word=$2
12936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12937$as_echo_n "checking for $ac_word... " >&6; }
12938if ${ac_cv_path_GREP+:} false; then :
12939  $as_echo_n "(cached) " >&6
12940else
12941  case $GREP in
12942  [\\/]* | ?:[\\/]*)
12943  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12944  ;;
12945  *)
12946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12947for as_dir in $PATH
12948do
12949  IFS=$as_save_IFS
12950  test -z "$as_dir" && as_dir=.
12951    for ac_exec_ext in '' $ac_executable_extensions; do
12952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12953    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12955    break 2
12956  fi
12957done
12958  done
12959IFS=$as_save_IFS
12960
12961  ;;
12962esac
12963fi
12964GREP=$ac_cv_path_GREP
12965if test -n "$GREP"; then
12966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12967$as_echo "$GREP" >&6; }
12968else
12969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12970$as_echo "no" >&6; }
12971fi
12972
12973
12974          if test "x$GREP" = x; then
12975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12976          fi
12977        else
12978          # Otherwise we believe it is a complete path. Use it as it is.
12979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12980$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12982$as_echo_n "checking for GREP... " >&6; }
12983          if test ! -x "$tool_specified"; then
12984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12985$as_echo "not found" >&6; }
12986            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12987          fi
12988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12989$as_echo "$tool_specified" >&6; }
12990        fi
12991      fi
12992    fi
12993
12994  fi
12995
12996
12997  if test "x$GREP" = x; then
12998    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12999  fi
13000
13001
13002
13003
13004  # Publish this variable in the help.
13005
13006
13007  if [ -z "${EGREP+x}" ]; then
13008    # The variable is not set by user, try to locate tool using the code snippet
13009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13010$as_echo_n "checking for egrep... " >&6; }
13011if ${ac_cv_path_EGREP+:} false; then :
13012  $as_echo_n "(cached) " >&6
13013else
13014  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13015   then ac_cv_path_EGREP="$GREP -E"
13016   else
13017     if test -z "$EGREP"; then
13018  ac_path_EGREP_found=false
13019  # Loop through the user's path and test for each of PROGNAME-LIST
13020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13021for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13022do
13023  IFS=$as_save_IFS
13024  test -z "$as_dir" && as_dir=.
13025    for ac_prog in egrep; do
13026    for ac_exec_ext in '' $ac_executable_extensions; do
13027      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13028      as_fn_executable_p "$ac_path_EGREP" || continue
13029# Check for GNU ac_path_EGREP and select it if it is found.
13030  # Check for GNU $ac_path_EGREP
13031case `"$ac_path_EGREP" --version 2>&1` in
13032*GNU*)
13033  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13034*)
13035  ac_count=0
13036  $as_echo_n 0123456789 >"conftest.in"
13037  while :
13038  do
13039    cat "conftest.in" "conftest.in" >"conftest.tmp"
13040    mv "conftest.tmp" "conftest.in"
13041    cp "conftest.in" "conftest.nl"
13042    $as_echo 'EGREP' >> "conftest.nl"
13043    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13044    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13045    as_fn_arith $ac_count + 1 && ac_count=$as_val
13046    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13047      # Best one so far, save it but keep looking for a better one
13048      ac_cv_path_EGREP="$ac_path_EGREP"
13049      ac_path_EGREP_max=$ac_count
13050    fi
13051    # 10*(2^10) chars as input seems more than enough
13052    test $ac_count -gt 10 && break
13053  done
13054  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13055esac
13056
13057      $ac_path_EGREP_found && break 3
13058    done
13059  done
13060  done
13061IFS=$as_save_IFS
13062  if test -z "$ac_cv_path_EGREP"; then
13063    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13064  fi
13065else
13066  ac_cv_path_EGREP=$EGREP
13067fi
13068
13069   fi
13070fi
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13072$as_echo "$ac_cv_path_EGREP" >&6; }
13073 EGREP="$ac_cv_path_EGREP"
13074
13075
13076  else
13077    # The variable is set, but is it from the command line or the environment?
13078
13079    # Try to remove the string !EGREP! from our list.
13080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13082      # If it failed, the variable was not from the command line. Ignore it,
13083      # but warn the user (except for BASH, which is always set by the calling BASH).
13084      if test "xEGREP" != xBASH; then
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13086$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13087      fi
13088      # Try to locate tool using the code snippet
13089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13090$as_echo_n "checking for egrep... " >&6; }
13091if ${ac_cv_path_EGREP+:} false; then :
13092  $as_echo_n "(cached) " >&6
13093else
13094  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13095   then ac_cv_path_EGREP="$GREP -E"
13096   else
13097     if test -z "$EGREP"; then
13098  ac_path_EGREP_found=false
13099  # Loop through the user's path and test for each of PROGNAME-LIST
13100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13101for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13102do
13103  IFS=$as_save_IFS
13104  test -z "$as_dir" && as_dir=.
13105    for ac_prog in egrep; do
13106    for ac_exec_ext in '' $ac_executable_extensions; do
13107      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13108      as_fn_executable_p "$ac_path_EGREP" || continue
13109# Check for GNU ac_path_EGREP and select it if it is found.
13110  # Check for GNU $ac_path_EGREP
13111case `"$ac_path_EGREP" --version 2>&1` in
13112*GNU*)
13113  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13114*)
13115  ac_count=0
13116  $as_echo_n 0123456789 >"conftest.in"
13117  while :
13118  do
13119    cat "conftest.in" "conftest.in" >"conftest.tmp"
13120    mv "conftest.tmp" "conftest.in"
13121    cp "conftest.in" "conftest.nl"
13122    $as_echo 'EGREP' >> "conftest.nl"
13123    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13124    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13125    as_fn_arith $ac_count + 1 && ac_count=$as_val
13126    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13127      # Best one so far, save it but keep looking for a better one
13128      ac_cv_path_EGREP="$ac_path_EGREP"
13129      ac_path_EGREP_max=$ac_count
13130    fi
13131    # 10*(2^10) chars as input seems more than enough
13132    test $ac_count -gt 10 && break
13133  done
13134  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13135esac
13136
13137      $ac_path_EGREP_found && break 3
13138    done
13139  done
13140  done
13141IFS=$as_save_IFS
13142  if test -z "$ac_cv_path_EGREP"; then
13143    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13144  fi
13145else
13146  ac_cv_path_EGREP=$EGREP
13147fi
13148
13149   fi
13150fi
13151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13152$as_echo "$ac_cv_path_EGREP" >&6; }
13153 EGREP="$ac_cv_path_EGREP"
13154
13155
13156    else
13157      # If it succeeded, then it was overridden by the user. We will use it
13158      # for the tool.
13159
13160      # First remove it from the list of overridden variables, so we can test
13161      # for unknown variables in the end.
13162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13163
13164      # Check if we try to supply an empty value
13165      if test "x$EGREP" = x; then
13166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13167$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13169$as_echo_n "checking for EGREP... " >&6; }
13170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13171$as_echo "disabled" >&6; }
13172      else
13173        # Check if the provided tool contains a complete path.
13174        tool_specified="$EGREP"
13175        tool_basename="${tool_specified##*/}"
13176        if test "x$tool_basename" = "x$tool_specified"; then
13177          # A command without a complete path is provided, search $PATH.
13178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13179$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13180          # Extract the first word of "$tool_basename", so it can be a program name with args.
13181set dummy $tool_basename; ac_word=$2
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13183$as_echo_n "checking for $ac_word... " >&6; }
13184if ${ac_cv_path_EGREP+:} false; then :
13185  $as_echo_n "(cached) " >&6
13186else
13187  case $EGREP in
13188  [\\/]* | ?:[\\/]*)
13189  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13190  ;;
13191  *)
13192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13193for as_dir in $PATH
13194do
13195  IFS=$as_save_IFS
13196  test -z "$as_dir" && as_dir=.
13197    for ac_exec_ext in '' $ac_executable_extensions; do
13198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13199    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13201    break 2
13202  fi
13203done
13204  done
13205IFS=$as_save_IFS
13206
13207  ;;
13208esac
13209fi
13210EGREP=$ac_cv_path_EGREP
13211if test -n "$EGREP"; then
13212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13213$as_echo "$EGREP" >&6; }
13214else
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13216$as_echo "no" >&6; }
13217fi
13218
13219
13220          if test "x$EGREP" = x; then
13221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13222          fi
13223        else
13224          # Otherwise we believe it is a complete path. Use it as it is.
13225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13226$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13228$as_echo_n "checking for EGREP... " >&6; }
13229          if test ! -x "$tool_specified"; then
13230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13231$as_echo "not found" >&6; }
13232            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13233          fi
13234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13235$as_echo "$tool_specified" >&6; }
13236        fi
13237      fi
13238    fi
13239
13240  fi
13241
13242
13243  if test "x$EGREP" = x; then
13244    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13245  fi
13246
13247
13248
13249
13250  # Publish this variable in the help.
13251
13252
13253  if [ -z "${FGREP+x}" ]; then
13254    # The variable is not set by user, try to locate tool using the code snippet
13255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13256$as_echo_n "checking for fgrep... " >&6; }
13257if ${ac_cv_path_FGREP+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13261   then ac_cv_path_FGREP="$GREP -F"
13262   else
13263     if test -z "$FGREP"; then
13264  ac_path_FGREP_found=false
13265  # Loop through the user's path and test for each of PROGNAME-LIST
13266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13267for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13268do
13269  IFS=$as_save_IFS
13270  test -z "$as_dir" && as_dir=.
13271    for ac_prog in fgrep; do
13272    for ac_exec_ext in '' $ac_executable_extensions; do
13273      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13274      as_fn_executable_p "$ac_path_FGREP" || continue
13275# Check for GNU ac_path_FGREP and select it if it is found.
13276  # Check for GNU $ac_path_FGREP
13277case `"$ac_path_FGREP" --version 2>&1` in
13278*GNU*)
13279  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13280*)
13281  ac_count=0
13282  $as_echo_n 0123456789 >"conftest.in"
13283  while :
13284  do
13285    cat "conftest.in" "conftest.in" >"conftest.tmp"
13286    mv "conftest.tmp" "conftest.in"
13287    cp "conftest.in" "conftest.nl"
13288    $as_echo 'FGREP' >> "conftest.nl"
13289    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13290    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13291    as_fn_arith $ac_count + 1 && ac_count=$as_val
13292    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13293      # Best one so far, save it but keep looking for a better one
13294      ac_cv_path_FGREP="$ac_path_FGREP"
13295      ac_path_FGREP_max=$ac_count
13296    fi
13297    # 10*(2^10) chars as input seems more than enough
13298    test $ac_count -gt 10 && break
13299  done
13300  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13301esac
13302
13303      $ac_path_FGREP_found && break 3
13304    done
13305  done
13306  done
13307IFS=$as_save_IFS
13308  if test -z "$ac_cv_path_FGREP"; then
13309    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13310  fi
13311else
13312  ac_cv_path_FGREP=$FGREP
13313fi
13314
13315   fi
13316fi
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13318$as_echo "$ac_cv_path_FGREP" >&6; }
13319 FGREP="$ac_cv_path_FGREP"
13320
13321
13322  else
13323    # The variable is set, but is it from the command line or the environment?
13324
13325    # Try to remove the string !FGREP! from our list.
13326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13328      # If it failed, the variable was not from the command line. Ignore it,
13329      # but warn the user (except for BASH, which is always set by the calling BASH).
13330      if test "xFGREP" != xBASH; then
13331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13332$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13333      fi
13334      # Try to locate tool using the code snippet
13335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13336$as_echo_n "checking for fgrep... " >&6; }
13337if ${ac_cv_path_FGREP+:} false; then :
13338  $as_echo_n "(cached) " >&6
13339else
13340  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13341   then ac_cv_path_FGREP="$GREP -F"
13342   else
13343     if test -z "$FGREP"; then
13344  ac_path_FGREP_found=false
13345  # Loop through the user's path and test for each of PROGNAME-LIST
13346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13347for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13348do
13349  IFS=$as_save_IFS
13350  test -z "$as_dir" && as_dir=.
13351    for ac_prog in fgrep; do
13352    for ac_exec_ext in '' $ac_executable_extensions; do
13353      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13354      as_fn_executable_p "$ac_path_FGREP" || continue
13355# Check for GNU ac_path_FGREP and select it if it is found.
13356  # Check for GNU $ac_path_FGREP
13357case `"$ac_path_FGREP" --version 2>&1` in
13358*GNU*)
13359  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13360*)
13361  ac_count=0
13362  $as_echo_n 0123456789 >"conftest.in"
13363  while :
13364  do
13365    cat "conftest.in" "conftest.in" >"conftest.tmp"
13366    mv "conftest.tmp" "conftest.in"
13367    cp "conftest.in" "conftest.nl"
13368    $as_echo 'FGREP' >> "conftest.nl"
13369    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13370    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13371    as_fn_arith $ac_count + 1 && ac_count=$as_val
13372    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13373      # Best one so far, save it but keep looking for a better one
13374      ac_cv_path_FGREP="$ac_path_FGREP"
13375      ac_path_FGREP_max=$ac_count
13376    fi
13377    # 10*(2^10) chars as input seems more than enough
13378    test $ac_count -gt 10 && break
13379  done
13380  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13381esac
13382
13383      $ac_path_FGREP_found && break 3
13384    done
13385  done
13386  done
13387IFS=$as_save_IFS
13388  if test -z "$ac_cv_path_FGREP"; then
13389    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13390  fi
13391else
13392  ac_cv_path_FGREP=$FGREP
13393fi
13394
13395   fi
13396fi
13397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13398$as_echo "$ac_cv_path_FGREP" >&6; }
13399 FGREP="$ac_cv_path_FGREP"
13400
13401
13402    else
13403      # If it succeeded, then it was overridden by the user. We will use it
13404      # for the tool.
13405
13406      # First remove it from the list of overridden variables, so we can test
13407      # for unknown variables in the end.
13408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13409
13410      # Check if we try to supply an empty value
13411      if test "x$FGREP" = x; then
13412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13413$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13415$as_echo_n "checking for FGREP... " >&6; }
13416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13417$as_echo "disabled" >&6; }
13418      else
13419        # Check if the provided tool contains a complete path.
13420        tool_specified="$FGREP"
13421        tool_basename="${tool_specified##*/}"
13422        if test "x$tool_basename" = "x$tool_specified"; then
13423          # A command without a complete path is provided, search $PATH.
13424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13425$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13426          # Extract the first word of "$tool_basename", so it can be a program name with args.
13427set dummy $tool_basename; ac_word=$2
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13429$as_echo_n "checking for $ac_word... " >&6; }
13430if ${ac_cv_path_FGREP+:} false; then :
13431  $as_echo_n "(cached) " >&6
13432else
13433  case $FGREP in
13434  [\\/]* | ?:[\\/]*)
13435  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13436  ;;
13437  *)
13438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13439for as_dir in $PATH
13440do
13441  IFS=$as_save_IFS
13442  test -z "$as_dir" && as_dir=.
13443    for ac_exec_ext in '' $ac_executable_extensions; do
13444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13445    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13447    break 2
13448  fi
13449done
13450  done
13451IFS=$as_save_IFS
13452
13453  ;;
13454esac
13455fi
13456FGREP=$ac_cv_path_FGREP
13457if test -n "$FGREP"; then
13458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13459$as_echo "$FGREP" >&6; }
13460else
13461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13462$as_echo "no" >&6; }
13463fi
13464
13465
13466          if test "x$FGREP" = x; then
13467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13468          fi
13469        else
13470          # Otherwise we believe it is a complete path. Use it as it is.
13471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13472$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13474$as_echo_n "checking for FGREP... " >&6; }
13475          if test ! -x "$tool_specified"; then
13476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13477$as_echo "not found" >&6; }
13478            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13479          fi
13480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13481$as_echo "$tool_specified" >&6; }
13482        fi
13483      fi
13484    fi
13485
13486  fi
13487
13488
13489  if test "x$FGREP" = x; then
13490    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13491  fi
13492
13493
13494
13495
13496  # Publish this variable in the help.
13497
13498
13499  if [ -z "${SED+x}" ]; then
13500    # The variable is not set by user, try to locate tool using the code snippet
13501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13502$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13503if ${ac_cv_path_SED+:} false; then :
13504  $as_echo_n "(cached) " >&6
13505else
13506            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13507     for ac_i in 1 2 3 4 5 6 7; do
13508       ac_script="$ac_script$as_nl$ac_script"
13509     done
13510     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13511     { ac_script=; unset ac_script;}
13512     if test -z "$SED"; then
13513  ac_path_SED_found=false
13514  # Loop through the user's path and test for each of PROGNAME-LIST
13515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13516for as_dir in $PATH
13517do
13518  IFS=$as_save_IFS
13519  test -z "$as_dir" && as_dir=.
13520    for ac_prog in sed gsed; do
13521    for ac_exec_ext in '' $ac_executable_extensions; do
13522      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13523      as_fn_executable_p "$ac_path_SED" || continue
13524# Check for GNU ac_path_SED and select it if it is found.
13525  # Check for GNU $ac_path_SED
13526case `"$ac_path_SED" --version 2>&1` in
13527*GNU*)
13528  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13529*)
13530  ac_count=0
13531  $as_echo_n 0123456789 >"conftest.in"
13532  while :
13533  do
13534    cat "conftest.in" "conftest.in" >"conftest.tmp"
13535    mv "conftest.tmp" "conftest.in"
13536    cp "conftest.in" "conftest.nl"
13537    $as_echo '' >> "conftest.nl"
13538    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13539    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13540    as_fn_arith $ac_count + 1 && ac_count=$as_val
13541    if test $ac_count -gt ${ac_path_SED_max-0}; then
13542      # Best one so far, save it but keep looking for a better one
13543      ac_cv_path_SED="$ac_path_SED"
13544      ac_path_SED_max=$ac_count
13545    fi
13546    # 10*(2^10) chars as input seems more than enough
13547    test $ac_count -gt 10 && break
13548  done
13549  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13550esac
13551
13552      $ac_path_SED_found && break 3
13553    done
13554  done
13555  done
13556IFS=$as_save_IFS
13557  if test -z "$ac_cv_path_SED"; then
13558    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13559  fi
13560else
13561  ac_cv_path_SED=$SED
13562fi
13563
13564fi
13565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13566$as_echo "$ac_cv_path_SED" >&6; }
13567 SED="$ac_cv_path_SED"
13568  rm -f conftest.sed
13569
13570  else
13571    # The variable is set, but is it from the command line or the environment?
13572
13573    # Try to remove the string !SED! from our list.
13574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13576      # If it failed, the variable was not from the command line. Ignore it,
13577      # but warn the user (except for BASH, which is always set by the calling BASH).
13578      if test "xSED" != xBASH; then
13579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13580$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13581      fi
13582      # Try to locate tool using the code snippet
13583      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13584$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13585if ${ac_cv_path_SED+:} false; then :
13586  $as_echo_n "(cached) " >&6
13587else
13588            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13589     for ac_i in 1 2 3 4 5 6 7; do
13590       ac_script="$ac_script$as_nl$ac_script"
13591     done
13592     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13593     { ac_script=; unset ac_script;}
13594     if test -z "$SED"; then
13595  ac_path_SED_found=false
13596  # Loop through the user's path and test for each of PROGNAME-LIST
13597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13598for as_dir in $PATH
13599do
13600  IFS=$as_save_IFS
13601  test -z "$as_dir" && as_dir=.
13602    for ac_prog in sed gsed; do
13603    for ac_exec_ext in '' $ac_executable_extensions; do
13604      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13605      as_fn_executable_p "$ac_path_SED" || continue
13606# Check for GNU ac_path_SED and select it if it is found.
13607  # Check for GNU $ac_path_SED
13608case `"$ac_path_SED" --version 2>&1` in
13609*GNU*)
13610  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13611*)
13612  ac_count=0
13613  $as_echo_n 0123456789 >"conftest.in"
13614  while :
13615  do
13616    cat "conftest.in" "conftest.in" >"conftest.tmp"
13617    mv "conftest.tmp" "conftest.in"
13618    cp "conftest.in" "conftest.nl"
13619    $as_echo '' >> "conftest.nl"
13620    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13621    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13622    as_fn_arith $ac_count + 1 && ac_count=$as_val
13623    if test $ac_count -gt ${ac_path_SED_max-0}; then
13624      # Best one so far, save it but keep looking for a better one
13625      ac_cv_path_SED="$ac_path_SED"
13626      ac_path_SED_max=$ac_count
13627    fi
13628    # 10*(2^10) chars as input seems more than enough
13629    test $ac_count -gt 10 && break
13630  done
13631  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13632esac
13633
13634      $ac_path_SED_found && break 3
13635    done
13636  done
13637  done
13638IFS=$as_save_IFS
13639  if test -z "$ac_cv_path_SED"; then
13640    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13641  fi
13642else
13643  ac_cv_path_SED=$SED
13644fi
13645
13646fi
13647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13648$as_echo "$ac_cv_path_SED" >&6; }
13649 SED="$ac_cv_path_SED"
13650  rm -f conftest.sed
13651
13652    else
13653      # If it succeeded, then it was overridden by the user. We will use it
13654      # for the tool.
13655
13656      # First remove it from the list of overridden variables, so we can test
13657      # for unknown variables in the end.
13658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13659
13660      # Check if we try to supply an empty value
13661      if test "x$SED" = x; then
13662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13663$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13665$as_echo_n "checking for SED... " >&6; }
13666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13667$as_echo "disabled" >&6; }
13668      else
13669        # Check if the provided tool contains a complete path.
13670        tool_specified="$SED"
13671        tool_basename="${tool_specified##*/}"
13672        if test "x$tool_basename" = "x$tool_specified"; then
13673          # A command without a complete path is provided, search $PATH.
13674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13675$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13676          # Extract the first word of "$tool_basename", so it can be a program name with args.
13677set dummy $tool_basename; ac_word=$2
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13679$as_echo_n "checking for $ac_word... " >&6; }
13680if ${ac_cv_path_SED+:} false; then :
13681  $as_echo_n "(cached) " >&6
13682else
13683  case $SED in
13684  [\\/]* | ?:[\\/]*)
13685  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13686  ;;
13687  *)
13688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13689for as_dir in $PATH
13690do
13691  IFS=$as_save_IFS
13692  test -z "$as_dir" && as_dir=.
13693    for ac_exec_ext in '' $ac_executable_extensions; do
13694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13695    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13697    break 2
13698  fi
13699done
13700  done
13701IFS=$as_save_IFS
13702
13703  ;;
13704esac
13705fi
13706SED=$ac_cv_path_SED
13707if test -n "$SED"; then
13708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13709$as_echo "$SED" >&6; }
13710else
13711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13712$as_echo "no" >&6; }
13713fi
13714
13715
13716          if test "x$SED" = x; then
13717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13718          fi
13719        else
13720          # Otherwise we believe it is a complete path. Use it as it is.
13721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13722$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13724$as_echo_n "checking for SED... " >&6; }
13725          if test ! -x "$tool_specified"; then
13726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13727$as_echo "not found" >&6; }
13728            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13729          fi
13730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13731$as_echo "$tool_specified" >&6; }
13732        fi
13733      fi
13734    fi
13735
13736  fi
13737
13738
13739  if test "x$SED" = x; then
13740    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13741  fi
13742
13743
13744
13745  # Always force rm.
13746  RM="$RM -f"
13747
13748  # pwd behaves differently on various platforms and some don't support the -L flag.
13749  # Always use the bash builtin pwd to get uniform behavior.
13750  THEPWDCMD=pwd
13751
13752  # These are not required on all platforms
13753
13754
13755  # Publish this variable in the help.
13756
13757
13758  if [ -z "${CYGPATH+x}" ]; then
13759    # The variable is not set by user, try to locate tool using the code snippet
13760    for ac_prog in cygpath
13761do
13762  # Extract the first word of "$ac_prog", so it can be a program name with args.
13763set dummy $ac_prog; ac_word=$2
13764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13765$as_echo_n "checking for $ac_word... " >&6; }
13766if ${ac_cv_path_CYGPATH+:} false; then :
13767  $as_echo_n "(cached) " >&6
13768else
13769  case $CYGPATH in
13770  [\\/]* | ?:[\\/]*)
13771  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13772  ;;
13773  *)
13774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13775for as_dir in $PATH
13776do
13777  IFS=$as_save_IFS
13778  test -z "$as_dir" && as_dir=.
13779    for ac_exec_ext in '' $ac_executable_extensions; do
13780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13781    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13783    break 2
13784  fi
13785done
13786  done
13787IFS=$as_save_IFS
13788
13789  ;;
13790esac
13791fi
13792CYGPATH=$ac_cv_path_CYGPATH
13793if test -n "$CYGPATH"; then
13794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13795$as_echo "$CYGPATH" >&6; }
13796else
13797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13798$as_echo "no" >&6; }
13799fi
13800
13801
13802  test -n "$CYGPATH" && break
13803done
13804
13805  else
13806    # The variable is set, but is it from the command line or the environment?
13807
13808    # Try to remove the string !CYGPATH! from our list.
13809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13811      # If it failed, the variable was not from the command line. Ignore it,
13812      # but warn the user (except for BASH, which is always set by the calling BASH).
13813      if test "xCYGPATH" != xBASH; then
13814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13815$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13816      fi
13817      # Try to locate tool using the code snippet
13818      for ac_prog in cygpath
13819do
13820  # Extract the first word of "$ac_prog", so it can be a program name with args.
13821set dummy $ac_prog; ac_word=$2
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13823$as_echo_n "checking for $ac_word... " >&6; }
13824if ${ac_cv_path_CYGPATH+:} false; then :
13825  $as_echo_n "(cached) " >&6
13826else
13827  case $CYGPATH in
13828  [\\/]* | ?:[\\/]*)
13829  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13830  ;;
13831  *)
13832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13833for as_dir in $PATH
13834do
13835  IFS=$as_save_IFS
13836  test -z "$as_dir" && as_dir=.
13837    for ac_exec_ext in '' $ac_executable_extensions; do
13838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13839    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13841    break 2
13842  fi
13843done
13844  done
13845IFS=$as_save_IFS
13846
13847  ;;
13848esac
13849fi
13850CYGPATH=$ac_cv_path_CYGPATH
13851if test -n "$CYGPATH"; then
13852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13853$as_echo "$CYGPATH" >&6; }
13854else
13855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13856$as_echo "no" >&6; }
13857fi
13858
13859
13860  test -n "$CYGPATH" && break
13861done
13862
13863    else
13864      # If it succeeded, then it was overridden by the user. We will use it
13865      # for the tool.
13866
13867      # First remove it from the list of overridden variables, so we can test
13868      # for unknown variables in the end.
13869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13870
13871      # Check if we try to supply an empty value
13872      if test "x$CYGPATH" = x; then
13873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13874$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13876$as_echo_n "checking for CYGPATH... " >&6; }
13877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13878$as_echo "disabled" >&6; }
13879      else
13880        # Check if the provided tool contains a complete path.
13881        tool_specified="$CYGPATH"
13882        tool_basename="${tool_specified##*/}"
13883        if test "x$tool_basename" = "x$tool_specified"; then
13884          # A command without a complete path is provided, search $PATH.
13885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13886$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13887          # Extract the first word of "$tool_basename", so it can be a program name with args.
13888set dummy $tool_basename; 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_CYGPATH+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  case $CYGPATH in
13895  [\\/]* | ?:[\\/]*)
13896  ac_cv_path_CYGPATH="$CYGPATH" # 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_CYGPATH="$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
13917CYGPATH=$ac_cv_path_CYGPATH
13918if test -n "$CYGPATH"; then
13919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13920$as_echo "$CYGPATH" >&6; }
13921else
13922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13923$as_echo "no" >&6; }
13924fi
13925
13926
13927          if test "x$CYGPATH" = x; then
13928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13929          fi
13930        else
13931          # Otherwise we believe it is a complete path. Use it as it is.
13932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13933$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13935$as_echo_n "checking for CYGPATH... " >&6; }
13936          if test ! -x "$tool_specified"; then
13937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13938$as_echo "not found" >&6; }
13939            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13940          fi
13941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13942$as_echo "$tool_specified" >&6; }
13943        fi
13944      fi
13945    fi
13946
13947  fi
13948
13949
13950
13951
13952  # Publish this variable in the help.
13953
13954
13955  if [ -z "${READLINK+x}" ]; then
13956    # The variable is not set by user, try to locate tool using the code snippet
13957    for ac_prog in greadlink readlink
13958do
13959  # Extract the first word of "$ac_prog", so it can be a program name with args.
13960set dummy $ac_prog; ac_word=$2
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13962$as_echo_n "checking for $ac_word... " >&6; }
13963if ${ac_cv_path_READLINK+:} false; then :
13964  $as_echo_n "(cached) " >&6
13965else
13966  case $READLINK in
13967  [\\/]* | ?:[\\/]*)
13968  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13969  ;;
13970  *)
13971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13972for as_dir in $PATH
13973do
13974  IFS=$as_save_IFS
13975  test -z "$as_dir" && as_dir=.
13976    for ac_exec_ext in '' $ac_executable_extensions; do
13977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13978    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13980    break 2
13981  fi
13982done
13983  done
13984IFS=$as_save_IFS
13985
13986  ;;
13987esac
13988fi
13989READLINK=$ac_cv_path_READLINK
13990if test -n "$READLINK"; then
13991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13992$as_echo "$READLINK" >&6; }
13993else
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995$as_echo "no" >&6; }
13996fi
13997
13998
13999  test -n "$READLINK" && break
14000done
14001
14002  else
14003    # The variable is set, but is it from the command line or the environment?
14004
14005    # Try to remove the string !READLINK! from our list.
14006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14008      # If it failed, the variable was not from the command line. Ignore it,
14009      # but warn the user (except for BASH, which is always set by the calling BASH).
14010      if test "xREADLINK" != xBASH; then
14011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14012$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14013      fi
14014      # Try to locate tool using the code snippet
14015      for ac_prog in greadlink readlink
14016do
14017  # Extract the first word of "$ac_prog", so it can be a program name with args.
14018set dummy $ac_prog; ac_word=$2
14019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14020$as_echo_n "checking for $ac_word... " >&6; }
14021if ${ac_cv_path_READLINK+:} false; then :
14022  $as_echo_n "(cached) " >&6
14023else
14024  case $READLINK in
14025  [\\/]* | ?:[\\/]*)
14026  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14027  ;;
14028  *)
14029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14030for as_dir in $PATH
14031do
14032  IFS=$as_save_IFS
14033  test -z "$as_dir" && as_dir=.
14034    for ac_exec_ext in '' $ac_executable_extensions; do
14035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14036    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14038    break 2
14039  fi
14040done
14041  done
14042IFS=$as_save_IFS
14043
14044  ;;
14045esac
14046fi
14047READLINK=$ac_cv_path_READLINK
14048if test -n "$READLINK"; then
14049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14050$as_echo "$READLINK" >&6; }
14051else
14052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14053$as_echo "no" >&6; }
14054fi
14055
14056
14057  test -n "$READLINK" && break
14058done
14059
14060    else
14061      # If it succeeded, then it was overridden by the user. We will use it
14062      # for the tool.
14063
14064      # First remove it from the list of overridden variables, so we can test
14065      # for unknown variables in the end.
14066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14067
14068      # Check if we try to supply an empty value
14069      if test "x$READLINK" = x; then
14070        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14071$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14073$as_echo_n "checking for READLINK... " >&6; }
14074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14075$as_echo "disabled" >&6; }
14076      else
14077        # Check if the provided tool contains a complete path.
14078        tool_specified="$READLINK"
14079        tool_basename="${tool_specified##*/}"
14080        if test "x$tool_basename" = "x$tool_specified"; then
14081          # A command without a complete path is provided, search $PATH.
14082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14083$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14084          # Extract the first word of "$tool_basename", so it can be a program name with args.
14085set dummy $tool_basename; 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_READLINK+:} false; then :
14089  $as_echo_n "(cached) " >&6
14090else
14091  case $READLINK in
14092  [\\/]* | ?:[\\/]*)
14093  ac_cv_path_READLINK="$READLINK" # 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_READLINK="$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
14114READLINK=$ac_cv_path_READLINK
14115if test -n "$READLINK"; then
14116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14117$as_echo "$READLINK" >&6; }
14118else
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14120$as_echo "no" >&6; }
14121fi
14122
14123
14124          if test "x$READLINK" = x; then
14125            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14126          fi
14127        else
14128          # Otherwise we believe it is a complete path. Use it as it is.
14129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14130$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14131          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14132$as_echo_n "checking for READLINK... " >&6; }
14133          if test ! -x "$tool_specified"; then
14134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14135$as_echo "not found" >&6; }
14136            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14137          fi
14138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14139$as_echo "$tool_specified" >&6; }
14140        fi
14141      fi
14142    fi
14143
14144  fi
14145
14146
14147
14148
14149  # Publish this variable in the help.
14150
14151
14152  if [ -z "${DF+x}" ]; then
14153    # The variable is not set by user, try to locate tool using the code snippet
14154    for ac_prog in df
14155do
14156  # Extract the first word of "$ac_prog", so it can be a program name with args.
14157set dummy $ac_prog; ac_word=$2
14158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14159$as_echo_n "checking for $ac_word... " >&6; }
14160if ${ac_cv_path_DF+:} false; then :
14161  $as_echo_n "(cached) " >&6
14162else
14163  case $DF in
14164  [\\/]* | ?:[\\/]*)
14165  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14166  ;;
14167  *)
14168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14169for as_dir in $PATH
14170do
14171  IFS=$as_save_IFS
14172  test -z "$as_dir" && as_dir=.
14173    for ac_exec_ext in '' $ac_executable_extensions; do
14174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14175    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14177    break 2
14178  fi
14179done
14180  done
14181IFS=$as_save_IFS
14182
14183  ;;
14184esac
14185fi
14186DF=$ac_cv_path_DF
14187if test -n "$DF"; then
14188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14189$as_echo "$DF" >&6; }
14190else
14191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14192$as_echo "no" >&6; }
14193fi
14194
14195
14196  test -n "$DF" && break
14197done
14198
14199  else
14200    # The variable is set, but is it from the command line or the environment?
14201
14202    # Try to remove the string !DF! from our list.
14203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14205      # If it failed, the variable was not from the command line. Ignore it,
14206      # but warn the user (except for BASH, which is always set by the calling BASH).
14207      if test "xDF" != xBASH; then
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14209$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14210      fi
14211      # Try to locate tool using the code snippet
14212      for ac_prog in df
14213do
14214  # Extract the first word of "$ac_prog", so it can be a program name with args.
14215set dummy $ac_prog; ac_word=$2
14216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14217$as_echo_n "checking for $ac_word... " >&6; }
14218if ${ac_cv_path_DF+:} false; then :
14219  $as_echo_n "(cached) " >&6
14220else
14221  case $DF in
14222  [\\/]* | ?:[\\/]*)
14223  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14224  ;;
14225  *)
14226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14227for as_dir in $PATH
14228do
14229  IFS=$as_save_IFS
14230  test -z "$as_dir" && as_dir=.
14231    for ac_exec_ext in '' $ac_executable_extensions; do
14232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14233    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14235    break 2
14236  fi
14237done
14238  done
14239IFS=$as_save_IFS
14240
14241  ;;
14242esac
14243fi
14244DF=$ac_cv_path_DF
14245if test -n "$DF"; then
14246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14247$as_echo "$DF" >&6; }
14248else
14249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14250$as_echo "no" >&6; }
14251fi
14252
14253
14254  test -n "$DF" && break
14255done
14256
14257    else
14258      # If it succeeded, then it was overridden by the user. We will use it
14259      # for the tool.
14260
14261      # First remove it from the list of overridden variables, so we can test
14262      # for unknown variables in the end.
14263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14264
14265      # Check if we try to supply an empty value
14266      if test "x$DF" = x; then
14267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14268$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14270$as_echo_n "checking for DF... " >&6; }
14271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14272$as_echo "disabled" >&6; }
14273      else
14274        # Check if the provided tool contains a complete path.
14275        tool_specified="$DF"
14276        tool_basename="${tool_specified##*/}"
14277        if test "x$tool_basename" = "x$tool_specified"; then
14278          # A command without a complete path is provided, search $PATH.
14279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14280$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14281          # Extract the first word of "$tool_basename", so it can be a program name with args.
14282set dummy $tool_basename; 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_DF+:} false; then :
14286  $as_echo_n "(cached) " >&6
14287else
14288  case $DF in
14289  [\\/]* | ?:[\\/]*)
14290  ac_cv_path_DF="$DF" # 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_DF="$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
14311DF=$ac_cv_path_DF
14312if test -n "$DF"; then
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14314$as_echo "$DF" >&6; }
14315else
14316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14317$as_echo "no" >&6; }
14318fi
14319
14320
14321          if test "x$DF" = x; then
14322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14323          fi
14324        else
14325          # Otherwise we believe it is a complete path. Use it as it is.
14326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14327$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14329$as_echo_n "checking for DF... " >&6; }
14330          if test ! -x "$tool_specified"; then
14331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14332$as_echo "not found" >&6; }
14333            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14334          fi
14335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14336$as_echo "$tool_specified" >&6; }
14337        fi
14338      fi
14339    fi
14340
14341  fi
14342
14343
14344
14345
14346  # Publish this variable in the help.
14347
14348
14349  if [ -z "${CPIO+x}" ]; then
14350    # The variable is not set by user, try to locate tool using the code snippet
14351    for ac_prog in cpio bsdcpio
14352do
14353  # Extract the first word of "$ac_prog", so it can be a program name with args.
14354set dummy $ac_prog; ac_word=$2
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14356$as_echo_n "checking for $ac_word... " >&6; }
14357if ${ac_cv_path_CPIO+:} false; then :
14358  $as_echo_n "(cached) " >&6
14359else
14360  case $CPIO in
14361  [\\/]* | ?:[\\/]*)
14362  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14363  ;;
14364  *)
14365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14366for as_dir in $PATH
14367do
14368  IFS=$as_save_IFS
14369  test -z "$as_dir" && as_dir=.
14370    for ac_exec_ext in '' $ac_executable_extensions; do
14371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14372    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14374    break 2
14375  fi
14376done
14377  done
14378IFS=$as_save_IFS
14379
14380  ;;
14381esac
14382fi
14383CPIO=$ac_cv_path_CPIO
14384if test -n "$CPIO"; then
14385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14386$as_echo "$CPIO" >&6; }
14387else
14388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389$as_echo "no" >&6; }
14390fi
14391
14392
14393  test -n "$CPIO" && break
14394done
14395
14396  else
14397    # The variable is set, but is it from the command line or the environment?
14398
14399    # Try to remove the string !CPIO! from our list.
14400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14402      # If it failed, the variable was not from the command line. Ignore it,
14403      # but warn the user (except for BASH, which is always set by the calling BASH).
14404      if test "xCPIO" != xBASH; then
14405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14406$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14407      fi
14408      # Try to locate tool using the code snippet
14409      for ac_prog in cpio bsdcpio
14410do
14411  # Extract the first word of "$ac_prog", so it can be a program name with args.
14412set dummy $ac_prog; ac_word=$2
14413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14414$as_echo_n "checking for $ac_word... " >&6; }
14415if ${ac_cv_path_CPIO+:} false; then :
14416  $as_echo_n "(cached) " >&6
14417else
14418  case $CPIO in
14419  [\\/]* | ?:[\\/]*)
14420  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14421  ;;
14422  *)
14423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14424for as_dir in $PATH
14425do
14426  IFS=$as_save_IFS
14427  test -z "$as_dir" && as_dir=.
14428    for ac_exec_ext in '' $ac_executable_extensions; do
14429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14430    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14432    break 2
14433  fi
14434done
14435  done
14436IFS=$as_save_IFS
14437
14438  ;;
14439esac
14440fi
14441CPIO=$ac_cv_path_CPIO
14442if test -n "$CPIO"; then
14443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14444$as_echo "$CPIO" >&6; }
14445else
14446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14447$as_echo "no" >&6; }
14448fi
14449
14450
14451  test -n "$CPIO" && break
14452done
14453
14454    else
14455      # If it succeeded, then it was overridden by the user. We will use it
14456      # for the tool.
14457
14458      # First remove it from the list of overridden variables, so we can test
14459      # for unknown variables in the end.
14460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14461
14462      # Check if we try to supply an empty value
14463      if test "x$CPIO" = x; then
14464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14465$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14467$as_echo_n "checking for CPIO... " >&6; }
14468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14469$as_echo "disabled" >&6; }
14470      else
14471        # Check if the provided tool contains a complete path.
14472        tool_specified="$CPIO"
14473        tool_basename="${tool_specified##*/}"
14474        if test "x$tool_basename" = "x$tool_specified"; then
14475          # A command without a complete path is provided, search $PATH.
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14477$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14478          # Extract the first word of "$tool_basename", so it can be a program name with args.
14479set dummy $tool_basename; 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_CPIO+:} false; then :
14483  $as_echo_n "(cached) " >&6
14484else
14485  case $CPIO in
14486  [\\/]* | ?:[\\/]*)
14487  ac_cv_path_CPIO="$CPIO" # 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_CPIO="$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
14508CPIO=$ac_cv_path_CPIO
14509if test -n "$CPIO"; then
14510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14511$as_echo "$CPIO" >&6; }
14512else
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14514$as_echo "no" >&6; }
14515fi
14516
14517
14518          if test "x$CPIO" = x; then
14519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14520          fi
14521        else
14522          # Otherwise we believe it is a complete path. Use it as it is.
14523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14524$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14526$as_echo_n "checking for CPIO... " >&6; }
14527          if test ! -x "$tool_specified"; then
14528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14529$as_echo "not found" >&6; }
14530            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14531          fi
14532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14533$as_echo "$tool_specified" >&6; }
14534        fi
14535      fi
14536    fi
14537
14538  fi
14539
14540
14541
14542
14543  # Publish this variable in the help.
14544
14545
14546  if [ -z "${NICE+x}" ]; then
14547    # The variable is not set by user, try to locate tool using the code snippet
14548    for ac_prog in nice
14549do
14550  # Extract the first word of "$ac_prog", so it can be a program name with args.
14551set dummy $ac_prog; ac_word=$2
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14553$as_echo_n "checking for $ac_word... " >&6; }
14554if ${ac_cv_path_NICE+:} false; then :
14555  $as_echo_n "(cached) " >&6
14556else
14557  case $NICE in
14558  [\\/]* | ?:[\\/]*)
14559  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14560  ;;
14561  *)
14562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14563for as_dir in $PATH
14564do
14565  IFS=$as_save_IFS
14566  test -z "$as_dir" && as_dir=.
14567    for ac_exec_ext in '' $ac_executable_extensions; do
14568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14569    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14571    break 2
14572  fi
14573done
14574  done
14575IFS=$as_save_IFS
14576
14577  ;;
14578esac
14579fi
14580NICE=$ac_cv_path_NICE
14581if test -n "$NICE"; then
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14583$as_echo "$NICE" >&6; }
14584else
14585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14586$as_echo "no" >&6; }
14587fi
14588
14589
14590  test -n "$NICE" && break
14591done
14592
14593  else
14594    # The variable is set, but is it from the command line or the environment?
14595
14596    # Try to remove the string !NICE! from our list.
14597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14599      # If it failed, the variable was not from the command line. Ignore it,
14600      # but warn the user (except for BASH, which is always set by the calling BASH).
14601      if test "xNICE" != xBASH; then
14602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14603$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14604      fi
14605      # Try to locate tool using the code snippet
14606      for ac_prog in nice
14607do
14608  # Extract the first word of "$ac_prog", so it can be a program name with args.
14609set dummy $ac_prog; ac_word=$2
14610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14611$as_echo_n "checking for $ac_word... " >&6; }
14612if ${ac_cv_path_NICE+:} false; then :
14613  $as_echo_n "(cached) " >&6
14614else
14615  case $NICE in
14616  [\\/]* | ?:[\\/]*)
14617  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14618  ;;
14619  *)
14620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14621for as_dir in $PATH
14622do
14623  IFS=$as_save_IFS
14624  test -z "$as_dir" && as_dir=.
14625    for ac_exec_ext in '' $ac_executable_extensions; do
14626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14627    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14629    break 2
14630  fi
14631done
14632  done
14633IFS=$as_save_IFS
14634
14635  ;;
14636esac
14637fi
14638NICE=$ac_cv_path_NICE
14639if test -n "$NICE"; then
14640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14641$as_echo "$NICE" >&6; }
14642else
14643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14644$as_echo "no" >&6; }
14645fi
14646
14647
14648  test -n "$NICE" && break
14649done
14650
14651    else
14652      # If it succeeded, then it was overridden by the user. We will use it
14653      # for the tool.
14654
14655      # First remove it from the list of overridden variables, so we can test
14656      # for unknown variables in the end.
14657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14658
14659      # Check if we try to supply an empty value
14660      if test "x$NICE" = x; then
14661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14662$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14664$as_echo_n "checking for NICE... " >&6; }
14665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14666$as_echo "disabled" >&6; }
14667      else
14668        # Check if the provided tool contains a complete path.
14669        tool_specified="$NICE"
14670        tool_basename="${tool_specified##*/}"
14671        if test "x$tool_basename" = "x$tool_specified"; then
14672          # A command without a complete path is provided, search $PATH.
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14674$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14675          # Extract the first word of "$tool_basename", so it can be a program name with args.
14676set dummy $tool_basename; ac_word=$2
14677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14678$as_echo_n "checking for $ac_word... " >&6; }
14679if ${ac_cv_path_NICE+:} false; then :
14680  $as_echo_n "(cached) " >&6
14681else
14682  case $NICE in
14683  [\\/]* | ?:[\\/]*)
14684  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14685  ;;
14686  *)
14687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14688for as_dir in $PATH
14689do
14690  IFS=$as_save_IFS
14691  test -z "$as_dir" && as_dir=.
14692    for ac_exec_ext in '' $ac_executable_extensions; do
14693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14694    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14696    break 2
14697  fi
14698done
14699  done
14700IFS=$as_save_IFS
14701
14702  ;;
14703esac
14704fi
14705NICE=$ac_cv_path_NICE
14706if test -n "$NICE"; then
14707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14708$as_echo "$NICE" >&6; }
14709else
14710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14711$as_echo "no" >&6; }
14712fi
14713
14714
14715          if test "x$NICE" = x; then
14716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14717          fi
14718        else
14719          # Otherwise we believe it is a complete path. Use it as it is.
14720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14721$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14723$as_echo_n "checking for NICE... " >&6; }
14724          if test ! -x "$tool_specified"; then
14725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14726$as_echo "not found" >&6; }
14727            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14728          fi
14729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14730$as_echo "$tool_specified" >&6; }
14731        fi
14732      fi
14733    fi
14734
14735  fi
14736
14737
14738
14739
14740# Now we can determine OpenJDK build and target platforms. This is required to
14741# have early on.
14742# Make sure we can run config.sub.
14743$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14744  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14745
14746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14747$as_echo_n "checking build system type... " >&6; }
14748if ${ac_cv_build+:} false; then :
14749  $as_echo_n "(cached) " >&6
14750else
14751  ac_build_alias=$build_alias
14752test "x$ac_build_alias" = x &&
14753  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14754test "x$ac_build_alias" = x &&
14755  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14756ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14757  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14758
14759fi
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14761$as_echo "$ac_cv_build" >&6; }
14762case $ac_cv_build in
14763*-*-*) ;;
14764*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14765esac
14766build=$ac_cv_build
14767ac_save_IFS=$IFS; IFS='-'
14768set x $ac_cv_build
14769shift
14770build_cpu=$1
14771build_vendor=$2
14772shift; shift
14773# Remember, the first character of IFS is used to create $*,
14774# except with old shells:
14775build_os=$*
14776IFS=$ac_save_IFS
14777case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14778
14779
14780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14781$as_echo_n "checking host system type... " >&6; }
14782if ${ac_cv_host+:} false; then :
14783  $as_echo_n "(cached) " >&6
14784else
14785  if test "x$host_alias" = x; then
14786  ac_cv_host=$ac_cv_build
14787else
14788  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14789    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14790fi
14791
14792fi
14793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14794$as_echo "$ac_cv_host" >&6; }
14795case $ac_cv_host in
14796*-*-*) ;;
14797*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14798esac
14799host=$ac_cv_host
14800ac_save_IFS=$IFS; IFS='-'
14801set x $ac_cv_host
14802shift
14803host_cpu=$1
14804host_vendor=$2
14805shift; shift
14806# Remember, the first character of IFS is used to create $*,
14807# except with old shells:
14808host_os=$*
14809IFS=$ac_save_IFS
14810case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14811
14812
14813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14814$as_echo_n "checking target system type... " >&6; }
14815if ${ac_cv_target+:} false; then :
14816  $as_echo_n "(cached) " >&6
14817else
14818  if test "x$target_alias" = x; then
14819  ac_cv_target=$ac_cv_host
14820else
14821  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14822    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14823fi
14824
14825fi
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14827$as_echo "$ac_cv_target" >&6; }
14828case $ac_cv_target in
14829*-*-*) ;;
14830*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14831esac
14832target=$ac_cv_target
14833ac_save_IFS=$IFS; IFS='-'
14834set x $ac_cv_target
14835shift
14836target_cpu=$1
14837target_vendor=$2
14838shift; shift
14839# Remember, the first character of IFS is used to create $*,
14840# except with old shells:
14841target_os=$*
14842IFS=$ac_save_IFS
14843case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14844
14845
14846# The aliases save the names the user supplied, while $host etc.
14847# will get canonicalized.
14848test -n "$target_alias" &&
14849  test "$program_prefix$program_suffix$program_transform_name" = \
14850    NONENONEs,x,x, &&
14851  program_prefix=${target_alias}-
14852
14853  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14854  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14855  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14856  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14857  # to use the configure naming style.
14858
14859
14860
14861
14862
14863  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14864  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14865  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14866  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14867  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14868  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14869
14870
14871
14872  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14873
14874  case "$build_os" in
14875    *linux*)
14876      VAR_OS=linux
14877      VAR_OS_TYPE=unix
14878      ;;
14879    *solaris*)
14880      VAR_OS=solaris
14881      VAR_OS_TYPE=unix
14882      ;;
14883    *darwin*)
14884      VAR_OS=macosx
14885      VAR_OS_TYPE=unix
14886      ;;
14887    *bsd*)
14888      VAR_OS=bsd
14889      VAR_OS_TYPE=unix
14890      ;;
14891    *cygwin*)
14892      VAR_OS=windows
14893      VAR_OS_ENV=windows.cygwin
14894      ;;
14895    *mingw*)
14896      VAR_OS=windows
14897      VAR_OS_ENV=windows.msys
14898      ;;
14899    *aix*)
14900      VAR_OS=aix
14901      VAR_OS_TYPE=unix
14902      ;;
14903    *)
14904      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14905      ;;
14906  esac
14907
14908
14909  # First argument is the cpu name from the trip/quad
14910  case "$build_cpu" in
14911    x86_64)
14912      VAR_CPU=x86_64
14913      VAR_CPU_ARCH=x86
14914      VAR_CPU_BITS=64
14915      VAR_CPU_ENDIAN=little
14916      ;;
14917    i?86)
14918      VAR_CPU=x86
14919      VAR_CPU_ARCH=x86
14920      VAR_CPU_BITS=32
14921      VAR_CPU_ENDIAN=little
14922      ;;
14923    arm*)
14924      VAR_CPU=arm
14925      VAR_CPU_ARCH=arm
14926      VAR_CPU_BITS=32
14927      VAR_CPU_ENDIAN=little
14928      ;;
14929    aarch64)
14930      VAR_CPU=aarch64
14931      VAR_CPU_ARCH=aarch64
14932      VAR_CPU_BITS=64
14933      VAR_CPU_ENDIAN=little
14934      ;;
14935    powerpc)
14936      VAR_CPU=ppc
14937      VAR_CPU_ARCH=ppc
14938      VAR_CPU_BITS=32
14939      VAR_CPU_ENDIAN=big
14940      ;;
14941    powerpc64)
14942      VAR_CPU=ppc64
14943      VAR_CPU_ARCH=ppc
14944      VAR_CPU_BITS=64
14945      VAR_CPU_ENDIAN=big
14946      ;;
14947    powerpc64le)
14948      VAR_CPU=ppc64le
14949      VAR_CPU_ARCH=ppc
14950      VAR_CPU_BITS=64
14951      VAR_CPU_ENDIAN=little
14952      ;;
14953    s390)
14954      VAR_CPU=s390
14955      VAR_CPU_ARCH=s390
14956      VAR_CPU_BITS=32
14957      VAR_CPU_ENDIAN=big
14958      ;;
14959    s390x)
14960      VAR_CPU=s390x
14961      VAR_CPU_ARCH=s390
14962      VAR_CPU_BITS=64
14963      VAR_CPU_ENDIAN=big
14964      ;;
14965    sparc)
14966      VAR_CPU=sparc
14967      VAR_CPU_ARCH=sparc
14968      VAR_CPU_BITS=32
14969      VAR_CPU_ENDIAN=big
14970      ;;
14971    sparcv9|sparc64)
14972      VAR_CPU=sparcv9
14973      VAR_CPU_ARCH=sparc
14974      VAR_CPU_BITS=64
14975      VAR_CPU_ENDIAN=big
14976      ;;
14977    *)
14978      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14979      ;;
14980  esac
14981
14982  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14983  OPENJDK_BUILD_OS="$VAR_OS"
14984  if test "x$VAR_OS_TYPE" != x; then
14985    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14986  else
14987    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14988  fi
14989  if test "x$VAR_OS_ENV" != x; then
14990    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14991  else
14992    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14993  fi
14994  OPENJDK_BUILD_CPU="$VAR_CPU"
14995  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14996  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14997  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14998
14999
15000
15001
15002
15003
15004
15005
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15007$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15009$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15010
15011  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15012
15013  case "$host_os" in
15014    *linux*)
15015      VAR_OS=linux
15016      VAR_OS_TYPE=unix
15017      ;;
15018    *solaris*)
15019      VAR_OS=solaris
15020      VAR_OS_TYPE=unix
15021      ;;
15022    *darwin*)
15023      VAR_OS=macosx
15024      VAR_OS_TYPE=unix
15025      ;;
15026    *bsd*)
15027      VAR_OS=bsd
15028      VAR_OS_TYPE=unix
15029      ;;
15030    *cygwin*)
15031      VAR_OS=windows
15032      VAR_OS_ENV=windows.cygwin
15033      ;;
15034    *mingw*)
15035      VAR_OS=windows
15036      VAR_OS_ENV=windows.msys
15037      ;;
15038    *aix*)
15039      VAR_OS=aix
15040      VAR_OS_TYPE=unix
15041      ;;
15042    *)
15043      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15044      ;;
15045  esac
15046
15047
15048  # First argument is the cpu name from the trip/quad
15049  case "$host_cpu" in
15050    x86_64)
15051      VAR_CPU=x86_64
15052      VAR_CPU_ARCH=x86
15053      VAR_CPU_BITS=64
15054      VAR_CPU_ENDIAN=little
15055      ;;
15056    i?86)
15057      VAR_CPU=x86
15058      VAR_CPU_ARCH=x86
15059      VAR_CPU_BITS=32
15060      VAR_CPU_ENDIAN=little
15061      ;;
15062    arm*)
15063      VAR_CPU=arm
15064      VAR_CPU_ARCH=arm
15065      VAR_CPU_BITS=32
15066      VAR_CPU_ENDIAN=little
15067      ;;
15068    aarch64)
15069      VAR_CPU=aarch64
15070      VAR_CPU_ARCH=aarch64
15071      VAR_CPU_BITS=64
15072      VAR_CPU_ENDIAN=little
15073      ;;
15074    powerpc)
15075      VAR_CPU=ppc
15076      VAR_CPU_ARCH=ppc
15077      VAR_CPU_BITS=32
15078      VAR_CPU_ENDIAN=big
15079      ;;
15080    powerpc64)
15081      VAR_CPU=ppc64
15082      VAR_CPU_ARCH=ppc
15083      VAR_CPU_BITS=64
15084      VAR_CPU_ENDIAN=big
15085      ;;
15086    powerpc64le)
15087      VAR_CPU=ppc64le
15088      VAR_CPU_ARCH=ppc
15089      VAR_CPU_BITS=64
15090      VAR_CPU_ENDIAN=little
15091      ;;
15092    s390)
15093      VAR_CPU=s390
15094      VAR_CPU_ARCH=s390
15095      VAR_CPU_BITS=32
15096      VAR_CPU_ENDIAN=big
15097      ;;
15098    s390x)
15099      VAR_CPU=s390x
15100      VAR_CPU_ARCH=s390
15101      VAR_CPU_BITS=64
15102      VAR_CPU_ENDIAN=big
15103      ;;
15104    sparc)
15105      VAR_CPU=sparc
15106      VAR_CPU_ARCH=sparc
15107      VAR_CPU_BITS=32
15108      VAR_CPU_ENDIAN=big
15109      ;;
15110    sparcv9|sparc64)
15111      VAR_CPU=sparcv9
15112      VAR_CPU_ARCH=sparc
15113      VAR_CPU_BITS=64
15114      VAR_CPU_ENDIAN=big
15115      ;;
15116    *)
15117      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15118      ;;
15119  esac
15120
15121  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15122  OPENJDK_TARGET_OS="$VAR_OS"
15123  if test "x$VAR_OS_TYPE" != x; then
15124    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15125  else
15126    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15127  fi
15128  if test "x$VAR_OS_ENV" != x; then
15129    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15130  else
15131    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15132  fi
15133  OPENJDK_TARGET_CPU="$VAR_CPU"
15134  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15135  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15136  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15137
15138
15139
15140
15141
15142
15143
15144
15145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15146$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15148$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15149
15150
15151
15152# Check whether --with-target-bits was given.
15153if test "${with_target_bits+set}" = set; then :
15154  withval=$with_target_bits;
15155fi
15156
15157
15158  # We have three types of compiles:
15159  # native  == normal compilation, target system == build system
15160  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15161  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15162  #
15163  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15164    # We're doing a proper cross-compilation
15165    COMPILE_TYPE="cross"
15166  else
15167    COMPILE_TYPE="native"
15168  fi
15169
15170  if test "x$with_target_bits" != x; then
15171    if test "x$COMPILE_TYPE" = "xcross"; then
15172      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15173    fi
15174
15175    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15176      # A reduced build is requested
15177      COMPILE_TYPE="reduced"
15178      OPENJDK_TARGET_CPU_BITS=32
15179      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15180        OPENJDK_TARGET_CPU=x86
15181      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15182        OPENJDK_TARGET_CPU=sparc
15183      else
15184        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15185      fi
15186    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15187      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
15188    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15189      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15190$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15191    else
15192      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15193    fi
15194  fi
15195
15196
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15198$as_echo_n "checking compilation type... " >&6; }
15199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15200$as_echo "$COMPILE_TYPE" >&6; }
15201
15202
15203  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15204    REQUIRED_OS_NAME=SunOS
15205    REQUIRED_OS_VERSION=5.10
15206  fi
15207  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15208    REQUIRED_OS_NAME=Linux
15209    REQUIRED_OS_VERSION=2.6
15210  fi
15211  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15212    REQUIRED_OS_NAME=Windows
15213    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15214      REQUIRED_OS_VERSION=5.2
15215    else
15216      REQUIRED_OS_VERSION=5.1
15217    fi
15218  fi
15219  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15220    REQUIRED_OS_NAME=Darwin
15221    REQUIRED_OS_VERSION=11.2
15222  fi
15223  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15224    REQUIRED_OS_NAME=AIX
15225    REQUIRED_OS_VERSION=7.1
15226  fi
15227
15228
15229
15230
15231
15232  # Also store the legacy naming of the cpu.
15233  # Ie i586 and amd64 instead of x86 and x86_64
15234  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15235  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15236    OPENJDK_TARGET_CPU_LEGACY="i586"
15237  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15238    # On all platforms except MacOSX replace x86_64 with amd64.
15239    OPENJDK_TARGET_CPU_LEGACY="amd64"
15240  fi
15241
15242
15243  # And the second legacy naming of the cpu.
15244  # Ie i386 and amd64 instead of x86 and x86_64.
15245  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15246  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15247    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15248  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15249    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15250  fi
15251
15252
15253  # This is the name of the cpu (but using i386 and amd64 instead of
15254  # x86 and x86_64, respectively), preceeded by a /, to be used when
15255  # locating libraries. On macosx, it's empty, though.
15256  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15257  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15258    OPENJDK_TARGET_CPU_LIBDIR=""
15259  fi
15260
15261
15262  # Now do the same for OPENJDK_BUILD_CPU...
15263  # Also store the legacy naming of the cpu.
15264  # Ie i586 and amd64 instead of x86 and x86_64
15265  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15266  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15267    OPENJDK_BUILD_CPU_LEGACY="i586"
15268  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15269    # On all platforms except MacOSX replace x86_64 with amd64.
15270    OPENJDK_BUILD_CPU_LEGACY="amd64"
15271  fi
15272
15273
15274  # And the second legacy naming of the cpu.
15275  # Ie i386 and amd64 instead of x86 and x86_64.
15276  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15277  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15278    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15279  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15280    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15281  fi
15282
15283
15284  # This is the name of the cpu (but using i386 and amd64 instead of
15285  # x86 and x86_64, respectively), preceeded by a /, to be used when
15286  # locating libraries. On macosx, it's empty, though.
15287  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15288  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15289    OPENJDK_BUILD_CPU_LIBDIR=""
15290  fi
15291
15292
15293  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15294  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15295  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15296  OPENJDK_TARGET_CPU_ISADIR=""
15297  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15298    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15299      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15300    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15301      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15302    fi
15303  fi
15304
15305
15306  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15307  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15308  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15309    # On linux only, we replace x86 with i386.
15310    OPENJDK_TARGET_CPU_OSARCH="i386"
15311  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15312    # On all platforms except macosx, we replace x86_64 with amd64.
15313    OPENJDK_TARGET_CPU_OSARCH="amd64"
15314  fi
15315
15316
15317  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15318  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15319    OPENJDK_TARGET_CPU_JLI="i386"
15320  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15321    # On all platforms except macosx, we replace x86_64 with amd64.
15322    OPENJDK_TARGET_CPU_JLI="amd64"
15323  fi
15324  # Now setup the -D flags for building libjli.
15325  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15326  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15327    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15328      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15329    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15330      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15331    fi
15332  fi
15333
15334
15335  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15336  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15337    OPENJDK_BUILD_CPU_JLI="i386"
15338  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15339    # On all platforms except macosx, we replace x86_64 with amd64.
15340    OPENJDK_BUILD_CPU_JLI="amd64"
15341  fi
15342  # Now setup the -D flags for building libjli.
15343  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15344  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15345    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15346      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15347    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15348      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15349    fi
15350  fi
15351
15352
15353  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15354      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15355  else
15356      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15357  fi
15358
15359
15360  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15361    A_LP64="LP64:="
15362    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15363    # unpack200.exe
15364    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15365      ADD_LP64="-D_LP64=1"
15366    fi
15367  fi
15368  LP64=$A_LP64
15369
15370  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15371    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15372      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15373    fi
15374  fi
15375
15376  if test "x$COMPILE_TYPE" = "xcross"; then
15377    # FIXME: ... or should this include reduced builds..?
15378    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15379  else
15380    DEFINE_CROSS_COMPILE_ARCH=""
15381  fi
15382
15383
15384  # ZERO_ARCHDEF is used to enable architecture-specific code
15385  case "${OPENJDK_TARGET_CPU}" in
15386    ppc)     ZERO_ARCHDEF=PPC32 ;;
15387    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15388    s390*)   ZERO_ARCHDEF=S390  ;;
15389    sparc*)  ZERO_ARCHDEF=SPARC ;;
15390    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15391    x86)     ZERO_ARCHDEF=IA32  ;;
15392    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15393  esac
15394
15395
15396
15397
15398# Continue setting up basic stuff. Most remaining code require fundamental tools.
15399
15400  # Save the current directory this script was started from
15401  CURDIR="$PWD"
15402
15403  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15404  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15405  # was not available at that time.
15406  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15407  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15408    ORIGINAL_PATH="$REWRITTEN_PATH"
15409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15410$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15411  fi
15412
15413  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15414    PATH_SEP=";"
15415
15416  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15417  if test $SRC_ROOT_LENGTH -gt 100; then
15418    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15419  fi
15420
15421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15423$as_echo_n "checking cygwin release... " >&6; }
15424    CYGWIN_VERSION=`$UNAME -r`
15425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15426$as_echo "$CYGWIN_VERSION" >&6; }
15427    WINDOWS_ENV_VENDOR='cygwin'
15428    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15429
15430    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15431    if test "x$CYGWIN_VERSION_OLD" != x; then
15432      { $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
15433$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;}
15434      as_fn_error $? "Cannot continue" "$LINENO" 5
15435    fi
15436    if test "x$CYGPATH" = x; then
15437      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15438    fi
15439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15440$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15441    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15442    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15443    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15444    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15446$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15447    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15448    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15449    if test "x$test_cygdrive_prefix" = x; then
15450      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15451    fi
15452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15454$as_echo_n "checking msys release... " >&6; }
15455    MSYS_VERSION=`$UNAME -r`
15456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15457$as_echo "$MSYS_VERSION" >&6; }
15458
15459    WINDOWS_ENV_VENDOR='msys'
15460    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15461
15462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15463$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15464    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15465    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15466
15467  windows_path="$MSYS_ROOT_PATH"
15468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15469    unix_path=`$CYGPATH -u "$windows_path"`
15470    MSYS_ROOT_PATH="$unix_path"
15471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15473    MSYS_ROOT_PATH="$unix_path"
15474  fi
15475
15476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15477$as_echo "$MSYS_ROOT_PATH" >&6; }
15478    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15479  else
15480    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15481  fi
15482
15483  # Test if windows or unix (cygwin/msys) find is first in path.
15484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15485$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15486  FIND_BINARY_OUTPUT=`find --version 2>&1`
15487  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15489$as_echo "unix style" >&6; }
15490  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15492$as_echo "Windows" >&6; }
15493    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15494$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15495    { $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
15496$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15497    as_fn_error $? "Cannot continue" "$LINENO" 5
15498  else
15499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15500$as_echo "unknown" >&6; }
15501    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15502$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15503  fi
15504
15505  else
15506    PATH_SEP=":"
15507  fi
15508
15509
15510  # We get the top-level directory from the supporting wrappers.
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15512$as_echo_n "checking for top-level directory... " >&6; }
15513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15514$as_echo "$TOPDIR" >&6; }
15515
15516
15517  # Save the original version of TOPDIR for string comparisons
15518  ORIGINAL_TOPDIR="$TOPDIR"
15519
15520
15521  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15522
15523  # Only process if variable expands to non-empty
15524
15525  if test "x$CURDIR" != x; then
15526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15527
15528  # Input might be given as Windows format, start by converting to
15529  # unix format.
15530  path="$CURDIR"
15531  new_path=`$CYGPATH -u "$path"`
15532
15533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15536  # "foo.exe" is OK but "foo" is an error.
15537  #
15538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15539  # It is also a way to make sure we got the proper file name for the real test later on.
15540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15541  if test "x$test_shortpath" = x; then
15542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15543$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15544    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15545  fi
15546
15547  # Call helper function which possibly converts this using DOS-style short mode.
15548  # If so, the updated path is stored in $new_path.
15549
15550  input_path="$new_path"
15551  # Check if we need to convert this using DOS-style short mode. If the path
15552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15553  # take no chances and rewrite it.
15554  # Note: m4 eats our [], so we need to use [ and ] instead.
15555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15556  if test "x$has_forbidden_chars" != x; then
15557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15561      # Going to short mode and back again did indeed matter. Since short mode is
15562      # case insensitive, let's make it lowercase to improve readability.
15563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15564      # Now convert it back to Unix-style (cygpath)
15565      input_path=`$CYGPATH -u "$shortmode_path"`
15566      new_path="$input_path"
15567    fi
15568  fi
15569
15570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15571  if test "x$test_cygdrive_prefix" = x; then
15572    # As a simple fix, exclude /usr/bin since it's not a real path.
15573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15575      # a path prefixed by /cygdrive for fixpath to work.
15576      new_path="$CYGWIN_ROOT_PATH$input_path"
15577    fi
15578  fi
15579
15580
15581  if test "x$path" != "x$new_path"; then
15582    CURDIR="$new_path"
15583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15584$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15585  fi
15586
15587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15588
15589  path="$CURDIR"
15590  has_colon=`$ECHO $path | $GREP ^.:`
15591  new_path="$path"
15592  if test "x$has_colon" = x; then
15593    # Not in mixed or Windows style, start by that.
15594    new_path=`cmd //c echo $path`
15595  fi
15596
15597
15598  input_path="$new_path"
15599  # Check if we need to convert this using DOS-style short mode. If the path
15600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15601  # take no chances and rewrite it.
15602  # Note: m4 eats our [], so we need to use [ and ] instead.
15603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15604  if test "x$has_forbidden_chars" != x; then
15605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15607  fi
15608
15609
15610  windows_path="$new_path"
15611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15612    unix_path=`$CYGPATH -u "$windows_path"`
15613    new_path="$unix_path"
15614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15616    new_path="$unix_path"
15617  fi
15618
15619  if test "x$path" != "x$new_path"; then
15620    CURDIR="$new_path"
15621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15622$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15623  fi
15624
15625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15627
15628    else
15629      # We're on a unix platform. Hooray! :)
15630      path="$CURDIR"
15631      has_space=`$ECHO "$path" | $GREP " "`
15632      if test "x$has_space" != x; then
15633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15634$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15636      fi
15637
15638      # Use eval to expand a potential ~
15639      eval path="$path"
15640      if test ! -f "$path" && test ! -d "$path"; then
15641        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15642      fi
15643
15644      if test -d "$path"; then
15645        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15646      else
15647        dir="`$DIRNAME "$path"`"
15648        base="`$BASENAME "$path"`"
15649        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15650      fi
15651    fi
15652  fi
15653
15654
15655  # Only process if variable expands to non-empty
15656
15657  if test "x$TOPDIR" != x; then
15658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15659
15660  # Input might be given as Windows format, start by converting to
15661  # unix format.
15662  path="$TOPDIR"
15663  new_path=`$CYGPATH -u "$path"`
15664
15665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15668  # "foo.exe" is OK but "foo" is an error.
15669  #
15670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15671  # It is also a way to make sure we got the proper file name for the real test later on.
15672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15673  if test "x$test_shortpath" = x; then
15674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15675$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15676    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15677  fi
15678
15679  # Call helper function which possibly converts this using DOS-style short mode.
15680  # If so, the updated path is stored in $new_path.
15681
15682  input_path="$new_path"
15683  # Check if we need to convert this using DOS-style short mode. If the path
15684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15685  # take no chances and rewrite it.
15686  # Note: m4 eats our [], so we need to use [ and ] instead.
15687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15688  if test "x$has_forbidden_chars" != x; then
15689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15693      # Going to short mode and back again did indeed matter. Since short mode is
15694      # case insensitive, let's make it lowercase to improve readability.
15695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15696      # Now convert it back to Unix-style (cygpath)
15697      input_path=`$CYGPATH -u "$shortmode_path"`
15698      new_path="$input_path"
15699    fi
15700  fi
15701
15702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15703  if test "x$test_cygdrive_prefix" = x; then
15704    # As a simple fix, exclude /usr/bin since it's not a real path.
15705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15707      # a path prefixed by /cygdrive for fixpath to work.
15708      new_path="$CYGWIN_ROOT_PATH$input_path"
15709    fi
15710  fi
15711
15712
15713  if test "x$path" != "x$new_path"; then
15714    TOPDIR="$new_path"
15715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15716$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15717  fi
15718
15719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15720
15721  path="$TOPDIR"
15722  has_colon=`$ECHO $path | $GREP ^.:`
15723  new_path="$path"
15724  if test "x$has_colon" = x; then
15725    # Not in mixed or Windows style, start by that.
15726    new_path=`cmd //c echo $path`
15727  fi
15728
15729
15730  input_path="$new_path"
15731  # Check if we need to convert this using DOS-style short mode. If the path
15732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15733  # take no chances and rewrite it.
15734  # Note: m4 eats our [], so we need to use [ and ] instead.
15735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15736  if test "x$has_forbidden_chars" != x; then
15737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15739  fi
15740
15741
15742  windows_path="$new_path"
15743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15744    unix_path=`$CYGPATH -u "$windows_path"`
15745    new_path="$unix_path"
15746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15748    new_path="$unix_path"
15749  fi
15750
15751  if test "x$path" != "x$new_path"; then
15752    TOPDIR="$new_path"
15753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15754$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15755  fi
15756
15757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15759
15760    else
15761      # We're on a unix platform. Hooray! :)
15762      path="$TOPDIR"
15763      has_space=`$ECHO "$path" | $GREP " "`
15764      if test "x$has_space" != x; then
15765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15766$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15768      fi
15769
15770      # Use eval to expand a potential ~
15771      eval path="$path"
15772      if test ! -f "$path" && test ! -d "$path"; then
15773        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15774      fi
15775
15776      if test -d "$path"; then
15777        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15778      else
15779        dir="`$DIRNAME "$path"`"
15780        base="`$BASENAME "$path"`"
15781        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15782      fi
15783    fi
15784  fi
15785
15786  # SRC_ROOT is a traditional alias for TOPDIR.
15787  SRC_ROOT=$TOPDIR
15788
15789  # Calculate a canonical version of TOPDIR for string comparisons
15790  CANONICAL_TOPDIR=$TOPDIR
15791
15792  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15793    # Follow a chain of symbolic links. Use readlink
15794    # where it exists, else fall back to horribly
15795    # complicated shell code.
15796    if test "x$READLINK_TESTED" != yes; then
15797      # On MacOSX there is a readlink tool with a different
15798      # purpose than the GNU readlink tool. Check the found readlink.
15799      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15800      if test "x$ISGNU" = x; then
15801        # A readlink that we do not know how to use.
15802        # Are there other non-GNU readlinks out there?
15803        READLINK_TESTED=yes
15804        READLINK=
15805      fi
15806    fi
15807
15808    if test "x$READLINK" != x; then
15809      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15810    else
15811      # Save the current directory for restoring afterwards
15812      STARTDIR=$PWD
15813      COUNTER=0
15814      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15815      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15816      cd $sym_link_dir
15817      # Use -P flag to resolve symlinks in directories.
15818      cd `$THEPWDCMD -P`
15819      sym_link_dir=`$THEPWDCMD -P`
15820      # Resolve file symlinks
15821      while test $COUNTER -lt 20; do
15822        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15823        if test "x$ISLINK" == x; then
15824          # This is not a symbolic link! We are done!
15825          break
15826        fi
15827        # Again resolve directory symlinks since the target of the just found
15828        # link could be in a different directory
15829        cd `$DIRNAME $ISLINK`
15830        sym_link_dir=`$THEPWDCMD -P`
15831        sym_link_file=`$BASENAME $ISLINK`
15832        let COUNTER=COUNTER+1
15833      done
15834      cd $STARTDIR
15835      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15836    fi
15837  fi
15838
15839
15840
15841  # Locate the directory of this script.
15842  AUTOCONF_DIR=$TOPDIR/common/autoconf
15843
15844  # Setup username (for use in adhoc version strings etc)
15845  # Outer [ ] to quote m4.
15846   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15847
15848
15849
15850# Check if it's a pure open build or if custom sources are to be used.
15851
15852  # Check whether --enable-openjdk-only was given.
15853if test "${enable_openjdk_only+set}" = set; then :
15854  enableval=$enable_openjdk_only;
15855else
15856  enable_openjdk_only="no"
15857fi
15858
15859
15860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15861$as_echo_n "checking for presence of closed sources... " >&6; }
15862  if test -d "$SRC_ROOT/jdk/src/closed"; then
15863    CLOSED_SOURCE_PRESENT=yes
15864  else
15865    CLOSED_SOURCE_PRESENT=no
15866  fi
15867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15868$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15869
15870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15871$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15872  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15874$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15875
15876  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15877    OPENJDK=true
15878    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15879      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15880$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15881    fi
15882  else
15883    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15884      OPENJDK=true
15885    else
15886      OPENJDK=false
15887    fi
15888  fi
15889
15890  if test "x$OPENJDK" = "xtrue"; then
15891    SET_OPENJDK="OPENJDK=true"
15892  fi
15893
15894
15895
15896  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15897  # the IncludeCustomExtension macro.
15898
15899
15900# Check whether --with-custom-make-dir was given.
15901if test "${with_custom_make_dir+set}" = set; then :
15902  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
15903$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15904fi
15905
15906
15907
15908
15909# These are needed to be able to create a configuration name (and thus the output directory)
15910
15911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15912$as_echo_n "checking which variant of the JDK to build... " >&6; }
15913
15914# Check whether --with-jdk-variant was given.
15915if test "${with_jdk_variant+set}" = set; then :
15916  withval=$with_jdk_variant;
15917fi
15918
15919
15920  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15921    JDK_VARIANT="normal"
15922  else
15923    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15924  fi
15925
15926
15927
15928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15929$as_echo "$JDK_VARIANT" >&6; }
15930
15931
15932
15933# Check whether --with-jvm-interpreter was given.
15934if test "${with_jvm_interpreter+set}" = set; then :
15935  withval=$with_jvm_interpreter;
15936fi
15937
15938
15939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15940$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15941  if test "x$with_jvm_interpreter" = x; then
15942    JVM_INTERPRETER="template"
15943  else
15944    JVM_INTERPRETER="$with_jvm_interpreter"
15945  fi
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15947$as_echo "$JVM_INTERPRETER" >&6; }
15948
15949  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15950    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15951  fi
15952
15953
15954
15955
15956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15957$as_echo_n "checking which variants of the JVM to build... " >&6; }
15958
15959# Check whether --with-jvm-variants was given.
15960if test "${with_jvm_variants+set}" = set; then :
15961  withval=$with_jvm_variants;
15962fi
15963
15964
15965  if test "x$with_jvm_variants" = x; then
15966    with_jvm_variants="server"
15967  fi
15968
15969  JVM_VARIANTS=",$with_jvm_variants,"
15970  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15971
15972  if test "x$TEST_VARIANTS" != "x,"; then
15973    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15974  fi
15975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15976$as_echo "$with_jvm_variants" >&6; }
15977
15978  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15979  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15980  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15981  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15982  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15983  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15984
15985  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15986    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15987      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15988    fi
15989  fi
15990  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15991    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15992      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15993    fi
15994  fi
15995
15996  # Replace the commas with AND for use in the build directory name.
15997  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15998  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/'`
15999  if test "x$COUNT_VARIANTS" != "x,1"; then
16000    BUILDING_MULTIPLE_JVM_VARIANTS=yes
16001  else
16002    BUILDING_MULTIPLE_JVM_VARIANTS=no
16003  fi
16004
16005  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
16006    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
16007  fi
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16018    MACOSX_UNIVERSAL="true"
16019  fi
16020
16021
16022
16023
16024  DEBUG_LEVEL="release"
16025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16026$as_echo_n "checking which debug level to use... " >&6; }
16027  # Check whether --enable-debug was given.
16028if test "${enable_debug+set}" = set; then :
16029  enableval=$enable_debug;
16030        ENABLE_DEBUG="${enableval}"
16031        DEBUG_LEVEL="fastdebug"
16032
16033else
16034  ENABLE_DEBUG="no"
16035fi
16036
16037
16038
16039# Check whether --with-debug-level was given.
16040if test "${with_debug_level+set}" = set; then :
16041  withval=$with_debug_level;
16042        DEBUG_LEVEL="${withval}"
16043        if test "x$ENABLE_DEBUG" = xyes; then
16044          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16045        fi
16046
16047fi
16048
16049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16050$as_echo "$DEBUG_LEVEL" >&6; }
16051
16052  if test "x$DEBUG_LEVEL" != xrelease && \
16053      test "x$DEBUG_LEVEL" != xoptimized && \
16054      test "x$DEBUG_LEVEL" != xfastdebug && \
16055      test "x$DEBUG_LEVEL" != xslowdebug; then
16056    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16057  fi
16058
16059
16060  case $DEBUG_LEVEL in
16061    release )
16062      VARIANT="OPT"
16063      FASTDEBUG="false"
16064      DEBUG_CLASSFILES="false"
16065      BUILD_VARIANT_RELEASE=""
16066      HOTSPOT_DEBUG_LEVEL="product"
16067      HOTSPOT_EXPORT="product"
16068      ;;
16069    fastdebug )
16070      VARIANT="DBG"
16071      FASTDEBUG="true"
16072      DEBUG_CLASSFILES="true"
16073      BUILD_VARIANT_RELEASE="-fastdebug"
16074      HOTSPOT_DEBUG_LEVEL="fastdebug"
16075      HOTSPOT_EXPORT="fastdebug"
16076      ;;
16077    slowdebug )
16078      VARIANT="DBG"
16079      FASTDEBUG="false"
16080      DEBUG_CLASSFILES="true"
16081      BUILD_VARIANT_RELEASE="-debug"
16082      HOTSPOT_DEBUG_LEVEL="debug"
16083      HOTSPOT_EXPORT="debug"
16084      ;;
16085    optimized )
16086      VARIANT="OPT"
16087      FASTDEBUG="false"
16088      DEBUG_CLASSFILES="false"
16089      BUILD_VARIANT_RELEASE="-optimized"
16090      HOTSPOT_DEBUG_LEVEL="optimized"
16091      HOTSPOT_EXPORT="optimized"
16092      ;;
16093  esac
16094
16095  # The debug level 'optimized' is a little special because it is currently only
16096  # applicable to the HotSpot build where it means to build a completely
16097  # optimized version of the VM without any debugging code (like for the
16098  # 'release' debug level which is called 'product' in the HotSpot build) but
16099  # with the exception that it can contain additional code which is otherwise
16100  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16101  # test new and/or experimental features which are not intended for customer
16102  # shipment. Because these new features need to be tested and benchmarked in
16103  # real world scenarios, we want to build the containing JDK at the 'release'
16104  # debug level.
16105  if test "x$DEBUG_LEVEL" = xoptimized; then
16106    DEBUG_LEVEL="release"
16107  fi
16108
16109  #####
16110  # Generate the legacy makefile targets for hotspot.
16111  # The hotspot api for selecting the build artifacts, really, needs to be improved.
16112  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
16113  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
16114  # But until then ...
16115  HOTSPOT_TARGET=""
16116
16117  if test "x$JVM_VARIANT_SERVER" = xtrue; then
16118    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
16119  fi
16120
16121  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
16122    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
16123  fi
16124
16125  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
16126    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
16127  fi
16128
16129  if test "x$JVM_VARIANT_ZERO" = xtrue; then
16130    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
16131  fi
16132
16133  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
16134    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
16135  fi
16136
16137  if test "x$JVM_VARIANT_CORE" = xtrue; then
16138    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
16139  fi
16140
16141  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
16142
16143  # On Macosx universal binaries are produced, but they only contain
16144  # 64 bit intel. This invalidates control of which jvms are built
16145  # from configure, but only server is valid anyway. Fix this
16146  # when hotspot makefiles are rewritten.
16147  if test "x$MACOSX_UNIVERSAL" = xtrue; then
16148    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
16149  fi
16150
16151  #####
16152
16153
16154
16155
16156
16157
16158
16159
16160# With basic setup done, call the custom early hook.
16161
16162
16163# Check if we have devkits, extra paths or sysroot set.
16164
16165
16166# Check whether --with-devkit was given.
16167if test "${with_devkit+set}" = set; then :
16168  withval=$with_devkit;
16169
16170  # Only process if variable expands to non-empty
16171
16172  if test "x$with_devkit" != x; then
16173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16174
16175  # Input might be given as Windows format, start by converting to
16176  # unix format.
16177  path="$with_devkit"
16178  new_path=`$CYGPATH -u "$path"`
16179
16180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16183  # "foo.exe" is OK but "foo" is an error.
16184  #
16185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16186  # It is also a way to make sure we got the proper file name for the real test later on.
16187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16188  if test "x$test_shortpath" = x; then
16189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16190$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16191    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16192  fi
16193
16194  # Call helper function which possibly converts this using DOS-style short mode.
16195  # If so, the updated path is stored in $new_path.
16196
16197  input_path="$new_path"
16198  # Check if we need to convert this using DOS-style short mode. If the path
16199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16200  # take no chances and rewrite it.
16201  # Note: m4 eats our [], so we need to use [ and ] instead.
16202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16203  if test "x$has_forbidden_chars" != x; then
16204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16208      # Going to short mode and back again did indeed matter. Since short mode is
16209      # case insensitive, let's make it lowercase to improve readability.
16210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16211      # Now convert it back to Unix-style (cygpath)
16212      input_path=`$CYGPATH -u "$shortmode_path"`
16213      new_path="$input_path"
16214    fi
16215  fi
16216
16217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16218  if test "x$test_cygdrive_prefix" = x; then
16219    # As a simple fix, exclude /usr/bin since it's not a real path.
16220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16222      # a path prefixed by /cygdrive for fixpath to work.
16223      new_path="$CYGWIN_ROOT_PATH$input_path"
16224    fi
16225  fi
16226
16227
16228  if test "x$path" != "x$new_path"; then
16229    with_devkit="$new_path"
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16231$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16232  fi
16233
16234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16235
16236  path="$with_devkit"
16237  has_colon=`$ECHO $path | $GREP ^.:`
16238  new_path="$path"
16239  if test "x$has_colon" = x; then
16240    # Not in mixed or Windows style, start by that.
16241    new_path=`cmd //c echo $path`
16242  fi
16243
16244
16245  input_path="$new_path"
16246  # Check if we need to convert this using DOS-style short mode. If the path
16247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16248  # take no chances and rewrite it.
16249  # Note: m4 eats our [], so we need to use [ and ] instead.
16250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16251  if test "x$has_forbidden_chars" != x; then
16252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16254  fi
16255
16256
16257  windows_path="$new_path"
16258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16259    unix_path=`$CYGPATH -u "$windows_path"`
16260    new_path="$unix_path"
16261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16263    new_path="$unix_path"
16264  fi
16265
16266  if test "x$path" != "x$new_path"; then
16267    with_devkit="$new_path"
16268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16269$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16270  fi
16271
16272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16274
16275    else
16276      # We're on a unix platform. Hooray! :)
16277      path="$with_devkit"
16278      has_space=`$ECHO "$path" | $GREP " "`
16279      if test "x$has_space" != x; then
16280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16281$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16283      fi
16284
16285      # Use eval to expand a potential ~
16286      eval path="$path"
16287      if test ! -f "$path" && test ! -d "$path"; then
16288        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16289      fi
16290
16291      if test -d "$path"; then
16292        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16293      else
16294        dir="`$DIRNAME "$path"`"
16295        base="`$BASENAME "$path"`"
16296        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16297      fi
16298    fi
16299  fi
16300
16301        DEVKIT_ROOT="$with_devkit"
16302        # Check for a meta data info file in the root of the devkit
16303        if test -f "$DEVKIT_ROOT/devkit.info"; then
16304          . $DEVKIT_ROOT/devkit.info
16305          # This potentially sets the following:
16306          # A descriptive name of the devkit
16307
16308  if test "x$DEVKIT_NAME" = x; then
16309    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16310  fi
16311
16312          # Corresponds to --with-extra-path
16313
16314  if test "x$DEVKIT_EXTRA_PATH" = x; then
16315    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16316  fi
16317
16318          # Corresponds to --with-toolchain-path
16319
16320  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16321    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16322  fi
16323
16324          # Corresponds to --with-sysroot
16325
16326  if test "x$DEVKIT_SYSROOT" = x; then
16327    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16328  fi
16329
16330
16331          # Identifies the Visual Studio version in the devkit
16332
16333  if test "x$DEVKIT_VS_VERSION" = x; then
16334    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16335  fi
16336
16337          # The Visual Studio include environment variable
16338
16339  if test "x$DEVKIT_VS_INCLUDE" = x; then
16340    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16341  fi
16342
16343          # The Visual Studio lib environment variable
16344
16345  if test "x$DEVKIT_VS_LIB" = x; then
16346    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16347  fi
16348
16349          # Corresponds to --with-msvcr-dll
16350
16351  if test "x$DEVKIT_MSVCR_DLL" = x; then
16352    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16353  fi
16354
16355          # Corresponds to --with-msvcp-dll
16356
16357  if test "x$DEVKIT_MSVCP_DLL" = x; then
16358    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16359  fi
16360
16361        fi
16362
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16364$as_echo_n "checking for devkit... " >&6; }
16365        if test "x$DEVKIT_NAME" != x; then
16366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16367$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16368        else
16369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16370$as_echo "$DEVKIT_ROOT" >&6; }
16371        fi
16372
16373
16374  if test "x$DEVKIT_EXTRA_PATH" != x; then
16375    if test "x$EXTRA_PATH" = x; then
16376      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16377    else
16378      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16379    fi
16380  fi
16381
16382
16383        # Fallback default of just /bin if DEVKIT_PATH is not defined
16384        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16385          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16386        fi
16387
16388  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16389    if test "x$TOOLCHAIN_PATH" = x; then
16390      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16391    else
16392      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16393    fi
16394  fi
16395
16396
16397        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16398        # places for backwards compatiblity.
16399        if test "x$DEVKIT_SYSROOT" != x; then
16400          SYSROOT="$DEVKIT_SYSROOT"
16401        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16402          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16403        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16404          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16405        fi
16406
16407
16408fi
16409
16410
16411  # You can force the sysroot if the sysroot encoded into the compiler tools
16412  # is not correct.
16413
16414# Check whether --with-sys-root was given.
16415if test "${with_sys_root+set}" = set; then :
16416  withval=$with_sys_root; SYSROOT=$with_sys_root
16417
16418fi
16419
16420
16421
16422# Check whether --with-sysroot was given.
16423if test "${with_sysroot+set}" = set; then :
16424  withval=$with_sysroot; SYSROOT=$with_sysroot
16425
16426fi
16427
16428
16429
16430# Check whether --with-tools-dir was given.
16431if test "${with_tools_dir+set}" = set; then :
16432  withval=$with_tools_dir;
16433  if test "x$with_tools_dir" != x; then
16434    if test "x$TOOLCHAIN_PATH" = x; then
16435      TOOLCHAIN_PATH="$with_tools_dir"
16436    else
16437      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16438    fi
16439  fi
16440
16441
16442fi
16443
16444
16445
16446# Check whether --with-toolchain-path was given.
16447if test "${with_toolchain_path+set}" = set; then :
16448  withval=$with_toolchain_path;
16449  if test "x$with_toolchain_path" != x; then
16450    if test "x$TOOLCHAIN_PATH" = x; then
16451      TOOLCHAIN_PATH="$with_toolchain_path"
16452    else
16453      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16454    fi
16455  fi
16456
16457
16458fi
16459
16460
16461
16462# Check whether --with-extra-path was given.
16463if test "${with_extra_path+set}" = set; then :
16464  withval=$with_extra_path;
16465  if test "x$with_extra_path" != x; then
16466    if test "x$EXTRA_PATH" = x; then
16467      EXTRA_PATH="$with_extra_path"
16468    else
16469      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16470    fi
16471  fi
16472
16473
16474fi
16475
16476
16477  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16478    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16479    # If not, detect if Xcode is installed by running xcodebuild -version
16480    # if no Xcode installed, xcodebuild exits with 1
16481    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16482    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16483      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16484      # fall back on the stub binary in /usr/bin/xcodebuild
16485      # Extract the first word of "xcodebuild", so it can be a program name with args.
16486set dummy xcodebuild; ac_word=$2
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16488$as_echo_n "checking for $ac_word... " >&6; }
16489if ${ac_cv_path_XCODEBUILD+:} false; then :
16490  $as_echo_n "(cached) " >&6
16491else
16492  case $XCODEBUILD in
16493  [\\/]* | ?:[\\/]*)
16494  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16495  ;;
16496  *)
16497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16498for as_dir in $TOOLCHAIN_PATH
16499do
16500  IFS=$as_save_IFS
16501  test -z "$as_dir" && as_dir=.
16502    for ac_exec_ext in '' $ac_executable_extensions; do
16503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16504    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16506    break 2
16507  fi
16508done
16509  done
16510IFS=$as_save_IFS
16511
16512  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16513  ;;
16514esac
16515fi
16516XCODEBUILD=$ac_cv_path_XCODEBUILD
16517if test -n "$XCODEBUILD"; then
16518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16519$as_echo "$XCODEBUILD" >&6; }
16520else
16521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16522$as_echo "no" >&6; }
16523fi
16524
16525
16526    else
16527      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16528      # when only the command line tools are installed there are no SDKs, so headers
16529      # are copied into the system frameworks
16530      XCODEBUILD=
16531
16532    fi
16533
16534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16535$as_echo_n "checking for sdk name... " >&6; }
16536
16537# Check whether --with-sdk-name was given.
16538if test "${with_sdk_name+set}" = set; then :
16539  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16540
16541fi
16542
16543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16544$as_echo "$SDKNAME" >&6; }
16545
16546    # if toolchain path is specified then don't rely on system headers, they may not compile
16547    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16548    test -z "$TOOLCHAIN_PATH" && \
16549      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16550
16551    if test -z "$SYSROOT"; then
16552      if test -n "$XCODEBUILD"; then
16553        # if we don't have system headers, use default SDK name (last resort)
16554        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16555          SDKNAME=${SDKNAME:-macosx}
16556        fi
16557
16558        if test -n "$SDKNAME"; then
16559          # Call xcodebuild to determine SYSROOT
16560          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16561        fi
16562      else
16563        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16564          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
16565        fi
16566      fi
16567    else
16568      # warn user if --with-sdk-name was also set
16569      if test -n "$with_sdk_name"; then
16570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16571$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16572      fi
16573    fi
16574
16575    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16576      # If no system framework headers, then SYSROOT must be set, or we won't build
16577      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
16578    fi
16579
16580    # Perform a basic sanity test
16581    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16582      if test -z "$SYSROOT"; then
16583        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
16584      else
16585        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16586      fi
16587    fi
16588
16589    # set SDKROOT too, Xcode tools will pick it up
16590    SDKROOT=$SYSROOT
16591
16592  fi
16593
16594  # Prepend the extra path to the global path
16595
16596  if test "x$EXTRA_PATH" != x; then
16597    if test "x$PATH" = x; then
16598      PATH="$EXTRA_PATH"
16599    else
16600      PATH="$EXTRA_PATH:$PATH"
16601    fi
16602  fi
16603
16604
16605  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16606    # Add extra search paths on solaris for utilities like ar and as etc...
16607    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16608  fi
16609
16610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16611$as_echo_n "checking for sysroot... " >&6; }
16612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16613$as_echo "$SYSROOT" >&6; }
16614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16615$as_echo_n "checking for toolchain path... " >&6; }
16616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16617$as_echo "$TOOLCHAIN_PATH" >&6; }
16618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16619$as_echo_n "checking for extra path... " >&6; }
16620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16621$as_echo "$EXTRA_PATH" >&6; }
16622
16623
16624# To properly create a configuration name, we need to have the OpenJDK target
16625# and options (variants and debug level) parsed.
16626
16627
16628
16629# Check whether --with-conf-name was given.
16630if test "${with_conf_name+set}" = set; then :
16631  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16632fi
16633
16634
16635  # Test from where we are running configure, in or outside of src root.
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16637$as_echo_n "checking where to store configuration... " >&6; }
16638  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16639      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16640      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16641    # We are running configure from the src root.
16642    # Create a default ./build/target-variant-debuglevel output root.
16643    if test "x${CONF_NAME}" = x; then
16644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16645$as_echo "in default location" >&6; }
16646      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16647    else
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16649$as_echo "in build directory with custom name" >&6; }
16650    fi
16651    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16652    $MKDIR -p "$OUTPUT_ROOT"
16653    if test ! -d "$OUTPUT_ROOT"; then
16654      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16655    fi
16656  else
16657    # We are running configure from outside of the src dir.
16658    # Then use the current directory as output dir!
16659    # If configuration is situated in normal build directory, just use the build
16660    # directory name as configuration name, otherwise use the complete path.
16661    if test "x${CONF_NAME}" = x; then
16662      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16663    fi
16664    OUTPUT_ROOT="$CURDIR"
16665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16666$as_echo "in current directory" >&6; }
16667
16668    # WARNING: This might be a bad thing to do. You need to be sure you want to
16669    # have a configuration in this directory. Do some sanity checks!
16670
16671    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16672      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16673      # other files
16674      files_present=`$LS $OUTPUT_ROOT`
16675      # Configure has already touched config.log and confdefs.h in the current dir when this check
16676      # is performed.
16677      filtered_files=`$ECHO "$files_present" \
16678          | $SED -e 's/config.log//g' \
16679              -e 's/configure.log//g' \
16680              -e 's/confdefs.h//g' \
16681              -e 's/ //g' \
16682          | $TR -d '\n'`
16683      if test "x$filtered_files" != x; then
16684        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16685$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16686        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16687$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16689$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16690        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16691$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16692        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16693$as_echo "$as_me: seriously mess up just about everything." >&6;}
16694        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16695$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16696        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16697$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16698        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16699      fi
16700    fi
16701  fi
16702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16703$as_echo_n "checking what configuration name to use... " >&6; }
16704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16705$as_echo "$CONF_NAME" >&6; }
16706
16707
16708  # Only process if variable expands to non-empty
16709
16710  if test "x$OUTPUT_ROOT" != x; then
16711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16712
16713  # Input might be given as Windows format, start by converting to
16714  # unix format.
16715  path="$OUTPUT_ROOT"
16716  new_path=`$CYGPATH -u "$path"`
16717
16718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16721  # "foo.exe" is OK but "foo" is an error.
16722  #
16723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16724  # It is also a way to make sure we got the proper file name for the real test later on.
16725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16726  if test "x$test_shortpath" = x; then
16727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16728$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16729    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16730  fi
16731
16732  # Call helper function which possibly converts this using DOS-style short mode.
16733  # If so, the updated path is stored in $new_path.
16734
16735  input_path="$new_path"
16736  # Check if we need to convert this using DOS-style short mode. If the path
16737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16738  # take no chances and rewrite it.
16739  # Note: m4 eats our [], so we need to use [ and ] instead.
16740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16741  if test "x$has_forbidden_chars" != x; then
16742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16746      # Going to short mode and back again did indeed matter. Since short mode is
16747      # case insensitive, let's make it lowercase to improve readability.
16748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16749      # Now convert it back to Unix-style (cygpath)
16750      input_path=`$CYGPATH -u "$shortmode_path"`
16751      new_path="$input_path"
16752    fi
16753  fi
16754
16755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16756  if test "x$test_cygdrive_prefix" = x; then
16757    # As a simple fix, exclude /usr/bin since it's not a real path.
16758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16760      # a path prefixed by /cygdrive for fixpath to work.
16761      new_path="$CYGWIN_ROOT_PATH$input_path"
16762    fi
16763  fi
16764
16765
16766  if test "x$path" != "x$new_path"; then
16767    OUTPUT_ROOT="$new_path"
16768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16769$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16770  fi
16771
16772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16773
16774  path="$OUTPUT_ROOT"
16775  has_colon=`$ECHO $path | $GREP ^.:`
16776  new_path="$path"
16777  if test "x$has_colon" = x; then
16778    # Not in mixed or Windows style, start by that.
16779    new_path=`cmd //c echo $path`
16780  fi
16781
16782
16783  input_path="$new_path"
16784  # Check if we need to convert this using DOS-style short mode. If the path
16785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16786  # take no chances and rewrite it.
16787  # Note: m4 eats our [], so we need to use [ and ] instead.
16788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16789  if test "x$has_forbidden_chars" != x; then
16790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16792  fi
16793
16794
16795  windows_path="$new_path"
16796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16797    unix_path=`$CYGPATH -u "$windows_path"`
16798    new_path="$unix_path"
16799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16801    new_path="$unix_path"
16802  fi
16803
16804  if test "x$path" != "x$new_path"; then
16805    OUTPUT_ROOT="$new_path"
16806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16807$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16808  fi
16809
16810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16812
16813    else
16814      # We're on a unix platform. Hooray! :)
16815      path="$OUTPUT_ROOT"
16816      has_space=`$ECHO "$path" | $GREP " "`
16817      if test "x$has_space" != x; then
16818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16819$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16821      fi
16822
16823      # Use eval to expand a potential ~
16824      eval path="$path"
16825      if test ! -f "$path" && test ! -d "$path"; then
16826        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16827      fi
16828
16829      if test -d "$path"; then
16830        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16831      else
16832        dir="`$DIRNAME "$path"`"
16833        base="`$BASENAME "$path"`"
16834        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16835      fi
16836    fi
16837  fi
16838
16839
16840  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16841  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16842
16843  SPEC=$OUTPUT_ROOT/spec.gmk
16844
16845  CONF_NAME=$CONF_NAME
16846
16847  OUTPUT_ROOT=$OUTPUT_ROOT
16848
16849
16850
16851  # The spec.gmk file contains all variables for the make system.
16852  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16853
16854  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16855  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16856
16857  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16858  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16859
16860  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
16861  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
16862
16863  # The compare.sh is used to compare the build output to other builds.
16864  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16865
16866  # The generated Makefile knows where the spec.gmk is and where the source is.
16867  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16868  # which will look for generated configurations
16869  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16870
16871
16872
16873# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16874
16875  for ac_prog in apt-get yum port pkgutil pkgadd
16876do
16877  # Extract the first word of "$ac_prog", so it can be a program name with args.
16878set dummy $ac_prog; ac_word=$2
16879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16880$as_echo_n "checking for $ac_word... " >&6; }
16881if ${ac_cv_prog_PKGHANDLER+:} false; then :
16882  $as_echo_n "(cached) " >&6
16883else
16884  if test -n "$PKGHANDLER"; then
16885  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16886else
16887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16888for as_dir in $PATH
16889do
16890  IFS=$as_save_IFS
16891  test -z "$as_dir" && as_dir=.
16892    for ac_exec_ext in '' $ac_executable_extensions; do
16893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16894    ac_cv_prog_PKGHANDLER="$ac_prog"
16895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16896    break 2
16897  fi
16898done
16899  done
16900IFS=$as_save_IFS
16901
16902fi
16903fi
16904PKGHANDLER=$ac_cv_prog_PKGHANDLER
16905if test -n "$PKGHANDLER"; then
16906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16907$as_echo "$PKGHANDLER" >&6; }
16908else
16909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16910$as_echo "no" >&6; }
16911fi
16912
16913
16914  test -n "$PKGHANDLER" && break
16915done
16916
16917
16918
16919# Setup tools that requires more complex handling, or that is not needed by the configure script.
16920
16921
16922
16923  # Publish this variable in the help.
16924
16925
16926  if [ -z "${MAKE+x}" ]; then
16927    # The variable is not set by user, try to locate tool using the code snippet
16928
16929    # Try our hardest to locate a correct version of GNU make
16930    for ac_prog in gmake
16931do
16932  # Extract the first word of "$ac_prog", so it can be a program name with args.
16933set dummy $ac_prog; ac_word=$2
16934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16935$as_echo_n "checking for $ac_word... " >&6; }
16936if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16937  $as_echo_n "(cached) " >&6
16938else
16939  case $CHECK_GMAKE in
16940  [\\/]* | ?:[\\/]*)
16941  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16942  ;;
16943  *)
16944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16945for as_dir in $PATH
16946do
16947  IFS=$as_save_IFS
16948  test -z "$as_dir" && as_dir=.
16949    for ac_exec_ext in '' $ac_executable_extensions; do
16950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16951    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16953    break 2
16954  fi
16955done
16956  done
16957IFS=$as_save_IFS
16958
16959  ;;
16960esac
16961fi
16962CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16963if test -n "$CHECK_GMAKE"; then
16964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16965$as_echo "$CHECK_GMAKE" >&6; }
16966else
16967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16968$as_echo "no" >&6; }
16969fi
16970
16971
16972  test -n "$CHECK_GMAKE" && break
16973done
16974
16975
16976  MAKE_CANDIDATE=""$CHECK_GMAKE""
16977  DESCRIPTION="gmake in PATH"
16978
16979  # On Cygwin, we require a newer version of make than on other platforms
16980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16981    MAKE_VERSION_EXPR="-e 4\."
16982    MAKE_REQUIRED_VERSION="4.0"
16983   else
16984    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16985    MAKE_REQUIRED_VERSION="3.81"
16986  fi
16987
16988  if test "x$MAKE_CANDIDATE" != x; then
16989    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16990$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16991    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16992    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16993    if test "x$IS_GNU_MAKE" = x; then
16994      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16995$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16996    else
16997      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16998      if test "x$IS_MODERN_MAKE" = x; then
16999        { $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
17000$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;}
17001      else
17002        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17003          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17004            MAKE_EXPECTED_ENV='cygwin'
17005          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17006            MAKE_EXPECTED_ENV='msys'
17007          else
17008            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17009          fi
17010          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17011          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17012        else
17013          # Not relevant for non-Windows
17014          IS_MAKE_CORRECT_ENV=true
17015        fi
17016        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17017          { $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
17018$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;}
17019        else
17020          FOUND_MAKE=$MAKE_CANDIDATE
17021
17022  # Only process if variable expands to non-empty
17023
17024  if test "x$FOUND_MAKE" != x; then
17025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17026
17027  # First separate the path from the arguments. This will split at the first
17028  # space.
17029  complete="$FOUND_MAKE"
17030  path="${complete%% *}"
17031  tmp="$complete EOL"
17032  arguments="${tmp#* }"
17033
17034  # Input might be given as Windows format, start by converting to
17035  # unix format.
17036  new_path=`$CYGPATH -u "$path"`
17037
17038  # Now try to locate executable using which
17039  new_path=`$WHICH "$new_path" 2> /dev/null`
17040  # bat and cmd files are not always considered executable in cygwin causing which
17041  # to not find them
17042  if test "x$new_path" = x \
17043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17045    new_path=`$CYGPATH -u "$path"`
17046  fi
17047  if test "x$new_path" = x; then
17048    # Oops. Which didn't find the executable.
17049    # The splitting of arguments from the executable at a space might have been incorrect,
17050    # since paths with space are more likely in Windows. Give it another try with the whole
17051    # argument.
17052    path="$complete"
17053    arguments="EOL"
17054    new_path=`$CYGPATH -u "$path"`
17055    new_path=`$WHICH "$new_path" 2> /dev/null`
17056    # bat and cmd files are not always considered executable in cygwin causing which
17057    # to not find them
17058    if test "x$new_path" = x \
17059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17061      new_path=`$CYGPATH -u "$path"`
17062    fi
17063    if test "x$new_path" = x; then
17064      # It's still not found. Now this is an unrecoverable error.
17065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17066$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17067      has_space=`$ECHO "$complete" | $GREP " "`
17068      if test "x$has_space" != x; then
17069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17071      fi
17072      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17073    fi
17074  fi
17075
17076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17079  # "foo.exe" is OK but "foo" is an error.
17080  #
17081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17082  # It is also a way to make sure we got the proper file name for the real test later on.
17083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17084  if test "x$test_shortpath" = x; then
17085    # Short path failed, file does not exist as specified.
17086    # Try adding .exe or .cmd
17087    if test -f "${new_path}.exe"; then
17088      input_to_shortpath="${new_path}.exe"
17089    elif test -f "${new_path}.cmd"; then
17090      input_to_shortpath="${new_path}.cmd"
17091    else
17092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17096      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17097    fi
17098  else
17099    input_to_shortpath="$new_path"
17100  fi
17101
17102  # Call helper function which possibly converts this using DOS-style short mode.
17103  # If so, the updated path is stored in $new_path.
17104  new_path="$input_to_shortpath"
17105
17106  input_path="$input_to_shortpath"
17107  # Check if we need to convert this using DOS-style short mode. If the path
17108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17109  # take no chances and rewrite it.
17110  # Note: m4 eats our [], so we need to use [ and ] instead.
17111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17112  if test "x$has_forbidden_chars" != x; then
17113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17117      # Going to short mode and back again did indeed matter. Since short mode is
17118      # case insensitive, let's make it lowercase to improve readability.
17119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17120      # Now convert it back to Unix-style (cygpath)
17121      input_path=`$CYGPATH -u "$shortmode_path"`
17122      new_path="$input_path"
17123    fi
17124  fi
17125
17126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17127  if test "x$test_cygdrive_prefix" = x; then
17128    # As a simple fix, exclude /usr/bin since it's not a real path.
17129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17131      # a path prefixed by /cygdrive for fixpath to work.
17132      new_path="$CYGWIN_ROOT_PATH$input_path"
17133    fi
17134  fi
17135
17136  # remove trailing .exe if any
17137  new_path="${new_path/%.exe/}"
17138
17139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17140
17141  # First separate the path from the arguments. This will split at the first
17142  # space.
17143  complete="$FOUND_MAKE"
17144  path="${complete%% *}"
17145  tmp="$complete EOL"
17146  arguments="${tmp#* }"
17147
17148  # Input might be given as Windows format, start by converting to
17149  # unix format.
17150  new_path="$path"
17151
17152  windows_path="$new_path"
17153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17154    unix_path=`$CYGPATH -u "$windows_path"`
17155    new_path="$unix_path"
17156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17158    new_path="$unix_path"
17159  fi
17160
17161
17162  # Now try to locate executable using which
17163  new_path=`$WHICH "$new_path" 2> /dev/null`
17164
17165  if test "x$new_path" = x; then
17166    # Oops. Which didn't find the executable.
17167    # The splitting of arguments from the executable at a space might have been incorrect,
17168    # since paths with space are more likely in Windows. Give it another try with the whole
17169    # argument.
17170    path="$complete"
17171    arguments="EOL"
17172    new_path="$path"
17173
17174  windows_path="$new_path"
17175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17176    unix_path=`$CYGPATH -u "$windows_path"`
17177    new_path="$unix_path"
17178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17180    new_path="$unix_path"
17181  fi
17182
17183
17184    new_path=`$WHICH "$new_path" 2> /dev/null`
17185    # bat and cmd files are not always considered executable in MSYS causing which
17186    # to not find them
17187    if test "x$new_path" = x \
17188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17190      new_path="$path"
17191
17192  windows_path="$new_path"
17193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17194    unix_path=`$CYGPATH -u "$windows_path"`
17195    new_path="$unix_path"
17196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17198    new_path="$unix_path"
17199  fi
17200
17201    fi
17202
17203    if test "x$new_path" = x; then
17204      # It's still not found. Now this is an unrecoverable error.
17205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17206$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17207      has_space=`$ECHO "$complete" | $GREP " "`
17208      if test "x$has_space" != x; then
17209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17211      fi
17212      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17213    fi
17214  fi
17215
17216  # Now new_path has a complete unix path to the binary
17217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17218    # Keep paths in /bin as-is, but remove trailing .exe if any
17219    new_path="${new_path/%.exe/}"
17220    # Do not save /bin paths to all_fixpath_prefixes!
17221  else
17222    # Not in mixed or Windows style, start by that.
17223    new_path=`cmd //c echo $new_path`
17224
17225  input_path="$new_path"
17226  # Check if we need to convert this using DOS-style short mode. If the path
17227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17228  # take no chances and rewrite it.
17229  # Note: m4 eats our [], so we need to use [ and ] instead.
17230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17231  if test "x$has_forbidden_chars" != x; then
17232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17234  fi
17235
17236    # Output is in $new_path
17237
17238  windows_path="$new_path"
17239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17240    unix_path=`$CYGPATH -u "$windows_path"`
17241    new_path="$unix_path"
17242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17244    new_path="$unix_path"
17245  fi
17246
17247    # remove trailing .exe if any
17248    new_path="${new_path/%.exe/}"
17249
17250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17252  fi
17253
17254    else
17255      # We're on a unix platform. Hooray! :)
17256      # First separate the path from the arguments. This will split at the first
17257      # space.
17258      complete="$FOUND_MAKE"
17259      path="${complete%% *}"
17260      tmp="$complete EOL"
17261      arguments="${tmp#* }"
17262
17263      # Cannot rely on the command "which" here since it doesn't always work.
17264      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17265      if test -z "$is_absolute_path"; then
17266        # Path to executable is not absolute. Find it.
17267        IFS_save="$IFS"
17268        IFS=:
17269        for p in $PATH; do
17270          if test -f "$p/$path" && test -x "$p/$path"; then
17271            new_path="$p/$path"
17272            break
17273          fi
17274        done
17275        IFS="$IFS_save"
17276      else
17277        # This is an absolute path, we can use it without further modifications.
17278        new_path="$path"
17279      fi
17280
17281      if test "x$new_path" = x; then
17282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17283$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17284        has_space=`$ECHO "$complete" | $GREP " "`
17285        if test "x$has_space" != x; then
17286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17288        fi
17289        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17290      fi
17291    fi
17292
17293    # Now join together the path and the arguments once again
17294    if test "x$arguments" != xEOL; then
17295      new_complete="$new_path ${arguments% *}"
17296    else
17297      new_complete="$new_path"
17298    fi
17299
17300    if test "x$complete" != "x$new_complete"; then
17301      FOUND_MAKE="$new_complete"
17302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17303$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17304    fi
17305  fi
17306
17307        fi
17308      fi
17309    fi
17310  fi
17311
17312
17313    if test "x$FOUND_MAKE" = x; then
17314      for ac_prog in make
17315do
17316  # Extract the first word of "$ac_prog", so it can be a program name with args.
17317set dummy $ac_prog; ac_word=$2
17318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17319$as_echo_n "checking for $ac_word... " >&6; }
17320if ${ac_cv_path_CHECK_MAKE+:} false; then :
17321  $as_echo_n "(cached) " >&6
17322else
17323  case $CHECK_MAKE in
17324  [\\/]* | ?:[\\/]*)
17325  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17326  ;;
17327  *)
17328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17329for as_dir in $PATH
17330do
17331  IFS=$as_save_IFS
17332  test -z "$as_dir" && as_dir=.
17333    for ac_exec_ext in '' $ac_executable_extensions; do
17334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17335    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17337    break 2
17338  fi
17339done
17340  done
17341IFS=$as_save_IFS
17342
17343  ;;
17344esac
17345fi
17346CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17347if test -n "$CHECK_MAKE"; then
17348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17349$as_echo "$CHECK_MAKE" >&6; }
17350else
17351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17352$as_echo "no" >&6; }
17353fi
17354
17355
17356  test -n "$CHECK_MAKE" && break
17357done
17358
17359
17360  MAKE_CANDIDATE=""$CHECK_MAKE""
17361  DESCRIPTION="make in PATH"
17362
17363  # On Cygwin, we require a newer version of make than on other platforms
17364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17365    MAKE_VERSION_EXPR="-e 4\."
17366    MAKE_REQUIRED_VERSION="4.0"
17367   else
17368    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17369    MAKE_REQUIRED_VERSION="3.81"
17370  fi
17371
17372  if test "x$MAKE_CANDIDATE" != x; then
17373    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17374$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17375    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17376    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17377    if test "x$IS_GNU_MAKE" = x; then
17378      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17379$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17380    else
17381      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17382      if test "x$IS_MODERN_MAKE" = x; then
17383        { $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
17384$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;}
17385      else
17386        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17387          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17388            MAKE_EXPECTED_ENV='cygwin'
17389          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17390            MAKE_EXPECTED_ENV='msys'
17391          else
17392            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17393          fi
17394          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17395          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17396        else
17397          # Not relevant for non-Windows
17398          IS_MAKE_CORRECT_ENV=true
17399        fi
17400        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17401          { $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
17402$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;}
17403        else
17404          FOUND_MAKE=$MAKE_CANDIDATE
17405
17406  # Only process if variable expands to non-empty
17407
17408  if test "x$FOUND_MAKE" != x; then
17409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17410
17411  # First separate the path from the arguments. This will split at the first
17412  # space.
17413  complete="$FOUND_MAKE"
17414  path="${complete%% *}"
17415  tmp="$complete EOL"
17416  arguments="${tmp#* }"
17417
17418  # Input might be given as Windows format, start by converting to
17419  # unix format.
17420  new_path=`$CYGPATH -u "$path"`
17421
17422  # Now try to locate executable using which
17423  new_path=`$WHICH "$new_path" 2> /dev/null`
17424  # bat and cmd files are not always considered executable in cygwin causing which
17425  # to not find them
17426  if test "x$new_path" = x \
17427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17429    new_path=`$CYGPATH -u "$path"`
17430  fi
17431  if test "x$new_path" = x; then
17432    # Oops. Which didn't find the executable.
17433    # The splitting of arguments from the executable at a space might have been incorrect,
17434    # since paths with space are more likely in Windows. Give it another try with the whole
17435    # argument.
17436    path="$complete"
17437    arguments="EOL"
17438    new_path=`$CYGPATH -u "$path"`
17439    new_path=`$WHICH "$new_path" 2> /dev/null`
17440    # bat and cmd files are not always considered executable in cygwin causing which
17441    # to not find them
17442    if test "x$new_path" = x \
17443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17445      new_path=`$CYGPATH -u "$path"`
17446    fi
17447    if test "x$new_path" = x; then
17448      # It's still not found. Now this is an unrecoverable error.
17449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17451      has_space=`$ECHO "$complete" | $GREP " "`
17452      if test "x$has_space" != x; then
17453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17455      fi
17456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17457    fi
17458  fi
17459
17460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17463  # "foo.exe" is OK but "foo" is an error.
17464  #
17465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17466  # It is also a way to make sure we got the proper file name for the real test later on.
17467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17468  if test "x$test_shortpath" = x; then
17469    # Short path failed, file does not exist as specified.
17470    # Try adding .exe or .cmd
17471    if test -f "${new_path}.exe"; then
17472      input_to_shortpath="${new_path}.exe"
17473    elif test -f "${new_path}.cmd"; then
17474      input_to_shortpath="${new_path}.cmd"
17475    else
17476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17481    fi
17482  else
17483    input_to_shortpath="$new_path"
17484  fi
17485
17486  # Call helper function which possibly converts this using DOS-style short mode.
17487  # If so, the updated path is stored in $new_path.
17488  new_path="$input_to_shortpath"
17489
17490  input_path="$input_to_shortpath"
17491  # Check if we need to convert this using DOS-style short mode. If the path
17492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17493  # take no chances and rewrite it.
17494  # Note: m4 eats our [], so we need to use [ and ] instead.
17495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17496  if test "x$has_forbidden_chars" != x; then
17497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17501      # Going to short mode and back again did indeed matter. Since short mode is
17502      # case insensitive, let's make it lowercase to improve readability.
17503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17504      # Now convert it back to Unix-style (cygpath)
17505      input_path=`$CYGPATH -u "$shortmode_path"`
17506      new_path="$input_path"
17507    fi
17508  fi
17509
17510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17511  if test "x$test_cygdrive_prefix" = x; then
17512    # As a simple fix, exclude /usr/bin since it's not a real path.
17513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17515      # a path prefixed by /cygdrive for fixpath to work.
17516      new_path="$CYGWIN_ROOT_PATH$input_path"
17517    fi
17518  fi
17519
17520  # remove trailing .exe if any
17521  new_path="${new_path/%.exe/}"
17522
17523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17524
17525  # First separate the path from the arguments. This will split at the first
17526  # space.
17527  complete="$FOUND_MAKE"
17528  path="${complete%% *}"
17529  tmp="$complete EOL"
17530  arguments="${tmp#* }"
17531
17532  # Input might be given as Windows format, start by converting to
17533  # unix format.
17534  new_path="$path"
17535
17536  windows_path="$new_path"
17537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17538    unix_path=`$CYGPATH -u "$windows_path"`
17539    new_path="$unix_path"
17540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17542    new_path="$unix_path"
17543  fi
17544
17545
17546  # Now try to locate executable using which
17547  new_path=`$WHICH "$new_path" 2> /dev/null`
17548
17549  if test "x$new_path" = x; then
17550    # Oops. Which didn't find the executable.
17551    # The splitting of arguments from the executable at a space might have been incorrect,
17552    # since paths with space are more likely in Windows. Give it another try with the whole
17553    # argument.
17554    path="$complete"
17555    arguments="EOL"
17556    new_path="$path"
17557
17558  windows_path="$new_path"
17559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17560    unix_path=`$CYGPATH -u "$windows_path"`
17561    new_path="$unix_path"
17562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17564    new_path="$unix_path"
17565  fi
17566
17567
17568    new_path=`$WHICH "$new_path" 2> /dev/null`
17569    # bat and cmd files are not always considered executable in MSYS causing which
17570    # to not find them
17571    if test "x$new_path" = x \
17572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17574      new_path="$path"
17575
17576  windows_path="$new_path"
17577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17578    unix_path=`$CYGPATH -u "$windows_path"`
17579    new_path="$unix_path"
17580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17582    new_path="$unix_path"
17583  fi
17584
17585    fi
17586
17587    if test "x$new_path" = x; then
17588      # It's still not found. Now this is an unrecoverable error.
17589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17591      has_space=`$ECHO "$complete" | $GREP " "`
17592      if test "x$has_space" != x; then
17593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17595      fi
17596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17597    fi
17598  fi
17599
17600  # Now new_path has a complete unix path to the binary
17601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17602    # Keep paths in /bin as-is, but remove trailing .exe if any
17603    new_path="${new_path/%.exe/}"
17604    # Do not save /bin paths to all_fixpath_prefixes!
17605  else
17606    # Not in mixed or Windows style, start by that.
17607    new_path=`cmd //c echo $new_path`
17608
17609  input_path="$new_path"
17610  # Check if we need to convert this using DOS-style short mode. If the path
17611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17612  # take no chances and rewrite it.
17613  # Note: m4 eats our [], so we need to use [ and ] instead.
17614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17615  if test "x$has_forbidden_chars" != x; then
17616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17618  fi
17619
17620    # Output is in $new_path
17621
17622  windows_path="$new_path"
17623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17624    unix_path=`$CYGPATH -u "$windows_path"`
17625    new_path="$unix_path"
17626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17628    new_path="$unix_path"
17629  fi
17630
17631    # remove trailing .exe if any
17632    new_path="${new_path/%.exe/}"
17633
17634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17636  fi
17637
17638    else
17639      # We're on a unix platform. Hooray! :)
17640      # First separate the path from the arguments. This will split at the first
17641      # space.
17642      complete="$FOUND_MAKE"
17643      path="${complete%% *}"
17644      tmp="$complete EOL"
17645      arguments="${tmp#* }"
17646
17647      # Cannot rely on the command "which" here since it doesn't always work.
17648      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17649      if test -z "$is_absolute_path"; then
17650        # Path to executable is not absolute. Find it.
17651        IFS_save="$IFS"
17652        IFS=:
17653        for p in $PATH; do
17654          if test -f "$p/$path" && test -x "$p/$path"; then
17655            new_path="$p/$path"
17656            break
17657          fi
17658        done
17659        IFS="$IFS_save"
17660      else
17661        # This is an absolute path, we can use it without further modifications.
17662        new_path="$path"
17663      fi
17664
17665      if test "x$new_path" = x; then
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668        has_space=`$ECHO "$complete" | $GREP " "`
17669        if test "x$has_space" != x; then
17670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17672        fi
17673        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674      fi
17675    fi
17676
17677    # Now join together the path and the arguments once again
17678    if test "x$arguments" != xEOL; then
17679      new_complete="$new_path ${arguments% *}"
17680    else
17681      new_complete="$new_path"
17682    fi
17683
17684    if test "x$complete" != "x$new_complete"; then
17685      FOUND_MAKE="$new_complete"
17686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17687$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17688    fi
17689  fi
17690
17691        fi
17692      fi
17693    fi
17694  fi
17695
17696    fi
17697
17698    if test "x$FOUND_MAKE" = x; then
17699      if test "x$TOOLCHAIN_PATH" != x; then
17700        # We have a toolchain path, check that as well before giving up.
17701        OLD_PATH=$PATH
17702        PATH=$TOOLCHAIN_PATH:$PATH
17703        for ac_prog in gmake
17704do
17705  # Extract the first word of "$ac_prog", so it can be a program name with args.
17706set dummy $ac_prog; ac_word=$2
17707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17708$as_echo_n "checking for $ac_word... " >&6; }
17709if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17710  $as_echo_n "(cached) " >&6
17711else
17712  case $CHECK_TOOLSDIR_GMAKE in
17713  [\\/]* | ?:[\\/]*)
17714  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17715  ;;
17716  *)
17717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17718for as_dir in $PATH
17719do
17720  IFS=$as_save_IFS
17721  test -z "$as_dir" && as_dir=.
17722    for ac_exec_ext in '' $ac_executable_extensions; do
17723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17724    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17726    break 2
17727  fi
17728done
17729  done
17730IFS=$as_save_IFS
17731
17732  ;;
17733esac
17734fi
17735CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17736if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17738$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17739else
17740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17741$as_echo "no" >&6; }
17742fi
17743
17744
17745  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17746done
17747
17748
17749  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17750  DESCRIPTION="gmake in tools-dir"
17751
17752  # On Cygwin, we require a newer version of make than on other platforms
17753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17754    MAKE_VERSION_EXPR="-e 4\."
17755    MAKE_REQUIRED_VERSION="4.0"
17756   else
17757    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17758    MAKE_REQUIRED_VERSION="3.81"
17759  fi
17760
17761  if test "x$MAKE_CANDIDATE" != x; then
17762    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17763$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17764    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17765    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17766    if test "x$IS_GNU_MAKE" = x; then
17767      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17768$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17769    else
17770      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17771      if test "x$IS_MODERN_MAKE" = x; then
17772        { $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
17773$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;}
17774      else
17775        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17776          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777            MAKE_EXPECTED_ENV='cygwin'
17778          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17779            MAKE_EXPECTED_ENV='msys'
17780          else
17781            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17782          fi
17783          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17784          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17785        else
17786          # Not relevant for non-Windows
17787          IS_MAKE_CORRECT_ENV=true
17788        fi
17789        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17790          { $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
17791$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;}
17792        else
17793          FOUND_MAKE=$MAKE_CANDIDATE
17794
17795  # Only process if variable expands to non-empty
17796
17797  if test "x$FOUND_MAKE" != x; then
17798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17799
17800  # First separate the path from the arguments. This will split at the first
17801  # space.
17802  complete="$FOUND_MAKE"
17803  path="${complete%% *}"
17804  tmp="$complete EOL"
17805  arguments="${tmp#* }"
17806
17807  # Input might be given as Windows format, start by converting to
17808  # unix format.
17809  new_path=`$CYGPATH -u "$path"`
17810
17811  # Now try to locate executable using which
17812  new_path=`$WHICH "$new_path" 2> /dev/null`
17813  # bat and cmd files are not always considered executable in cygwin causing which
17814  # to not find them
17815  if test "x$new_path" = x \
17816      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17817      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17818    new_path=`$CYGPATH -u "$path"`
17819  fi
17820  if test "x$new_path" = x; then
17821    # Oops. Which didn't find the executable.
17822    # The splitting of arguments from the executable at a space might have been incorrect,
17823    # since paths with space are more likely in Windows. Give it another try with the whole
17824    # argument.
17825    path="$complete"
17826    arguments="EOL"
17827    new_path=`$CYGPATH -u "$path"`
17828    new_path=`$WHICH "$new_path" 2> /dev/null`
17829    # bat and cmd files are not always considered executable in cygwin causing which
17830    # to not find them
17831    if test "x$new_path" = x \
17832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17834      new_path=`$CYGPATH -u "$path"`
17835    fi
17836    if test "x$new_path" = x; then
17837      # It's still not found. Now this is an unrecoverable error.
17838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17839$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17840      has_space=`$ECHO "$complete" | $GREP " "`
17841      if test "x$has_space" != x; then
17842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17844      fi
17845      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17846    fi
17847  fi
17848
17849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17852  # "foo.exe" is OK but "foo" is an error.
17853  #
17854  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17855  # It is also a way to make sure we got the proper file name for the real test later on.
17856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17857  if test "x$test_shortpath" = x; then
17858    # Short path failed, file does not exist as specified.
17859    # Try adding .exe or .cmd
17860    if test -f "${new_path}.exe"; then
17861      input_to_shortpath="${new_path}.exe"
17862    elif test -f "${new_path}.cmd"; then
17863      input_to_shortpath="${new_path}.cmd"
17864    else
17865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17869      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17870    fi
17871  else
17872    input_to_shortpath="$new_path"
17873  fi
17874
17875  # Call helper function which possibly converts this using DOS-style short mode.
17876  # If so, the updated path is stored in $new_path.
17877  new_path="$input_to_shortpath"
17878
17879  input_path="$input_to_shortpath"
17880  # Check if we need to convert this using DOS-style short mode. If the path
17881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17882  # take no chances and rewrite it.
17883  # Note: m4 eats our [], so we need to use [ and ] instead.
17884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17885  if test "x$has_forbidden_chars" != x; then
17886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17890      # Going to short mode and back again did indeed matter. Since short mode is
17891      # case insensitive, let's make it lowercase to improve readability.
17892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17893      # Now convert it back to Unix-style (cygpath)
17894      input_path=`$CYGPATH -u "$shortmode_path"`
17895      new_path="$input_path"
17896    fi
17897  fi
17898
17899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17900  if test "x$test_cygdrive_prefix" = x; then
17901    # As a simple fix, exclude /usr/bin since it's not a real path.
17902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17904      # a path prefixed by /cygdrive for fixpath to work.
17905      new_path="$CYGWIN_ROOT_PATH$input_path"
17906    fi
17907  fi
17908
17909  # remove trailing .exe if any
17910  new_path="${new_path/%.exe/}"
17911
17912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17913
17914  # First separate the path from the arguments. This will split at the first
17915  # space.
17916  complete="$FOUND_MAKE"
17917  path="${complete%% *}"
17918  tmp="$complete EOL"
17919  arguments="${tmp#* }"
17920
17921  # Input might be given as Windows format, start by converting to
17922  # unix format.
17923  new_path="$path"
17924
17925  windows_path="$new_path"
17926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17927    unix_path=`$CYGPATH -u "$windows_path"`
17928    new_path="$unix_path"
17929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17931    new_path="$unix_path"
17932  fi
17933
17934
17935  # Now try to locate executable using which
17936  new_path=`$WHICH "$new_path" 2> /dev/null`
17937
17938  if test "x$new_path" = x; then
17939    # Oops. Which didn't find the executable.
17940    # The splitting of arguments from the executable at a space might have been incorrect,
17941    # since paths with space are more likely in Windows. Give it another try with the whole
17942    # argument.
17943    path="$complete"
17944    arguments="EOL"
17945    new_path="$path"
17946
17947  windows_path="$new_path"
17948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17949    unix_path=`$CYGPATH -u "$windows_path"`
17950    new_path="$unix_path"
17951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17953    new_path="$unix_path"
17954  fi
17955
17956
17957    new_path=`$WHICH "$new_path" 2> /dev/null`
17958    # bat and cmd files are not always considered executable in MSYS causing which
17959    # to not find them
17960    if test "x$new_path" = x \
17961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17963      new_path="$path"
17964
17965  windows_path="$new_path"
17966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17967    unix_path=`$CYGPATH -u "$windows_path"`
17968    new_path="$unix_path"
17969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17971    new_path="$unix_path"
17972  fi
17973
17974    fi
17975
17976    if test "x$new_path" = x; then
17977      # It's still not found. Now this is an unrecoverable error.
17978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17979$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17980      has_space=`$ECHO "$complete" | $GREP " "`
17981      if test "x$has_space" != x; then
17982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17984      fi
17985      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17986    fi
17987  fi
17988
17989  # Now new_path has a complete unix path to the binary
17990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17991    # Keep paths in /bin as-is, but remove trailing .exe if any
17992    new_path="${new_path/%.exe/}"
17993    # Do not save /bin paths to all_fixpath_prefixes!
17994  else
17995    # Not in mixed or Windows style, start by that.
17996    new_path=`cmd //c echo $new_path`
17997
17998  input_path="$new_path"
17999  # Check if we need to convert this using DOS-style short mode. If the path
18000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18001  # take no chances and rewrite it.
18002  # Note: m4 eats our [], so we need to use [ and ] instead.
18003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18004  if test "x$has_forbidden_chars" != x; then
18005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18007  fi
18008
18009    # Output is in $new_path
18010
18011  windows_path="$new_path"
18012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013    unix_path=`$CYGPATH -u "$windows_path"`
18014    new_path="$unix_path"
18015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18017    new_path="$unix_path"
18018  fi
18019
18020    # remove trailing .exe if any
18021    new_path="${new_path/%.exe/}"
18022
18023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18025  fi
18026
18027    else
18028      # We're on a unix platform. Hooray! :)
18029      # First separate the path from the arguments. This will split at the first
18030      # space.
18031      complete="$FOUND_MAKE"
18032      path="${complete%% *}"
18033      tmp="$complete EOL"
18034      arguments="${tmp#* }"
18035
18036      # Cannot rely on the command "which" here since it doesn't always work.
18037      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18038      if test -z "$is_absolute_path"; then
18039        # Path to executable is not absolute. Find it.
18040        IFS_save="$IFS"
18041        IFS=:
18042        for p in $PATH; do
18043          if test -f "$p/$path" && test -x "$p/$path"; then
18044            new_path="$p/$path"
18045            break
18046          fi
18047        done
18048        IFS="$IFS_save"
18049      else
18050        # This is an absolute path, we can use it without further modifications.
18051        new_path="$path"
18052      fi
18053
18054      if test "x$new_path" = x; then
18055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18057        has_space=`$ECHO "$complete" | $GREP " "`
18058        if test "x$has_space" != x; then
18059          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18061        fi
18062        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18063      fi
18064    fi
18065
18066    # Now join together the path and the arguments once again
18067    if test "x$arguments" != xEOL; then
18068      new_complete="$new_path ${arguments% *}"
18069    else
18070      new_complete="$new_path"
18071    fi
18072
18073    if test "x$complete" != "x$new_complete"; then
18074      FOUND_MAKE="$new_complete"
18075      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18076$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18077    fi
18078  fi
18079
18080        fi
18081      fi
18082    fi
18083  fi
18084
18085        if test "x$FOUND_MAKE" = x; then
18086          for ac_prog in make
18087do
18088  # Extract the first word of "$ac_prog", so it can be a program name with args.
18089set dummy $ac_prog; ac_word=$2
18090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18091$as_echo_n "checking for $ac_word... " >&6; }
18092if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18093  $as_echo_n "(cached) " >&6
18094else
18095  case $CHECK_TOOLSDIR_MAKE in
18096  [\\/]* | ?:[\\/]*)
18097  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18098  ;;
18099  *)
18100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18101for as_dir in $PATH
18102do
18103  IFS=$as_save_IFS
18104  test -z "$as_dir" && as_dir=.
18105    for ac_exec_ext in '' $ac_executable_extensions; do
18106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18107    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18109    break 2
18110  fi
18111done
18112  done
18113IFS=$as_save_IFS
18114
18115  ;;
18116esac
18117fi
18118CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18119if test -n "$CHECK_TOOLSDIR_MAKE"; then
18120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18121$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18122else
18123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18124$as_echo "no" >&6; }
18125fi
18126
18127
18128  test -n "$CHECK_TOOLSDIR_MAKE" && break
18129done
18130
18131
18132  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18133  DESCRIPTION="make in tools-dir"
18134
18135  # On Cygwin, we require a newer version of make than on other platforms
18136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18137    MAKE_VERSION_EXPR="-e 4\."
18138    MAKE_REQUIRED_VERSION="4.0"
18139   else
18140    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18141    MAKE_REQUIRED_VERSION="3.81"
18142  fi
18143
18144  if test "x$MAKE_CANDIDATE" != x; then
18145    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18146$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18147    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18148    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18149    if test "x$IS_GNU_MAKE" = x; then
18150      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18151$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18152    else
18153      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18154      if test "x$IS_MODERN_MAKE" = x; then
18155        { $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
18156$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;}
18157      else
18158        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18159          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18160            MAKE_EXPECTED_ENV='cygwin'
18161          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18162            MAKE_EXPECTED_ENV='msys'
18163          else
18164            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18165          fi
18166          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18167          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18168        else
18169          # Not relevant for non-Windows
18170          IS_MAKE_CORRECT_ENV=true
18171        fi
18172        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18173          { $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
18174$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;}
18175        else
18176          FOUND_MAKE=$MAKE_CANDIDATE
18177
18178  # Only process if variable expands to non-empty
18179
18180  if test "x$FOUND_MAKE" != x; then
18181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18182
18183  # First separate the path from the arguments. This will split at the first
18184  # space.
18185  complete="$FOUND_MAKE"
18186  path="${complete%% *}"
18187  tmp="$complete EOL"
18188  arguments="${tmp#* }"
18189
18190  # Input might be given as Windows format, start by converting to
18191  # unix format.
18192  new_path=`$CYGPATH -u "$path"`
18193
18194  # Now try to locate executable using which
18195  new_path=`$WHICH "$new_path" 2> /dev/null`
18196  # bat and cmd files are not always considered executable in cygwin causing which
18197  # to not find them
18198  if test "x$new_path" = x \
18199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18201    new_path=`$CYGPATH -u "$path"`
18202  fi
18203  if test "x$new_path" = x; then
18204    # Oops. Which didn't find the executable.
18205    # The splitting of arguments from the executable at a space might have been incorrect,
18206    # since paths with space are more likely in Windows. Give it another try with the whole
18207    # argument.
18208    path="$complete"
18209    arguments="EOL"
18210    new_path=`$CYGPATH -u "$path"`
18211    new_path=`$WHICH "$new_path" 2> /dev/null`
18212    # bat and cmd files are not always considered executable in cygwin causing which
18213    # to not find them
18214    if test "x$new_path" = x \
18215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18217      new_path=`$CYGPATH -u "$path"`
18218    fi
18219    if test "x$new_path" = x; then
18220      # It's still not found. Now this is an unrecoverable error.
18221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18222$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18223      has_space=`$ECHO "$complete" | $GREP " "`
18224      if test "x$has_space" != x; then
18225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18227      fi
18228      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18229    fi
18230  fi
18231
18232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18235  # "foo.exe" is OK but "foo" is an error.
18236  #
18237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18238  # It is also a way to make sure we got the proper file name for the real test later on.
18239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18240  if test "x$test_shortpath" = x; then
18241    # Short path failed, file does not exist as specified.
18242    # Try adding .exe or .cmd
18243    if test -f "${new_path}.exe"; then
18244      input_to_shortpath="${new_path}.exe"
18245    elif test -f "${new_path}.cmd"; then
18246      input_to_shortpath="${new_path}.cmd"
18247    else
18248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18253    fi
18254  else
18255    input_to_shortpath="$new_path"
18256  fi
18257
18258  # Call helper function which possibly converts this using DOS-style short mode.
18259  # If so, the updated path is stored in $new_path.
18260  new_path="$input_to_shortpath"
18261
18262  input_path="$input_to_shortpath"
18263  # Check if we need to convert this using DOS-style short mode. If the path
18264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18265  # take no chances and rewrite it.
18266  # Note: m4 eats our [], so we need to use [ and ] instead.
18267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18268  if test "x$has_forbidden_chars" != x; then
18269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18273      # Going to short mode and back again did indeed matter. Since short mode is
18274      # case insensitive, let's make it lowercase to improve readability.
18275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18276      # Now convert it back to Unix-style (cygpath)
18277      input_path=`$CYGPATH -u "$shortmode_path"`
18278      new_path="$input_path"
18279    fi
18280  fi
18281
18282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18283  if test "x$test_cygdrive_prefix" = x; then
18284    # As a simple fix, exclude /usr/bin since it's not a real path.
18285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18287      # a path prefixed by /cygdrive for fixpath to work.
18288      new_path="$CYGWIN_ROOT_PATH$input_path"
18289    fi
18290  fi
18291
18292  # remove trailing .exe if any
18293  new_path="${new_path/%.exe/}"
18294
18295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18296
18297  # First separate the path from the arguments. This will split at the first
18298  # space.
18299  complete="$FOUND_MAKE"
18300  path="${complete%% *}"
18301  tmp="$complete EOL"
18302  arguments="${tmp#* }"
18303
18304  # Input might be given as Windows format, start by converting to
18305  # unix format.
18306  new_path="$path"
18307
18308  windows_path="$new_path"
18309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18310    unix_path=`$CYGPATH -u "$windows_path"`
18311    new_path="$unix_path"
18312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18314    new_path="$unix_path"
18315  fi
18316
18317
18318  # Now try to locate executable using which
18319  new_path=`$WHICH "$new_path" 2> /dev/null`
18320
18321  if test "x$new_path" = x; then
18322    # Oops. Which didn't find the executable.
18323    # The splitting of arguments from the executable at a space might have been incorrect,
18324    # since paths with space are more likely in Windows. Give it another try with the whole
18325    # argument.
18326    path="$complete"
18327    arguments="EOL"
18328    new_path="$path"
18329
18330  windows_path="$new_path"
18331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18332    unix_path=`$CYGPATH -u "$windows_path"`
18333    new_path="$unix_path"
18334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18336    new_path="$unix_path"
18337  fi
18338
18339
18340    new_path=`$WHICH "$new_path" 2> /dev/null`
18341    # bat and cmd files are not always considered executable in MSYS causing which
18342    # to not find them
18343    if test "x$new_path" = x \
18344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18346      new_path="$path"
18347
18348  windows_path="$new_path"
18349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18350    unix_path=`$CYGPATH -u "$windows_path"`
18351    new_path="$unix_path"
18352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18354    new_path="$unix_path"
18355  fi
18356
18357    fi
18358
18359    if test "x$new_path" = x; then
18360      # It's still not found. Now this is an unrecoverable error.
18361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18362$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18363      has_space=`$ECHO "$complete" | $GREP " "`
18364      if test "x$has_space" != x; then
18365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18367      fi
18368      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18369    fi
18370  fi
18371
18372  # Now new_path has a complete unix path to the binary
18373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18374    # Keep paths in /bin as-is, but remove trailing .exe if any
18375    new_path="${new_path/%.exe/}"
18376    # Do not save /bin paths to all_fixpath_prefixes!
18377  else
18378    # Not in mixed or Windows style, start by that.
18379    new_path=`cmd //c echo $new_path`
18380
18381  input_path="$new_path"
18382  # Check if we need to convert this using DOS-style short mode. If the path
18383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18384  # take no chances and rewrite it.
18385  # Note: m4 eats our [], so we need to use [ and ] instead.
18386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18387  if test "x$has_forbidden_chars" != x; then
18388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18390  fi
18391
18392    # Output is in $new_path
18393
18394  windows_path="$new_path"
18395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18396    unix_path=`$CYGPATH -u "$windows_path"`
18397    new_path="$unix_path"
18398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18400    new_path="$unix_path"
18401  fi
18402
18403    # remove trailing .exe if any
18404    new_path="${new_path/%.exe/}"
18405
18406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18408  fi
18409
18410    else
18411      # We're on a unix platform. Hooray! :)
18412      # First separate the path from the arguments. This will split at the first
18413      # space.
18414      complete="$FOUND_MAKE"
18415      path="${complete%% *}"
18416      tmp="$complete EOL"
18417      arguments="${tmp#* }"
18418
18419      # Cannot rely on the command "which" here since it doesn't always work.
18420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18421      if test -z "$is_absolute_path"; then
18422        # Path to executable is not absolute. Find it.
18423        IFS_save="$IFS"
18424        IFS=:
18425        for p in $PATH; do
18426          if test -f "$p/$path" && test -x "$p/$path"; then
18427            new_path="$p/$path"
18428            break
18429          fi
18430        done
18431        IFS="$IFS_save"
18432      else
18433        # This is an absolute path, we can use it without further modifications.
18434        new_path="$path"
18435      fi
18436
18437      if test "x$new_path" = x; then
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18440        has_space=`$ECHO "$complete" | $GREP " "`
18441        if test "x$has_space" != x; then
18442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18444        fi
18445        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18446      fi
18447    fi
18448
18449    # Now join together the path and the arguments once again
18450    if test "x$arguments" != xEOL; then
18451      new_complete="$new_path ${arguments% *}"
18452    else
18453      new_complete="$new_path"
18454    fi
18455
18456    if test "x$complete" != "x$new_complete"; then
18457      FOUND_MAKE="$new_complete"
18458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18459$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18460    fi
18461  fi
18462
18463        fi
18464      fi
18465    fi
18466  fi
18467
18468        fi
18469        PATH=$OLD_PATH
18470      fi
18471    fi
18472
18473    if test "x$FOUND_MAKE" = x; then
18474      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
18475    fi
18476
18477  else
18478    # The variable is set, but is it from the command line or the environment?
18479
18480    # Try to remove the string !MAKE! from our list.
18481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18483      # If it failed, the variable was not from the command line. Ignore it,
18484      # but warn the user (except for BASH, which is always set by the calling BASH).
18485      if test "xMAKE" != xBASH; then
18486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18487$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18488      fi
18489      # Try to locate tool using the code snippet
18490
18491    # Try our hardest to locate a correct version of GNU make
18492    for ac_prog in gmake
18493do
18494  # Extract the first word of "$ac_prog", so it can be a program name with args.
18495set dummy $ac_prog; ac_word=$2
18496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18497$as_echo_n "checking for $ac_word... " >&6; }
18498if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18499  $as_echo_n "(cached) " >&6
18500else
18501  case $CHECK_GMAKE in
18502  [\\/]* | ?:[\\/]*)
18503  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18504  ;;
18505  *)
18506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18507for as_dir in $PATH
18508do
18509  IFS=$as_save_IFS
18510  test -z "$as_dir" && as_dir=.
18511    for ac_exec_ext in '' $ac_executable_extensions; do
18512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18513    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18515    break 2
18516  fi
18517done
18518  done
18519IFS=$as_save_IFS
18520
18521  ;;
18522esac
18523fi
18524CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18525if test -n "$CHECK_GMAKE"; then
18526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18527$as_echo "$CHECK_GMAKE" >&6; }
18528else
18529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18530$as_echo "no" >&6; }
18531fi
18532
18533
18534  test -n "$CHECK_GMAKE" && break
18535done
18536
18537
18538  MAKE_CANDIDATE=""$CHECK_GMAKE""
18539  DESCRIPTION="gmake in PATH"
18540
18541  # On Cygwin, we require a newer version of make than on other platforms
18542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18543    MAKE_VERSION_EXPR="-e 4\."
18544    MAKE_REQUIRED_VERSION="4.0"
18545   else
18546    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18547    MAKE_REQUIRED_VERSION="3.81"
18548  fi
18549
18550  if test "x$MAKE_CANDIDATE" != x; then
18551    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18552$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18553    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18554    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18555    if test "x$IS_GNU_MAKE" = x; then
18556      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18557$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18558    else
18559      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18560      if test "x$IS_MODERN_MAKE" = x; then
18561        { $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
18562$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;}
18563      else
18564        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18565          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18566            MAKE_EXPECTED_ENV='cygwin'
18567          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18568            MAKE_EXPECTED_ENV='msys'
18569          else
18570            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18571          fi
18572          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18573          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18574        else
18575          # Not relevant for non-Windows
18576          IS_MAKE_CORRECT_ENV=true
18577        fi
18578        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18579          { $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
18580$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;}
18581        else
18582          FOUND_MAKE=$MAKE_CANDIDATE
18583
18584  # Only process if variable expands to non-empty
18585
18586  if test "x$FOUND_MAKE" != x; then
18587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18588
18589  # First separate the path from the arguments. This will split at the first
18590  # space.
18591  complete="$FOUND_MAKE"
18592  path="${complete%% *}"
18593  tmp="$complete EOL"
18594  arguments="${tmp#* }"
18595
18596  # Input might be given as Windows format, start by converting to
18597  # unix format.
18598  new_path=`$CYGPATH -u "$path"`
18599
18600  # Now try to locate executable using which
18601  new_path=`$WHICH "$new_path" 2> /dev/null`
18602  # bat and cmd files are not always considered executable in cygwin causing which
18603  # to not find them
18604  if test "x$new_path" = x \
18605      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18606      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18607    new_path=`$CYGPATH -u "$path"`
18608  fi
18609  if test "x$new_path" = x; then
18610    # Oops. Which didn't find the executable.
18611    # The splitting of arguments from the executable at a space might have been incorrect,
18612    # since paths with space are more likely in Windows. Give it another try with the whole
18613    # argument.
18614    path="$complete"
18615    arguments="EOL"
18616    new_path=`$CYGPATH -u "$path"`
18617    new_path=`$WHICH "$new_path" 2> /dev/null`
18618    # bat and cmd files are not always considered executable in cygwin causing which
18619    # to not find them
18620    if test "x$new_path" = x \
18621        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18622        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18623      new_path=`$CYGPATH -u "$path"`
18624    fi
18625    if test "x$new_path" = x; then
18626      # It's still not found. Now this is an unrecoverable error.
18627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18628$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18629      has_space=`$ECHO "$complete" | $GREP " "`
18630      if test "x$has_space" != x; then
18631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18633      fi
18634      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18635    fi
18636  fi
18637
18638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18641  # "foo.exe" is OK but "foo" is an error.
18642  #
18643  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18644  # It is also a way to make sure we got the proper file name for the real test later on.
18645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18646  if test "x$test_shortpath" = x; then
18647    # Short path failed, file does not exist as specified.
18648    # Try adding .exe or .cmd
18649    if test -f "${new_path}.exe"; then
18650      input_to_shortpath="${new_path}.exe"
18651    elif test -f "${new_path}.cmd"; then
18652      input_to_shortpath="${new_path}.cmd"
18653    else
18654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18655$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18656      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18657$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18658      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18659    fi
18660  else
18661    input_to_shortpath="$new_path"
18662  fi
18663
18664  # Call helper function which possibly converts this using DOS-style short mode.
18665  # If so, the updated path is stored in $new_path.
18666  new_path="$input_to_shortpath"
18667
18668  input_path="$input_to_shortpath"
18669  # Check if we need to convert this using DOS-style short mode. If the path
18670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18671  # take no chances and rewrite it.
18672  # Note: m4 eats our [], so we need to use [ and ] instead.
18673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18674  if test "x$has_forbidden_chars" != x; then
18675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18679      # Going to short mode and back again did indeed matter. Since short mode is
18680      # case insensitive, let's make it lowercase to improve readability.
18681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18682      # Now convert it back to Unix-style (cygpath)
18683      input_path=`$CYGPATH -u "$shortmode_path"`
18684      new_path="$input_path"
18685    fi
18686  fi
18687
18688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18689  if test "x$test_cygdrive_prefix" = x; then
18690    # As a simple fix, exclude /usr/bin since it's not a real path.
18691    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18693      # a path prefixed by /cygdrive for fixpath to work.
18694      new_path="$CYGWIN_ROOT_PATH$input_path"
18695    fi
18696  fi
18697
18698  # remove trailing .exe if any
18699  new_path="${new_path/%.exe/}"
18700
18701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18702
18703  # First separate the path from the arguments. This will split at the first
18704  # space.
18705  complete="$FOUND_MAKE"
18706  path="${complete%% *}"
18707  tmp="$complete EOL"
18708  arguments="${tmp#* }"
18709
18710  # Input might be given as Windows format, start by converting to
18711  # unix format.
18712  new_path="$path"
18713
18714  windows_path="$new_path"
18715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18716    unix_path=`$CYGPATH -u "$windows_path"`
18717    new_path="$unix_path"
18718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18720    new_path="$unix_path"
18721  fi
18722
18723
18724  # Now try to locate executable using which
18725  new_path=`$WHICH "$new_path" 2> /dev/null`
18726
18727  if test "x$new_path" = x; then
18728    # Oops. Which didn't find the executable.
18729    # The splitting of arguments from the executable at a space might have been incorrect,
18730    # since paths with space are more likely in Windows. Give it another try with the whole
18731    # argument.
18732    path="$complete"
18733    arguments="EOL"
18734    new_path="$path"
18735
18736  windows_path="$new_path"
18737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738    unix_path=`$CYGPATH -u "$windows_path"`
18739    new_path="$unix_path"
18740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18742    new_path="$unix_path"
18743  fi
18744
18745
18746    new_path=`$WHICH "$new_path" 2> /dev/null`
18747    # bat and cmd files are not always considered executable in MSYS causing which
18748    # to not find them
18749    if test "x$new_path" = x \
18750        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18751        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18752      new_path="$path"
18753
18754  windows_path="$new_path"
18755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18756    unix_path=`$CYGPATH -u "$windows_path"`
18757    new_path="$unix_path"
18758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18760    new_path="$unix_path"
18761  fi
18762
18763    fi
18764
18765    if test "x$new_path" = x; then
18766      # It's still not found. Now this is an unrecoverable error.
18767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18769      has_space=`$ECHO "$complete" | $GREP " "`
18770      if test "x$has_space" != x; then
18771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18773      fi
18774      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18775    fi
18776  fi
18777
18778  # Now new_path has a complete unix path to the binary
18779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18780    # Keep paths in /bin as-is, but remove trailing .exe if any
18781    new_path="${new_path/%.exe/}"
18782    # Do not save /bin paths to all_fixpath_prefixes!
18783  else
18784    # Not in mixed or Windows style, start by that.
18785    new_path=`cmd //c echo $new_path`
18786
18787  input_path="$new_path"
18788  # Check if we need to convert this using DOS-style short mode. If the path
18789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18790  # take no chances and rewrite it.
18791  # Note: m4 eats our [], so we need to use [ and ] instead.
18792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18793  if test "x$has_forbidden_chars" != x; then
18794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18796  fi
18797
18798    # Output is in $new_path
18799
18800  windows_path="$new_path"
18801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18802    unix_path=`$CYGPATH -u "$windows_path"`
18803    new_path="$unix_path"
18804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18806    new_path="$unix_path"
18807  fi
18808
18809    # remove trailing .exe if any
18810    new_path="${new_path/%.exe/}"
18811
18812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18814  fi
18815
18816    else
18817      # We're on a unix platform. Hooray! :)
18818      # First separate the path from the arguments. This will split at the first
18819      # space.
18820      complete="$FOUND_MAKE"
18821      path="${complete%% *}"
18822      tmp="$complete EOL"
18823      arguments="${tmp#* }"
18824
18825      # Cannot rely on the command "which" here since it doesn't always work.
18826      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18827      if test -z "$is_absolute_path"; then
18828        # Path to executable is not absolute. Find it.
18829        IFS_save="$IFS"
18830        IFS=:
18831        for p in $PATH; do
18832          if test -f "$p/$path" && test -x "$p/$path"; then
18833            new_path="$p/$path"
18834            break
18835          fi
18836        done
18837        IFS="$IFS_save"
18838      else
18839        # This is an absolute path, we can use it without further modifications.
18840        new_path="$path"
18841      fi
18842
18843      if test "x$new_path" = x; then
18844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18846        has_space=`$ECHO "$complete" | $GREP " "`
18847        if test "x$has_space" != x; then
18848          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18850        fi
18851        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18852      fi
18853    fi
18854
18855    # Now join together the path and the arguments once again
18856    if test "x$arguments" != xEOL; then
18857      new_complete="$new_path ${arguments% *}"
18858    else
18859      new_complete="$new_path"
18860    fi
18861
18862    if test "x$complete" != "x$new_complete"; then
18863      FOUND_MAKE="$new_complete"
18864      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18865$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18866    fi
18867  fi
18868
18869        fi
18870      fi
18871    fi
18872  fi
18873
18874
18875    if test "x$FOUND_MAKE" = x; then
18876      for ac_prog in make
18877do
18878  # Extract the first word of "$ac_prog", so it can be a program name with args.
18879set dummy $ac_prog; ac_word=$2
18880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18881$as_echo_n "checking for $ac_word... " >&6; }
18882if ${ac_cv_path_CHECK_MAKE+:} false; then :
18883  $as_echo_n "(cached) " >&6
18884else
18885  case $CHECK_MAKE in
18886  [\\/]* | ?:[\\/]*)
18887  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18888  ;;
18889  *)
18890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18891for as_dir in $PATH
18892do
18893  IFS=$as_save_IFS
18894  test -z "$as_dir" && as_dir=.
18895    for ac_exec_ext in '' $ac_executable_extensions; do
18896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18897    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18899    break 2
18900  fi
18901done
18902  done
18903IFS=$as_save_IFS
18904
18905  ;;
18906esac
18907fi
18908CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18909if test -n "$CHECK_MAKE"; then
18910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18911$as_echo "$CHECK_MAKE" >&6; }
18912else
18913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18914$as_echo "no" >&6; }
18915fi
18916
18917
18918  test -n "$CHECK_MAKE" && break
18919done
18920
18921
18922  MAKE_CANDIDATE=""$CHECK_MAKE""
18923  DESCRIPTION="make in PATH"
18924
18925  # On Cygwin, we require a newer version of make than on other platforms
18926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18927    MAKE_VERSION_EXPR="-e 4\."
18928    MAKE_REQUIRED_VERSION="4.0"
18929   else
18930    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18931    MAKE_REQUIRED_VERSION="3.81"
18932  fi
18933
18934  if test "x$MAKE_CANDIDATE" != x; then
18935    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18936$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18937    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18938    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18939    if test "x$IS_GNU_MAKE" = x; then
18940      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18941$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18942    else
18943      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18944      if test "x$IS_MODERN_MAKE" = x; then
18945        { $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
18946$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;}
18947      else
18948        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18949          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18950            MAKE_EXPECTED_ENV='cygwin'
18951          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18952            MAKE_EXPECTED_ENV='msys'
18953          else
18954            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18955          fi
18956          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18957          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18958        else
18959          # Not relevant for non-Windows
18960          IS_MAKE_CORRECT_ENV=true
18961        fi
18962        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18963          { $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
18964$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;}
18965        else
18966          FOUND_MAKE=$MAKE_CANDIDATE
18967
18968  # Only process if variable expands to non-empty
18969
18970  if test "x$FOUND_MAKE" != x; then
18971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18972
18973  # First separate the path from the arguments. This will split at the first
18974  # space.
18975  complete="$FOUND_MAKE"
18976  path="${complete%% *}"
18977  tmp="$complete EOL"
18978  arguments="${tmp#* }"
18979
18980  # Input might be given as Windows format, start by converting to
18981  # unix format.
18982  new_path=`$CYGPATH -u "$path"`
18983
18984  # Now try to locate executable using which
18985  new_path=`$WHICH "$new_path" 2> /dev/null`
18986  # bat and cmd files are not always considered executable in cygwin causing which
18987  # to not find them
18988  if test "x$new_path" = x \
18989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18991    new_path=`$CYGPATH -u "$path"`
18992  fi
18993  if test "x$new_path" = x; then
18994    # Oops. Which didn't find the executable.
18995    # The splitting of arguments from the executable at a space might have been incorrect,
18996    # since paths with space are more likely in Windows. Give it another try with the whole
18997    # argument.
18998    path="$complete"
18999    arguments="EOL"
19000    new_path=`$CYGPATH -u "$path"`
19001    new_path=`$WHICH "$new_path" 2> /dev/null`
19002    # bat and cmd files are not always considered executable in cygwin causing which
19003    # to not find them
19004    if test "x$new_path" = x \
19005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19007      new_path=`$CYGPATH -u "$path"`
19008    fi
19009    if test "x$new_path" = x; then
19010      # It's still not found. Now this is an unrecoverable error.
19011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19012$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19013      has_space=`$ECHO "$complete" | $GREP " "`
19014      if test "x$has_space" != x; then
19015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19017      fi
19018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19019    fi
19020  fi
19021
19022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19025  # "foo.exe" is OK but "foo" is an error.
19026  #
19027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19028  # It is also a way to make sure we got the proper file name for the real test later on.
19029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19030  if test "x$test_shortpath" = x; then
19031    # Short path failed, file does not exist as specified.
19032    # Try adding .exe or .cmd
19033    if test -f "${new_path}.exe"; then
19034      input_to_shortpath="${new_path}.exe"
19035    elif test -f "${new_path}.cmd"; then
19036      input_to_shortpath="${new_path}.cmd"
19037    else
19038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19042      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19043    fi
19044  else
19045    input_to_shortpath="$new_path"
19046  fi
19047
19048  # Call helper function which possibly converts this using DOS-style short mode.
19049  # If so, the updated path is stored in $new_path.
19050  new_path="$input_to_shortpath"
19051
19052  input_path="$input_to_shortpath"
19053  # Check if we need to convert this using DOS-style short mode. If the path
19054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19055  # take no chances and rewrite it.
19056  # Note: m4 eats our [], so we need to use [ and ] instead.
19057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19058  if test "x$has_forbidden_chars" != x; then
19059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19063      # Going to short mode and back again did indeed matter. Since short mode is
19064      # case insensitive, let's make it lowercase to improve readability.
19065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19066      # Now convert it back to Unix-style (cygpath)
19067      input_path=`$CYGPATH -u "$shortmode_path"`
19068      new_path="$input_path"
19069    fi
19070  fi
19071
19072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19073  if test "x$test_cygdrive_prefix" = x; then
19074    # As a simple fix, exclude /usr/bin since it's not a real path.
19075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19077      # a path prefixed by /cygdrive for fixpath to work.
19078      new_path="$CYGWIN_ROOT_PATH$input_path"
19079    fi
19080  fi
19081
19082  # remove trailing .exe if any
19083  new_path="${new_path/%.exe/}"
19084
19085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19086
19087  # First separate the path from the arguments. This will split at the first
19088  # space.
19089  complete="$FOUND_MAKE"
19090  path="${complete%% *}"
19091  tmp="$complete EOL"
19092  arguments="${tmp#* }"
19093
19094  # Input might be given as Windows format, start by converting to
19095  # unix format.
19096  new_path="$path"
19097
19098  windows_path="$new_path"
19099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19100    unix_path=`$CYGPATH -u "$windows_path"`
19101    new_path="$unix_path"
19102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19104    new_path="$unix_path"
19105  fi
19106
19107
19108  # Now try to locate executable using which
19109  new_path=`$WHICH "$new_path" 2> /dev/null`
19110
19111  if test "x$new_path" = x; then
19112    # Oops. Which didn't find the executable.
19113    # The splitting of arguments from the executable at a space might have been incorrect,
19114    # since paths with space are more likely in Windows. Give it another try with the whole
19115    # argument.
19116    path="$complete"
19117    arguments="EOL"
19118    new_path="$path"
19119
19120  windows_path="$new_path"
19121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19122    unix_path=`$CYGPATH -u "$windows_path"`
19123    new_path="$unix_path"
19124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19126    new_path="$unix_path"
19127  fi
19128
19129
19130    new_path=`$WHICH "$new_path" 2> /dev/null`
19131    # bat and cmd files are not always considered executable in MSYS causing which
19132    # to not find them
19133    if test "x$new_path" = x \
19134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19136      new_path="$path"
19137
19138  windows_path="$new_path"
19139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19140    unix_path=`$CYGPATH -u "$windows_path"`
19141    new_path="$unix_path"
19142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19144    new_path="$unix_path"
19145  fi
19146
19147    fi
19148
19149    if test "x$new_path" = x; then
19150      # It's still not found. Now this is an unrecoverable error.
19151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19152$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19153      has_space=`$ECHO "$complete" | $GREP " "`
19154      if test "x$has_space" != x; then
19155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19157      fi
19158      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19159    fi
19160  fi
19161
19162  # Now new_path has a complete unix path to the binary
19163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19164    # Keep paths in /bin as-is, but remove trailing .exe if any
19165    new_path="${new_path/%.exe/}"
19166    # Do not save /bin paths to all_fixpath_prefixes!
19167  else
19168    # Not in mixed or Windows style, start by that.
19169    new_path=`cmd //c echo $new_path`
19170
19171  input_path="$new_path"
19172  # Check if we need to convert this using DOS-style short mode. If the path
19173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19174  # take no chances and rewrite it.
19175  # Note: m4 eats our [], so we need to use [ and ] instead.
19176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19177  if test "x$has_forbidden_chars" != x; then
19178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19180  fi
19181
19182    # Output is in $new_path
19183
19184  windows_path="$new_path"
19185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19186    unix_path=`$CYGPATH -u "$windows_path"`
19187    new_path="$unix_path"
19188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19190    new_path="$unix_path"
19191  fi
19192
19193    # remove trailing .exe if any
19194    new_path="${new_path/%.exe/}"
19195
19196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19198  fi
19199
19200    else
19201      # We're on a unix platform. Hooray! :)
19202      # First separate the path from the arguments. This will split at the first
19203      # space.
19204      complete="$FOUND_MAKE"
19205      path="${complete%% *}"
19206      tmp="$complete EOL"
19207      arguments="${tmp#* }"
19208
19209      # Cannot rely on the command "which" here since it doesn't always work.
19210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19211      if test -z "$is_absolute_path"; then
19212        # Path to executable is not absolute. Find it.
19213        IFS_save="$IFS"
19214        IFS=:
19215        for p in $PATH; do
19216          if test -f "$p/$path" && test -x "$p/$path"; then
19217            new_path="$p/$path"
19218            break
19219          fi
19220        done
19221        IFS="$IFS_save"
19222      else
19223        # This is an absolute path, we can use it without further modifications.
19224        new_path="$path"
19225      fi
19226
19227      if test "x$new_path" = x; then
19228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19230        has_space=`$ECHO "$complete" | $GREP " "`
19231        if test "x$has_space" != x; then
19232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19234        fi
19235        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19236      fi
19237    fi
19238
19239    # Now join together the path and the arguments once again
19240    if test "x$arguments" != xEOL; then
19241      new_complete="$new_path ${arguments% *}"
19242    else
19243      new_complete="$new_path"
19244    fi
19245
19246    if test "x$complete" != "x$new_complete"; then
19247      FOUND_MAKE="$new_complete"
19248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19249$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19250    fi
19251  fi
19252
19253        fi
19254      fi
19255    fi
19256  fi
19257
19258    fi
19259
19260    if test "x$FOUND_MAKE" = x; then
19261      if test "x$TOOLCHAIN_PATH" != x; then
19262        # We have a toolchain path, check that as well before giving up.
19263        OLD_PATH=$PATH
19264        PATH=$TOOLCHAIN_PATH:$PATH
19265        for ac_prog in gmake
19266do
19267  # Extract the first word of "$ac_prog", so it can be a program name with args.
19268set dummy $ac_prog; ac_word=$2
19269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19270$as_echo_n "checking for $ac_word... " >&6; }
19271if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19272  $as_echo_n "(cached) " >&6
19273else
19274  case $CHECK_TOOLSDIR_GMAKE in
19275  [\\/]* | ?:[\\/]*)
19276  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19277  ;;
19278  *)
19279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19280for as_dir in $PATH
19281do
19282  IFS=$as_save_IFS
19283  test -z "$as_dir" && as_dir=.
19284    for ac_exec_ext in '' $ac_executable_extensions; do
19285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19286    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19288    break 2
19289  fi
19290done
19291  done
19292IFS=$as_save_IFS
19293
19294  ;;
19295esac
19296fi
19297CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19298if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19300$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19301else
19302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19303$as_echo "no" >&6; }
19304fi
19305
19306
19307  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19308done
19309
19310
19311  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19312  DESCRIPTION="gmake in tools-dir"
19313
19314  # On Cygwin, we require a newer version of make than on other platforms
19315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19316    MAKE_VERSION_EXPR="-e 4\."
19317    MAKE_REQUIRED_VERSION="4.0"
19318   else
19319    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19320    MAKE_REQUIRED_VERSION="3.81"
19321  fi
19322
19323  if test "x$MAKE_CANDIDATE" != x; then
19324    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19325$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19326    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19327    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19328    if test "x$IS_GNU_MAKE" = x; then
19329      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19330$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19331    else
19332      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19333      if test "x$IS_MODERN_MAKE" = x; then
19334        { $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
19335$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;}
19336      else
19337        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19338          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339            MAKE_EXPECTED_ENV='cygwin'
19340          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19341            MAKE_EXPECTED_ENV='msys'
19342          else
19343            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19344          fi
19345          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19346          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19347        else
19348          # Not relevant for non-Windows
19349          IS_MAKE_CORRECT_ENV=true
19350        fi
19351        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19352          { $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
19353$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;}
19354        else
19355          FOUND_MAKE=$MAKE_CANDIDATE
19356
19357  # Only process if variable expands to non-empty
19358
19359  if test "x$FOUND_MAKE" != x; then
19360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19361
19362  # First separate the path from the arguments. This will split at the first
19363  # space.
19364  complete="$FOUND_MAKE"
19365  path="${complete%% *}"
19366  tmp="$complete EOL"
19367  arguments="${tmp#* }"
19368
19369  # Input might be given as Windows format, start by converting to
19370  # unix format.
19371  new_path=`$CYGPATH -u "$path"`
19372
19373  # Now try to locate executable using which
19374  new_path=`$WHICH "$new_path" 2> /dev/null`
19375  # bat and cmd files are not always considered executable in cygwin causing which
19376  # to not find them
19377  if test "x$new_path" = x \
19378      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19379      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19380    new_path=`$CYGPATH -u "$path"`
19381  fi
19382  if test "x$new_path" = x; then
19383    # Oops. Which didn't find the executable.
19384    # The splitting of arguments from the executable at a space might have been incorrect,
19385    # since paths with space are more likely in Windows. Give it another try with the whole
19386    # argument.
19387    path="$complete"
19388    arguments="EOL"
19389    new_path=`$CYGPATH -u "$path"`
19390    new_path=`$WHICH "$new_path" 2> /dev/null`
19391    # bat and cmd files are not always considered executable in cygwin causing which
19392    # to not find them
19393    if test "x$new_path" = x \
19394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19396      new_path=`$CYGPATH -u "$path"`
19397    fi
19398    if test "x$new_path" = x; then
19399      # It's still not found. Now this is an unrecoverable error.
19400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19402      has_space=`$ECHO "$complete" | $GREP " "`
19403      if test "x$has_space" != x; then
19404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19406      fi
19407      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19408    fi
19409  fi
19410
19411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19414  # "foo.exe" is OK but "foo" is an error.
19415  #
19416  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19417  # It is also a way to make sure we got the proper file name for the real test later on.
19418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19419  if test "x$test_shortpath" = x; then
19420    # Short path failed, file does not exist as specified.
19421    # Try adding .exe or .cmd
19422    if test -f "${new_path}.exe"; then
19423      input_to_shortpath="${new_path}.exe"
19424    elif test -f "${new_path}.cmd"; then
19425      input_to_shortpath="${new_path}.cmd"
19426    else
19427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19428$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19429      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19430$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19431      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19432    fi
19433  else
19434    input_to_shortpath="$new_path"
19435  fi
19436
19437  # Call helper function which possibly converts this using DOS-style short mode.
19438  # If so, the updated path is stored in $new_path.
19439  new_path="$input_to_shortpath"
19440
19441  input_path="$input_to_shortpath"
19442  # Check if we need to convert this using DOS-style short mode. If the path
19443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19444  # take no chances and rewrite it.
19445  # Note: m4 eats our [], so we need to use [ and ] instead.
19446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19447  if test "x$has_forbidden_chars" != x; then
19448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19452      # Going to short mode and back again did indeed matter. Since short mode is
19453      # case insensitive, let's make it lowercase to improve readability.
19454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19455      # Now convert it back to Unix-style (cygpath)
19456      input_path=`$CYGPATH -u "$shortmode_path"`
19457      new_path="$input_path"
19458    fi
19459  fi
19460
19461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19462  if test "x$test_cygdrive_prefix" = x; then
19463    # As a simple fix, exclude /usr/bin since it's not a real path.
19464    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19466      # a path prefixed by /cygdrive for fixpath to work.
19467      new_path="$CYGWIN_ROOT_PATH$input_path"
19468    fi
19469  fi
19470
19471  # remove trailing .exe if any
19472  new_path="${new_path/%.exe/}"
19473
19474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19475
19476  # First separate the path from the arguments. This will split at the first
19477  # space.
19478  complete="$FOUND_MAKE"
19479  path="${complete%% *}"
19480  tmp="$complete EOL"
19481  arguments="${tmp#* }"
19482
19483  # Input might be given as Windows format, start by converting to
19484  # unix format.
19485  new_path="$path"
19486
19487  windows_path="$new_path"
19488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19489    unix_path=`$CYGPATH -u "$windows_path"`
19490    new_path="$unix_path"
19491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19493    new_path="$unix_path"
19494  fi
19495
19496
19497  # Now try to locate executable using which
19498  new_path=`$WHICH "$new_path" 2> /dev/null`
19499
19500  if test "x$new_path" = x; then
19501    # Oops. Which didn't find the executable.
19502    # The splitting of arguments from the executable at a space might have been incorrect,
19503    # since paths with space are more likely in Windows. Give it another try with the whole
19504    # argument.
19505    path="$complete"
19506    arguments="EOL"
19507    new_path="$path"
19508
19509  windows_path="$new_path"
19510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19511    unix_path=`$CYGPATH -u "$windows_path"`
19512    new_path="$unix_path"
19513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19515    new_path="$unix_path"
19516  fi
19517
19518
19519    new_path=`$WHICH "$new_path" 2> /dev/null`
19520    # bat and cmd files are not always considered executable in MSYS causing which
19521    # to not find them
19522    if test "x$new_path" = x \
19523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19525      new_path="$path"
19526
19527  windows_path="$new_path"
19528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19529    unix_path=`$CYGPATH -u "$windows_path"`
19530    new_path="$unix_path"
19531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19533    new_path="$unix_path"
19534  fi
19535
19536    fi
19537
19538    if test "x$new_path" = x; then
19539      # It's still not found. Now this is an unrecoverable error.
19540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19541$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19542      has_space=`$ECHO "$complete" | $GREP " "`
19543      if test "x$has_space" != x; then
19544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19546      fi
19547      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19548    fi
19549  fi
19550
19551  # Now new_path has a complete unix path to the binary
19552  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19553    # Keep paths in /bin as-is, but remove trailing .exe if any
19554    new_path="${new_path/%.exe/}"
19555    # Do not save /bin paths to all_fixpath_prefixes!
19556  else
19557    # Not in mixed or Windows style, start by that.
19558    new_path=`cmd //c echo $new_path`
19559
19560  input_path="$new_path"
19561  # Check if we need to convert this using DOS-style short mode. If the path
19562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19563  # take no chances and rewrite it.
19564  # Note: m4 eats our [], so we need to use [ and ] instead.
19565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19566  if test "x$has_forbidden_chars" != x; then
19567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19569  fi
19570
19571    # Output is in $new_path
19572
19573  windows_path="$new_path"
19574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575    unix_path=`$CYGPATH -u "$windows_path"`
19576    new_path="$unix_path"
19577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19579    new_path="$unix_path"
19580  fi
19581
19582    # remove trailing .exe if any
19583    new_path="${new_path/%.exe/}"
19584
19585    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19586    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19587  fi
19588
19589    else
19590      # We're on a unix platform. Hooray! :)
19591      # First separate the path from the arguments. This will split at the first
19592      # space.
19593      complete="$FOUND_MAKE"
19594      path="${complete%% *}"
19595      tmp="$complete EOL"
19596      arguments="${tmp#* }"
19597
19598      # Cannot rely on the command "which" here since it doesn't always work.
19599      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19600      if test -z "$is_absolute_path"; then
19601        # Path to executable is not absolute. Find it.
19602        IFS_save="$IFS"
19603        IFS=:
19604        for p in $PATH; do
19605          if test -f "$p/$path" && test -x "$p/$path"; then
19606            new_path="$p/$path"
19607            break
19608          fi
19609        done
19610        IFS="$IFS_save"
19611      else
19612        # This is an absolute path, we can use it without further modifications.
19613        new_path="$path"
19614      fi
19615
19616      if test "x$new_path" = x; then
19617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19618$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19619        has_space=`$ECHO "$complete" | $GREP " "`
19620        if test "x$has_space" != x; then
19621          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19622$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19623        fi
19624        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19625      fi
19626    fi
19627
19628    # Now join together the path and the arguments once again
19629    if test "x$arguments" != xEOL; then
19630      new_complete="$new_path ${arguments% *}"
19631    else
19632      new_complete="$new_path"
19633    fi
19634
19635    if test "x$complete" != "x$new_complete"; then
19636      FOUND_MAKE="$new_complete"
19637      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19638$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19639    fi
19640  fi
19641
19642        fi
19643      fi
19644    fi
19645  fi
19646
19647        if test "x$FOUND_MAKE" = x; then
19648          for ac_prog in make
19649do
19650  # Extract the first word of "$ac_prog", so it can be a program name with args.
19651set dummy $ac_prog; ac_word=$2
19652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19653$as_echo_n "checking for $ac_word... " >&6; }
19654if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19655  $as_echo_n "(cached) " >&6
19656else
19657  case $CHECK_TOOLSDIR_MAKE in
19658  [\\/]* | ?:[\\/]*)
19659  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19660  ;;
19661  *)
19662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19663for as_dir in $PATH
19664do
19665  IFS=$as_save_IFS
19666  test -z "$as_dir" && as_dir=.
19667    for ac_exec_ext in '' $ac_executable_extensions; do
19668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19669    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19671    break 2
19672  fi
19673done
19674  done
19675IFS=$as_save_IFS
19676
19677  ;;
19678esac
19679fi
19680CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19681if test -n "$CHECK_TOOLSDIR_MAKE"; then
19682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19683$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19684else
19685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19686$as_echo "no" >&6; }
19687fi
19688
19689
19690  test -n "$CHECK_TOOLSDIR_MAKE" && break
19691done
19692
19693
19694  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19695  DESCRIPTION="make in tools-dir"
19696
19697  # On Cygwin, we require a newer version of make than on other platforms
19698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19699    MAKE_VERSION_EXPR="-e 4\."
19700    MAKE_REQUIRED_VERSION="4.0"
19701   else
19702    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19703    MAKE_REQUIRED_VERSION="3.81"
19704  fi
19705
19706  if test "x$MAKE_CANDIDATE" != x; then
19707    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19708$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19709    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19710    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19711    if test "x$IS_GNU_MAKE" = x; then
19712      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19713$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19714    else
19715      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19716      if test "x$IS_MODERN_MAKE" = x; then
19717        { $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
19718$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;}
19719      else
19720        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19721          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19722            MAKE_EXPECTED_ENV='cygwin'
19723          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19724            MAKE_EXPECTED_ENV='msys'
19725          else
19726            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19727          fi
19728          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19729          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19730        else
19731          # Not relevant for non-Windows
19732          IS_MAKE_CORRECT_ENV=true
19733        fi
19734        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19735          { $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
19736$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;}
19737        else
19738          FOUND_MAKE=$MAKE_CANDIDATE
19739
19740  # Only process if variable expands to non-empty
19741
19742  if test "x$FOUND_MAKE" != x; then
19743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19744
19745  # First separate the path from the arguments. This will split at the first
19746  # space.
19747  complete="$FOUND_MAKE"
19748  path="${complete%% *}"
19749  tmp="$complete EOL"
19750  arguments="${tmp#* }"
19751
19752  # Input might be given as Windows format, start by converting to
19753  # unix format.
19754  new_path=`$CYGPATH -u "$path"`
19755
19756  # Now try to locate executable using which
19757  new_path=`$WHICH "$new_path" 2> /dev/null`
19758  # bat and cmd files are not always considered executable in cygwin causing which
19759  # to not find them
19760  if test "x$new_path" = x \
19761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19763    new_path=`$CYGPATH -u "$path"`
19764  fi
19765  if test "x$new_path" = x; then
19766    # Oops. Which didn't find the executable.
19767    # The splitting of arguments from the executable at a space might have been incorrect,
19768    # since paths with space are more likely in Windows. Give it another try with the whole
19769    # argument.
19770    path="$complete"
19771    arguments="EOL"
19772    new_path=`$CYGPATH -u "$path"`
19773    new_path=`$WHICH "$new_path" 2> /dev/null`
19774    # bat and cmd files are not always considered executable in cygwin causing which
19775    # to not find them
19776    if test "x$new_path" = x \
19777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19779      new_path=`$CYGPATH -u "$path"`
19780    fi
19781    if test "x$new_path" = x; then
19782      # It's still not found. Now this is an unrecoverable error.
19783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19784$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19785      has_space=`$ECHO "$complete" | $GREP " "`
19786      if test "x$has_space" != x; then
19787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19789      fi
19790      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19791    fi
19792  fi
19793
19794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19797  # "foo.exe" is OK but "foo" is an error.
19798  #
19799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19800  # It is also a way to make sure we got the proper file name for the real test later on.
19801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19802  if test "x$test_shortpath" = x; then
19803    # Short path failed, file does not exist as specified.
19804    # Try adding .exe or .cmd
19805    if test -f "${new_path}.exe"; then
19806      input_to_shortpath="${new_path}.exe"
19807    elif test -f "${new_path}.cmd"; then
19808      input_to_shortpath="${new_path}.cmd"
19809    else
19810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19811$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19814      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19815    fi
19816  else
19817    input_to_shortpath="$new_path"
19818  fi
19819
19820  # Call helper function which possibly converts this using DOS-style short mode.
19821  # If so, the updated path is stored in $new_path.
19822  new_path="$input_to_shortpath"
19823
19824  input_path="$input_to_shortpath"
19825  # Check if we need to convert this using DOS-style short mode. If the path
19826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19827  # take no chances and rewrite it.
19828  # Note: m4 eats our [], so we need to use [ and ] instead.
19829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19830  if test "x$has_forbidden_chars" != x; then
19831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19835      # Going to short mode and back again did indeed matter. Since short mode is
19836      # case insensitive, let's make it lowercase to improve readability.
19837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19838      # Now convert it back to Unix-style (cygpath)
19839      input_path=`$CYGPATH -u "$shortmode_path"`
19840      new_path="$input_path"
19841    fi
19842  fi
19843
19844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19845  if test "x$test_cygdrive_prefix" = x; then
19846    # As a simple fix, exclude /usr/bin since it's not a real path.
19847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19849      # a path prefixed by /cygdrive for fixpath to work.
19850      new_path="$CYGWIN_ROOT_PATH$input_path"
19851    fi
19852  fi
19853
19854  # remove trailing .exe if any
19855  new_path="${new_path/%.exe/}"
19856
19857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19858
19859  # First separate the path from the arguments. This will split at the first
19860  # space.
19861  complete="$FOUND_MAKE"
19862  path="${complete%% *}"
19863  tmp="$complete EOL"
19864  arguments="${tmp#* }"
19865
19866  # Input might be given as Windows format, start by converting to
19867  # unix format.
19868  new_path="$path"
19869
19870  windows_path="$new_path"
19871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19872    unix_path=`$CYGPATH -u "$windows_path"`
19873    new_path="$unix_path"
19874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19876    new_path="$unix_path"
19877  fi
19878
19879
19880  # Now try to locate executable using which
19881  new_path=`$WHICH "$new_path" 2> /dev/null`
19882
19883  if test "x$new_path" = x; then
19884    # Oops. Which didn't find the executable.
19885    # The splitting of arguments from the executable at a space might have been incorrect,
19886    # since paths with space are more likely in Windows. Give it another try with the whole
19887    # argument.
19888    path="$complete"
19889    arguments="EOL"
19890    new_path="$path"
19891
19892  windows_path="$new_path"
19893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19894    unix_path=`$CYGPATH -u "$windows_path"`
19895    new_path="$unix_path"
19896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19898    new_path="$unix_path"
19899  fi
19900
19901
19902    new_path=`$WHICH "$new_path" 2> /dev/null`
19903    # bat and cmd files are not always considered executable in MSYS causing which
19904    # to not find them
19905    if test "x$new_path" = x \
19906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19908      new_path="$path"
19909
19910  windows_path="$new_path"
19911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19912    unix_path=`$CYGPATH -u "$windows_path"`
19913    new_path="$unix_path"
19914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19916    new_path="$unix_path"
19917  fi
19918
19919    fi
19920
19921    if test "x$new_path" = x; then
19922      # It's still not found. Now this is an unrecoverable error.
19923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19925      has_space=`$ECHO "$complete" | $GREP " "`
19926      if test "x$has_space" != x; then
19927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19929      fi
19930      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19931    fi
19932  fi
19933
19934  # Now new_path has a complete unix path to the binary
19935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19936    # Keep paths in /bin as-is, but remove trailing .exe if any
19937    new_path="${new_path/%.exe/}"
19938    # Do not save /bin paths to all_fixpath_prefixes!
19939  else
19940    # Not in mixed or Windows style, start by that.
19941    new_path=`cmd //c echo $new_path`
19942
19943  input_path="$new_path"
19944  # Check if we need to convert this using DOS-style short mode. If the path
19945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19946  # take no chances and rewrite it.
19947  # Note: m4 eats our [], so we need to use [ and ] instead.
19948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19949  if test "x$has_forbidden_chars" != x; then
19950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19952  fi
19953
19954    # Output is in $new_path
19955
19956  windows_path="$new_path"
19957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19958    unix_path=`$CYGPATH -u "$windows_path"`
19959    new_path="$unix_path"
19960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19962    new_path="$unix_path"
19963  fi
19964
19965    # remove trailing .exe if any
19966    new_path="${new_path/%.exe/}"
19967
19968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19970  fi
19971
19972    else
19973      # We're on a unix platform. Hooray! :)
19974      # First separate the path from the arguments. This will split at the first
19975      # space.
19976      complete="$FOUND_MAKE"
19977      path="${complete%% *}"
19978      tmp="$complete EOL"
19979      arguments="${tmp#* }"
19980
19981      # Cannot rely on the command "which" here since it doesn't always work.
19982      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19983      if test -z "$is_absolute_path"; then
19984        # Path to executable is not absolute. Find it.
19985        IFS_save="$IFS"
19986        IFS=:
19987        for p in $PATH; do
19988          if test -f "$p/$path" && test -x "$p/$path"; then
19989            new_path="$p/$path"
19990            break
19991          fi
19992        done
19993        IFS="$IFS_save"
19994      else
19995        # This is an absolute path, we can use it without further modifications.
19996        new_path="$path"
19997      fi
19998
19999      if test "x$new_path" = x; then
20000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20001$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20002        has_space=`$ECHO "$complete" | $GREP " "`
20003        if test "x$has_space" != x; then
20004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20006        fi
20007        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20008      fi
20009    fi
20010
20011    # Now join together the path and the arguments once again
20012    if test "x$arguments" != xEOL; then
20013      new_complete="$new_path ${arguments% *}"
20014    else
20015      new_complete="$new_path"
20016    fi
20017
20018    if test "x$complete" != "x$new_complete"; then
20019      FOUND_MAKE="$new_complete"
20020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20021$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20022    fi
20023  fi
20024
20025        fi
20026      fi
20027    fi
20028  fi
20029
20030        fi
20031        PATH=$OLD_PATH
20032      fi
20033    fi
20034
20035    if test "x$FOUND_MAKE" = x; then
20036      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
20037    fi
20038
20039    else
20040      # If it succeeded, then it was overridden by the user. We will use it
20041      # for the tool.
20042
20043      # First remove it from the list of overridden variables, so we can test
20044      # for unknown variables in the end.
20045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20046
20047      # Check if we try to supply an empty value
20048      if test "x$MAKE" = x; then
20049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20050$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20052$as_echo_n "checking for MAKE... " >&6; }
20053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20054$as_echo "disabled" >&6; }
20055      else
20056        # Check if the provided tool contains a complete path.
20057        tool_specified="$MAKE"
20058        tool_basename="${tool_specified##*/}"
20059        if test "x$tool_basename" = "x$tool_specified"; then
20060          # A command without a complete path is provided, search $PATH.
20061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20062$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20063          # Extract the first word of "$tool_basename", so it can be a program name with args.
20064set dummy $tool_basename; ac_word=$2
20065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20066$as_echo_n "checking for $ac_word... " >&6; }
20067if ${ac_cv_path_MAKE+:} false; then :
20068  $as_echo_n "(cached) " >&6
20069else
20070  case $MAKE in
20071  [\\/]* | ?:[\\/]*)
20072  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20073  ;;
20074  *)
20075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20076for as_dir in $PATH
20077do
20078  IFS=$as_save_IFS
20079  test -z "$as_dir" && as_dir=.
20080    for ac_exec_ext in '' $ac_executable_extensions; do
20081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20082    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20084    break 2
20085  fi
20086done
20087  done
20088IFS=$as_save_IFS
20089
20090  ;;
20091esac
20092fi
20093MAKE=$ac_cv_path_MAKE
20094if test -n "$MAKE"; then
20095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20096$as_echo "$MAKE" >&6; }
20097else
20098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20099$as_echo "no" >&6; }
20100fi
20101
20102
20103          if test "x$MAKE" = x; then
20104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20105          fi
20106        else
20107          # Otherwise we believe it is a complete path. Use it as it is.
20108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20109$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20111$as_echo_n "checking for MAKE... " >&6; }
20112          if test ! -x "$tool_specified"; then
20113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20114$as_echo "not found" >&6; }
20115            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20116          fi
20117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20118$as_echo "$tool_specified" >&6; }
20119        fi
20120      fi
20121    fi
20122
20123    # If MAKE was set by user, verify the version
20124
20125  MAKE_CANDIDATE=""$MAKE""
20126  DESCRIPTION="user supplied MAKE=$MAKE"
20127
20128  # On Cygwin, we require a newer version of make than on other platforms
20129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130    MAKE_VERSION_EXPR="-e 4\."
20131    MAKE_REQUIRED_VERSION="4.0"
20132   else
20133    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20134    MAKE_REQUIRED_VERSION="3.81"
20135  fi
20136
20137  if test "x$MAKE_CANDIDATE" != x; then
20138    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20139$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20140    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20141    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20142    if test "x$IS_GNU_MAKE" = x; then
20143      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20144$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20145    else
20146      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20147      if test "x$IS_MODERN_MAKE" = x; then
20148        { $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
20149$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;}
20150      else
20151        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20152          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20153            MAKE_EXPECTED_ENV='cygwin'
20154          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20155            MAKE_EXPECTED_ENV='msys'
20156          else
20157            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20158          fi
20159          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20160          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20161        else
20162          # Not relevant for non-Windows
20163          IS_MAKE_CORRECT_ENV=true
20164        fi
20165        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20166          { $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
20167$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;}
20168        else
20169          FOUND_MAKE=$MAKE_CANDIDATE
20170
20171  # Only process if variable expands to non-empty
20172
20173  if test "x$FOUND_MAKE" != x; then
20174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20175
20176  # First separate the path from the arguments. This will split at the first
20177  # space.
20178  complete="$FOUND_MAKE"
20179  path="${complete%% *}"
20180  tmp="$complete EOL"
20181  arguments="${tmp#* }"
20182
20183  # Input might be given as Windows format, start by converting to
20184  # unix format.
20185  new_path=`$CYGPATH -u "$path"`
20186
20187  # Now try to locate executable using which
20188  new_path=`$WHICH "$new_path" 2> /dev/null`
20189  # bat and cmd files are not always considered executable in cygwin causing which
20190  # to not find them
20191  if test "x$new_path" = x \
20192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20194    new_path=`$CYGPATH -u "$path"`
20195  fi
20196  if test "x$new_path" = x; then
20197    # Oops. Which didn't find the executable.
20198    # The splitting of arguments from the executable at a space might have been incorrect,
20199    # since paths with space are more likely in Windows. Give it another try with the whole
20200    # argument.
20201    path="$complete"
20202    arguments="EOL"
20203    new_path=`$CYGPATH -u "$path"`
20204    new_path=`$WHICH "$new_path" 2> /dev/null`
20205    # bat and cmd files are not always considered executable in cygwin causing which
20206    # to not find them
20207    if test "x$new_path" = x \
20208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20210      new_path=`$CYGPATH -u "$path"`
20211    fi
20212    if test "x$new_path" = x; then
20213      # It's still not found. Now this is an unrecoverable error.
20214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20215$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20216      has_space=`$ECHO "$complete" | $GREP " "`
20217      if test "x$has_space" != x; then
20218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20220      fi
20221      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20222    fi
20223  fi
20224
20225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20228  # "foo.exe" is OK but "foo" is an error.
20229  #
20230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20231  # It is also a way to make sure we got the proper file name for the real test later on.
20232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20233  if test "x$test_shortpath" = x; then
20234    # Short path failed, file does not exist as specified.
20235    # Try adding .exe or .cmd
20236    if test -f "${new_path}.exe"; then
20237      input_to_shortpath="${new_path}.exe"
20238    elif test -f "${new_path}.cmd"; then
20239      input_to_shortpath="${new_path}.cmd"
20240    else
20241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20242$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20245      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20246    fi
20247  else
20248    input_to_shortpath="$new_path"
20249  fi
20250
20251  # Call helper function which possibly converts this using DOS-style short mode.
20252  # If so, the updated path is stored in $new_path.
20253  new_path="$input_to_shortpath"
20254
20255  input_path="$input_to_shortpath"
20256  # Check if we need to convert this using DOS-style short mode. If the path
20257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20258  # take no chances and rewrite it.
20259  # Note: m4 eats our [], so we need to use [ and ] instead.
20260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20261  if test "x$has_forbidden_chars" != x; then
20262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20266      # Going to short mode and back again did indeed matter. Since short mode is
20267      # case insensitive, let's make it lowercase to improve readability.
20268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20269      # Now convert it back to Unix-style (cygpath)
20270      input_path=`$CYGPATH -u "$shortmode_path"`
20271      new_path="$input_path"
20272    fi
20273  fi
20274
20275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20276  if test "x$test_cygdrive_prefix" = x; then
20277    # As a simple fix, exclude /usr/bin since it's not a real path.
20278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20280      # a path prefixed by /cygdrive for fixpath to work.
20281      new_path="$CYGWIN_ROOT_PATH$input_path"
20282    fi
20283  fi
20284
20285  # remove trailing .exe if any
20286  new_path="${new_path/%.exe/}"
20287
20288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20289
20290  # First separate the path from the arguments. This will split at the first
20291  # space.
20292  complete="$FOUND_MAKE"
20293  path="${complete%% *}"
20294  tmp="$complete EOL"
20295  arguments="${tmp#* }"
20296
20297  # Input might be given as Windows format, start by converting to
20298  # unix format.
20299  new_path="$path"
20300
20301  windows_path="$new_path"
20302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20303    unix_path=`$CYGPATH -u "$windows_path"`
20304    new_path="$unix_path"
20305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20307    new_path="$unix_path"
20308  fi
20309
20310
20311  # Now try to locate executable using which
20312  new_path=`$WHICH "$new_path" 2> /dev/null`
20313
20314  if test "x$new_path" = x; then
20315    # Oops. Which didn't find the executable.
20316    # The splitting of arguments from the executable at a space might have been incorrect,
20317    # since paths with space are more likely in Windows. Give it another try with the whole
20318    # argument.
20319    path="$complete"
20320    arguments="EOL"
20321    new_path="$path"
20322
20323  windows_path="$new_path"
20324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20325    unix_path=`$CYGPATH -u "$windows_path"`
20326    new_path="$unix_path"
20327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20329    new_path="$unix_path"
20330  fi
20331
20332
20333    new_path=`$WHICH "$new_path" 2> /dev/null`
20334    # bat and cmd files are not always considered executable in MSYS causing which
20335    # to not find them
20336    if test "x$new_path" = x \
20337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20339      new_path="$path"
20340
20341  windows_path="$new_path"
20342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20343    unix_path=`$CYGPATH -u "$windows_path"`
20344    new_path="$unix_path"
20345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20347    new_path="$unix_path"
20348  fi
20349
20350    fi
20351
20352    if test "x$new_path" = x; then
20353      # It's still not found. Now this is an unrecoverable error.
20354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20355$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20356      has_space=`$ECHO "$complete" | $GREP " "`
20357      if test "x$has_space" != x; then
20358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20360      fi
20361      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20362    fi
20363  fi
20364
20365  # Now new_path has a complete unix path to the binary
20366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20367    # Keep paths in /bin as-is, but remove trailing .exe if any
20368    new_path="${new_path/%.exe/}"
20369    # Do not save /bin paths to all_fixpath_prefixes!
20370  else
20371    # Not in mixed or Windows style, start by that.
20372    new_path=`cmd //c echo $new_path`
20373
20374  input_path="$new_path"
20375  # Check if we need to convert this using DOS-style short mode. If the path
20376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20377  # take no chances and rewrite it.
20378  # Note: m4 eats our [], so we need to use [ and ] instead.
20379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20380  if test "x$has_forbidden_chars" != x; then
20381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20383  fi
20384
20385    # Output is in $new_path
20386
20387  windows_path="$new_path"
20388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20389    unix_path=`$CYGPATH -u "$windows_path"`
20390    new_path="$unix_path"
20391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20393    new_path="$unix_path"
20394  fi
20395
20396    # remove trailing .exe if any
20397    new_path="${new_path/%.exe/}"
20398
20399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20401  fi
20402
20403    else
20404      # We're on a unix platform. Hooray! :)
20405      # First separate the path from the arguments. This will split at the first
20406      # space.
20407      complete="$FOUND_MAKE"
20408      path="${complete%% *}"
20409      tmp="$complete EOL"
20410      arguments="${tmp#* }"
20411
20412      # Cannot rely on the command "which" here since it doesn't always work.
20413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20414      if test -z "$is_absolute_path"; then
20415        # Path to executable is not absolute. Find it.
20416        IFS_save="$IFS"
20417        IFS=:
20418        for p in $PATH; do
20419          if test -f "$p/$path" && test -x "$p/$path"; then
20420            new_path="$p/$path"
20421            break
20422          fi
20423        done
20424        IFS="$IFS_save"
20425      else
20426        # This is an absolute path, we can use it without further modifications.
20427        new_path="$path"
20428      fi
20429
20430      if test "x$new_path" = x; then
20431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20432$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20433        has_space=`$ECHO "$complete" | $GREP " "`
20434        if test "x$has_space" != x; then
20435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20437        fi
20438        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20439      fi
20440    fi
20441
20442    # Now join together the path and the arguments once again
20443    if test "x$arguments" != xEOL; then
20444      new_complete="$new_path ${arguments% *}"
20445    else
20446      new_complete="$new_path"
20447    fi
20448
20449    if test "x$complete" != "x$new_complete"; then
20450      FOUND_MAKE="$new_complete"
20451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20452$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20453    fi
20454  fi
20455
20456        fi
20457      fi
20458    fi
20459  fi
20460
20461    if test "x$FOUND_MAKE" = x; then
20462      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20463    fi
20464
20465  fi
20466
20467
20468  MAKE=$FOUND_MAKE
20469
20470  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20471$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20472
20473
20474  # Check if make supports the output sync option and if so, setup using it.
20475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20476$as_echo_n "checking if make --output-sync is supported... " >&6; }
20477  if $MAKE --version -O > /dev/null 2>&1; then
20478    OUTPUT_SYNC_SUPPORTED=true
20479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20480$as_echo "yes" >&6; }
20481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20482$as_echo_n "checking for output-sync value... " >&6; }
20483
20484# Check whether --with-output-sync was given.
20485if test "${with_output_sync+set}" = set; then :
20486  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20487fi
20488
20489    if test "x$OUTPUT_SYNC" = "x"; then
20490      OUTPUT_SYNC=none
20491    fi
20492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20493$as_echo "$OUTPUT_SYNC" >&6; }
20494    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20495      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20496    fi
20497  else
20498    OUTPUT_SYNC_SUPPORTED=false
20499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20500$as_echo "no" >&6; }
20501  fi
20502
20503
20504
20505
20506
20507
20508  # Test if find supports -delete
20509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20510$as_echo_n "checking if find supports -delete... " >&6; }
20511  FIND_DELETE="-delete"
20512
20513  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20514
20515  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20516
20517  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20518  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20519    # No, it does not.
20520    rm $DELETEDIR/TestIfFindSupportsDelete
20521    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20522      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20523      FIND_DELETE="-print | xargs rm"
20524    else
20525      FIND_DELETE="-exec rm \{\} \+"
20526    fi
20527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20528$as_echo "no" >&6; }
20529  else
20530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20531$as_echo "yes" >&6; }
20532  fi
20533  rmdir $DELETEDIR
20534
20535
20536
20537  # These tools might not be installed by default,
20538  # need hint on how to install them.
20539
20540
20541
20542  # Publish this variable in the help.
20543
20544
20545  if [ -z "${UNZIP+x}" ]; then
20546    # The variable is not set by user, try to locate tool using the code snippet
20547    for ac_prog in unzip
20548do
20549  # Extract the first word of "$ac_prog", so it can be a program name with args.
20550set dummy $ac_prog; ac_word=$2
20551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20552$as_echo_n "checking for $ac_word... " >&6; }
20553if ${ac_cv_path_UNZIP+:} false; then :
20554  $as_echo_n "(cached) " >&6
20555else
20556  case $UNZIP in
20557  [\\/]* | ?:[\\/]*)
20558  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20559  ;;
20560  *)
20561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20562for as_dir in $PATH
20563do
20564  IFS=$as_save_IFS
20565  test -z "$as_dir" && as_dir=.
20566    for ac_exec_ext in '' $ac_executable_extensions; do
20567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20568    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20570    break 2
20571  fi
20572done
20573  done
20574IFS=$as_save_IFS
20575
20576  ;;
20577esac
20578fi
20579UNZIP=$ac_cv_path_UNZIP
20580if test -n "$UNZIP"; then
20581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20582$as_echo "$UNZIP" >&6; }
20583else
20584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20585$as_echo "no" >&6; }
20586fi
20587
20588
20589  test -n "$UNZIP" && break
20590done
20591
20592  else
20593    # The variable is set, but is it from the command line or the environment?
20594
20595    # Try to remove the string !UNZIP! from our list.
20596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20598      # If it failed, the variable was not from the command line. Ignore it,
20599      # but warn the user (except for BASH, which is always set by the calling BASH).
20600      if test "xUNZIP" != xBASH; then
20601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20602$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20603      fi
20604      # Try to locate tool using the code snippet
20605      for ac_prog in unzip
20606do
20607  # Extract the first word of "$ac_prog", so it can be a program name with args.
20608set dummy $ac_prog; ac_word=$2
20609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20610$as_echo_n "checking for $ac_word... " >&6; }
20611if ${ac_cv_path_UNZIP+:} false; then :
20612  $as_echo_n "(cached) " >&6
20613else
20614  case $UNZIP in
20615  [\\/]* | ?:[\\/]*)
20616  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20617  ;;
20618  *)
20619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20620for as_dir in $PATH
20621do
20622  IFS=$as_save_IFS
20623  test -z "$as_dir" && as_dir=.
20624    for ac_exec_ext in '' $ac_executable_extensions; do
20625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20626    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20628    break 2
20629  fi
20630done
20631  done
20632IFS=$as_save_IFS
20633
20634  ;;
20635esac
20636fi
20637UNZIP=$ac_cv_path_UNZIP
20638if test -n "$UNZIP"; then
20639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20640$as_echo "$UNZIP" >&6; }
20641else
20642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20643$as_echo "no" >&6; }
20644fi
20645
20646
20647  test -n "$UNZIP" && break
20648done
20649
20650    else
20651      # If it succeeded, then it was overridden by the user. We will use it
20652      # for the tool.
20653
20654      # First remove it from the list of overridden variables, so we can test
20655      # for unknown variables in the end.
20656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20657
20658      # Check if we try to supply an empty value
20659      if test "x$UNZIP" = x; then
20660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20661$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20663$as_echo_n "checking for UNZIP... " >&6; }
20664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20665$as_echo "disabled" >&6; }
20666      else
20667        # Check if the provided tool contains a complete path.
20668        tool_specified="$UNZIP"
20669        tool_basename="${tool_specified##*/}"
20670        if test "x$tool_basename" = "x$tool_specified"; then
20671          # A command without a complete path is provided, search $PATH.
20672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20673$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20674          # Extract the first word of "$tool_basename", so it can be a program name with args.
20675set dummy $tool_basename; ac_word=$2
20676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20677$as_echo_n "checking for $ac_word... " >&6; }
20678if ${ac_cv_path_UNZIP+:} false; then :
20679  $as_echo_n "(cached) " >&6
20680else
20681  case $UNZIP in
20682  [\\/]* | ?:[\\/]*)
20683  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20684  ;;
20685  *)
20686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20687for as_dir in $PATH
20688do
20689  IFS=$as_save_IFS
20690  test -z "$as_dir" && as_dir=.
20691    for ac_exec_ext in '' $ac_executable_extensions; do
20692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20693    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20695    break 2
20696  fi
20697done
20698  done
20699IFS=$as_save_IFS
20700
20701  ;;
20702esac
20703fi
20704UNZIP=$ac_cv_path_UNZIP
20705if test -n "$UNZIP"; then
20706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20707$as_echo "$UNZIP" >&6; }
20708else
20709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20710$as_echo "no" >&6; }
20711fi
20712
20713
20714          if test "x$UNZIP" = x; then
20715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20716          fi
20717        else
20718          # Otherwise we believe it is a complete path. Use it as it is.
20719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20720$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20722$as_echo_n "checking for UNZIP... " >&6; }
20723          if test ! -x "$tool_specified"; then
20724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20725$as_echo "not found" >&6; }
20726            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20727          fi
20728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20729$as_echo "$tool_specified" >&6; }
20730        fi
20731      fi
20732    fi
20733
20734  fi
20735
20736
20737
20738  if test "x$UNZIP" = x; then
20739    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20740  fi
20741
20742
20743
20744
20745
20746  # Publish this variable in the help.
20747
20748
20749  if [ -z "${ZIP+x}" ]; then
20750    # The variable is not set by user, try to locate tool using the code snippet
20751    for ac_prog in zip
20752do
20753  # Extract the first word of "$ac_prog", so it can be a program name with args.
20754set dummy $ac_prog; ac_word=$2
20755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20756$as_echo_n "checking for $ac_word... " >&6; }
20757if ${ac_cv_path_ZIP+:} false; then :
20758  $as_echo_n "(cached) " >&6
20759else
20760  case $ZIP in
20761  [\\/]* | ?:[\\/]*)
20762  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20763  ;;
20764  *)
20765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20766for as_dir in $PATH
20767do
20768  IFS=$as_save_IFS
20769  test -z "$as_dir" && as_dir=.
20770    for ac_exec_ext in '' $ac_executable_extensions; do
20771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20772    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20774    break 2
20775  fi
20776done
20777  done
20778IFS=$as_save_IFS
20779
20780  ;;
20781esac
20782fi
20783ZIP=$ac_cv_path_ZIP
20784if test -n "$ZIP"; then
20785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20786$as_echo "$ZIP" >&6; }
20787else
20788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20789$as_echo "no" >&6; }
20790fi
20791
20792
20793  test -n "$ZIP" && break
20794done
20795
20796  else
20797    # The variable is set, but is it from the command line or the environment?
20798
20799    # Try to remove the string !ZIP! from our list.
20800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20802      # If it failed, the variable was not from the command line. Ignore it,
20803      # but warn the user (except for BASH, which is always set by the calling BASH).
20804      if test "xZIP" != xBASH; then
20805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20806$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20807      fi
20808      # Try to locate tool using the code snippet
20809      for ac_prog in zip
20810do
20811  # Extract the first word of "$ac_prog", so it can be a program name with args.
20812set dummy $ac_prog; ac_word=$2
20813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20814$as_echo_n "checking for $ac_word... " >&6; }
20815if ${ac_cv_path_ZIP+:} false; then :
20816  $as_echo_n "(cached) " >&6
20817else
20818  case $ZIP in
20819  [\\/]* | ?:[\\/]*)
20820  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20821  ;;
20822  *)
20823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20824for as_dir in $PATH
20825do
20826  IFS=$as_save_IFS
20827  test -z "$as_dir" && as_dir=.
20828    for ac_exec_ext in '' $ac_executable_extensions; do
20829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20830    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20832    break 2
20833  fi
20834done
20835  done
20836IFS=$as_save_IFS
20837
20838  ;;
20839esac
20840fi
20841ZIP=$ac_cv_path_ZIP
20842if test -n "$ZIP"; then
20843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20844$as_echo "$ZIP" >&6; }
20845else
20846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20847$as_echo "no" >&6; }
20848fi
20849
20850
20851  test -n "$ZIP" && break
20852done
20853
20854    else
20855      # If it succeeded, then it was overridden by the user. We will use it
20856      # for the tool.
20857
20858      # First remove it from the list of overridden variables, so we can test
20859      # for unknown variables in the end.
20860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20861
20862      # Check if we try to supply an empty value
20863      if test "x$ZIP" = x; then
20864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20865$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20867$as_echo_n "checking for ZIP... " >&6; }
20868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20869$as_echo "disabled" >&6; }
20870      else
20871        # Check if the provided tool contains a complete path.
20872        tool_specified="$ZIP"
20873        tool_basename="${tool_specified##*/}"
20874        if test "x$tool_basename" = "x$tool_specified"; then
20875          # A command without a complete path is provided, search $PATH.
20876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20877$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20878          # Extract the first word of "$tool_basename", so it can be a program name with args.
20879set dummy $tool_basename; ac_word=$2
20880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20881$as_echo_n "checking for $ac_word... " >&6; }
20882if ${ac_cv_path_ZIP+:} false; then :
20883  $as_echo_n "(cached) " >&6
20884else
20885  case $ZIP in
20886  [\\/]* | ?:[\\/]*)
20887  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20888  ;;
20889  *)
20890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20891for as_dir in $PATH
20892do
20893  IFS=$as_save_IFS
20894  test -z "$as_dir" && as_dir=.
20895    for ac_exec_ext in '' $ac_executable_extensions; do
20896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20897    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20899    break 2
20900  fi
20901done
20902  done
20903IFS=$as_save_IFS
20904
20905  ;;
20906esac
20907fi
20908ZIP=$ac_cv_path_ZIP
20909if test -n "$ZIP"; then
20910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20911$as_echo "$ZIP" >&6; }
20912else
20913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20914$as_echo "no" >&6; }
20915fi
20916
20917
20918          if test "x$ZIP" = x; then
20919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20920          fi
20921        else
20922          # Otherwise we believe it is a complete path. Use it as it is.
20923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20924$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20926$as_echo_n "checking for ZIP... " >&6; }
20927          if test ! -x "$tool_specified"; then
20928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20929$as_echo "not found" >&6; }
20930            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20931          fi
20932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20933$as_echo "$tool_specified" >&6; }
20934        fi
20935      fi
20936    fi
20937
20938  fi
20939
20940
20941
20942  if test "x$ZIP" = x; then
20943    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20944  fi
20945
20946
20947
20948  # Non-required basic tools
20949
20950
20951
20952  # Publish this variable in the help.
20953
20954
20955  if [ -z "${LDD+x}" ]; then
20956    # The variable is not set by user, try to locate tool using the code snippet
20957    for ac_prog in ldd
20958do
20959  # Extract the first word of "$ac_prog", so it can be a program name with args.
20960set dummy $ac_prog; ac_word=$2
20961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20962$as_echo_n "checking for $ac_word... " >&6; }
20963if ${ac_cv_path_LDD+:} false; then :
20964  $as_echo_n "(cached) " >&6
20965else
20966  case $LDD in
20967  [\\/]* | ?:[\\/]*)
20968  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20969  ;;
20970  *)
20971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20972for as_dir in $PATH
20973do
20974  IFS=$as_save_IFS
20975  test -z "$as_dir" && as_dir=.
20976    for ac_exec_ext in '' $ac_executable_extensions; do
20977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20978    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20980    break 2
20981  fi
20982done
20983  done
20984IFS=$as_save_IFS
20985
20986  ;;
20987esac
20988fi
20989LDD=$ac_cv_path_LDD
20990if test -n "$LDD"; then
20991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20992$as_echo "$LDD" >&6; }
20993else
20994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20995$as_echo "no" >&6; }
20996fi
20997
20998
20999  test -n "$LDD" && break
21000done
21001
21002  else
21003    # The variable is set, but is it from the command line or the environment?
21004
21005    # Try to remove the string !LDD! from our list.
21006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21008      # If it failed, the variable was not from the command line. Ignore it,
21009      # but warn the user (except for BASH, which is always set by the calling BASH).
21010      if test "xLDD" != xBASH; then
21011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21012$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21013      fi
21014      # Try to locate tool using the code snippet
21015      for ac_prog in ldd
21016do
21017  # Extract the first word of "$ac_prog", so it can be a program name with args.
21018set dummy $ac_prog; ac_word=$2
21019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21020$as_echo_n "checking for $ac_word... " >&6; }
21021if ${ac_cv_path_LDD+:} false; then :
21022  $as_echo_n "(cached) " >&6
21023else
21024  case $LDD in
21025  [\\/]* | ?:[\\/]*)
21026  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21027  ;;
21028  *)
21029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21030for as_dir in $PATH
21031do
21032  IFS=$as_save_IFS
21033  test -z "$as_dir" && as_dir=.
21034    for ac_exec_ext in '' $ac_executable_extensions; do
21035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21036    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21038    break 2
21039  fi
21040done
21041  done
21042IFS=$as_save_IFS
21043
21044  ;;
21045esac
21046fi
21047LDD=$ac_cv_path_LDD
21048if test -n "$LDD"; then
21049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21050$as_echo "$LDD" >&6; }
21051else
21052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21053$as_echo "no" >&6; }
21054fi
21055
21056
21057  test -n "$LDD" && break
21058done
21059
21060    else
21061      # If it succeeded, then it was overridden by the user. We will use it
21062      # for the tool.
21063
21064      # First remove it from the list of overridden variables, so we can test
21065      # for unknown variables in the end.
21066      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21067
21068      # Check if we try to supply an empty value
21069      if test "x$LDD" = x; then
21070        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21071$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21073$as_echo_n "checking for LDD... " >&6; }
21074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21075$as_echo "disabled" >&6; }
21076      else
21077        # Check if the provided tool contains a complete path.
21078        tool_specified="$LDD"
21079        tool_basename="${tool_specified##*/}"
21080        if test "x$tool_basename" = "x$tool_specified"; then
21081          # A command without a complete path is provided, search $PATH.
21082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21083$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21084          # Extract the first word of "$tool_basename", so it can be a program name with args.
21085set dummy $tool_basename; ac_word=$2
21086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21087$as_echo_n "checking for $ac_word... " >&6; }
21088if ${ac_cv_path_LDD+:} false; then :
21089  $as_echo_n "(cached) " >&6
21090else
21091  case $LDD in
21092  [\\/]* | ?:[\\/]*)
21093  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21094  ;;
21095  *)
21096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21097for as_dir in $PATH
21098do
21099  IFS=$as_save_IFS
21100  test -z "$as_dir" && as_dir=.
21101    for ac_exec_ext in '' $ac_executable_extensions; do
21102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21103    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21105    break 2
21106  fi
21107done
21108  done
21109IFS=$as_save_IFS
21110
21111  ;;
21112esac
21113fi
21114LDD=$ac_cv_path_LDD
21115if test -n "$LDD"; then
21116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21117$as_echo "$LDD" >&6; }
21118else
21119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21120$as_echo "no" >&6; }
21121fi
21122
21123
21124          if test "x$LDD" = x; then
21125            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21126          fi
21127        else
21128          # Otherwise we believe it is a complete path. Use it as it is.
21129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21130$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21131          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21132$as_echo_n "checking for LDD... " >&6; }
21133          if test ! -x "$tool_specified"; then
21134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21135$as_echo "not found" >&6; }
21136            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21137          fi
21138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21139$as_echo "$tool_specified" >&6; }
21140        fi
21141      fi
21142    fi
21143
21144  fi
21145
21146
21147  if test "x$LDD" = "x"; then
21148    # List shared lib dependencies is used for
21149    # debug output and checking for forbidden dependencies.
21150    # We can build without it.
21151    LDD="true"
21152  fi
21153
21154
21155  # Publish this variable in the help.
21156
21157
21158  if [ -z "${OTOOL+x}" ]; then
21159    # The variable is not set by user, try to locate tool using the code snippet
21160    for ac_prog in otool
21161do
21162  # Extract the first word of "$ac_prog", so it can be a program name with args.
21163set dummy $ac_prog; ac_word=$2
21164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21165$as_echo_n "checking for $ac_word... " >&6; }
21166if ${ac_cv_path_OTOOL+:} false; then :
21167  $as_echo_n "(cached) " >&6
21168else
21169  case $OTOOL in
21170  [\\/]* | ?:[\\/]*)
21171  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21172  ;;
21173  *)
21174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21175for as_dir in $PATH
21176do
21177  IFS=$as_save_IFS
21178  test -z "$as_dir" && as_dir=.
21179    for ac_exec_ext in '' $ac_executable_extensions; do
21180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21181    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21183    break 2
21184  fi
21185done
21186  done
21187IFS=$as_save_IFS
21188
21189  ;;
21190esac
21191fi
21192OTOOL=$ac_cv_path_OTOOL
21193if test -n "$OTOOL"; then
21194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21195$as_echo "$OTOOL" >&6; }
21196else
21197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21198$as_echo "no" >&6; }
21199fi
21200
21201
21202  test -n "$OTOOL" && break
21203done
21204
21205  else
21206    # The variable is set, but is it from the command line or the environment?
21207
21208    # Try to remove the string !OTOOL! from our list.
21209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21211      # If it failed, the variable was not from the command line. Ignore it,
21212      # but warn the user (except for BASH, which is always set by the calling BASH).
21213      if test "xOTOOL" != xBASH; then
21214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21215$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21216      fi
21217      # Try to locate tool using the code snippet
21218      for ac_prog in otool
21219do
21220  # Extract the first word of "$ac_prog", so it can be a program name with args.
21221set dummy $ac_prog; ac_word=$2
21222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21223$as_echo_n "checking for $ac_word... " >&6; }
21224if ${ac_cv_path_OTOOL+:} false; then :
21225  $as_echo_n "(cached) " >&6
21226else
21227  case $OTOOL in
21228  [\\/]* | ?:[\\/]*)
21229  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21230  ;;
21231  *)
21232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21233for as_dir in $PATH
21234do
21235  IFS=$as_save_IFS
21236  test -z "$as_dir" && as_dir=.
21237    for ac_exec_ext in '' $ac_executable_extensions; do
21238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21239    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21241    break 2
21242  fi
21243done
21244  done
21245IFS=$as_save_IFS
21246
21247  ;;
21248esac
21249fi
21250OTOOL=$ac_cv_path_OTOOL
21251if test -n "$OTOOL"; then
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21253$as_echo "$OTOOL" >&6; }
21254else
21255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21256$as_echo "no" >&6; }
21257fi
21258
21259
21260  test -n "$OTOOL" && break
21261done
21262
21263    else
21264      # If it succeeded, then it was overridden by the user. We will use it
21265      # for the tool.
21266
21267      # First remove it from the list of overridden variables, so we can test
21268      # for unknown variables in the end.
21269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21270
21271      # Check if we try to supply an empty value
21272      if test "x$OTOOL" = x; then
21273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21274$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21276$as_echo_n "checking for OTOOL... " >&6; }
21277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21278$as_echo "disabled" >&6; }
21279      else
21280        # Check if the provided tool contains a complete path.
21281        tool_specified="$OTOOL"
21282        tool_basename="${tool_specified##*/}"
21283        if test "x$tool_basename" = "x$tool_specified"; then
21284          # A command without a complete path is provided, search $PATH.
21285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21286$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21287          # Extract the first word of "$tool_basename", so it can be a program name with args.
21288set dummy $tool_basename; ac_word=$2
21289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21290$as_echo_n "checking for $ac_word... " >&6; }
21291if ${ac_cv_path_OTOOL+:} false; then :
21292  $as_echo_n "(cached) " >&6
21293else
21294  case $OTOOL in
21295  [\\/]* | ?:[\\/]*)
21296  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21297  ;;
21298  *)
21299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21300for as_dir in $PATH
21301do
21302  IFS=$as_save_IFS
21303  test -z "$as_dir" && as_dir=.
21304    for ac_exec_ext in '' $ac_executable_extensions; do
21305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21306    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21308    break 2
21309  fi
21310done
21311  done
21312IFS=$as_save_IFS
21313
21314  ;;
21315esac
21316fi
21317OTOOL=$ac_cv_path_OTOOL
21318if test -n "$OTOOL"; then
21319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21320$as_echo "$OTOOL" >&6; }
21321else
21322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21323$as_echo "no" >&6; }
21324fi
21325
21326
21327          if test "x$OTOOL" = x; then
21328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21329          fi
21330        else
21331          # Otherwise we believe it is a complete path. Use it as it is.
21332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21333$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21335$as_echo_n "checking for OTOOL... " >&6; }
21336          if test ! -x "$tool_specified"; then
21337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21338$as_echo "not found" >&6; }
21339            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21340          fi
21341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21342$as_echo "$tool_specified" >&6; }
21343        fi
21344      fi
21345    fi
21346
21347  fi
21348
21349
21350  if test "x$OTOOL" = "x"; then
21351    OTOOL="true"
21352  fi
21353
21354
21355  # Publish this variable in the help.
21356
21357
21358  if [ -z "${READELF+x}" ]; then
21359    # The variable is not set by user, try to locate tool using the code snippet
21360    for ac_prog in greadelf readelf
21361do
21362  # Extract the first word of "$ac_prog", so it can be a program name with args.
21363set dummy $ac_prog; ac_word=$2
21364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21365$as_echo_n "checking for $ac_word... " >&6; }
21366if ${ac_cv_path_READELF+:} false; then :
21367  $as_echo_n "(cached) " >&6
21368else
21369  case $READELF in
21370  [\\/]* | ?:[\\/]*)
21371  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21372  ;;
21373  *)
21374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21375for as_dir in $PATH
21376do
21377  IFS=$as_save_IFS
21378  test -z "$as_dir" && as_dir=.
21379    for ac_exec_ext in '' $ac_executable_extensions; do
21380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21381    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21383    break 2
21384  fi
21385done
21386  done
21387IFS=$as_save_IFS
21388
21389  ;;
21390esac
21391fi
21392READELF=$ac_cv_path_READELF
21393if test -n "$READELF"; then
21394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21395$as_echo "$READELF" >&6; }
21396else
21397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21398$as_echo "no" >&6; }
21399fi
21400
21401
21402  test -n "$READELF" && break
21403done
21404
21405  else
21406    # The variable is set, but is it from the command line or the environment?
21407
21408    # Try to remove the string !READELF! from our list.
21409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21411      # If it failed, the variable was not from the command line. Ignore it,
21412      # but warn the user (except for BASH, which is always set by the calling BASH).
21413      if test "xREADELF" != xBASH; then
21414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21415$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21416      fi
21417      # Try to locate tool using the code snippet
21418      for ac_prog in greadelf readelf
21419do
21420  # Extract the first word of "$ac_prog", so it can be a program name with args.
21421set dummy $ac_prog; ac_word=$2
21422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21423$as_echo_n "checking for $ac_word... " >&6; }
21424if ${ac_cv_path_READELF+:} false; then :
21425  $as_echo_n "(cached) " >&6
21426else
21427  case $READELF in
21428  [\\/]* | ?:[\\/]*)
21429  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21430  ;;
21431  *)
21432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21433for as_dir in $PATH
21434do
21435  IFS=$as_save_IFS
21436  test -z "$as_dir" && as_dir=.
21437    for ac_exec_ext in '' $ac_executable_extensions; do
21438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21439    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21441    break 2
21442  fi
21443done
21444  done
21445IFS=$as_save_IFS
21446
21447  ;;
21448esac
21449fi
21450READELF=$ac_cv_path_READELF
21451if test -n "$READELF"; then
21452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21453$as_echo "$READELF" >&6; }
21454else
21455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21456$as_echo "no" >&6; }
21457fi
21458
21459
21460  test -n "$READELF" && break
21461done
21462
21463    else
21464      # If it succeeded, then it was overridden by the user. We will use it
21465      # for the tool.
21466
21467      # First remove it from the list of overridden variables, so we can test
21468      # for unknown variables in the end.
21469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21470
21471      # Check if we try to supply an empty value
21472      if test "x$READELF" = x; then
21473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21474$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21476$as_echo_n "checking for READELF... " >&6; }
21477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21478$as_echo "disabled" >&6; }
21479      else
21480        # Check if the provided tool contains a complete path.
21481        tool_specified="$READELF"
21482        tool_basename="${tool_specified##*/}"
21483        if test "x$tool_basename" = "x$tool_specified"; then
21484          # A command without a complete path is provided, search $PATH.
21485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21486$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21487          # Extract the first word of "$tool_basename", so it can be a program name with args.
21488set dummy $tool_basename; ac_word=$2
21489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21490$as_echo_n "checking for $ac_word... " >&6; }
21491if ${ac_cv_path_READELF+:} false; then :
21492  $as_echo_n "(cached) " >&6
21493else
21494  case $READELF in
21495  [\\/]* | ?:[\\/]*)
21496  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21497  ;;
21498  *)
21499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21500for as_dir in $PATH
21501do
21502  IFS=$as_save_IFS
21503  test -z "$as_dir" && as_dir=.
21504    for ac_exec_ext in '' $ac_executable_extensions; do
21505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21506    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21508    break 2
21509  fi
21510done
21511  done
21512IFS=$as_save_IFS
21513
21514  ;;
21515esac
21516fi
21517READELF=$ac_cv_path_READELF
21518if test -n "$READELF"; then
21519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21520$as_echo "$READELF" >&6; }
21521else
21522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21523$as_echo "no" >&6; }
21524fi
21525
21526
21527          if test "x$READELF" = x; then
21528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21529          fi
21530        else
21531          # Otherwise we believe it is a complete path. Use it as it is.
21532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21533$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21535$as_echo_n "checking for READELF... " >&6; }
21536          if test ! -x "$tool_specified"; then
21537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21538$as_echo "not found" >&6; }
21539            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21540          fi
21541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21542$as_echo "$tool_specified" >&6; }
21543        fi
21544      fi
21545    fi
21546
21547  fi
21548
21549
21550
21551
21552  # Publish this variable in the help.
21553
21554
21555  if [ -z "${HG+x}" ]; then
21556    # The variable is not set by user, try to locate tool using the code snippet
21557    for ac_prog in hg
21558do
21559  # Extract the first word of "$ac_prog", so it can be a program name with args.
21560set dummy $ac_prog; ac_word=$2
21561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21562$as_echo_n "checking for $ac_word... " >&6; }
21563if ${ac_cv_path_HG+:} false; then :
21564  $as_echo_n "(cached) " >&6
21565else
21566  case $HG in
21567  [\\/]* | ?:[\\/]*)
21568  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21569  ;;
21570  *)
21571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21572for as_dir in $PATH
21573do
21574  IFS=$as_save_IFS
21575  test -z "$as_dir" && as_dir=.
21576    for ac_exec_ext in '' $ac_executable_extensions; do
21577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21578    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21580    break 2
21581  fi
21582done
21583  done
21584IFS=$as_save_IFS
21585
21586  ;;
21587esac
21588fi
21589HG=$ac_cv_path_HG
21590if test -n "$HG"; then
21591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21592$as_echo "$HG" >&6; }
21593else
21594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21595$as_echo "no" >&6; }
21596fi
21597
21598
21599  test -n "$HG" && break
21600done
21601
21602  else
21603    # The variable is set, but is it from the command line or the environment?
21604
21605    # Try to remove the string !HG! from our list.
21606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21608      # If it failed, the variable was not from the command line. Ignore it,
21609      # but warn the user (except for BASH, which is always set by the calling BASH).
21610      if test "xHG" != xBASH; then
21611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21612$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21613      fi
21614      # Try to locate tool using the code snippet
21615      for ac_prog in hg
21616do
21617  # Extract the first word of "$ac_prog", so it can be a program name with args.
21618set dummy $ac_prog; ac_word=$2
21619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21620$as_echo_n "checking for $ac_word... " >&6; }
21621if ${ac_cv_path_HG+:} false; then :
21622  $as_echo_n "(cached) " >&6
21623else
21624  case $HG in
21625  [\\/]* | ?:[\\/]*)
21626  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21627  ;;
21628  *)
21629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21630for as_dir in $PATH
21631do
21632  IFS=$as_save_IFS
21633  test -z "$as_dir" && as_dir=.
21634    for ac_exec_ext in '' $ac_executable_extensions; do
21635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21636    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21638    break 2
21639  fi
21640done
21641  done
21642IFS=$as_save_IFS
21643
21644  ;;
21645esac
21646fi
21647HG=$ac_cv_path_HG
21648if test -n "$HG"; then
21649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21650$as_echo "$HG" >&6; }
21651else
21652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21653$as_echo "no" >&6; }
21654fi
21655
21656
21657  test -n "$HG" && break
21658done
21659
21660    else
21661      # If it succeeded, then it was overridden by the user. We will use it
21662      # for the tool.
21663
21664      # First remove it from the list of overridden variables, so we can test
21665      # for unknown variables in the end.
21666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21667
21668      # Check if we try to supply an empty value
21669      if test "x$HG" = x; then
21670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21671$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21673$as_echo_n "checking for HG... " >&6; }
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21675$as_echo "disabled" >&6; }
21676      else
21677        # Check if the provided tool contains a complete path.
21678        tool_specified="$HG"
21679        tool_basename="${tool_specified##*/}"
21680        if test "x$tool_basename" = "x$tool_specified"; then
21681          # A command without a complete path is provided, search $PATH.
21682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21683$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21684          # Extract the first word of "$tool_basename", so it can be a program name with args.
21685set dummy $tool_basename; ac_word=$2
21686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21687$as_echo_n "checking for $ac_word... " >&6; }
21688if ${ac_cv_path_HG+:} false; then :
21689  $as_echo_n "(cached) " >&6
21690else
21691  case $HG in
21692  [\\/]* | ?:[\\/]*)
21693  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21694  ;;
21695  *)
21696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21697for as_dir in $PATH
21698do
21699  IFS=$as_save_IFS
21700  test -z "$as_dir" && as_dir=.
21701    for ac_exec_ext in '' $ac_executable_extensions; do
21702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21703    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21705    break 2
21706  fi
21707done
21708  done
21709IFS=$as_save_IFS
21710
21711  ;;
21712esac
21713fi
21714HG=$ac_cv_path_HG
21715if test -n "$HG"; then
21716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21717$as_echo "$HG" >&6; }
21718else
21719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21720$as_echo "no" >&6; }
21721fi
21722
21723
21724          if test "x$HG" = x; then
21725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21726          fi
21727        else
21728          # Otherwise we believe it is a complete path. Use it as it is.
21729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21730$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21732$as_echo_n "checking for HG... " >&6; }
21733          if test ! -x "$tool_specified"; then
21734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21735$as_echo "not found" >&6; }
21736            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21737          fi
21738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21739$as_echo "$tool_specified" >&6; }
21740        fi
21741      fi
21742    fi
21743
21744  fi
21745
21746
21747
21748
21749  # Publish this variable in the help.
21750
21751
21752  if [ -z "${STAT+x}" ]; then
21753    # The variable is not set by user, try to locate tool using the code snippet
21754    for ac_prog in stat
21755do
21756  # Extract the first word of "$ac_prog", so it can be a program name with args.
21757set dummy $ac_prog; ac_word=$2
21758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21759$as_echo_n "checking for $ac_word... " >&6; }
21760if ${ac_cv_path_STAT+:} false; then :
21761  $as_echo_n "(cached) " >&6
21762else
21763  case $STAT in
21764  [\\/]* | ?:[\\/]*)
21765  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21766  ;;
21767  *)
21768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21769for as_dir in $PATH
21770do
21771  IFS=$as_save_IFS
21772  test -z "$as_dir" && as_dir=.
21773    for ac_exec_ext in '' $ac_executable_extensions; do
21774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21775    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21777    break 2
21778  fi
21779done
21780  done
21781IFS=$as_save_IFS
21782
21783  ;;
21784esac
21785fi
21786STAT=$ac_cv_path_STAT
21787if test -n "$STAT"; then
21788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21789$as_echo "$STAT" >&6; }
21790else
21791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21792$as_echo "no" >&6; }
21793fi
21794
21795
21796  test -n "$STAT" && break
21797done
21798
21799  else
21800    # The variable is set, but is it from the command line or the environment?
21801
21802    # Try to remove the string !STAT! from our list.
21803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21805      # If it failed, the variable was not from the command line. Ignore it,
21806      # but warn the user (except for BASH, which is always set by the calling BASH).
21807      if test "xSTAT" != xBASH; then
21808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21809$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21810      fi
21811      # Try to locate tool using the code snippet
21812      for ac_prog in stat
21813do
21814  # Extract the first word of "$ac_prog", so it can be a program name with args.
21815set dummy $ac_prog; ac_word=$2
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21817$as_echo_n "checking for $ac_word... " >&6; }
21818if ${ac_cv_path_STAT+:} false; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  case $STAT in
21822  [\\/]* | ?:[\\/]*)
21823  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21824  ;;
21825  *)
21826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21827for as_dir in $PATH
21828do
21829  IFS=$as_save_IFS
21830  test -z "$as_dir" && as_dir=.
21831    for ac_exec_ext in '' $ac_executable_extensions; do
21832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21833    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21835    break 2
21836  fi
21837done
21838  done
21839IFS=$as_save_IFS
21840
21841  ;;
21842esac
21843fi
21844STAT=$ac_cv_path_STAT
21845if test -n "$STAT"; then
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21847$as_echo "$STAT" >&6; }
21848else
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21850$as_echo "no" >&6; }
21851fi
21852
21853
21854  test -n "$STAT" && break
21855done
21856
21857    else
21858      # If it succeeded, then it was overridden by the user. We will use it
21859      # for the tool.
21860
21861      # First remove it from the list of overridden variables, so we can test
21862      # for unknown variables in the end.
21863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21864
21865      # Check if we try to supply an empty value
21866      if test "x$STAT" = x; then
21867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21868$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21870$as_echo_n "checking for STAT... " >&6; }
21871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21872$as_echo "disabled" >&6; }
21873      else
21874        # Check if the provided tool contains a complete path.
21875        tool_specified="$STAT"
21876        tool_basename="${tool_specified##*/}"
21877        if test "x$tool_basename" = "x$tool_specified"; then
21878          # A command without a complete path is provided, search $PATH.
21879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21880$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21881          # Extract the first word of "$tool_basename", so it can be a program name with args.
21882set dummy $tool_basename; ac_word=$2
21883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21884$as_echo_n "checking for $ac_word... " >&6; }
21885if ${ac_cv_path_STAT+:} false; then :
21886  $as_echo_n "(cached) " >&6
21887else
21888  case $STAT in
21889  [\\/]* | ?:[\\/]*)
21890  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21891  ;;
21892  *)
21893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21894for as_dir in $PATH
21895do
21896  IFS=$as_save_IFS
21897  test -z "$as_dir" && as_dir=.
21898    for ac_exec_ext in '' $ac_executable_extensions; do
21899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21900    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21902    break 2
21903  fi
21904done
21905  done
21906IFS=$as_save_IFS
21907
21908  ;;
21909esac
21910fi
21911STAT=$ac_cv_path_STAT
21912if test -n "$STAT"; then
21913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21914$as_echo "$STAT" >&6; }
21915else
21916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21917$as_echo "no" >&6; }
21918fi
21919
21920
21921          if test "x$STAT" = x; then
21922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21923          fi
21924        else
21925          # Otherwise we believe it is a complete path. Use it as it is.
21926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21927$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21929$as_echo_n "checking for STAT... " >&6; }
21930          if test ! -x "$tool_specified"; then
21931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21932$as_echo "not found" >&6; }
21933            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21934          fi
21935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21936$as_echo "$tool_specified" >&6; }
21937        fi
21938      fi
21939    fi
21940
21941  fi
21942
21943
21944
21945
21946  # Publish this variable in the help.
21947
21948
21949  if [ -z "${TIME+x}" ]; then
21950    # The variable is not set by user, try to locate tool using the code snippet
21951    for ac_prog in time
21952do
21953  # Extract the first word of "$ac_prog", so it can be a program name with args.
21954set dummy $ac_prog; ac_word=$2
21955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21956$as_echo_n "checking for $ac_word... " >&6; }
21957if ${ac_cv_path_TIME+:} false; then :
21958  $as_echo_n "(cached) " >&6
21959else
21960  case $TIME in
21961  [\\/]* | ?:[\\/]*)
21962  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21963  ;;
21964  *)
21965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21966for as_dir in $PATH
21967do
21968  IFS=$as_save_IFS
21969  test -z "$as_dir" && as_dir=.
21970    for ac_exec_ext in '' $ac_executable_extensions; do
21971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21972    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21974    break 2
21975  fi
21976done
21977  done
21978IFS=$as_save_IFS
21979
21980  ;;
21981esac
21982fi
21983TIME=$ac_cv_path_TIME
21984if test -n "$TIME"; then
21985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21986$as_echo "$TIME" >&6; }
21987else
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989$as_echo "no" >&6; }
21990fi
21991
21992
21993  test -n "$TIME" && break
21994done
21995
21996  else
21997    # The variable is set, but is it from the command line or the environment?
21998
21999    # Try to remove the string !TIME! from our list.
22000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22002      # If it failed, the variable was not from the command line. Ignore it,
22003      # but warn the user (except for BASH, which is always set by the calling BASH).
22004      if test "xTIME" != xBASH; then
22005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22006$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22007      fi
22008      # Try to locate tool using the code snippet
22009      for ac_prog in time
22010do
22011  # Extract the first word of "$ac_prog", so it can be a program name with args.
22012set dummy $ac_prog; ac_word=$2
22013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22014$as_echo_n "checking for $ac_word... " >&6; }
22015if ${ac_cv_path_TIME+:} false; then :
22016  $as_echo_n "(cached) " >&6
22017else
22018  case $TIME in
22019  [\\/]* | ?:[\\/]*)
22020  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22021  ;;
22022  *)
22023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22024for as_dir in $PATH
22025do
22026  IFS=$as_save_IFS
22027  test -z "$as_dir" && as_dir=.
22028    for ac_exec_ext in '' $ac_executable_extensions; do
22029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22030    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22032    break 2
22033  fi
22034done
22035  done
22036IFS=$as_save_IFS
22037
22038  ;;
22039esac
22040fi
22041TIME=$ac_cv_path_TIME
22042if test -n "$TIME"; then
22043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22044$as_echo "$TIME" >&6; }
22045else
22046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22047$as_echo "no" >&6; }
22048fi
22049
22050
22051  test -n "$TIME" && break
22052done
22053
22054    else
22055      # If it succeeded, then it was overridden by the user. We will use it
22056      # for the tool.
22057
22058      # First remove it from the list of overridden variables, so we can test
22059      # for unknown variables in the end.
22060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22061
22062      # Check if we try to supply an empty value
22063      if test "x$TIME" = x; then
22064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22065$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22067$as_echo_n "checking for TIME... " >&6; }
22068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22069$as_echo "disabled" >&6; }
22070      else
22071        # Check if the provided tool contains a complete path.
22072        tool_specified="$TIME"
22073        tool_basename="${tool_specified##*/}"
22074        if test "x$tool_basename" = "x$tool_specified"; then
22075          # A command without a complete path is provided, search $PATH.
22076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22077$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22078          # Extract the first word of "$tool_basename", so it can be a program name with args.
22079set dummy $tool_basename; ac_word=$2
22080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22081$as_echo_n "checking for $ac_word... " >&6; }
22082if ${ac_cv_path_TIME+:} false; then :
22083  $as_echo_n "(cached) " >&6
22084else
22085  case $TIME in
22086  [\\/]* | ?:[\\/]*)
22087  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22088  ;;
22089  *)
22090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22091for as_dir in $PATH
22092do
22093  IFS=$as_save_IFS
22094  test -z "$as_dir" && as_dir=.
22095    for ac_exec_ext in '' $ac_executable_extensions; do
22096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22097    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22099    break 2
22100  fi
22101done
22102  done
22103IFS=$as_save_IFS
22104
22105  ;;
22106esac
22107fi
22108TIME=$ac_cv_path_TIME
22109if test -n "$TIME"; then
22110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22111$as_echo "$TIME" >&6; }
22112else
22113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22114$as_echo "no" >&6; }
22115fi
22116
22117
22118          if test "x$TIME" = x; then
22119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22120          fi
22121        else
22122          # Otherwise we believe it is a complete path. Use it as it is.
22123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22124$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22126$as_echo_n "checking for TIME... " >&6; }
22127          if test ! -x "$tool_specified"; then
22128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22129$as_echo "not found" >&6; }
22130            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22131          fi
22132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22133$as_echo "$tool_specified" >&6; }
22134        fi
22135      fi
22136    fi
22137
22138  fi
22139
22140
22141
22142
22143  # Publish this variable in the help.
22144
22145
22146  if [ -z "${PATCH+x}" ]; then
22147    # The variable is not set by user, try to locate tool using the code snippet
22148    for ac_prog in gpatch patch
22149do
22150  # Extract the first word of "$ac_prog", so it can be a program name with args.
22151set dummy $ac_prog; ac_word=$2
22152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22153$as_echo_n "checking for $ac_word... " >&6; }
22154if ${ac_cv_path_PATCH+:} false; then :
22155  $as_echo_n "(cached) " >&6
22156else
22157  case $PATCH in
22158  [\\/]* | ?:[\\/]*)
22159  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22160  ;;
22161  *)
22162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22163for as_dir in $PATH
22164do
22165  IFS=$as_save_IFS
22166  test -z "$as_dir" && as_dir=.
22167    for ac_exec_ext in '' $ac_executable_extensions; do
22168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22169    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22171    break 2
22172  fi
22173done
22174  done
22175IFS=$as_save_IFS
22176
22177  ;;
22178esac
22179fi
22180PATCH=$ac_cv_path_PATCH
22181if test -n "$PATCH"; then
22182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22183$as_echo "$PATCH" >&6; }
22184else
22185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22186$as_echo "no" >&6; }
22187fi
22188
22189
22190  test -n "$PATCH" && break
22191done
22192
22193  else
22194    # The variable is set, but is it from the command line or the environment?
22195
22196    # Try to remove the string !PATCH! from our list.
22197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22199      # If it failed, the variable was not from the command line. Ignore it,
22200      # but warn the user (except for BASH, which is always set by the calling BASH).
22201      if test "xPATCH" != xBASH; then
22202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22203$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22204      fi
22205      # Try to locate tool using the code snippet
22206      for ac_prog in gpatch patch
22207do
22208  # Extract the first word of "$ac_prog", so it can be a program name with args.
22209set dummy $ac_prog; ac_word=$2
22210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22211$as_echo_n "checking for $ac_word... " >&6; }
22212if ${ac_cv_path_PATCH+:} false; then :
22213  $as_echo_n "(cached) " >&6
22214else
22215  case $PATCH in
22216  [\\/]* | ?:[\\/]*)
22217  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22218  ;;
22219  *)
22220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22221for as_dir in $PATH
22222do
22223  IFS=$as_save_IFS
22224  test -z "$as_dir" && as_dir=.
22225    for ac_exec_ext in '' $ac_executable_extensions; do
22226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22227    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22229    break 2
22230  fi
22231done
22232  done
22233IFS=$as_save_IFS
22234
22235  ;;
22236esac
22237fi
22238PATCH=$ac_cv_path_PATCH
22239if test -n "$PATCH"; then
22240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22241$as_echo "$PATCH" >&6; }
22242else
22243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22244$as_echo "no" >&6; }
22245fi
22246
22247
22248  test -n "$PATCH" && break
22249done
22250
22251    else
22252      # If it succeeded, then it was overridden by the user. We will use it
22253      # for the tool.
22254
22255      # First remove it from the list of overridden variables, so we can test
22256      # for unknown variables in the end.
22257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22258
22259      # Check if we try to supply an empty value
22260      if test "x$PATCH" = x; then
22261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22262$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22264$as_echo_n "checking for PATCH... " >&6; }
22265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22266$as_echo "disabled" >&6; }
22267      else
22268        # Check if the provided tool contains a complete path.
22269        tool_specified="$PATCH"
22270        tool_basename="${tool_specified##*/}"
22271        if test "x$tool_basename" = "x$tool_specified"; then
22272          # A command without a complete path is provided, search $PATH.
22273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22274$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22275          # Extract the first word of "$tool_basename", so it can be a program name with args.
22276set dummy $tool_basename; ac_word=$2
22277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22278$as_echo_n "checking for $ac_word... " >&6; }
22279if ${ac_cv_path_PATCH+:} false; then :
22280  $as_echo_n "(cached) " >&6
22281else
22282  case $PATCH in
22283  [\\/]* | ?:[\\/]*)
22284  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22285  ;;
22286  *)
22287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22288for as_dir in $PATH
22289do
22290  IFS=$as_save_IFS
22291  test -z "$as_dir" && as_dir=.
22292    for ac_exec_ext in '' $ac_executable_extensions; do
22293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22294    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22296    break 2
22297  fi
22298done
22299  done
22300IFS=$as_save_IFS
22301
22302  ;;
22303esac
22304fi
22305PATCH=$ac_cv_path_PATCH
22306if test -n "$PATCH"; then
22307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22308$as_echo "$PATCH" >&6; }
22309else
22310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22311$as_echo "no" >&6; }
22312fi
22313
22314
22315          if test "x$PATCH" = x; then
22316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22317          fi
22318        else
22319          # Otherwise we believe it is a complete path. Use it as it is.
22320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22321$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22323$as_echo_n "checking for PATCH... " >&6; }
22324          if test ! -x "$tool_specified"; then
22325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22326$as_echo "not found" >&6; }
22327            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22328          fi
22329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22330$as_echo "$tool_specified" >&6; }
22331        fi
22332      fi
22333    fi
22334
22335  fi
22336
22337
22338  # Check if it's GNU time
22339  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22340  if test "x$IS_GNU_TIME" != x; then
22341    IS_GNU_TIME=yes
22342  else
22343    IS_GNU_TIME=no
22344  fi
22345
22346
22347  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22348
22349
22350
22351  # Publish this variable in the help.
22352
22353
22354  if [ -z "${DSYMUTIL+x}" ]; then
22355    # The variable is not set by user, try to locate tool using the code snippet
22356    for ac_prog in dsymutil
22357do
22358  # Extract the first word of "$ac_prog", so it can be a program name with args.
22359set dummy $ac_prog; ac_word=$2
22360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22361$as_echo_n "checking for $ac_word... " >&6; }
22362if ${ac_cv_path_DSYMUTIL+:} false; then :
22363  $as_echo_n "(cached) " >&6
22364else
22365  case $DSYMUTIL in
22366  [\\/]* | ?:[\\/]*)
22367  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22368  ;;
22369  *)
22370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22371for as_dir in $PATH
22372do
22373  IFS=$as_save_IFS
22374  test -z "$as_dir" && as_dir=.
22375    for ac_exec_ext in '' $ac_executable_extensions; do
22376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22377    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22379    break 2
22380  fi
22381done
22382  done
22383IFS=$as_save_IFS
22384
22385  ;;
22386esac
22387fi
22388DSYMUTIL=$ac_cv_path_DSYMUTIL
22389if test -n "$DSYMUTIL"; then
22390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22391$as_echo "$DSYMUTIL" >&6; }
22392else
22393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22394$as_echo "no" >&6; }
22395fi
22396
22397
22398  test -n "$DSYMUTIL" && break
22399done
22400
22401  else
22402    # The variable is set, but is it from the command line or the environment?
22403
22404    # Try to remove the string !DSYMUTIL! from our list.
22405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22407      # If it failed, the variable was not from the command line. Ignore it,
22408      # but warn the user (except for BASH, which is always set by the calling BASH).
22409      if test "xDSYMUTIL" != xBASH; then
22410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22411$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22412      fi
22413      # Try to locate tool using the code snippet
22414      for ac_prog in dsymutil
22415do
22416  # Extract the first word of "$ac_prog", so it can be a program name with args.
22417set dummy $ac_prog; ac_word=$2
22418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22419$as_echo_n "checking for $ac_word... " >&6; }
22420if ${ac_cv_path_DSYMUTIL+:} false; then :
22421  $as_echo_n "(cached) " >&6
22422else
22423  case $DSYMUTIL in
22424  [\\/]* | ?:[\\/]*)
22425  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22426  ;;
22427  *)
22428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22429for as_dir in $PATH
22430do
22431  IFS=$as_save_IFS
22432  test -z "$as_dir" && as_dir=.
22433    for ac_exec_ext in '' $ac_executable_extensions; do
22434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22435    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22437    break 2
22438  fi
22439done
22440  done
22441IFS=$as_save_IFS
22442
22443  ;;
22444esac
22445fi
22446DSYMUTIL=$ac_cv_path_DSYMUTIL
22447if test -n "$DSYMUTIL"; then
22448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22449$as_echo "$DSYMUTIL" >&6; }
22450else
22451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22452$as_echo "no" >&6; }
22453fi
22454
22455
22456  test -n "$DSYMUTIL" && break
22457done
22458
22459    else
22460      # If it succeeded, then it was overridden by the user. We will use it
22461      # for the tool.
22462
22463      # First remove it from the list of overridden variables, so we can test
22464      # for unknown variables in the end.
22465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22466
22467      # Check if we try to supply an empty value
22468      if test "x$DSYMUTIL" = x; then
22469        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22470$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22471        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22472$as_echo_n "checking for DSYMUTIL... " >&6; }
22473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22474$as_echo "disabled" >&6; }
22475      else
22476        # Check if the provided tool contains a complete path.
22477        tool_specified="$DSYMUTIL"
22478        tool_basename="${tool_specified##*/}"
22479        if test "x$tool_basename" = "x$tool_specified"; then
22480          # A command without a complete path is provided, search $PATH.
22481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22482$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22483          # Extract the first word of "$tool_basename", so it can be a program name with args.
22484set dummy $tool_basename; ac_word=$2
22485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22486$as_echo_n "checking for $ac_word... " >&6; }
22487if ${ac_cv_path_DSYMUTIL+:} false; then :
22488  $as_echo_n "(cached) " >&6
22489else
22490  case $DSYMUTIL in
22491  [\\/]* | ?:[\\/]*)
22492  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22493  ;;
22494  *)
22495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22496for as_dir in $PATH
22497do
22498  IFS=$as_save_IFS
22499  test -z "$as_dir" && as_dir=.
22500    for ac_exec_ext in '' $ac_executable_extensions; do
22501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22502    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22504    break 2
22505  fi
22506done
22507  done
22508IFS=$as_save_IFS
22509
22510  ;;
22511esac
22512fi
22513DSYMUTIL=$ac_cv_path_DSYMUTIL
22514if test -n "$DSYMUTIL"; then
22515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22516$as_echo "$DSYMUTIL" >&6; }
22517else
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22519$as_echo "no" >&6; }
22520fi
22521
22522
22523          if test "x$DSYMUTIL" = x; then
22524            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22525          fi
22526        else
22527          # Otherwise we believe it is a complete path. Use it as it is.
22528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22529$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22530          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22531$as_echo_n "checking for DSYMUTIL... " >&6; }
22532          if test ! -x "$tool_specified"; then
22533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22534$as_echo "not found" >&6; }
22535            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22536          fi
22537          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22538$as_echo "$tool_specified" >&6; }
22539        fi
22540      fi
22541    fi
22542
22543  fi
22544
22545
22546
22547  if test "x$DSYMUTIL" = x; then
22548    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22549  fi
22550
22551
22552
22553
22554
22555  # Publish this variable in the help.
22556
22557
22558  if [ -z "${XATTR+x}" ]; then
22559    # The variable is not set by user, try to locate tool using the code snippet
22560    for ac_prog in xattr
22561do
22562  # Extract the first word of "$ac_prog", so it can be a program name with args.
22563set dummy $ac_prog; ac_word=$2
22564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22565$as_echo_n "checking for $ac_word... " >&6; }
22566if ${ac_cv_path_XATTR+:} false; then :
22567  $as_echo_n "(cached) " >&6
22568else
22569  case $XATTR in
22570  [\\/]* | ?:[\\/]*)
22571  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22572  ;;
22573  *)
22574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22575for as_dir in $PATH
22576do
22577  IFS=$as_save_IFS
22578  test -z "$as_dir" && as_dir=.
22579    for ac_exec_ext in '' $ac_executable_extensions; do
22580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22581    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22583    break 2
22584  fi
22585done
22586  done
22587IFS=$as_save_IFS
22588
22589  ;;
22590esac
22591fi
22592XATTR=$ac_cv_path_XATTR
22593if test -n "$XATTR"; then
22594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22595$as_echo "$XATTR" >&6; }
22596else
22597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22598$as_echo "no" >&6; }
22599fi
22600
22601
22602  test -n "$XATTR" && break
22603done
22604
22605  else
22606    # The variable is set, but is it from the command line or the environment?
22607
22608    # Try to remove the string !XATTR! from our list.
22609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22611      # If it failed, the variable was not from the command line. Ignore it,
22612      # but warn the user (except for BASH, which is always set by the calling BASH).
22613      if test "xXATTR" != xBASH; then
22614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22615$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22616      fi
22617      # Try to locate tool using the code snippet
22618      for ac_prog in xattr
22619do
22620  # Extract the first word of "$ac_prog", so it can be a program name with args.
22621set dummy $ac_prog; ac_word=$2
22622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22623$as_echo_n "checking for $ac_word... " >&6; }
22624if ${ac_cv_path_XATTR+:} false; then :
22625  $as_echo_n "(cached) " >&6
22626else
22627  case $XATTR in
22628  [\\/]* | ?:[\\/]*)
22629  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22630  ;;
22631  *)
22632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22633for as_dir in $PATH
22634do
22635  IFS=$as_save_IFS
22636  test -z "$as_dir" && as_dir=.
22637    for ac_exec_ext in '' $ac_executable_extensions; do
22638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22639    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22641    break 2
22642  fi
22643done
22644  done
22645IFS=$as_save_IFS
22646
22647  ;;
22648esac
22649fi
22650XATTR=$ac_cv_path_XATTR
22651if test -n "$XATTR"; then
22652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22653$as_echo "$XATTR" >&6; }
22654else
22655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22656$as_echo "no" >&6; }
22657fi
22658
22659
22660  test -n "$XATTR" && break
22661done
22662
22663    else
22664      # If it succeeded, then it was overridden by the user. We will use it
22665      # for the tool.
22666
22667      # First remove it from the list of overridden variables, so we can test
22668      # for unknown variables in the end.
22669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22670
22671      # Check if we try to supply an empty value
22672      if test "x$XATTR" = x; then
22673        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22674$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22676$as_echo_n "checking for XATTR... " >&6; }
22677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22678$as_echo "disabled" >&6; }
22679      else
22680        # Check if the provided tool contains a complete path.
22681        tool_specified="$XATTR"
22682        tool_basename="${tool_specified##*/}"
22683        if test "x$tool_basename" = "x$tool_specified"; then
22684          # A command without a complete path is provided, search $PATH.
22685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22686$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22687          # Extract the first word of "$tool_basename", so it can be a program name with args.
22688set dummy $tool_basename; ac_word=$2
22689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22690$as_echo_n "checking for $ac_word... " >&6; }
22691if ${ac_cv_path_XATTR+:} false; then :
22692  $as_echo_n "(cached) " >&6
22693else
22694  case $XATTR in
22695  [\\/]* | ?:[\\/]*)
22696  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22697  ;;
22698  *)
22699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22700for as_dir in $PATH
22701do
22702  IFS=$as_save_IFS
22703  test -z "$as_dir" && as_dir=.
22704    for ac_exec_ext in '' $ac_executable_extensions; do
22705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22706    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22708    break 2
22709  fi
22710done
22711  done
22712IFS=$as_save_IFS
22713
22714  ;;
22715esac
22716fi
22717XATTR=$ac_cv_path_XATTR
22718if test -n "$XATTR"; then
22719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22720$as_echo "$XATTR" >&6; }
22721else
22722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22723$as_echo "no" >&6; }
22724fi
22725
22726
22727          if test "x$XATTR" = x; then
22728            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22729          fi
22730        else
22731          # Otherwise we believe it is a complete path. Use it as it is.
22732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22733$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22734          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22735$as_echo_n "checking for XATTR... " >&6; }
22736          if test ! -x "$tool_specified"; then
22737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22738$as_echo "not found" >&6; }
22739            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22740          fi
22741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22742$as_echo "$tool_specified" >&6; }
22743        fi
22744      fi
22745    fi
22746
22747  fi
22748
22749
22750
22751  if test "x$XATTR" = x; then
22752    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22753  fi
22754
22755
22756
22757
22758  # Publish this variable in the help.
22759
22760
22761  if [ -z "${CODESIGN+x}" ]; then
22762    # The variable is not set by user, try to locate tool using the code snippet
22763    for ac_prog in codesign
22764do
22765  # Extract the first word of "$ac_prog", so it can be a program name with args.
22766set dummy $ac_prog; ac_word=$2
22767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22768$as_echo_n "checking for $ac_word... " >&6; }
22769if ${ac_cv_path_CODESIGN+:} false; then :
22770  $as_echo_n "(cached) " >&6
22771else
22772  case $CODESIGN in
22773  [\\/]* | ?:[\\/]*)
22774  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22775  ;;
22776  *)
22777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22778for as_dir in $PATH
22779do
22780  IFS=$as_save_IFS
22781  test -z "$as_dir" && as_dir=.
22782    for ac_exec_ext in '' $ac_executable_extensions; do
22783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22784    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22786    break 2
22787  fi
22788done
22789  done
22790IFS=$as_save_IFS
22791
22792  ;;
22793esac
22794fi
22795CODESIGN=$ac_cv_path_CODESIGN
22796if test -n "$CODESIGN"; then
22797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22798$as_echo "$CODESIGN" >&6; }
22799else
22800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22801$as_echo "no" >&6; }
22802fi
22803
22804
22805  test -n "$CODESIGN" && break
22806done
22807
22808  else
22809    # The variable is set, but is it from the command line or the environment?
22810
22811    # Try to remove the string !CODESIGN! from our list.
22812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22814      # If it failed, the variable was not from the command line. Ignore it,
22815      # but warn the user (except for BASH, which is always set by the calling BASH).
22816      if test "xCODESIGN" != xBASH; then
22817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22818$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22819      fi
22820      # Try to locate tool using the code snippet
22821      for ac_prog in codesign
22822do
22823  # Extract the first word of "$ac_prog", so it can be a program name with args.
22824set dummy $ac_prog; ac_word=$2
22825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22826$as_echo_n "checking for $ac_word... " >&6; }
22827if ${ac_cv_path_CODESIGN+:} false; then :
22828  $as_echo_n "(cached) " >&6
22829else
22830  case $CODESIGN in
22831  [\\/]* | ?:[\\/]*)
22832  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22833  ;;
22834  *)
22835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22836for as_dir in $PATH
22837do
22838  IFS=$as_save_IFS
22839  test -z "$as_dir" && as_dir=.
22840    for ac_exec_ext in '' $ac_executable_extensions; do
22841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22842    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22844    break 2
22845  fi
22846done
22847  done
22848IFS=$as_save_IFS
22849
22850  ;;
22851esac
22852fi
22853CODESIGN=$ac_cv_path_CODESIGN
22854if test -n "$CODESIGN"; then
22855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22856$as_echo "$CODESIGN" >&6; }
22857else
22858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22859$as_echo "no" >&6; }
22860fi
22861
22862
22863  test -n "$CODESIGN" && break
22864done
22865
22866    else
22867      # If it succeeded, then it was overridden by the user. We will use it
22868      # for the tool.
22869
22870      # First remove it from the list of overridden variables, so we can test
22871      # for unknown variables in the end.
22872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22873
22874      # Check if we try to supply an empty value
22875      if test "x$CODESIGN" = x; then
22876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22877$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22879$as_echo_n "checking for CODESIGN... " >&6; }
22880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22881$as_echo "disabled" >&6; }
22882      else
22883        # Check if the provided tool contains a complete path.
22884        tool_specified="$CODESIGN"
22885        tool_basename="${tool_specified##*/}"
22886        if test "x$tool_basename" = "x$tool_specified"; then
22887          # A command without a complete path is provided, search $PATH.
22888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22889$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22890          # Extract the first word of "$tool_basename", so it can be a program name with args.
22891set dummy $tool_basename; ac_word=$2
22892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22893$as_echo_n "checking for $ac_word... " >&6; }
22894if ${ac_cv_path_CODESIGN+:} false; then :
22895  $as_echo_n "(cached) " >&6
22896else
22897  case $CODESIGN in
22898  [\\/]* | ?:[\\/]*)
22899  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22900  ;;
22901  *)
22902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22903for as_dir in $PATH
22904do
22905  IFS=$as_save_IFS
22906  test -z "$as_dir" && as_dir=.
22907    for ac_exec_ext in '' $ac_executable_extensions; do
22908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22909    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22911    break 2
22912  fi
22913done
22914  done
22915IFS=$as_save_IFS
22916
22917  ;;
22918esac
22919fi
22920CODESIGN=$ac_cv_path_CODESIGN
22921if test -n "$CODESIGN"; then
22922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22923$as_echo "$CODESIGN" >&6; }
22924else
22925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22926$as_echo "no" >&6; }
22927fi
22928
22929
22930          if test "x$CODESIGN" = x; then
22931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22932          fi
22933        else
22934          # Otherwise we believe it is a complete path. Use it as it is.
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22936$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22938$as_echo_n "checking for CODESIGN... " >&6; }
22939          if test ! -x "$tool_specified"; then
22940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22941$as_echo "not found" >&6; }
22942            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22943          fi
22944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22945$as_echo "$tool_specified" >&6; }
22946        fi
22947      fi
22948    fi
22949
22950  fi
22951
22952
22953    if test "x$CODESIGN" != "x"; then
22954      # Verify that the openjdk_codesign certificate is present
22955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22956$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22957      rm -f codesign-testfile
22958      touch codesign-testfile
22959      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22960      rm -f codesign-testfile
22961      if test "x$CODESIGN" = x; then
22962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22963$as_echo "no" >&6; }
22964      else
22965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22966$as_echo "yes" >&6; }
22967      fi
22968    fi
22969
22970
22971
22972  # Publish this variable in the help.
22973
22974
22975  if [ -z "${SETFILE+x}" ]; then
22976    # The variable is not set by user, try to locate tool using the code snippet
22977    for ac_prog in SetFile
22978do
22979  # Extract the first word of "$ac_prog", so it can be a program name with args.
22980set dummy $ac_prog; ac_word=$2
22981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22982$as_echo_n "checking for $ac_word... " >&6; }
22983if ${ac_cv_path_SETFILE+:} false; then :
22984  $as_echo_n "(cached) " >&6
22985else
22986  case $SETFILE in
22987  [\\/]* | ?:[\\/]*)
22988  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22989  ;;
22990  *)
22991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22992for as_dir in $PATH
22993do
22994  IFS=$as_save_IFS
22995  test -z "$as_dir" && as_dir=.
22996    for ac_exec_ext in '' $ac_executable_extensions; do
22997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22998    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23000    break 2
23001  fi
23002done
23003  done
23004IFS=$as_save_IFS
23005
23006  ;;
23007esac
23008fi
23009SETFILE=$ac_cv_path_SETFILE
23010if test -n "$SETFILE"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23012$as_echo "$SETFILE" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019  test -n "$SETFILE" && break
23020done
23021
23022  else
23023    # The variable is set, but is it from the command line or the environment?
23024
23025    # Try to remove the string !SETFILE! from our list.
23026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23028      # If it failed, the variable was not from the command line. Ignore it,
23029      # but warn the user (except for BASH, which is always set by the calling BASH).
23030      if test "xSETFILE" != xBASH; then
23031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23032$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23033      fi
23034      # Try to locate tool using the code snippet
23035      for ac_prog in SetFile
23036do
23037  # Extract the first word of "$ac_prog", so it can be a program name with args.
23038set dummy $ac_prog; ac_word=$2
23039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23040$as_echo_n "checking for $ac_word... " >&6; }
23041if ${ac_cv_path_SETFILE+:} false; then :
23042  $as_echo_n "(cached) " >&6
23043else
23044  case $SETFILE in
23045  [\\/]* | ?:[\\/]*)
23046  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23047  ;;
23048  *)
23049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23050for as_dir in $PATH
23051do
23052  IFS=$as_save_IFS
23053  test -z "$as_dir" && as_dir=.
23054    for ac_exec_ext in '' $ac_executable_extensions; do
23055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23056    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23058    break 2
23059  fi
23060done
23061  done
23062IFS=$as_save_IFS
23063
23064  ;;
23065esac
23066fi
23067SETFILE=$ac_cv_path_SETFILE
23068if test -n "$SETFILE"; then
23069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23070$as_echo "$SETFILE" >&6; }
23071else
23072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23073$as_echo "no" >&6; }
23074fi
23075
23076
23077  test -n "$SETFILE" && break
23078done
23079
23080    else
23081      # If it succeeded, then it was overridden by the user. We will use it
23082      # for the tool.
23083
23084      # First remove it from the list of overridden variables, so we can test
23085      # for unknown variables in the end.
23086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23087
23088      # Check if we try to supply an empty value
23089      if test "x$SETFILE" = x; then
23090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23091$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23093$as_echo_n "checking for SETFILE... " >&6; }
23094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23095$as_echo "disabled" >&6; }
23096      else
23097        # Check if the provided tool contains a complete path.
23098        tool_specified="$SETFILE"
23099        tool_basename="${tool_specified##*/}"
23100        if test "x$tool_basename" = "x$tool_specified"; then
23101          # A command without a complete path is provided, search $PATH.
23102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23103$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23104          # Extract the first word of "$tool_basename", so it can be a program name with args.
23105set dummy $tool_basename; ac_word=$2
23106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23107$as_echo_n "checking for $ac_word... " >&6; }
23108if ${ac_cv_path_SETFILE+:} false; then :
23109  $as_echo_n "(cached) " >&6
23110else
23111  case $SETFILE in
23112  [\\/]* | ?:[\\/]*)
23113  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23114  ;;
23115  *)
23116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23117for as_dir in $PATH
23118do
23119  IFS=$as_save_IFS
23120  test -z "$as_dir" && as_dir=.
23121    for ac_exec_ext in '' $ac_executable_extensions; do
23122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23123    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23125    break 2
23126  fi
23127done
23128  done
23129IFS=$as_save_IFS
23130
23131  ;;
23132esac
23133fi
23134SETFILE=$ac_cv_path_SETFILE
23135if test -n "$SETFILE"; then
23136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23137$as_echo "$SETFILE" >&6; }
23138else
23139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23140$as_echo "no" >&6; }
23141fi
23142
23143
23144          if test "x$SETFILE" = x; then
23145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23146          fi
23147        else
23148          # Otherwise we believe it is a complete path. Use it as it is.
23149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23150$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23152$as_echo_n "checking for SETFILE... " >&6; }
23153          if test ! -x "$tool_specified"; then
23154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23155$as_echo "not found" >&6; }
23156            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23157          fi
23158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23159$as_echo "$tool_specified" >&6; }
23160        fi
23161      fi
23162    fi
23163
23164  fi
23165
23166
23167
23168  if test "x$SETFILE" = x; then
23169    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23170  fi
23171
23172
23173  fi
23174
23175
23176  # Test if bash supports pipefail.
23177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23178$as_echo_n "checking if bash supports pipefail... " >&6; }
23179  if ${BASH} -c 'set -o pipefail'; then
23180    BASH_ARGS="$BASH_ARGS -o pipefail"
23181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23182$as_echo "yes" >&6; }
23183  else
23184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23185$as_echo "no" >&6; }
23186  fi
23187
23188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23189$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23190  if ${BASH} -e -c 'true'; then
23191    BASH_ARGS="$BASH_ARGS -e"
23192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23193$as_echo "yes" >&6; }
23194  else
23195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23196$as_echo "no" >&6; }
23197  fi
23198
23199
23200
23201
23202# Check if pkg-config is available.
23203
23204
23205if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23206	if test -n "$ac_tool_prefix"; then
23207  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23208set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23210$as_echo_n "checking for $ac_word... " >&6; }
23211if ${ac_cv_path_PKG_CONFIG+:} false; then :
23212  $as_echo_n "(cached) " >&6
23213else
23214  case $PKG_CONFIG in
23215  [\\/]* | ?:[\\/]*)
23216  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23217  ;;
23218  *)
23219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23220for as_dir in $PATH
23221do
23222  IFS=$as_save_IFS
23223  test -z "$as_dir" && as_dir=.
23224    for ac_exec_ext in '' $ac_executable_extensions; do
23225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23226    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23228    break 2
23229  fi
23230done
23231  done
23232IFS=$as_save_IFS
23233
23234  ;;
23235esac
23236fi
23237PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23238if test -n "$PKG_CONFIG"; then
23239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23240$as_echo "$PKG_CONFIG" >&6; }
23241else
23242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23243$as_echo "no" >&6; }
23244fi
23245
23246
23247fi
23248if test -z "$ac_cv_path_PKG_CONFIG"; then
23249  ac_pt_PKG_CONFIG=$PKG_CONFIG
23250  # Extract the first word of "pkg-config", so it can be a program name with args.
23251set dummy pkg-config; ac_word=$2
23252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23253$as_echo_n "checking for $ac_word... " >&6; }
23254if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23255  $as_echo_n "(cached) " >&6
23256else
23257  case $ac_pt_PKG_CONFIG in
23258  [\\/]* | ?:[\\/]*)
23259  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23260  ;;
23261  *)
23262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23263for as_dir in $PATH
23264do
23265  IFS=$as_save_IFS
23266  test -z "$as_dir" && as_dir=.
23267    for ac_exec_ext in '' $ac_executable_extensions; do
23268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23269    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23271    break 2
23272  fi
23273done
23274  done
23275IFS=$as_save_IFS
23276
23277  ;;
23278esac
23279fi
23280ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23281if test -n "$ac_pt_PKG_CONFIG"; then
23282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23283$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23284else
23285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23286$as_echo "no" >&6; }
23287fi
23288
23289  if test "x$ac_pt_PKG_CONFIG" = x; then
23290    PKG_CONFIG=""
23291  else
23292    case $cross_compiling:$ac_tool_warned in
23293yes:)
23294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23296ac_tool_warned=yes ;;
23297esac
23298    PKG_CONFIG=$ac_pt_PKG_CONFIG
23299  fi
23300else
23301  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23302fi
23303
23304fi
23305if test -n "$PKG_CONFIG"; then
23306	_pkg_min_version=0.9.0
23307	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23308$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23309	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23310		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23311$as_echo "yes" >&6; }
23312	else
23313		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23314$as_echo "no" >&6; }
23315		PKG_CONFIG=""
23316	fi
23317
23318fi
23319
23320# After basic tools have been setup, we can check build os specific details.
23321
23322  ###############################################################################
23323
23324  # Note that this is the build platform OS version!
23325
23326  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23327  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23328  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23329  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23330
23331
23332
23333
23334
23335# Misc basic settings
23336
23337
23338# Check whether --with-default-make-target was given.
23339if test "${with_default_make_target+set}" = set; then :
23340  withval=$with_default_make_target;
23341fi
23342
23343  if test "x$with_default_make_target" = "x" \
23344      || test "x$with_default_make_target" = "xyes"; then
23345    DEFAULT_MAKE_TARGET="exploded-image"
23346  elif test "x$with_default_make_target" = "xno"; then
23347    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23348  else
23349    DEFAULT_MAKE_TARGET="$with_default_make_target"
23350  fi
23351
23352
23353
23354
23355###############################################################################
23356#
23357# Determine OpenJDK variants, options and version numbers.
23358#
23359###############################################################################
23360
23361# We need build & target for this.
23362
23363  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23364  # We always build headless support.
23365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23366$as_echo_n "checking headful support... " >&6; }
23367  # Check whether --enable-headful was given.
23368if test "${enable_headful+set}" = set; then :
23369  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23370else
23371  SUPPORT_HEADFUL=yes
23372fi
23373
23374
23375  SUPPORT_HEADLESS=yes
23376  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23377
23378  if test "x$SUPPORT_HEADFUL" = xyes; then
23379    # We are building both headful and headless.
23380    headful_msg="include support for both headful and headless"
23381  fi
23382
23383  if test "x$SUPPORT_HEADFUL" = xno; then
23384    # Thus we are building headless only.
23385    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23386    headful_msg="headless only"
23387  fi
23388
23389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23390$as_echo "$headful_msg" >&6; }
23391
23392
23393
23394
23395
23396  # Choose cacerts source file
23397
23398# Check whether --with-cacerts-file was given.
23399if test "${with_cacerts_file+set}" = set; then :
23400  withval=$with_cacerts_file;
23401fi
23402
23403  if test "x$with_cacerts_file" != x; then
23404    CACERTS_FILE=$with_cacerts_file
23405  fi
23406
23407
23408  # Enable or disable unlimited crypto
23409  # Check whether --enable-unlimited-crypto was given.
23410if test "${enable_unlimited_crypto+set}" = set; then :
23411  enableval=$enable_unlimited_crypto;
23412else
23413  enable_unlimited_crypto=no
23414fi
23415
23416  if test "x$enable_unlimited_crypto" = "xyes"; then
23417    UNLIMITED_CRYPTO=true
23418  else
23419    UNLIMITED_CRYPTO=false
23420  fi
23421
23422
23423  # Should we build the serviceability agent (SA)?
23424  INCLUDE_SA=true
23425  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
23426    INCLUDE_SA=false
23427  fi
23428  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
23429    INCLUDE_SA=false
23430  fi
23431  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23432    INCLUDE_SA=false
23433  fi
23434  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23435    INCLUDE_SA=false
23436  fi
23437
23438
23439  # Compress jars
23440  COMPRESS_JARS=false
23441
23442
23443
23444  # Setup default copyright year. Mostly overridden when building close to a new year.
23445
23446# Check whether --with-copyright-year was given.
23447if test "${with_copyright_year+set}" = set; then :
23448  withval=$with_copyright_year;
23449fi
23450
23451  if test "x$with_copyright_year" = xyes; then
23452    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23453  elif test "x$with_copyright_year" != x; then
23454    COPYRIGHT_YEAR="$with_copyright_year"
23455  else
23456    COPYRIGHT_YEAR=`date +'%Y'`
23457  fi
23458
23459
23460
23461  # Check whether --enable-keep-packaged-modules was given.
23462if test "${enable_keep_packaged_modules+set}" = set; then :
23463  enableval=$enable_keep_packaged_modules;
23464fi
23465
23466
23467  if test "x$enable_keep_packaged_modules" = "xyes"; then
23468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23469$as_echo_n "checking if packaged modules are kept... " >&6; }
23470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23471$as_echo "yes" >&6; }
23472    JLINK_KEEP_PACKAGED_MODULES=true
23473  elif test "x$enable_keep_packaged_modules" = "xno"; then
23474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23475$as_echo_n "checking if packaged modules are kept... " >&6; }
23476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23477$as_echo "no" >&6; }
23478    JLINK_KEEP_PACKAGED_MODULES=false
23479  elif test "x$enable_keep_packaged_modules" = "x"; then
23480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23481$as_echo "yes (default)" >&6; }
23482    JLINK_KEEP_PACKAGED_MODULES=true
23483  else
23484    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23485  fi
23486
23487
23488
23489
23490  # Control wether Hotspot runs Queens test after build.
23491  # Check whether --enable-hotspot-test-in-build was given.
23492if test "${enable_hotspot_test_in_build+set}" = set; then :
23493  enableval=$enable_hotspot_test_in_build;
23494else
23495  enable_hotspot_test_in_build=no
23496fi
23497
23498  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23499    TEST_IN_BUILD=true
23500  else
23501    TEST_IN_BUILD=false
23502  fi
23503
23504
23505
23506  # Warn user that old version arguments are deprecated.
23507
23508
23509# Check whether --with-milestone was given.
23510if test "${with_milestone+set}" = set; then :
23511  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23512$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23513fi
23514
23515
23516
23517
23518# Check whether --with-update-version was given.
23519if test "${with_update_version+set}" = set; then :
23520  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23521$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23522fi
23523
23524
23525
23526
23527# Check whether --with-user-release-suffix was given.
23528if test "${with_user_release_suffix+set}" = set; then :
23529  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
23530$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23531fi
23532
23533
23534
23535
23536# Check whether --with-build-number was given.
23537if test "${with_build_number+set}" = set; then :
23538  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23539$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23540fi
23541
23542
23543
23544  # Source the version numbers file
23545  . $AUTOCONF_DIR/version-numbers
23546
23547  # Some non-version number information is set in that file
23548
23549
23550
23551
23552
23553
23554
23555
23556  # Override version from arguments
23557
23558  # If --with-version-string is set, process it first. It is possible to
23559  # override parts with more specific flags, since these are processed later.
23560
23561# Check whether --with-version-string was given.
23562if test "${with_version_string+set}" = set; then :
23563  withval=$with_version_string;
23564fi
23565
23566  if test "x$with_version_string" = xyes; then
23567    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23568  elif test "x$with_version_string" != x; then
23569    # Additional [] needed to keep m4 from mangling shell constructs.
23570    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23571      VERSION_MAJOR=${BASH_REMATCH[1]}
23572      VERSION_MINOR=${BASH_REMATCH[3]}
23573      VERSION_SECURITY=${BASH_REMATCH[5]}
23574      VERSION_PATCH=${BASH_REMATCH[7]}
23575      VERSION_PRE=${BASH_REMATCH[9]}
23576      version_plus_separator=${BASH_REMATCH[11]}
23577      VERSION_BUILD=${BASH_REMATCH[12]}
23578      VERSION_OPT=${BASH_REMATCH[14]}
23579      # Unspecified numerical fields are interpreted as 0.
23580      if test "x$VERSION_MINOR" = x; then
23581        VERSION_MINOR=0
23582      fi
23583      if test "x$VERSION_SECURITY" = x; then
23584        VERSION_SECURITY=0
23585      fi
23586      if test "x$VERSION_PATCH" = x; then
23587        VERSION_PATCH=0
23588      fi
23589      if test "x$version_plus_separator" != x \
23590          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23591        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23592      fi
23593      # Stop the version part process from setting default values.
23594      # We still allow them to explicitely override though.
23595      NO_DEFAULT_VERSION_PARTS=true
23596    else
23597      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23598    fi
23599  fi
23600
23601
23602# Check whether --with-version-pre was given.
23603if test "${with_version_pre+set}" = set; then :
23604  withval=$with_version_pre; with_version_pre_present=true
23605else
23606  with_version_pre_present=false
23607fi
23608
23609
23610  if test "x$with_version_pre_present" = xtrue; then
23611    if test "x$with_version_pre" = xyes; then
23612      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23613    elif test "x$with_version_pre" = xno; then
23614      # Interpret --without-* as empty string instead of the literal "no"
23615      VERSION_PRE=
23616    else
23617      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23618       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23619      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23621$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23622      fi
23623    fi
23624  else
23625    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23626      # Default is to use "internal" as pre
23627      VERSION_PRE="internal"
23628    fi
23629  fi
23630
23631
23632# Check whether --with-version-opt was given.
23633if test "${with_version_opt+set}" = set; then :
23634  withval=$with_version_opt; with_version_opt_present=true
23635else
23636  with_version_opt_present=false
23637fi
23638
23639
23640  if test "x$with_version_opt_present" = xtrue; then
23641    if test "x$with_version_opt" = xyes; then
23642      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23643    elif test "x$with_version_opt" = xno; then
23644      # Interpret --without-* as empty string instead of the literal "no"
23645      VERSION_OPT=
23646    else
23647      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23648       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23649      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23651$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23652      fi
23653    fi
23654  else
23655    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23656      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23657      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23658      # Outer [ ] to quote m4.
23659       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23660      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23661    fi
23662  fi
23663
23664
23665# Check whether --with-version-build was given.
23666if test "${with_version_build+set}" = set; then :
23667  withval=$with_version_build; with_version_build_present=true
23668else
23669  with_version_build_present=false
23670fi
23671
23672
23673  if test "x$with_version_build_present" = xtrue; then
23674    if test "x$with_version_build" = xyes; then
23675      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23676    elif test "x$with_version_build" = xno; then
23677      # Interpret --without-* as empty string instead of the literal "no"
23678      VERSION_BUILD=
23679    elif test "x$with_version_build" = x; then
23680      VERSION_BUILD=
23681    else
23682
23683  # Additional [] needed to keep m4 from mangling shell constructs.
23684  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23685    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23686  fi
23687  # Extract the version number without leading zeros.
23688  cleaned_value=${BASH_REMATCH[1]}
23689  if test "x$cleaned_value" = x; then
23690    # Special case for zero
23691    cleaned_value=${BASH_REMATCH[2]}
23692  fi
23693
23694  if test $cleaned_value -gt 255; then
23695    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23696  fi
23697  if test "x$cleaned_value" != "x$with_version_build"; then
23698    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23699$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23700  fi
23701  VERSION_BUILD=$cleaned_value
23702
23703    fi
23704  else
23705    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23706      # Default is to not have a build number.
23707      VERSION_BUILD=""
23708      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23709      VERSION_BUILD=0
23710    fi
23711  fi
23712
23713
23714# Check whether --with-version-major was given.
23715if test "${with_version_major+set}" = set; then :
23716  withval=$with_version_major; with_version_major_present=true
23717else
23718  with_version_major_present=false
23719fi
23720
23721
23722  if test "x$with_version_major_present" = xtrue; then
23723    if test "x$with_version_major" = xyes; then
23724      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23725    else
23726
23727  # Additional [] needed to keep m4 from mangling shell constructs.
23728  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23729    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23730  fi
23731  # Extract the version number without leading zeros.
23732  cleaned_value=${BASH_REMATCH[1]}
23733  if test "x$cleaned_value" = x; then
23734    # Special case for zero
23735    cleaned_value=${BASH_REMATCH[2]}
23736  fi
23737
23738  if test $cleaned_value -gt 255; then
23739    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23740  fi
23741  if test "x$cleaned_value" != "x$with_version_major"; then
23742    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23743$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23744  fi
23745  VERSION_MAJOR=$cleaned_value
23746
23747    fi
23748  else
23749    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23750      # Default is to get value from version-numbers
23751      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23752    fi
23753  fi
23754
23755
23756# Check whether --with-version-minor was given.
23757if test "${with_version_minor+set}" = set; then :
23758  withval=$with_version_minor; with_version_minor_present=true
23759else
23760  with_version_minor_present=false
23761fi
23762
23763
23764  if test "x$with_version_minor_present" = xtrue; then
23765    if test "x$with_version_minor" = xyes; then
23766      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23767    elif test "x$with_version_minor" = xno; then
23768      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23769      VERSION_MINOR=0
23770    elif test "x$with_version_minor" = x; then
23771      VERSION_MINOR=0
23772    else
23773
23774  # Additional [] needed to keep m4 from mangling shell constructs.
23775  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23776    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23777  fi
23778  # Extract the version number without leading zeros.
23779  cleaned_value=${BASH_REMATCH[1]}
23780  if test "x$cleaned_value" = x; then
23781    # Special case for zero
23782    cleaned_value=${BASH_REMATCH[2]}
23783  fi
23784
23785  if test $cleaned_value -gt 255; then
23786    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23787  fi
23788  if test "x$cleaned_value" != "x$with_version_minor"; then
23789    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23790$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23791  fi
23792  VERSION_MINOR=$cleaned_value
23793
23794    fi
23795  else
23796    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23797      # Default is 0, if unspecified
23798      VERSION_MINOR=0
23799    fi
23800  fi
23801
23802
23803# Check whether --with-version-security was given.
23804if test "${with_version_security+set}" = set; then :
23805  withval=$with_version_security; with_version_security_present=true
23806else
23807  with_version_security_present=false
23808fi
23809
23810
23811  if test "x$with_version_security_present" = xtrue; then
23812    if test "x$with_version_security" = xyes; then
23813      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23814    elif test "x$with_version_security" = xno; then
23815      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23816      VERSION_SECURITY=0
23817    elif test "x$with_version_security" = x; then
23818      VERSION_SECURITY=0
23819    else
23820
23821  # Additional [] needed to keep m4 from mangling shell constructs.
23822  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23823    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23824  fi
23825  # Extract the version number without leading zeros.
23826  cleaned_value=${BASH_REMATCH[1]}
23827  if test "x$cleaned_value" = x; then
23828    # Special case for zero
23829    cleaned_value=${BASH_REMATCH[2]}
23830  fi
23831
23832  if test $cleaned_value -gt 255; then
23833    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23834  fi
23835  if test "x$cleaned_value" != "x$with_version_security"; then
23836    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23837$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23838  fi
23839  VERSION_SECURITY=$cleaned_value
23840
23841    fi
23842  else
23843    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23844      # Default is 0, if unspecified
23845      VERSION_SECURITY=0
23846    fi
23847  fi
23848
23849
23850# Check whether --with-version-patch was given.
23851if test "${with_version_patch+set}" = set; then :
23852  withval=$with_version_patch; with_version_patch_present=true
23853else
23854  with_version_patch_present=false
23855fi
23856
23857
23858  if test "x$with_version_patch_present" = xtrue; then
23859    if test "x$with_version_patch" = xyes; then
23860      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23861    elif test "x$with_version_patch" = xno; then
23862      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23863      VERSION_PATCH=0
23864    elif test "x$with_version_patch" = x; then
23865      VERSION_PATCH=0
23866    else
23867
23868  # Additional [] needed to keep m4 from mangling shell constructs.
23869  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23870    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23871  fi
23872  # Extract the version number without leading zeros.
23873  cleaned_value=${BASH_REMATCH[1]}
23874  if test "x$cleaned_value" = x; then
23875    # Special case for zero
23876    cleaned_value=${BASH_REMATCH[2]}
23877  fi
23878
23879  if test $cleaned_value -gt 255; then
23880    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23881  fi
23882  if test "x$cleaned_value" != "x$with_version_patch"; then
23883    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23884$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23885  fi
23886  VERSION_PATCH=$cleaned_value
23887
23888    fi
23889  else
23890    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23891      # Default is 0, if unspecified
23892      VERSION_PATCH=0
23893    fi
23894  fi
23895
23896  # Calculate derived version properties
23897
23898  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23899  if test "x$VERSION_PRE" = x; then
23900    VERSION_IS_GA=true
23901  else
23902    VERSION_IS_GA=false
23903  fi
23904
23905  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23906  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23907
23908  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23909  # Strip trailing zeroes from stripped_version_number
23910  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23911  VERSION_NUMBER=$stripped_version_number
23912
23913  # The complete version string, with additional build information
23914  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23915    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23916  else
23917    # If either build or opt is set, we need a + separator
23918    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23919  fi
23920
23921  # The short version string, just VERSION_NUMBER and PRE, if present.
23922  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23923
23924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23925$as_echo_n "checking for version string... " >&6; }
23926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23927$as_echo "$VERSION_STRING" >&6; }
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943###############################################################################
23944#
23945# Setup BootJDK, used to bootstrap the build.
23946#
23947###############################################################################
23948
23949
23950  BOOT_JDK_FOUND=no
23951
23952# Check whether --with-boot-jdk was given.
23953if test "${with_boot_jdk+set}" = set; then :
23954  withval=$with_boot_jdk;
23955fi
23956
23957
23958  # We look for the Boot JDK through various means, going from more certain to
23959  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23960  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23961  # must check if this is indeed valid; otherwise we'll continue looking.
23962
23963  # Test: Is bootjdk explicitely set by command line arguments?
23964
23965  if test "x$BOOT_JDK_FOUND" = xno; then
23966    # Now execute the test
23967
23968  if test "x$with_boot_jdk" != x; then
23969    BOOT_JDK=$with_boot_jdk
23970    BOOT_JDK_FOUND=maybe
23971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23972$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23973  fi
23974
23975
23976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23978      # Do we have a bin/java?
23979      if test ! -x "$BOOT_JDK/bin/java"; then
23980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23982        BOOT_JDK_FOUND=no
23983      else
23984        # Do we have a bin/javac?
23985        if test ! -x "$BOOT_JDK/bin/javac"; then
23986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23990          BOOT_JDK_FOUND=no
23991        else
23992          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23993          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23994
23995          # Extra M4 quote needed to protect [] in grep expression.
23996          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23997          if test "x$FOUND_CORRECT_VERSION" = x; then
23998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24000            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24001$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24002            BOOT_JDK_FOUND=no
24003          else
24004            # We're done! :-)
24005            BOOT_JDK_FOUND=yes
24006
24007  # Only process if variable expands to non-empty
24008
24009  if test "x$BOOT_JDK" != x; then
24010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24011
24012  # Input might be given as Windows format, start by converting to
24013  # unix format.
24014  path="$BOOT_JDK"
24015  new_path=`$CYGPATH -u "$path"`
24016
24017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24020  # "foo.exe" is OK but "foo" is an error.
24021  #
24022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24023  # It is also a way to make sure we got the proper file name for the real test later on.
24024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24025  if test "x$test_shortpath" = x; then
24026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24029  fi
24030
24031  # Call helper function which possibly converts this using DOS-style short mode.
24032  # If so, the updated path is stored in $new_path.
24033
24034  input_path="$new_path"
24035  # Check if we need to convert this using DOS-style short mode. If the path
24036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24037  # take no chances and rewrite it.
24038  # Note: m4 eats our [], so we need to use [ and ] instead.
24039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24040  if test "x$has_forbidden_chars" != x; then
24041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24045      # Going to short mode and back again did indeed matter. Since short mode is
24046      # case insensitive, let's make it lowercase to improve readability.
24047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24048      # Now convert it back to Unix-style (cygpath)
24049      input_path=`$CYGPATH -u "$shortmode_path"`
24050      new_path="$input_path"
24051    fi
24052  fi
24053
24054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24055  if test "x$test_cygdrive_prefix" = x; then
24056    # As a simple fix, exclude /usr/bin since it's not a real path.
24057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24059      # a path prefixed by /cygdrive for fixpath to work.
24060      new_path="$CYGWIN_ROOT_PATH$input_path"
24061    fi
24062  fi
24063
24064
24065  if test "x$path" != "x$new_path"; then
24066    BOOT_JDK="$new_path"
24067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24069  fi
24070
24071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24072
24073  path="$BOOT_JDK"
24074  has_colon=`$ECHO $path | $GREP ^.:`
24075  new_path="$path"
24076  if test "x$has_colon" = x; then
24077    # Not in mixed or Windows style, start by that.
24078    new_path=`cmd //c echo $path`
24079  fi
24080
24081
24082  input_path="$new_path"
24083  # Check if we need to convert this using DOS-style short mode. If the path
24084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24085  # take no chances and rewrite it.
24086  # Note: m4 eats our [], so we need to use [ and ] instead.
24087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24088  if test "x$has_forbidden_chars" != x; then
24089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24091  fi
24092
24093
24094  windows_path="$new_path"
24095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24096    unix_path=`$CYGPATH -u "$windows_path"`
24097    new_path="$unix_path"
24098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24100    new_path="$unix_path"
24101  fi
24102
24103  if test "x$path" != "x$new_path"; then
24104    BOOT_JDK="$new_path"
24105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24107  fi
24108
24109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24111
24112    else
24113      # We're on a unix platform. Hooray! :)
24114      path="$BOOT_JDK"
24115      has_space=`$ECHO "$path" | $GREP " "`
24116      if test "x$has_space" != x; then
24117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24120      fi
24121
24122      # Use eval to expand a potential ~
24123      eval path="$path"
24124      if test ! -f "$path" && test ! -d "$path"; then
24125        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24126      fi
24127
24128      if test -d "$path"; then
24129        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24130      else
24131        dir="`$DIRNAME "$path"`"
24132        base="`$BASENAME "$path"`"
24133        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24134      fi
24135    fi
24136  fi
24137
24138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24139$as_echo_n "checking for Boot JDK... " >&6; }
24140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24141$as_echo "$BOOT_JDK" >&6; }
24142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24143$as_echo_n "checking Boot JDK version... " >&6; }
24144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24146$as_echo "$BOOT_JDK_VERSION" >&6; }
24147          fi # end check jdk version
24148        fi # end check javac
24149      fi # end check java
24150    fi # end check boot jdk found
24151  fi
24152
24153  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24154    # Having specified an argument which is incorrect will produce an instant failure;
24155    # we should not go on looking
24156    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24157  fi
24158
24159  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24160
24161  if test "x$BOOT_JDK_FOUND" = xno; then
24162    # Now execute the test
24163
24164  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24165    # First check at user selected default
24166
24167  if test "x$BOOT_JDK_FOUND" = xno; then
24168    # Now execute the test
24169
24170  if test -x /usr/libexec/java_home; then
24171    BOOT_JDK=`/usr/libexec/java_home `
24172    BOOT_JDK_FOUND=maybe
24173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24174$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24175  fi
24176
24177
24178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24180      # Do we have a bin/java?
24181      if test ! -x "$BOOT_JDK/bin/java"; then
24182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24184        BOOT_JDK_FOUND=no
24185      else
24186        # Do we have a bin/javac?
24187        if test ! -x "$BOOT_JDK/bin/javac"; then
24188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24192          BOOT_JDK_FOUND=no
24193        else
24194          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24195          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24196
24197          # Extra M4 quote needed to protect [] in grep expression.
24198          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24199          if test "x$FOUND_CORRECT_VERSION" = x; then
24200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24202            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24203$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24204            BOOT_JDK_FOUND=no
24205          else
24206            # We're done! :-)
24207            BOOT_JDK_FOUND=yes
24208
24209  # Only process if variable expands to non-empty
24210
24211  if test "x$BOOT_JDK" != x; then
24212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24213
24214  # Input might be given as Windows format, start by converting to
24215  # unix format.
24216  path="$BOOT_JDK"
24217  new_path=`$CYGPATH -u "$path"`
24218
24219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24222  # "foo.exe" is OK but "foo" is an error.
24223  #
24224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24225  # It is also a way to make sure we got the proper file name for the real test later on.
24226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24227  if test "x$test_shortpath" = x; then
24228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24231  fi
24232
24233  # Call helper function which possibly converts this using DOS-style short mode.
24234  # If so, the updated path is stored in $new_path.
24235
24236  input_path="$new_path"
24237  # Check if we need to convert this using DOS-style short mode. If the path
24238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24239  # take no chances and rewrite it.
24240  # Note: m4 eats our [], so we need to use [ and ] instead.
24241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24242  if test "x$has_forbidden_chars" != x; then
24243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24247      # Going to short mode and back again did indeed matter. Since short mode is
24248      # case insensitive, let's make it lowercase to improve readability.
24249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24250      # Now convert it back to Unix-style (cygpath)
24251      input_path=`$CYGPATH -u "$shortmode_path"`
24252      new_path="$input_path"
24253    fi
24254  fi
24255
24256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24257  if test "x$test_cygdrive_prefix" = x; then
24258    # As a simple fix, exclude /usr/bin since it's not a real path.
24259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24261      # a path prefixed by /cygdrive for fixpath to work.
24262      new_path="$CYGWIN_ROOT_PATH$input_path"
24263    fi
24264  fi
24265
24266
24267  if test "x$path" != "x$new_path"; then
24268    BOOT_JDK="$new_path"
24269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24271  fi
24272
24273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24274
24275  path="$BOOT_JDK"
24276  has_colon=`$ECHO $path | $GREP ^.:`
24277  new_path="$path"
24278  if test "x$has_colon" = x; then
24279    # Not in mixed or Windows style, start by that.
24280    new_path=`cmd //c echo $path`
24281  fi
24282
24283
24284  input_path="$new_path"
24285  # Check if we need to convert this using DOS-style short mode. If the path
24286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24287  # take no chances and rewrite it.
24288  # Note: m4 eats our [], so we need to use [ and ] instead.
24289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24290  if test "x$has_forbidden_chars" != x; then
24291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24293  fi
24294
24295
24296  windows_path="$new_path"
24297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24298    unix_path=`$CYGPATH -u "$windows_path"`
24299    new_path="$unix_path"
24300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24302    new_path="$unix_path"
24303  fi
24304
24305  if test "x$path" != "x$new_path"; then
24306    BOOT_JDK="$new_path"
24307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24309  fi
24310
24311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24313
24314    else
24315      # We're on a unix platform. Hooray! :)
24316      path="$BOOT_JDK"
24317      has_space=`$ECHO "$path" | $GREP " "`
24318      if test "x$has_space" != x; then
24319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24322      fi
24323
24324      # Use eval to expand a potential ~
24325      eval path="$path"
24326      if test ! -f "$path" && test ! -d "$path"; then
24327        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24328      fi
24329
24330      if test -d "$path"; then
24331        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24332      else
24333        dir="`$DIRNAME "$path"`"
24334        base="`$BASENAME "$path"`"
24335        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24336      fi
24337    fi
24338  fi
24339
24340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24341$as_echo_n "checking for Boot JDK... " >&6; }
24342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24343$as_echo "$BOOT_JDK" >&6; }
24344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24345$as_echo_n "checking Boot JDK version... " >&6; }
24346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24348$as_echo "$BOOT_JDK_VERSION" >&6; }
24349          fi # end check jdk version
24350        fi # end check javac
24351      fi # end check java
24352    fi # end check boot jdk found
24353  fi
24354
24355    # If that did not work out (e.g. too old), try explicit versions instead
24356
24357  if test "x$BOOT_JDK_FOUND" = xno; then
24358    # Now execute the test
24359
24360  if test -x /usr/libexec/java_home; then
24361    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24362    BOOT_JDK_FOUND=maybe
24363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24364$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24365  fi
24366
24367
24368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24370      # Do we have a bin/java?
24371      if test ! -x "$BOOT_JDK/bin/java"; then
24372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24374        BOOT_JDK_FOUND=no
24375      else
24376        # Do we have a bin/javac?
24377        if test ! -x "$BOOT_JDK/bin/javac"; then
24378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24382          BOOT_JDK_FOUND=no
24383        else
24384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24386
24387          # Extra M4 quote needed to protect [] in grep expression.
24388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24389          if test "x$FOUND_CORRECT_VERSION" = x; then
24390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24394            BOOT_JDK_FOUND=no
24395          else
24396            # We're done! :-)
24397            BOOT_JDK_FOUND=yes
24398
24399  # Only process if variable expands to non-empty
24400
24401  if test "x$BOOT_JDK" != x; then
24402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24403
24404  # Input might be given as Windows format, start by converting to
24405  # unix format.
24406  path="$BOOT_JDK"
24407  new_path=`$CYGPATH -u "$path"`
24408
24409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24412  # "foo.exe" is OK but "foo" is an error.
24413  #
24414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24415  # It is also a way to make sure we got the proper file name for the real test later on.
24416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24417  if test "x$test_shortpath" = x; then
24418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24421  fi
24422
24423  # Call helper function which possibly converts this using DOS-style short mode.
24424  # If so, the updated path is stored in $new_path.
24425
24426  input_path="$new_path"
24427  # Check if we need to convert this using DOS-style short mode. If the path
24428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24429  # take no chances and rewrite it.
24430  # Note: m4 eats our [], so we need to use [ and ] instead.
24431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24432  if test "x$has_forbidden_chars" != x; then
24433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24437      # Going to short mode and back again did indeed matter. Since short mode is
24438      # case insensitive, let's make it lowercase to improve readability.
24439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24440      # Now convert it back to Unix-style (cygpath)
24441      input_path=`$CYGPATH -u "$shortmode_path"`
24442      new_path="$input_path"
24443    fi
24444  fi
24445
24446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24447  if test "x$test_cygdrive_prefix" = x; then
24448    # As a simple fix, exclude /usr/bin since it's not a real path.
24449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24451      # a path prefixed by /cygdrive for fixpath to work.
24452      new_path="$CYGWIN_ROOT_PATH$input_path"
24453    fi
24454  fi
24455
24456
24457  if test "x$path" != "x$new_path"; then
24458    BOOT_JDK="$new_path"
24459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24461  fi
24462
24463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24464
24465  path="$BOOT_JDK"
24466  has_colon=`$ECHO $path | $GREP ^.:`
24467  new_path="$path"
24468  if test "x$has_colon" = x; then
24469    # Not in mixed or Windows style, start by that.
24470    new_path=`cmd //c echo $path`
24471  fi
24472
24473
24474  input_path="$new_path"
24475  # Check if we need to convert this using DOS-style short mode. If the path
24476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24477  # take no chances and rewrite it.
24478  # Note: m4 eats our [], so we need to use [ and ] instead.
24479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24480  if test "x$has_forbidden_chars" != x; then
24481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24483  fi
24484
24485
24486  windows_path="$new_path"
24487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24488    unix_path=`$CYGPATH -u "$windows_path"`
24489    new_path="$unix_path"
24490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24492    new_path="$unix_path"
24493  fi
24494
24495  if test "x$path" != "x$new_path"; then
24496    BOOT_JDK="$new_path"
24497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24499  fi
24500
24501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24503
24504    else
24505      # We're on a unix platform. Hooray! :)
24506      path="$BOOT_JDK"
24507      has_space=`$ECHO "$path" | $GREP " "`
24508      if test "x$has_space" != x; then
24509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24512      fi
24513
24514      # Use eval to expand a potential ~
24515      eval path="$path"
24516      if test ! -f "$path" && test ! -d "$path"; then
24517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24518      fi
24519
24520      if test -d "$path"; then
24521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24522      else
24523        dir="`$DIRNAME "$path"`"
24524        base="`$BASENAME "$path"`"
24525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24526      fi
24527    fi
24528  fi
24529
24530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24531$as_echo_n "checking for Boot JDK... " >&6; }
24532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24533$as_echo "$BOOT_JDK" >&6; }
24534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24535$as_echo_n "checking Boot JDK version... " >&6; }
24536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24538$as_echo "$BOOT_JDK_VERSION" >&6; }
24539          fi # end check jdk version
24540        fi # end check javac
24541      fi # end check java
24542    fi # end check boot jdk found
24543  fi
24544
24545
24546  if test "x$BOOT_JDK_FOUND" = xno; then
24547    # Now execute the test
24548
24549  if test -x /usr/libexec/java_home; then
24550    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24551    BOOT_JDK_FOUND=maybe
24552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24553$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24554  fi
24555
24556
24557    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24558    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24559      # Do we have a bin/java?
24560      if test ! -x "$BOOT_JDK/bin/java"; then
24561        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24563        BOOT_JDK_FOUND=no
24564      else
24565        # Do we have a bin/javac?
24566        if test ! -x "$BOOT_JDK/bin/javac"; then
24567          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24569          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24570$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24571          BOOT_JDK_FOUND=no
24572        else
24573          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24574          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24575
24576          # Extra M4 quote needed to protect [] in grep expression.
24577          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24578          if test "x$FOUND_CORRECT_VERSION" = x; then
24579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24581            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24582$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24583            BOOT_JDK_FOUND=no
24584          else
24585            # We're done! :-)
24586            BOOT_JDK_FOUND=yes
24587
24588  # Only process if variable expands to non-empty
24589
24590  if test "x$BOOT_JDK" != x; then
24591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24592
24593  # Input might be given as Windows format, start by converting to
24594  # unix format.
24595  path="$BOOT_JDK"
24596  new_path=`$CYGPATH -u "$path"`
24597
24598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24601  # "foo.exe" is OK but "foo" is an error.
24602  #
24603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24604  # It is also a way to make sure we got the proper file name for the real test later on.
24605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24606  if test "x$test_shortpath" = x; then
24607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24610  fi
24611
24612  # Call helper function which possibly converts this using DOS-style short mode.
24613  # If so, the updated path is stored in $new_path.
24614
24615  input_path="$new_path"
24616  # Check if we need to convert this using DOS-style short mode. If the path
24617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24618  # take no chances and rewrite it.
24619  # Note: m4 eats our [], so we need to use [ and ] instead.
24620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24621  if test "x$has_forbidden_chars" != x; then
24622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24626      # Going to short mode and back again did indeed matter. Since short mode is
24627      # case insensitive, let's make it lowercase to improve readability.
24628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24629      # Now convert it back to Unix-style (cygpath)
24630      input_path=`$CYGPATH -u "$shortmode_path"`
24631      new_path="$input_path"
24632    fi
24633  fi
24634
24635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24636  if test "x$test_cygdrive_prefix" = x; then
24637    # As a simple fix, exclude /usr/bin since it's not a real path.
24638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24640      # a path prefixed by /cygdrive for fixpath to work.
24641      new_path="$CYGWIN_ROOT_PATH$input_path"
24642    fi
24643  fi
24644
24645
24646  if test "x$path" != "x$new_path"; then
24647    BOOT_JDK="$new_path"
24648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24650  fi
24651
24652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24653
24654  path="$BOOT_JDK"
24655  has_colon=`$ECHO $path | $GREP ^.:`
24656  new_path="$path"
24657  if test "x$has_colon" = x; then
24658    # Not in mixed or Windows style, start by that.
24659    new_path=`cmd //c echo $path`
24660  fi
24661
24662
24663  input_path="$new_path"
24664  # Check if we need to convert this using DOS-style short mode. If the path
24665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24666  # take no chances and rewrite it.
24667  # Note: m4 eats our [], so we need to use [ and ] instead.
24668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24669  if test "x$has_forbidden_chars" != x; then
24670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24672  fi
24673
24674
24675  windows_path="$new_path"
24676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24677    unix_path=`$CYGPATH -u "$windows_path"`
24678    new_path="$unix_path"
24679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24681    new_path="$unix_path"
24682  fi
24683
24684  if test "x$path" != "x$new_path"; then
24685    BOOT_JDK="$new_path"
24686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24688  fi
24689
24690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24692
24693    else
24694      # We're on a unix platform. Hooray! :)
24695      path="$BOOT_JDK"
24696      has_space=`$ECHO "$path" | $GREP " "`
24697      if test "x$has_space" != x; then
24698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24701      fi
24702
24703      # Use eval to expand a potential ~
24704      eval path="$path"
24705      if test ! -f "$path" && test ! -d "$path"; then
24706        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24707      fi
24708
24709      if test -d "$path"; then
24710        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24711      else
24712        dir="`$DIRNAME "$path"`"
24713        base="`$BASENAME "$path"`"
24714        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24715      fi
24716    fi
24717  fi
24718
24719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24720$as_echo_n "checking for Boot JDK... " >&6; }
24721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24722$as_echo "$BOOT_JDK" >&6; }
24723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24724$as_echo_n "checking Boot JDK version... " >&6; }
24725            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24727$as_echo "$BOOT_JDK_VERSION" >&6; }
24728          fi # end check jdk version
24729        fi # end check javac
24730      fi # end check java
24731    fi # end check boot jdk found
24732  fi
24733
24734
24735  if test "x$BOOT_JDK_FOUND" = xno; then
24736    # Now execute the test
24737
24738  if test -x /usr/libexec/java_home; then
24739    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24740    BOOT_JDK_FOUND=maybe
24741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24742$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24743  fi
24744
24745
24746    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24747    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24748      # Do we have a bin/java?
24749      if test ! -x "$BOOT_JDK/bin/java"; then
24750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24752        BOOT_JDK_FOUND=no
24753      else
24754        # Do we have a bin/javac?
24755        if test ! -x "$BOOT_JDK/bin/javac"; then
24756          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24758          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24759$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24760          BOOT_JDK_FOUND=no
24761        else
24762          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24763          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24764
24765          # Extra M4 quote needed to protect [] in grep expression.
24766          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24767          if test "x$FOUND_CORRECT_VERSION" = x; then
24768            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24770            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24771$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24772            BOOT_JDK_FOUND=no
24773          else
24774            # We're done! :-)
24775            BOOT_JDK_FOUND=yes
24776
24777  # Only process if variable expands to non-empty
24778
24779  if test "x$BOOT_JDK" != x; then
24780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24781
24782  # Input might be given as Windows format, start by converting to
24783  # unix format.
24784  path="$BOOT_JDK"
24785  new_path=`$CYGPATH -u "$path"`
24786
24787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24790  # "foo.exe" is OK but "foo" is an error.
24791  #
24792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24793  # It is also a way to make sure we got the proper file name for the real test later on.
24794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24795  if test "x$test_shortpath" = x; then
24796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24798    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24799  fi
24800
24801  # Call helper function which possibly converts this using DOS-style short mode.
24802  # If so, the updated path is stored in $new_path.
24803
24804  input_path="$new_path"
24805  # Check if we need to convert this using DOS-style short mode. If the path
24806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24807  # take no chances and rewrite it.
24808  # Note: m4 eats our [], so we need to use [ and ] instead.
24809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24810  if test "x$has_forbidden_chars" != x; then
24811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24815      # Going to short mode and back again did indeed matter. Since short mode is
24816      # case insensitive, let's make it lowercase to improve readability.
24817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24818      # Now convert it back to Unix-style (cygpath)
24819      input_path=`$CYGPATH -u "$shortmode_path"`
24820      new_path="$input_path"
24821    fi
24822  fi
24823
24824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24825  if test "x$test_cygdrive_prefix" = x; then
24826    # As a simple fix, exclude /usr/bin since it's not a real path.
24827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24829      # a path prefixed by /cygdrive for fixpath to work.
24830      new_path="$CYGWIN_ROOT_PATH$input_path"
24831    fi
24832  fi
24833
24834
24835  if test "x$path" != "x$new_path"; then
24836    BOOT_JDK="$new_path"
24837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24839  fi
24840
24841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24842
24843  path="$BOOT_JDK"
24844  has_colon=`$ECHO $path | $GREP ^.:`
24845  new_path="$path"
24846  if test "x$has_colon" = x; then
24847    # Not in mixed or Windows style, start by that.
24848    new_path=`cmd //c echo $path`
24849  fi
24850
24851
24852  input_path="$new_path"
24853  # Check if we need to convert this using DOS-style short mode. If the path
24854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24855  # take no chances and rewrite it.
24856  # Note: m4 eats our [], so we need to use [ and ] instead.
24857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24858  if test "x$has_forbidden_chars" != x; then
24859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24861  fi
24862
24863
24864  windows_path="$new_path"
24865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24866    unix_path=`$CYGPATH -u "$windows_path"`
24867    new_path="$unix_path"
24868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24870    new_path="$unix_path"
24871  fi
24872
24873  if test "x$path" != "x$new_path"; then
24874    BOOT_JDK="$new_path"
24875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24877  fi
24878
24879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24881
24882    else
24883      # We're on a unix platform. Hooray! :)
24884      path="$BOOT_JDK"
24885      has_space=`$ECHO "$path" | $GREP " "`
24886      if test "x$has_space" != x; then
24887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24890      fi
24891
24892      # Use eval to expand a potential ~
24893      eval path="$path"
24894      if test ! -f "$path" && test ! -d "$path"; then
24895        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24896      fi
24897
24898      if test -d "$path"; then
24899        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24900      else
24901        dir="`$DIRNAME "$path"`"
24902        base="`$BASENAME "$path"`"
24903        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24904      fi
24905    fi
24906  fi
24907
24908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24909$as_echo_n "checking for Boot JDK... " >&6; }
24910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24911$as_echo "$BOOT_JDK" >&6; }
24912            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24913$as_echo_n "checking Boot JDK version... " >&6; }
24914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24916$as_echo "$BOOT_JDK_VERSION" >&6; }
24917          fi # end check jdk version
24918        fi # end check javac
24919      fi # end check java
24920    fi # end check boot jdk found
24921  fi
24922
24923  fi
24924
24925
24926    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24927    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24928      # Do we have a bin/java?
24929      if test ! -x "$BOOT_JDK/bin/java"; then
24930        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24932        BOOT_JDK_FOUND=no
24933      else
24934        # Do we have a bin/javac?
24935        if test ! -x "$BOOT_JDK/bin/javac"; then
24936          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24938          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24939$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24940          BOOT_JDK_FOUND=no
24941        else
24942          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24943          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24944
24945          # Extra M4 quote needed to protect [] in grep expression.
24946          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24947          if test "x$FOUND_CORRECT_VERSION" = x; then
24948            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24950            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24951$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24952            BOOT_JDK_FOUND=no
24953          else
24954            # We're done! :-)
24955            BOOT_JDK_FOUND=yes
24956
24957  # Only process if variable expands to non-empty
24958
24959  if test "x$BOOT_JDK" != x; then
24960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24961
24962  # Input might be given as Windows format, start by converting to
24963  # unix format.
24964  path="$BOOT_JDK"
24965  new_path=`$CYGPATH -u "$path"`
24966
24967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24970  # "foo.exe" is OK but "foo" is an error.
24971  #
24972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24973  # It is also a way to make sure we got the proper file name for the real test later on.
24974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24975  if test "x$test_shortpath" = x; then
24976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24978    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24979  fi
24980
24981  # Call helper function which possibly converts this using DOS-style short mode.
24982  # If so, the updated path is stored in $new_path.
24983
24984  input_path="$new_path"
24985  # Check if we need to convert this using DOS-style short mode. If the path
24986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24987  # take no chances and rewrite it.
24988  # Note: m4 eats our [], so we need to use [ and ] instead.
24989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24990  if test "x$has_forbidden_chars" != x; then
24991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24995      # Going to short mode and back again did indeed matter. Since short mode is
24996      # case insensitive, let's make it lowercase to improve readability.
24997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24998      # Now convert it back to Unix-style (cygpath)
24999      input_path=`$CYGPATH -u "$shortmode_path"`
25000      new_path="$input_path"
25001    fi
25002  fi
25003
25004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25005  if test "x$test_cygdrive_prefix" = x; then
25006    # As a simple fix, exclude /usr/bin since it's not a real path.
25007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25009      # a path prefixed by /cygdrive for fixpath to work.
25010      new_path="$CYGWIN_ROOT_PATH$input_path"
25011    fi
25012  fi
25013
25014
25015  if test "x$path" != "x$new_path"; then
25016    BOOT_JDK="$new_path"
25017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25019  fi
25020
25021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25022
25023  path="$BOOT_JDK"
25024  has_colon=`$ECHO $path | $GREP ^.:`
25025  new_path="$path"
25026  if test "x$has_colon" = x; then
25027    # Not in mixed or Windows style, start by that.
25028    new_path=`cmd //c echo $path`
25029  fi
25030
25031
25032  input_path="$new_path"
25033  # Check if we need to convert this using DOS-style short mode. If the path
25034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25035  # take no chances and rewrite it.
25036  # Note: m4 eats our [], so we need to use [ and ] instead.
25037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25038  if test "x$has_forbidden_chars" != x; then
25039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25041  fi
25042
25043
25044  windows_path="$new_path"
25045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25046    unix_path=`$CYGPATH -u "$windows_path"`
25047    new_path="$unix_path"
25048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25050    new_path="$unix_path"
25051  fi
25052
25053  if test "x$path" != "x$new_path"; then
25054    BOOT_JDK="$new_path"
25055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25056$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25057  fi
25058
25059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25061
25062    else
25063      # We're on a unix platform. Hooray! :)
25064      path="$BOOT_JDK"
25065      has_space=`$ECHO "$path" | $GREP " "`
25066      if test "x$has_space" != x; then
25067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25070      fi
25071
25072      # Use eval to expand a potential ~
25073      eval path="$path"
25074      if test ! -f "$path" && test ! -d "$path"; then
25075        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25076      fi
25077
25078      if test -d "$path"; then
25079        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25080      else
25081        dir="`$DIRNAME "$path"`"
25082        base="`$BASENAME "$path"`"
25083        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25084      fi
25085    fi
25086  fi
25087
25088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25089$as_echo_n "checking for Boot JDK... " >&6; }
25090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25091$as_echo "$BOOT_JDK" >&6; }
25092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25093$as_echo_n "checking Boot JDK version... " >&6; }
25094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25096$as_echo "$BOOT_JDK_VERSION" >&6; }
25097          fi # end check jdk version
25098        fi # end check javac
25099      fi # end check java
25100    fi # end check boot jdk found
25101  fi
25102
25103
25104  # Test: Is $JAVA_HOME set?
25105
25106  if test "x$BOOT_JDK_FOUND" = xno; then
25107    # Now execute the test
25108
25109  if test "x$JAVA_HOME" != x; then
25110    JAVA_HOME_PROCESSED="$JAVA_HOME"
25111
25112  # Only process if variable expands to non-empty
25113
25114  if test "x$JAVA_HOME_PROCESSED" != x; then
25115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25116
25117  # Input might be given as Windows format, start by converting to
25118  # unix format.
25119  path="$JAVA_HOME_PROCESSED"
25120  new_path=`$CYGPATH -u "$path"`
25121
25122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25125  # "foo.exe" is OK but "foo" is an error.
25126  #
25127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25128  # It is also a way to make sure we got the proper file name for the real test later on.
25129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25130  if test "x$test_shortpath" = x; then
25131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25132$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25133    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25134  fi
25135
25136  # Call helper function which possibly converts this using DOS-style short mode.
25137  # If so, the updated path is stored in $new_path.
25138
25139  input_path="$new_path"
25140  # Check if we need to convert this using DOS-style short mode. If the path
25141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25142  # take no chances and rewrite it.
25143  # Note: m4 eats our [], so we need to use [ and ] instead.
25144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25145  if test "x$has_forbidden_chars" != x; then
25146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25150      # Going to short mode and back again did indeed matter. Since short mode is
25151      # case insensitive, let's make it lowercase to improve readability.
25152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25153      # Now convert it back to Unix-style (cygpath)
25154      input_path=`$CYGPATH -u "$shortmode_path"`
25155      new_path="$input_path"
25156    fi
25157  fi
25158
25159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25160  if test "x$test_cygdrive_prefix" = x; then
25161    # As a simple fix, exclude /usr/bin since it's not a real path.
25162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25164      # a path prefixed by /cygdrive for fixpath to work.
25165      new_path="$CYGWIN_ROOT_PATH$input_path"
25166    fi
25167  fi
25168
25169
25170  if test "x$path" != "x$new_path"; then
25171    JAVA_HOME_PROCESSED="$new_path"
25172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25173$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25174  fi
25175
25176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25177
25178  path="$JAVA_HOME_PROCESSED"
25179  has_colon=`$ECHO $path | $GREP ^.:`
25180  new_path="$path"
25181  if test "x$has_colon" = x; then
25182    # Not in mixed or Windows style, start by that.
25183    new_path=`cmd //c echo $path`
25184  fi
25185
25186
25187  input_path="$new_path"
25188  # Check if we need to convert this using DOS-style short mode. If the path
25189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25190  # take no chances and rewrite it.
25191  # Note: m4 eats our [], so we need to use [ and ] instead.
25192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25193  if test "x$has_forbidden_chars" != x; then
25194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25196  fi
25197
25198
25199  windows_path="$new_path"
25200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25201    unix_path=`$CYGPATH -u "$windows_path"`
25202    new_path="$unix_path"
25203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25205    new_path="$unix_path"
25206  fi
25207
25208  if test "x$path" != "x$new_path"; then
25209    JAVA_HOME_PROCESSED="$new_path"
25210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25211$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25212  fi
25213
25214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25216
25217    else
25218      # We're on a unix platform. Hooray! :)
25219      path="$JAVA_HOME_PROCESSED"
25220      has_space=`$ECHO "$path" | $GREP " "`
25221      if test "x$has_space" != x; then
25222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25223$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25225      fi
25226
25227      # Use eval to expand a potential ~
25228      eval path="$path"
25229      if test ! -f "$path" && test ! -d "$path"; then
25230        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25231      fi
25232
25233      if test -d "$path"; then
25234        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25235      else
25236        dir="`$DIRNAME "$path"`"
25237        base="`$BASENAME "$path"`"
25238        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25239      fi
25240    fi
25241  fi
25242
25243    if test ! -d "$JAVA_HOME_PROCESSED"; then
25244      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25245$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25246    else
25247      # Aha, the user has set a JAVA_HOME
25248      # let us use that as the Boot JDK.
25249      BOOT_JDK="$JAVA_HOME_PROCESSED"
25250      BOOT_JDK_FOUND=maybe
25251      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25252$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25253    fi
25254  fi
25255
25256
25257    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25258    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25259      # Do we have a bin/java?
25260      if test ! -x "$BOOT_JDK/bin/java"; then
25261        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25263        BOOT_JDK_FOUND=no
25264      else
25265        # Do we have a bin/javac?
25266        if test ! -x "$BOOT_JDK/bin/javac"; then
25267          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25269          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25270$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25271          BOOT_JDK_FOUND=no
25272        else
25273          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25274          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25275
25276          # Extra M4 quote needed to protect [] in grep expression.
25277          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25278          if test "x$FOUND_CORRECT_VERSION" = x; then
25279            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25281            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25282$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25283            BOOT_JDK_FOUND=no
25284          else
25285            # We're done! :-)
25286            BOOT_JDK_FOUND=yes
25287
25288  # Only process if variable expands to non-empty
25289
25290  if test "x$BOOT_JDK" != x; then
25291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25292
25293  # Input might be given as Windows format, start by converting to
25294  # unix format.
25295  path="$BOOT_JDK"
25296  new_path=`$CYGPATH -u "$path"`
25297
25298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25301  # "foo.exe" is OK but "foo" is an error.
25302  #
25303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25304  # It is also a way to make sure we got the proper file name for the real test later on.
25305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25306  if test "x$test_shortpath" = x; then
25307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25309    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25310  fi
25311
25312  # Call helper function which possibly converts this using DOS-style short mode.
25313  # If so, the updated path is stored in $new_path.
25314
25315  input_path="$new_path"
25316  # Check if we need to convert this using DOS-style short mode. If the path
25317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25318  # take no chances and rewrite it.
25319  # Note: m4 eats our [], so we need to use [ and ] instead.
25320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25321  if test "x$has_forbidden_chars" != x; then
25322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25326      # Going to short mode and back again did indeed matter. Since short mode is
25327      # case insensitive, let's make it lowercase to improve readability.
25328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25329      # Now convert it back to Unix-style (cygpath)
25330      input_path=`$CYGPATH -u "$shortmode_path"`
25331      new_path="$input_path"
25332    fi
25333  fi
25334
25335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25336  if test "x$test_cygdrive_prefix" = x; then
25337    # As a simple fix, exclude /usr/bin since it's not a real path.
25338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25340      # a path prefixed by /cygdrive for fixpath to work.
25341      new_path="$CYGWIN_ROOT_PATH$input_path"
25342    fi
25343  fi
25344
25345
25346  if test "x$path" != "x$new_path"; then
25347    BOOT_JDK="$new_path"
25348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25350  fi
25351
25352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25353
25354  path="$BOOT_JDK"
25355  has_colon=`$ECHO $path | $GREP ^.:`
25356  new_path="$path"
25357  if test "x$has_colon" = x; then
25358    # Not in mixed or Windows style, start by that.
25359    new_path=`cmd //c echo $path`
25360  fi
25361
25362
25363  input_path="$new_path"
25364  # Check if we need to convert this using DOS-style short mode. If the path
25365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25366  # take no chances and rewrite it.
25367  # Note: m4 eats our [], so we need to use [ and ] instead.
25368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25369  if test "x$has_forbidden_chars" != x; then
25370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25372  fi
25373
25374
25375  windows_path="$new_path"
25376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25377    unix_path=`$CYGPATH -u "$windows_path"`
25378    new_path="$unix_path"
25379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25381    new_path="$unix_path"
25382  fi
25383
25384  if test "x$path" != "x$new_path"; then
25385    BOOT_JDK="$new_path"
25386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25388  fi
25389
25390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25392
25393    else
25394      # We're on a unix platform. Hooray! :)
25395      path="$BOOT_JDK"
25396      has_space=`$ECHO "$path" | $GREP " "`
25397      if test "x$has_space" != x; then
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25400        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25401      fi
25402
25403      # Use eval to expand a potential ~
25404      eval path="$path"
25405      if test ! -f "$path" && test ! -d "$path"; then
25406        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25407      fi
25408
25409      if test -d "$path"; then
25410        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25411      else
25412        dir="`$DIRNAME "$path"`"
25413        base="`$BASENAME "$path"`"
25414        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25415      fi
25416    fi
25417  fi
25418
25419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25420$as_echo_n "checking for Boot JDK... " >&6; }
25421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25422$as_echo "$BOOT_JDK" >&6; }
25423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25424$as_echo_n "checking Boot JDK version... " >&6; }
25425            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25427$as_echo "$BOOT_JDK_VERSION" >&6; }
25428          fi # end check jdk version
25429        fi # end check javac
25430      fi # end check java
25431    fi # end check boot jdk found
25432  fi
25433
25434
25435  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25436
25437  if test "x$BOOT_JDK_FOUND" = xno; then
25438    # Now execute the test
25439
25440  # Extract the first word of "javac", so it can be a program name with args.
25441set dummy javac; ac_word=$2
25442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25443$as_echo_n "checking for $ac_word... " >&6; }
25444if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25445  $as_echo_n "(cached) " >&6
25446else
25447  case $JAVAC_CHECK in
25448  [\\/]* | ?:[\\/]*)
25449  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25450  ;;
25451  *)
25452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25453for as_dir in $PATH
25454do
25455  IFS=$as_save_IFS
25456  test -z "$as_dir" && as_dir=.
25457    for ac_exec_ext in '' $ac_executable_extensions; do
25458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25459    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25461    break 2
25462  fi
25463done
25464  done
25465IFS=$as_save_IFS
25466
25467  ;;
25468esac
25469fi
25470JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25471if test -n "$JAVAC_CHECK"; then
25472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25473$as_echo "$JAVAC_CHECK" >&6; }
25474else
25475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25476$as_echo "no" >&6; }
25477fi
25478
25479
25480  # Extract the first word of "java", so it can be a program name with args.
25481set dummy java; ac_word=$2
25482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25483$as_echo_n "checking for $ac_word... " >&6; }
25484if ${ac_cv_path_JAVA_CHECK+:} false; then :
25485  $as_echo_n "(cached) " >&6
25486else
25487  case $JAVA_CHECK in
25488  [\\/]* | ?:[\\/]*)
25489  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25490  ;;
25491  *)
25492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25493for as_dir in $PATH
25494do
25495  IFS=$as_save_IFS
25496  test -z "$as_dir" && as_dir=.
25497    for ac_exec_ext in '' $ac_executable_extensions; do
25498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25499    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25501    break 2
25502  fi
25503done
25504  done
25505IFS=$as_save_IFS
25506
25507  ;;
25508esac
25509fi
25510JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25511if test -n "$JAVA_CHECK"; then
25512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25513$as_echo "$JAVA_CHECK" >&6; }
25514else
25515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25516$as_echo "no" >&6; }
25517fi
25518
25519
25520  BINARY="$JAVAC_CHECK"
25521  if test "x$JAVAC_CHECK" = x; then
25522    BINARY="$JAVA_CHECK"
25523  fi
25524  if test "x$BINARY" != x; then
25525    # So there is a java(c) binary, it might be part of a JDK.
25526    # Lets find the JDK/JRE directory by following symbolic links.
25527    # Linux/GNU systems often have links from /usr/bin/java to
25528    # /etc/alternatives/java to the real JDK binary.
25529
25530  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25531    # Follow a chain of symbolic links. Use readlink
25532    # where it exists, else fall back to horribly
25533    # complicated shell code.
25534    if test "x$READLINK_TESTED" != yes; then
25535      # On MacOSX there is a readlink tool with a different
25536      # purpose than the GNU readlink tool. Check the found readlink.
25537      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25538      if test "x$ISGNU" = x; then
25539        # A readlink that we do not know how to use.
25540        # Are there other non-GNU readlinks out there?
25541        READLINK_TESTED=yes
25542        READLINK=
25543      fi
25544    fi
25545
25546    if test "x$READLINK" != x; then
25547      BINARY=`$READLINK -f $BINARY`
25548    else
25549      # Save the current directory for restoring afterwards
25550      STARTDIR=$PWD
25551      COUNTER=0
25552      sym_link_dir=`$DIRNAME $BINARY`
25553      sym_link_file=`$BASENAME $BINARY`
25554      cd $sym_link_dir
25555      # Use -P flag to resolve symlinks in directories.
25556      cd `$THEPWDCMD -P`
25557      sym_link_dir=`$THEPWDCMD -P`
25558      # Resolve file symlinks
25559      while test $COUNTER -lt 20; do
25560        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25561        if test "x$ISLINK" == x; then
25562          # This is not a symbolic link! We are done!
25563          break
25564        fi
25565        # Again resolve directory symlinks since the target of the just found
25566        # link could be in a different directory
25567        cd `$DIRNAME $ISLINK`
25568        sym_link_dir=`$THEPWDCMD -P`
25569        sym_link_file=`$BASENAME $ISLINK`
25570        let COUNTER=COUNTER+1
25571      done
25572      cd $STARTDIR
25573      BINARY=$sym_link_dir/$sym_link_file
25574    fi
25575  fi
25576
25577    BOOT_JDK=`dirname "$BINARY"`
25578    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25579    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25580      # Looks like we found ourselves an JDK
25581      BOOT_JDK_FOUND=maybe
25582      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25583$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25584    fi
25585  fi
25586
25587
25588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25590      # Do we have a bin/java?
25591      if test ! -x "$BOOT_JDK/bin/java"; then
25592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25594        BOOT_JDK_FOUND=no
25595      else
25596        # Do we have a bin/javac?
25597        if test ! -x "$BOOT_JDK/bin/javac"; then
25598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25602          BOOT_JDK_FOUND=no
25603        else
25604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25606
25607          # Extra M4 quote needed to protect [] in grep expression.
25608          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25609          if test "x$FOUND_CORRECT_VERSION" = x; then
25610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25614            BOOT_JDK_FOUND=no
25615          else
25616            # We're done! :-)
25617            BOOT_JDK_FOUND=yes
25618
25619  # Only process if variable expands to non-empty
25620
25621  if test "x$BOOT_JDK" != x; then
25622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25623
25624  # Input might be given as Windows format, start by converting to
25625  # unix format.
25626  path="$BOOT_JDK"
25627  new_path=`$CYGPATH -u "$path"`
25628
25629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25632  # "foo.exe" is OK but "foo" is an error.
25633  #
25634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25635  # It is also a way to make sure we got the proper file name for the real test later on.
25636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25637  if test "x$test_shortpath" = x; then
25638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25641  fi
25642
25643  # Call helper function which possibly converts this using DOS-style short mode.
25644  # If so, the updated path is stored in $new_path.
25645
25646  input_path="$new_path"
25647  # Check if we need to convert this using DOS-style short mode. If the path
25648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25649  # take no chances and rewrite it.
25650  # Note: m4 eats our [], so we need to use [ and ] instead.
25651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25652  if test "x$has_forbidden_chars" != x; then
25653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25657      # Going to short mode and back again did indeed matter. Since short mode is
25658      # case insensitive, let's make it lowercase to improve readability.
25659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25660      # Now convert it back to Unix-style (cygpath)
25661      input_path=`$CYGPATH -u "$shortmode_path"`
25662      new_path="$input_path"
25663    fi
25664  fi
25665
25666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25667  if test "x$test_cygdrive_prefix" = x; then
25668    # As a simple fix, exclude /usr/bin since it's not a real path.
25669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25671      # a path prefixed by /cygdrive for fixpath to work.
25672      new_path="$CYGWIN_ROOT_PATH$input_path"
25673    fi
25674  fi
25675
25676
25677  if test "x$path" != "x$new_path"; then
25678    BOOT_JDK="$new_path"
25679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25681  fi
25682
25683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25684
25685  path="$BOOT_JDK"
25686  has_colon=`$ECHO $path | $GREP ^.:`
25687  new_path="$path"
25688  if test "x$has_colon" = x; then
25689    # Not in mixed or Windows style, start by that.
25690    new_path=`cmd //c echo $path`
25691  fi
25692
25693
25694  input_path="$new_path"
25695  # Check if we need to convert this using DOS-style short mode. If the path
25696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25697  # take no chances and rewrite it.
25698  # Note: m4 eats our [], so we need to use [ and ] instead.
25699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25700  if test "x$has_forbidden_chars" != x; then
25701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25703  fi
25704
25705
25706  windows_path="$new_path"
25707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25708    unix_path=`$CYGPATH -u "$windows_path"`
25709    new_path="$unix_path"
25710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25712    new_path="$unix_path"
25713  fi
25714
25715  if test "x$path" != "x$new_path"; then
25716    BOOT_JDK="$new_path"
25717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25719  fi
25720
25721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25723
25724    else
25725      # We're on a unix platform. Hooray! :)
25726      path="$BOOT_JDK"
25727      has_space=`$ECHO "$path" | $GREP " "`
25728      if test "x$has_space" != x; then
25729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25732      fi
25733
25734      # Use eval to expand a potential ~
25735      eval path="$path"
25736      if test ! -f "$path" && test ! -d "$path"; then
25737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25738      fi
25739
25740      if test -d "$path"; then
25741        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25742      else
25743        dir="`$DIRNAME "$path"`"
25744        base="`$BASENAME "$path"`"
25745        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25746      fi
25747    fi
25748  fi
25749
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25751$as_echo_n "checking for Boot JDK... " >&6; }
25752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25753$as_echo "$BOOT_JDK" >&6; }
25754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25755$as_echo_n "checking Boot JDK version... " >&6; }
25756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25758$as_echo "$BOOT_JDK_VERSION" >&6; }
25759          fi # end check jdk version
25760        fi # end check javac
25761      fi # end check java
25762    fi # end check boot jdk found
25763  fi
25764
25765
25766  # Test: Is there a JDK installed in default, well-known locations?
25767
25768  if test "x$BOOT_JDK_FOUND" = xno; then
25769    # Now execute the test
25770
25771  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25772
25773  if test "x$BOOT_JDK_FOUND" = xno; then
25774    # Now execute the test
25775
25776  if test "x$ProgramW6432" != x; then
25777    VIRTUAL_DIR="$ProgramW6432/Java"
25778
25779  windows_path="$VIRTUAL_DIR"
25780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25781    unix_path=`$CYGPATH -u "$windows_path"`
25782    VIRTUAL_DIR="$unix_path"
25783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25785    VIRTUAL_DIR="$unix_path"
25786  fi
25787
25788
25789  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25790  BOOT_JDK_SUFFIX=""
25791  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25792  if test "x$ALL_JDKS_FOUND" != x; then
25793    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25794
25795  if test "x$BOOT_JDK_FOUND" = xno; then
25796    # Now execute the test
25797
25798        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25799        if test -d "$BOOT_JDK"; then
25800          BOOT_JDK_FOUND=maybe
25801          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25802$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25803        fi
25804
25805
25806    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25807    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25808      # Do we have a bin/java?
25809      if test ! -x "$BOOT_JDK/bin/java"; then
25810        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25812        BOOT_JDK_FOUND=no
25813      else
25814        # Do we have a bin/javac?
25815        if test ! -x "$BOOT_JDK/bin/javac"; then
25816          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25818          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25819$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25820          BOOT_JDK_FOUND=no
25821        else
25822          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25823          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25824
25825          # Extra M4 quote needed to protect [] in grep expression.
25826          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25827          if test "x$FOUND_CORRECT_VERSION" = x; then
25828            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25830            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25831$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25832            BOOT_JDK_FOUND=no
25833          else
25834            # We're done! :-)
25835            BOOT_JDK_FOUND=yes
25836
25837  # Only process if variable expands to non-empty
25838
25839  if test "x$BOOT_JDK" != x; then
25840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25841
25842  # Input might be given as Windows format, start by converting to
25843  # unix format.
25844  path="$BOOT_JDK"
25845  new_path=`$CYGPATH -u "$path"`
25846
25847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25850  # "foo.exe" is OK but "foo" is an error.
25851  #
25852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25853  # It is also a way to make sure we got the proper file name for the real test later on.
25854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25855  if test "x$test_shortpath" = x; then
25856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25859  fi
25860
25861  # Call helper function which possibly converts this using DOS-style short mode.
25862  # If so, the updated path is stored in $new_path.
25863
25864  input_path="$new_path"
25865  # Check if we need to convert this using DOS-style short mode. If the path
25866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25867  # take no chances and rewrite it.
25868  # Note: m4 eats our [], so we need to use [ and ] instead.
25869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25870  if test "x$has_forbidden_chars" != x; then
25871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25875      # Going to short mode and back again did indeed matter. Since short mode is
25876      # case insensitive, let's make it lowercase to improve readability.
25877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25878      # Now convert it back to Unix-style (cygpath)
25879      input_path=`$CYGPATH -u "$shortmode_path"`
25880      new_path="$input_path"
25881    fi
25882  fi
25883
25884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25885  if test "x$test_cygdrive_prefix" = x; then
25886    # As a simple fix, exclude /usr/bin since it's not a real path.
25887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25889      # a path prefixed by /cygdrive for fixpath to work.
25890      new_path="$CYGWIN_ROOT_PATH$input_path"
25891    fi
25892  fi
25893
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25902
25903  path="$BOOT_JDK"
25904  has_colon=`$ECHO $path | $GREP ^.:`
25905  new_path="$path"
25906  if test "x$has_colon" = x; then
25907    # Not in mixed or Windows style, start by that.
25908    new_path=`cmd //c echo $path`
25909  fi
25910
25911
25912  input_path="$new_path"
25913  # Check if we need to convert this using DOS-style short mode. If the path
25914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25915  # take no chances and rewrite it.
25916  # Note: m4 eats our [], so we need to use [ and ] instead.
25917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25918  if test "x$has_forbidden_chars" != x; then
25919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25921  fi
25922
25923
25924  windows_path="$new_path"
25925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25926    unix_path=`$CYGPATH -u "$windows_path"`
25927    new_path="$unix_path"
25928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25930    new_path="$unix_path"
25931  fi
25932
25933  if test "x$path" != "x$new_path"; then
25934    BOOT_JDK="$new_path"
25935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25937  fi
25938
25939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25941
25942    else
25943      # We're on a unix platform. Hooray! :)
25944      path="$BOOT_JDK"
25945      has_space=`$ECHO "$path" | $GREP " "`
25946      if test "x$has_space" != x; then
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25950      fi
25951
25952      # Use eval to expand a potential ~
25953      eval path="$path"
25954      if test ! -f "$path" && test ! -d "$path"; then
25955        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25956      fi
25957
25958      if test -d "$path"; then
25959        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25960      else
25961        dir="`$DIRNAME "$path"`"
25962        base="`$BASENAME "$path"`"
25963        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25964      fi
25965    fi
25966  fi
25967
25968            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25969$as_echo_n "checking for Boot JDK... " >&6; }
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25971$as_echo "$BOOT_JDK" >&6; }
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25973$as_echo_n "checking Boot JDK version... " >&6; }
25974            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25976$as_echo "$BOOT_JDK_VERSION" >&6; }
25977          fi # end check jdk version
25978        fi # end check javac
25979      fi # end check java
25980    fi # end check boot jdk found
25981  fi
25982
25983    done
25984  fi
25985
25986  fi
25987
25988
25989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25991      # Do we have a bin/java?
25992      if test ! -x "$BOOT_JDK/bin/java"; then
25993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25995        BOOT_JDK_FOUND=no
25996      else
25997        # Do we have a bin/javac?
25998        if test ! -x "$BOOT_JDK/bin/javac"; then
25999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26003          BOOT_JDK_FOUND=no
26004        else
26005          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26006          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26007
26008          # Extra M4 quote needed to protect [] in grep expression.
26009          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26010          if test "x$FOUND_CORRECT_VERSION" = x; then
26011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26013            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26014$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26015            BOOT_JDK_FOUND=no
26016          else
26017            # We're done! :-)
26018            BOOT_JDK_FOUND=yes
26019
26020  # Only process if variable expands to non-empty
26021
26022  if test "x$BOOT_JDK" != x; then
26023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26024
26025  # Input might be given as Windows format, start by converting to
26026  # unix format.
26027  path="$BOOT_JDK"
26028  new_path=`$CYGPATH -u "$path"`
26029
26030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26033  # "foo.exe" is OK but "foo" is an error.
26034  #
26035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26036  # It is also a way to make sure we got the proper file name for the real test later on.
26037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26038  if test "x$test_shortpath" = x; then
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26041    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26042  fi
26043
26044  # Call helper function which possibly converts this using DOS-style short mode.
26045  # If so, the updated path is stored in $new_path.
26046
26047  input_path="$new_path"
26048  # Check if we need to convert this using DOS-style short mode. If the path
26049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26050  # take no chances and rewrite it.
26051  # Note: m4 eats our [], so we need to use [ and ] instead.
26052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26053  if test "x$has_forbidden_chars" != x; then
26054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26058      # Going to short mode and back again did indeed matter. Since short mode is
26059      # case insensitive, let's make it lowercase to improve readability.
26060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26061      # Now convert it back to Unix-style (cygpath)
26062      input_path=`$CYGPATH -u "$shortmode_path"`
26063      new_path="$input_path"
26064    fi
26065  fi
26066
26067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26068  if test "x$test_cygdrive_prefix" = x; then
26069    # As a simple fix, exclude /usr/bin since it's not a real path.
26070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26072      # a path prefixed by /cygdrive for fixpath to work.
26073      new_path="$CYGWIN_ROOT_PATH$input_path"
26074    fi
26075  fi
26076
26077
26078  if test "x$path" != "x$new_path"; then
26079    BOOT_JDK="$new_path"
26080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26082  fi
26083
26084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26085
26086  path="$BOOT_JDK"
26087  has_colon=`$ECHO $path | $GREP ^.:`
26088  new_path="$path"
26089  if test "x$has_colon" = x; then
26090    # Not in mixed or Windows style, start by that.
26091    new_path=`cmd //c echo $path`
26092  fi
26093
26094
26095  input_path="$new_path"
26096  # Check if we need to convert this using DOS-style short mode. If the path
26097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26098  # take no chances and rewrite it.
26099  # Note: m4 eats our [], so we need to use [ and ] instead.
26100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26101  if test "x$has_forbidden_chars" != x; then
26102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26104  fi
26105
26106
26107  windows_path="$new_path"
26108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26109    unix_path=`$CYGPATH -u "$windows_path"`
26110    new_path="$unix_path"
26111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26113    new_path="$unix_path"
26114  fi
26115
26116  if test "x$path" != "x$new_path"; then
26117    BOOT_JDK="$new_path"
26118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26120  fi
26121
26122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26124
26125    else
26126      # We're on a unix platform. Hooray! :)
26127      path="$BOOT_JDK"
26128      has_space=`$ECHO "$path" | $GREP " "`
26129      if test "x$has_space" != x; then
26130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26133      fi
26134
26135      # Use eval to expand a potential ~
26136      eval path="$path"
26137      if test ! -f "$path" && test ! -d "$path"; then
26138        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26139      fi
26140
26141      if test -d "$path"; then
26142        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26143      else
26144        dir="`$DIRNAME "$path"`"
26145        base="`$BASENAME "$path"`"
26146        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26147      fi
26148    fi
26149  fi
26150
26151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26152$as_echo_n "checking for Boot JDK... " >&6; }
26153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26154$as_echo "$BOOT_JDK" >&6; }
26155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26156$as_echo_n "checking Boot JDK version... " >&6; }
26157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26159$as_echo "$BOOT_JDK_VERSION" >&6; }
26160          fi # end check jdk version
26161        fi # end check javac
26162      fi # end check java
26163    fi # end check boot jdk found
26164  fi
26165
26166
26167  if test "x$BOOT_JDK_FOUND" = xno; then
26168    # Now execute the test
26169
26170  if test "x$PROGRAMW6432" != x; then
26171    VIRTUAL_DIR="$PROGRAMW6432/Java"
26172
26173  windows_path="$VIRTUAL_DIR"
26174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26175    unix_path=`$CYGPATH -u "$windows_path"`
26176    VIRTUAL_DIR="$unix_path"
26177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26179    VIRTUAL_DIR="$unix_path"
26180  fi
26181
26182
26183  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26184  BOOT_JDK_SUFFIX=""
26185  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26186  if test "x$ALL_JDKS_FOUND" != x; then
26187    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26188
26189  if test "x$BOOT_JDK_FOUND" = xno; then
26190    # Now execute the test
26191
26192        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26193        if test -d "$BOOT_JDK"; then
26194          BOOT_JDK_FOUND=maybe
26195          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26196$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26197        fi
26198
26199
26200    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26201    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26202      # Do we have a bin/java?
26203      if test ! -x "$BOOT_JDK/bin/java"; then
26204        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26206        BOOT_JDK_FOUND=no
26207      else
26208        # Do we have a bin/javac?
26209        if test ! -x "$BOOT_JDK/bin/javac"; then
26210          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26212          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26213$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26214          BOOT_JDK_FOUND=no
26215        else
26216          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26217          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26218
26219          # Extra M4 quote needed to protect [] in grep expression.
26220          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26221          if test "x$FOUND_CORRECT_VERSION" = x; then
26222            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26224            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26225$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26226            BOOT_JDK_FOUND=no
26227          else
26228            # We're done! :-)
26229            BOOT_JDK_FOUND=yes
26230
26231  # Only process if variable expands to non-empty
26232
26233  if test "x$BOOT_JDK" != x; then
26234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26235
26236  # Input might be given as Windows format, start by converting to
26237  # unix format.
26238  path="$BOOT_JDK"
26239  new_path=`$CYGPATH -u "$path"`
26240
26241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26244  # "foo.exe" is OK but "foo" is an error.
26245  #
26246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26247  # It is also a way to make sure we got the proper file name for the real test later on.
26248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26249  if test "x$test_shortpath" = x; then
26250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26252    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26253  fi
26254
26255  # Call helper function which possibly converts this using DOS-style short mode.
26256  # If so, the updated path is stored in $new_path.
26257
26258  input_path="$new_path"
26259  # Check if we need to convert this using DOS-style short mode. If the path
26260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26261  # take no chances and rewrite it.
26262  # Note: m4 eats our [], so we need to use [ and ] instead.
26263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26264  if test "x$has_forbidden_chars" != x; then
26265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26269      # Going to short mode and back again did indeed matter. Since short mode is
26270      # case insensitive, let's make it lowercase to improve readability.
26271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26272      # Now convert it back to Unix-style (cygpath)
26273      input_path=`$CYGPATH -u "$shortmode_path"`
26274      new_path="$input_path"
26275    fi
26276  fi
26277
26278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26279  if test "x$test_cygdrive_prefix" = x; then
26280    # As a simple fix, exclude /usr/bin since it's not a real path.
26281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26283      # a path prefixed by /cygdrive for fixpath to work.
26284      new_path="$CYGWIN_ROOT_PATH$input_path"
26285    fi
26286  fi
26287
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26296
26297  path="$BOOT_JDK"
26298  has_colon=`$ECHO $path | $GREP ^.:`
26299  new_path="$path"
26300  if test "x$has_colon" = x; then
26301    # Not in mixed or Windows style, start by that.
26302    new_path=`cmd //c echo $path`
26303  fi
26304
26305
26306  input_path="$new_path"
26307  # Check if we need to convert this using DOS-style short mode. If the path
26308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26309  # take no chances and rewrite it.
26310  # Note: m4 eats our [], so we need to use [ and ] instead.
26311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26312  if test "x$has_forbidden_chars" != x; then
26313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26315  fi
26316
26317
26318  windows_path="$new_path"
26319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26320    unix_path=`$CYGPATH -u "$windows_path"`
26321    new_path="$unix_path"
26322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26324    new_path="$unix_path"
26325  fi
26326
26327  if test "x$path" != "x$new_path"; then
26328    BOOT_JDK="$new_path"
26329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26331  fi
26332
26333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26335
26336    else
26337      # We're on a unix platform. Hooray! :)
26338      path="$BOOT_JDK"
26339      has_space=`$ECHO "$path" | $GREP " "`
26340      if test "x$has_space" != x; then
26341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26344      fi
26345
26346      # Use eval to expand a potential ~
26347      eval path="$path"
26348      if test ! -f "$path" && test ! -d "$path"; then
26349        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26350      fi
26351
26352      if test -d "$path"; then
26353        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26354      else
26355        dir="`$DIRNAME "$path"`"
26356        base="`$BASENAME "$path"`"
26357        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26358      fi
26359    fi
26360  fi
26361
26362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26363$as_echo_n "checking for Boot JDK... " >&6; }
26364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26365$as_echo "$BOOT_JDK" >&6; }
26366            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26367$as_echo_n "checking Boot JDK version... " >&6; }
26368            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26370$as_echo "$BOOT_JDK_VERSION" >&6; }
26371          fi # end check jdk version
26372        fi # end check javac
26373      fi # end check java
26374    fi # end check boot jdk found
26375  fi
26376
26377    done
26378  fi
26379
26380  fi
26381
26382
26383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26385      # Do we have a bin/java?
26386      if test ! -x "$BOOT_JDK/bin/java"; then
26387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26389        BOOT_JDK_FOUND=no
26390      else
26391        # Do we have a bin/javac?
26392        if test ! -x "$BOOT_JDK/bin/javac"; then
26393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26397          BOOT_JDK_FOUND=no
26398        else
26399          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26400          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26401
26402          # Extra M4 quote needed to protect [] in grep expression.
26403          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26404          if test "x$FOUND_CORRECT_VERSION" = x; then
26405            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26407            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26408$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26409            BOOT_JDK_FOUND=no
26410          else
26411            # We're done! :-)
26412            BOOT_JDK_FOUND=yes
26413
26414  # Only process if variable expands to non-empty
26415
26416  if test "x$BOOT_JDK" != x; then
26417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26418
26419  # Input might be given as Windows format, start by converting to
26420  # unix format.
26421  path="$BOOT_JDK"
26422  new_path=`$CYGPATH -u "$path"`
26423
26424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26427  # "foo.exe" is OK but "foo" is an error.
26428  #
26429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26430  # It is also a way to make sure we got the proper file name for the real test later on.
26431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26432  if test "x$test_shortpath" = x; then
26433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26436  fi
26437
26438  # Call helper function which possibly converts this using DOS-style short mode.
26439  # If so, the updated path is stored in $new_path.
26440
26441  input_path="$new_path"
26442  # Check if we need to convert this using DOS-style short mode. If the path
26443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26444  # take no chances and rewrite it.
26445  # Note: m4 eats our [], so we need to use [ and ] instead.
26446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26447  if test "x$has_forbidden_chars" != x; then
26448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26452      # Going to short mode and back again did indeed matter. Since short mode is
26453      # case insensitive, let's make it lowercase to improve readability.
26454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26455      # Now convert it back to Unix-style (cygpath)
26456      input_path=`$CYGPATH -u "$shortmode_path"`
26457      new_path="$input_path"
26458    fi
26459  fi
26460
26461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26462  if test "x$test_cygdrive_prefix" = x; then
26463    # As a simple fix, exclude /usr/bin since it's not a real path.
26464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26466      # a path prefixed by /cygdrive for fixpath to work.
26467      new_path="$CYGWIN_ROOT_PATH$input_path"
26468    fi
26469  fi
26470
26471
26472  if test "x$path" != "x$new_path"; then
26473    BOOT_JDK="$new_path"
26474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26476  fi
26477
26478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26479
26480  path="$BOOT_JDK"
26481  has_colon=`$ECHO $path | $GREP ^.:`
26482  new_path="$path"
26483  if test "x$has_colon" = x; then
26484    # Not in mixed or Windows style, start by that.
26485    new_path=`cmd //c echo $path`
26486  fi
26487
26488
26489  input_path="$new_path"
26490  # Check if we need to convert this using DOS-style short mode. If the path
26491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26492  # take no chances and rewrite it.
26493  # Note: m4 eats our [], so we need to use [ and ] instead.
26494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26495  if test "x$has_forbidden_chars" != x; then
26496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26498  fi
26499
26500
26501  windows_path="$new_path"
26502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26503    unix_path=`$CYGPATH -u "$windows_path"`
26504    new_path="$unix_path"
26505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26507    new_path="$unix_path"
26508  fi
26509
26510  if test "x$path" != "x$new_path"; then
26511    BOOT_JDK="$new_path"
26512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26514  fi
26515
26516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26518
26519    else
26520      # We're on a unix platform. Hooray! :)
26521      path="$BOOT_JDK"
26522      has_space=`$ECHO "$path" | $GREP " "`
26523      if test "x$has_space" != x; then
26524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26527      fi
26528
26529      # Use eval to expand a potential ~
26530      eval path="$path"
26531      if test ! -f "$path" && test ! -d "$path"; then
26532        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26533      fi
26534
26535      if test -d "$path"; then
26536        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26537      else
26538        dir="`$DIRNAME "$path"`"
26539        base="`$BASENAME "$path"`"
26540        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26541      fi
26542    fi
26543  fi
26544
26545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26546$as_echo_n "checking for Boot JDK... " >&6; }
26547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26548$as_echo "$BOOT_JDK" >&6; }
26549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26550$as_echo_n "checking Boot JDK version... " >&6; }
26551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26553$as_echo "$BOOT_JDK_VERSION" >&6; }
26554          fi # end check jdk version
26555        fi # end check javac
26556      fi # end check java
26557    fi # end check boot jdk found
26558  fi
26559
26560
26561  if test "x$BOOT_JDK_FOUND" = xno; then
26562    # Now execute the test
26563
26564  if test "x$PROGRAMFILES" != x; then
26565    VIRTUAL_DIR="$PROGRAMFILES/Java"
26566
26567  windows_path="$VIRTUAL_DIR"
26568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26569    unix_path=`$CYGPATH -u "$windows_path"`
26570    VIRTUAL_DIR="$unix_path"
26571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26573    VIRTUAL_DIR="$unix_path"
26574  fi
26575
26576
26577  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26578  BOOT_JDK_SUFFIX=""
26579  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26580  if test "x$ALL_JDKS_FOUND" != x; then
26581    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26582
26583  if test "x$BOOT_JDK_FOUND" = xno; then
26584    # Now execute the test
26585
26586        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26587        if test -d "$BOOT_JDK"; then
26588          BOOT_JDK_FOUND=maybe
26589          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26590$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26591        fi
26592
26593
26594    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26595    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26596      # Do we have a bin/java?
26597      if test ! -x "$BOOT_JDK/bin/java"; then
26598        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26600        BOOT_JDK_FOUND=no
26601      else
26602        # Do we have a bin/javac?
26603        if test ! -x "$BOOT_JDK/bin/javac"; then
26604          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26606          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26607$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26608          BOOT_JDK_FOUND=no
26609        else
26610          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26611          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26612
26613          # Extra M4 quote needed to protect [] in grep expression.
26614          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26615          if test "x$FOUND_CORRECT_VERSION" = x; then
26616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26618            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26619$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26620            BOOT_JDK_FOUND=no
26621          else
26622            # We're done! :-)
26623            BOOT_JDK_FOUND=yes
26624
26625  # Only process if variable expands to non-empty
26626
26627  if test "x$BOOT_JDK" != x; then
26628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26629
26630  # Input might be given as Windows format, start by converting to
26631  # unix format.
26632  path="$BOOT_JDK"
26633  new_path=`$CYGPATH -u "$path"`
26634
26635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26638  # "foo.exe" is OK but "foo" is an error.
26639  #
26640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26641  # It is also a way to make sure we got the proper file name for the real test later on.
26642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26643  if test "x$test_shortpath" = x; then
26644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26646    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26647  fi
26648
26649  # Call helper function which possibly converts this using DOS-style short mode.
26650  # If so, the updated path is stored in $new_path.
26651
26652  input_path="$new_path"
26653  # Check if we need to convert this using DOS-style short mode. If the path
26654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26655  # take no chances and rewrite it.
26656  # Note: m4 eats our [], so we need to use [ and ] instead.
26657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26658  if test "x$has_forbidden_chars" != x; then
26659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26663      # Going to short mode and back again did indeed matter. Since short mode is
26664      # case insensitive, let's make it lowercase to improve readability.
26665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26666      # Now convert it back to Unix-style (cygpath)
26667      input_path=`$CYGPATH -u "$shortmode_path"`
26668      new_path="$input_path"
26669    fi
26670  fi
26671
26672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26673  if test "x$test_cygdrive_prefix" = x; then
26674    # As a simple fix, exclude /usr/bin since it's not a real path.
26675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26677      # a path prefixed by /cygdrive for fixpath to work.
26678      new_path="$CYGWIN_ROOT_PATH$input_path"
26679    fi
26680  fi
26681
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26690
26691  path="$BOOT_JDK"
26692  has_colon=`$ECHO $path | $GREP ^.:`
26693  new_path="$path"
26694  if test "x$has_colon" = x; then
26695    # Not in mixed or Windows style, start by that.
26696    new_path=`cmd //c echo $path`
26697  fi
26698
26699
26700  input_path="$new_path"
26701  # Check if we need to convert this using DOS-style short mode. If the path
26702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26703  # take no chances and rewrite it.
26704  # Note: m4 eats our [], so we need to use [ and ] instead.
26705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26706  if test "x$has_forbidden_chars" != x; then
26707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26709  fi
26710
26711
26712  windows_path="$new_path"
26713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26714    unix_path=`$CYGPATH -u "$windows_path"`
26715    new_path="$unix_path"
26716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26718    new_path="$unix_path"
26719  fi
26720
26721  if test "x$path" != "x$new_path"; then
26722    BOOT_JDK="$new_path"
26723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26725  fi
26726
26727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26729
26730    else
26731      # We're on a unix platform. Hooray! :)
26732      path="$BOOT_JDK"
26733      has_space=`$ECHO "$path" | $GREP " "`
26734      if test "x$has_space" != x; then
26735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26738      fi
26739
26740      # Use eval to expand a potential ~
26741      eval path="$path"
26742      if test ! -f "$path" && test ! -d "$path"; then
26743        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26744      fi
26745
26746      if test -d "$path"; then
26747        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26748      else
26749        dir="`$DIRNAME "$path"`"
26750        base="`$BASENAME "$path"`"
26751        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26752      fi
26753    fi
26754  fi
26755
26756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26757$as_echo_n "checking for Boot JDK... " >&6; }
26758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26759$as_echo "$BOOT_JDK" >&6; }
26760            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26761$as_echo_n "checking Boot JDK version... " >&6; }
26762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26764$as_echo "$BOOT_JDK_VERSION" >&6; }
26765          fi # end check jdk version
26766        fi # end check javac
26767      fi # end check java
26768    fi # end check boot jdk found
26769  fi
26770
26771    done
26772  fi
26773
26774  fi
26775
26776
26777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26779      # Do we have a bin/java?
26780      if test ! -x "$BOOT_JDK/bin/java"; then
26781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26783        BOOT_JDK_FOUND=no
26784      else
26785        # Do we have a bin/javac?
26786        if test ! -x "$BOOT_JDK/bin/javac"; then
26787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26791          BOOT_JDK_FOUND=no
26792        else
26793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26795
26796          # Extra M4 quote needed to protect [] in grep expression.
26797          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26798          if test "x$FOUND_CORRECT_VERSION" = x; then
26799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26803            BOOT_JDK_FOUND=no
26804          else
26805            # We're done! :-)
26806            BOOT_JDK_FOUND=yes
26807
26808  # Only process if variable expands to non-empty
26809
26810  if test "x$BOOT_JDK" != x; then
26811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26812
26813  # Input might be given as Windows format, start by converting to
26814  # unix format.
26815  path="$BOOT_JDK"
26816  new_path=`$CYGPATH -u "$path"`
26817
26818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26821  # "foo.exe" is OK but "foo" is an error.
26822  #
26823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26824  # It is also a way to make sure we got the proper file name for the real test later on.
26825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26826  if test "x$test_shortpath" = x; then
26827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26830  fi
26831
26832  # Call helper function which possibly converts this using DOS-style short mode.
26833  # If so, the updated path is stored in $new_path.
26834
26835  input_path="$new_path"
26836  # Check if we need to convert this using DOS-style short mode. If the path
26837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26838  # take no chances and rewrite it.
26839  # Note: m4 eats our [], so we need to use [ and ] instead.
26840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26841  if test "x$has_forbidden_chars" != x; then
26842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26846      # Going to short mode and back again did indeed matter. Since short mode is
26847      # case insensitive, let's make it lowercase to improve readability.
26848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26849      # Now convert it back to Unix-style (cygpath)
26850      input_path=`$CYGPATH -u "$shortmode_path"`
26851      new_path="$input_path"
26852    fi
26853  fi
26854
26855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26856  if test "x$test_cygdrive_prefix" = x; then
26857    # As a simple fix, exclude /usr/bin since it's not a real path.
26858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26860      # a path prefixed by /cygdrive for fixpath to work.
26861      new_path="$CYGWIN_ROOT_PATH$input_path"
26862    fi
26863  fi
26864
26865
26866  if test "x$path" != "x$new_path"; then
26867    BOOT_JDK="$new_path"
26868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26870  fi
26871
26872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26873
26874  path="$BOOT_JDK"
26875  has_colon=`$ECHO $path | $GREP ^.:`
26876  new_path="$path"
26877  if test "x$has_colon" = x; then
26878    # Not in mixed or Windows style, start by that.
26879    new_path=`cmd //c echo $path`
26880  fi
26881
26882
26883  input_path="$new_path"
26884  # Check if we need to convert this using DOS-style short mode. If the path
26885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26886  # take no chances and rewrite it.
26887  # Note: m4 eats our [], so we need to use [ and ] instead.
26888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26889  if test "x$has_forbidden_chars" != x; then
26890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26892  fi
26893
26894
26895  windows_path="$new_path"
26896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26897    unix_path=`$CYGPATH -u "$windows_path"`
26898    new_path="$unix_path"
26899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26901    new_path="$unix_path"
26902  fi
26903
26904  if test "x$path" != "x$new_path"; then
26905    BOOT_JDK="$new_path"
26906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26908  fi
26909
26910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26912
26913    else
26914      # We're on a unix platform. Hooray! :)
26915      path="$BOOT_JDK"
26916      has_space=`$ECHO "$path" | $GREP " "`
26917      if test "x$has_space" != x; then
26918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26921      fi
26922
26923      # Use eval to expand a potential ~
26924      eval path="$path"
26925      if test ! -f "$path" && test ! -d "$path"; then
26926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26927      fi
26928
26929      if test -d "$path"; then
26930        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26931      else
26932        dir="`$DIRNAME "$path"`"
26933        base="`$BASENAME "$path"`"
26934        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26935      fi
26936    fi
26937  fi
26938
26939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26940$as_echo_n "checking for Boot JDK... " >&6; }
26941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26942$as_echo "$BOOT_JDK" >&6; }
26943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26944$as_echo_n "checking Boot JDK version... " >&6; }
26945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26947$as_echo "$BOOT_JDK_VERSION" >&6; }
26948          fi # end check jdk version
26949        fi # end check javac
26950      fi # end check java
26951    fi # end check boot jdk found
26952  fi
26953
26954
26955  if test "x$BOOT_JDK_FOUND" = xno; then
26956    # Now execute the test
26957
26958  if test "x$ProgramFiles" != x; then
26959    VIRTUAL_DIR="$ProgramFiles/Java"
26960
26961  windows_path="$VIRTUAL_DIR"
26962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26963    unix_path=`$CYGPATH -u "$windows_path"`
26964    VIRTUAL_DIR="$unix_path"
26965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26967    VIRTUAL_DIR="$unix_path"
26968  fi
26969
26970
26971  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26972  BOOT_JDK_SUFFIX=""
26973  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26974  if test "x$ALL_JDKS_FOUND" != x; then
26975    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26976
26977  if test "x$BOOT_JDK_FOUND" = xno; then
26978    # Now execute the test
26979
26980        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26981        if test -d "$BOOT_JDK"; then
26982          BOOT_JDK_FOUND=maybe
26983          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26984$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26985        fi
26986
26987
26988    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26989    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26990      # Do we have a bin/java?
26991      if test ! -x "$BOOT_JDK/bin/java"; then
26992        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26994        BOOT_JDK_FOUND=no
26995      else
26996        # Do we have a bin/javac?
26997        if test ! -x "$BOOT_JDK/bin/javac"; then
26998          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27000          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27001$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27002          BOOT_JDK_FOUND=no
27003        else
27004          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27005          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27006
27007          # Extra M4 quote needed to protect [] in grep expression.
27008          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27009          if test "x$FOUND_CORRECT_VERSION" = x; then
27010            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27012            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27013$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27014            BOOT_JDK_FOUND=no
27015          else
27016            # We're done! :-)
27017            BOOT_JDK_FOUND=yes
27018
27019  # Only process if variable expands to non-empty
27020
27021  if test "x$BOOT_JDK" != x; then
27022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27023
27024  # Input might be given as Windows format, start by converting to
27025  # unix format.
27026  path="$BOOT_JDK"
27027  new_path=`$CYGPATH -u "$path"`
27028
27029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27032  # "foo.exe" is OK but "foo" is an error.
27033  #
27034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27035  # It is also a way to make sure we got the proper file name for the real test later on.
27036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27037  if test "x$test_shortpath" = x; then
27038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27041  fi
27042
27043  # Call helper function which possibly converts this using DOS-style short mode.
27044  # If so, the updated path is stored in $new_path.
27045
27046  input_path="$new_path"
27047  # Check if we need to convert this using DOS-style short mode. If the path
27048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27049  # take no chances and rewrite it.
27050  # Note: m4 eats our [], so we need to use [ and ] instead.
27051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27052  if test "x$has_forbidden_chars" != x; then
27053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27057      # Going to short mode and back again did indeed matter. Since short mode is
27058      # case insensitive, let's make it lowercase to improve readability.
27059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27060      # Now convert it back to Unix-style (cygpath)
27061      input_path=`$CYGPATH -u "$shortmode_path"`
27062      new_path="$input_path"
27063    fi
27064  fi
27065
27066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27067  if test "x$test_cygdrive_prefix" = x; then
27068    # As a simple fix, exclude /usr/bin since it's not a real path.
27069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27071      # a path prefixed by /cygdrive for fixpath to work.
27072      new_path="$CYGWIN_ROOT_PATH$input_path"
27073    fi
27074  fi
27075
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27084
27085  path="$BOOT_JDK"
27086  has_colon=`$ECHO $path | $GREP ^.:`
27087  new_path="$path"
27088  if test "x$has_colon" = x; then
27089    # Not in mixed or Windows style, start by that.
27090    new_path=`cmd //c echo $path`
27091  fi
27092
27093
27094  input_path="$new_path"
27095  # Check if we need to convert this using DOS-style short mode. If the path
27096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27097  # take no chances and rewrite it.
27098  # Note: m4 eats our [], so we need to use [ and ] instead.
27099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27100  if test "x$has_forbidden_chars" != x; then
27101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27103  fi
27104
27105
27106  windows_path="$new_path"
27107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27108    unix_path=`$CYGPATH -u "$windows_path"`
27109    new_path="$unix_path"
27110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27112    new_path="$unix_path"
27113  fi
27114
27115  if test "x$path" != "x$new_path"; then
27116    BOOT_JDK="$new_path"
27117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27119  fi
27120
27121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27123
27124    else
27125      # We're on a unix platform. Hooray! :)
27126      path="$BOOT_JDK"
27127      has_space=`$ECHO "$path" | $GREP " "`
27128      if test "x$has_space" != x; then
27129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27132      fi
27133
27134      # Use eval to expand a potential ~
27135      eval path="$path"
27136      if test ! -f "$path" && test ! -d "$path"; then
27137        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27138      fi
27139
27140      if test -d "$path"; then
27141        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27142      else
27143        dir="`$DIRNAME "$path"`"
27144        base="`$BASENAME "$path"`"
27145        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27146      fi
27147    fi
27148  fi
27149
27150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27151$as_echo_n "checking for Boot JDK... " >&6; }
27152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27153$as_echo "$BOOT_JDK" >&6; }
27154            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27155$as_echo_n "checking Boot JDK version... " >&6; }
27156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27158$as_echo "$BOOT_JDK_VERSION" >&6; }
27159          fi # end check jdk version
27160        fi # end check javac
27161      fi # end check java
27162    fi # end check boot jdk found
27163  fi
27164
27165    done
27166  fi
27167
27168  fi
27169
27170
27171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27173      # Do we have a bin/java?
27174      if test ! -x "$BOOT_JDK/bin/java"; then
27175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27177        BOOT_JDK_FOUND=no
27178      else
27179        # Do we have a bin/javac?
27180        if test ! -x "$BOOT_JDK/bin/javac"; then
27181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27185          BOOT_JDK_FOUND=no
27186        else
27187          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27188          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27189
27190          # Extra M4 quote needed to protect [] in grep expression.
27191          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27192          if test "x$FOUND_CORRECT_VERSION" = x; then
27193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27195            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27196$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27197            BOOT_JDK_FOUND=no
27198          else
27199            # We're done! :-)
27200            BOOT_JDK_FOUND=yes
27201
27202  # Only process if variable expands to non-empty
27203
27204  if test "x$BOOT_JDK" != x; then
27205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27206
27207  # Input might be given as Windows format, start by converting to
27208  # unix format.
27209  path="$BOOT_JDK"
27210  new_path=`$CYGPATH -u "$path"`
27211
27212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27215  # "foo.exe" is OK but "foo" is an error.
27216  #
27217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27218  # It is also a way to make sure we got the proper file name for the real test later on.
27219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27220  if test "x$test_shortpath" = x; then
27221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27224  fi
27225
27226  # Call helper function which possibly converts this using DOS-style short mode.
27227  # If so, the updated path is stored in $new_path.
27228
27229  input_path="$new_path"
27230  # Check if we need to convert this using DOS-style short mode. If the path
27231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27232  # take no chances and rewrite it.
27233  # Note: m4 eats our [], so we need to use [ and ] instead.
27234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27235  if test "x$has_forbidden_chars" != x; then
27236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27240      # Going to short mode and back again did indeed matter. Since short mode is
27241      # case insensitive, let's make it lowercase to improve readability.
27242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27243      # Now convert it back to Unix-style (cygpath)
27244      input_path=`$CYGPATH -u "$shortmode_path"`
27245      new_path="$input_path"
27246    fi
27247  fi
27248
27249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27250  if test "x$test_cygdrive_prefix" = x; then
27251    # As a simple fix, exclude /usr/bin since it's not a real path.
27252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27254      # a path prefixed by /cygdrive for fixpath to work.
27255      new_path="$CYGWIN_ROOT_PATH$input_path"
27256    fi
27257  fi
27258
27259
27260  if test "x$path" != "x$new_path"; then
27261    BOOT_JDK="$new_path"
27262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27264  fi
27265
27266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27267
27268  path="$BOOT_JDK"
27269  has_colon=`$ECHO $path | $GREP ^.:`
27270  new_path="$path"
27271  if test "x$has_colon" = x; then
27272    # Not in mixed or Windows style, start by that.
27273    new_path=`cmd //c echo $path`
27274  fi
27275
27276
27277  input_path="$new_path"
27278  # Check if we need to convert this using DOS-style short mode. If the path
27279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27280  # take no chances and rewrite it.
27281  # Note: m4 eats our [], so we need to use [ and ] instead.
27282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27283  if test "x$has_forbidden_chars" != x; then
27284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27286  fi
27287
27288
27289  windows_path="$new_path"
27290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27291    unix_path=`$CYGPATH -u "$windows_path"`
27292    new_path="$unix_path"
27293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27295    new_path="$unix_path"
27296  fi
27297
27298  if test "x$path" != "x$new_path"; then
27299    BOOT_JDK="$new_path"
27300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27302  fi
27303
27304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27306
27307    else
27308      # We're on a unix platform. Hooray! :)
27309      path="$BOOT_JDK"
27310      has_space=`$ECHO "$path" | $GREP " "`
27311      if test "x$has_space" != x; then
27312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27315      fi
27316
27317      # Use eval to expand a potential ~
27318      eval path="$path"
27319      if test ! -f "$path" && test ! -d "$path"; then
27320        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27321      fi
27322
27323      if test -d "$path"; then
27324        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27325      else
27326        dir="`$DIRNAME "$path"`"
27327        base="`$BASENAME "$path"`"
27328        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27329      fi
27330    fi
27331  fi
27332
27333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27334$as_echo_n "checking for Boot JDK... " >&6; }
27335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27336$as_echo "$BOOT_JDK" >&6; }
27337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27338$as_echo_n "checking Boot JDK version... " >&6; }
27339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27341$as_echo "$BOOT_JDK_VERSION" >&6; }
27342          fi # end check jdk version
27343        fi # end check javac
27344      fi # end check java
27345    fi # end check boot jdk found
27346  fi
27347
27348
27349  if test "x$BOOT_JDK_FOUND" = xno; then
27350    # Now execute the test
27351
27352  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27353  BOOT_JDK_SUFFIX=""
27354  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27355  if test "x$ALL_JDKS_FOUND" != x; then
27356    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27357
27358  if test "x$BOOT_JDK_FOUND" = xno; then
27359    # Now execute the test
27360
27361        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27362        if test -d "$BOOT_JDK"; then
27363          BOOT_JDK_FOUND=maybe
27364          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27365$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27366        fi
27367
27368
27369    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27370    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27371      # Do we have a bin/java?
27372      if test ! -x "$BOOT_JDK/bin/java"; then
27373        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27375        BOOT_JDK_FOUND=no
27376      else
27377        # Do we have a bin/javac?
27378        if test ! -x "$BOOT_JDK/bin/javac"; then
27379          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27381          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27382$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27383          BOOT_JDK_FOUND=no
27384        else
27385          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27386          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27387
27388          # Extra M4 quote needed to protect [] in grep expression.
27389          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27390          if test "x$FOUND_CORRECT_VERSION" = x; then
27391            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27393            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27394$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27395            BOOT_JDK_FOUND=no
27396          else
27397            # We're done! :-)
27398            BOOT_JDK_FOUND=yes
27399
27400  # Only process if variable expands to non-empty
27401
27402  if test "x$BOOT_JDK" != x; then
27403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27404
27405  # Input might be given as Windows format, start by converting to
27406  # unix format.
27407  path="$BOOT_JDK"
27408  new_path=`$CYGPATH -u "$path"`
27409
27410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27413  # "foo.exe" is OK but "foo" is an error.
27414  #
27415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27416  # It is also a way to make sure we got the proper file name for the real test later on.
27417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27418  if test "x$test_shortpath" = x; then
27419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27422  fi
27423
27424  # Call helper function which possibly converts this using DOS-style short mode.
27425  # If so, the updated path is stored in $new_path.
27426
27427  input_path="$new_path"
27428  # Check if we need to convert this using DOS-style short mode. If the path
27429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27430  # take no chances and rewrite it.
27431  # Note: m4 eats our [], so we need to use [ and ] instead.
27432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27433  if test "x$has_forbidden_chars" != x; then
27434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27438      # Going to short mode and back again did indeed matter. Since short mode is
27439      # case insensitive, let's make it lowercase to improve readability.
27440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27441      # Now convert it back to Unix-style (cygpath)
27442      input_path=`$CYGPATH -u "$shortmode_path"`
27443      new_path="$input_path"
27444    fi
27445  fi
27446
27447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27448  if test "x$test_cygdrive_prefix" = x; then
27449    # As a simple fix, exclude /usr/bin since it's not a real path.
27450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27452      # a path prefixed by /cygdrive for fixpath to work.
27453      new_path="$CYGWIN_ROOT_PATH$input_path"
27454    fi
27455  fi
27456
27457
27458  if test "x$path" != "x$new_path"; then
27459    BOOT_JDK="$new_path"
27460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27462  fi
27463
27464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27465
27466  path="$BOOT_JDK"
27467  has_colon=`$ECHO $path | $GREP ^.:`
27468  new_path="$path"
27469  if test "x$has_colon" = x; then
27470    # Not in mixed or Windows style, start by that.
27471    new_path=`cmd //c echo $path`
27472  fi
27473
27474
27475  input_path="$new_path"
27476  # Check if we need to convert this using DOS-style short mode. If the path
27477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27478  # take no chances and rewrite it.
27479  # Note: m4 eats our [], so we need to use [ and ] instead.
27480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27481  if test "x$has_forbidden_chars" != x; then
27482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27484  fi
27485
27486
27487  windows_path="$new_path"
27488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27489    unix_path=`$CYGPATH -u "$windows_path"`
27490    new_path="$unix_path"
27491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27493    new_path="$unix_path"
27494  fi
27495
27496  if test "x$path" != "x$new_path"; then
27497    BOOT_JDK="$new_path"
27498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27500  fi
27501
27502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27504
27505    else
27506      # We're on a unix platform. Hooray! :)
27507      path="$BOOT_JDK"
27508      has_space=`$ECHO "$path" | $GREP " "`
27509      if test "x$has_space" != x; then
27510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27513      fi
27514
27515      # Use eval to expand a potential ~
27516      eval path="$path"
27517      if test ! -f "$path" && test ! -d "$path"; then
27518        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27519      fi
27520
27521      if test -d "$path"; then
27522        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27523      else
27524        dir="`$DIRNAME "$path"`"
27525        base="`$BASENAME "$path"`"
27526        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27527      fi
27528    fi
27529  fi
27530
27531            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27532$as_echo_n "checking for Boot JDK... " >&6; }
27533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27534$as_echo "$BOOT_JDK" >&6; }
27535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27536$as_echo_n "checking Boot JDK version... " >&6; }
27537            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27539$as_echo "$BOOT_JDK_VERSION" >&6; }
27540          fi # end check jdk version
27541        fi # end check javac
27542      fi # end check java
27543    fi # end check boot jdk found
27544  fi
27545
27546    done
27547  fi
27548
27549
27550    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27551    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27552      # Do we have a bin/java?
27553      if test ! -x "$BOOT_JDK/bin/java"; then
27554        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27556        BOOT_JDK_FOUND=no
27557      else
27558        # Do we have a bin/javac?
27559        if test ! -x "$BOOT_JDK/bin/javac"; then
27560          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27562          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27563$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27564          BOOT_JDK_FOUND=no
27565        else
27566          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27567          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27568
27569          # Extra M4 quote needed to protect [] in grep expression.
27570          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27571          if test "x$FOUND_CORRECT_VERSION" = x; then
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27575$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27576            BOOT_JDK_FOUND=no
27577          else
27578            # We're done! :-)
27579            BOOT_JDK_FOUND=yes
27580
27581  # Only process if variable expands to non-empty
27582
27583  if test "x$BOOT_JDK" != x; then
27584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27585
27586  # Input might be given as Windows format, start by converting to
27587  # unix format.
27588  path="$BOOT_JDK"
27589  new_path=`$CYGPATH -u "$path"`
27590
27591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27594  # "foo.exe" is OK but "foo" is an error.
27595  #
27596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27597  # It is also a way to make sure we got the proper file name for the real test later on.
27598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27599  if test "x$test_shortpath" = x; then
27600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27601$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27602    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27603  fi
27604
27605  # Call helper function which possibly converts this using DOS-style short mode.
27606  # If so, the updated path is stored in $new_path.
27607
27608  input_path="$new_path"
27609  # Check if we need to convert this using DOS-style short mode. If the path
27610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27611  # take no chances and rewrite it.
27612  # Note: m4 eats our [], so we need to use [ and ] instead.
27613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27614  if test "x$has_forbidden_chars" != x; then
27615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27619      # Going to short mode and back again did indeed matter. Since short mode is
27620      # case insensitive, let's make it lowercase to improve readability.
27621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27622      # Now convert it back to Unix-style (cygpath)
27623      input_path=`$CYGPATH -u "$shortmode_path"`
27624      new_path="$input_path"
27625    fi
27626  fi
27627
27628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27629  if test "x$test_cygdrive_prefix" = x; then
27630    # As a simple fix, exclude /usr/bin since it's not a real path.
27631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27633      # a path prefixed by /cygdrive for fixpath to work.
27634      new_path="$CYGWIN_ROOT_PATH$input_path"
27635    fi
27636  fi
27637
27638
27639  if test "x$path" != "x$new_path"; then
27640    BOOT_JDK="$new_path"
27641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27643  fi
27644
27645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27646
27647  path="$BOOT_JDK"
27648  has_colon=`$ECHO $path | $GREP ^.:`
27649  new_path="$path"
27650  if test "x$has_colon" = x; then
27651    # Not in mixed or Windows style, start by that.
27652    new_path=`cmd //c echo $path`
27653  fi
27654
27655
27656  input_path="$new_path"
27657  # Check if we need to convert this using DOS-style short mode. If the path
27658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27659  # take no chances and rewrite it.
27660  # Note: m4 eats our [], so we need to use [ and ] instead.
27661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27662  if test "x$has_forbidden_chars" != x; then
27663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27665  fi
27666
27667
27668  windows_path="$new_path"
27669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27670    unix_path=`$CYGPATH -u "$windows_path"`
27671    new_path="$unix_path"
27672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27674    new_path="$unix_path"
27675  fi
27676
27677  if test "x$path" != "x$new_path"; then
27678    BOOT_JDK="$new_path"
27679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27681  fi
27682
27683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27685
27686    else
27687      # We're on a unix platform. Hooray! :)
27688      path="$BOOT_JDK"
27689      has_space=`$ECHO "$path" | $GREP " "`
27690      if test "x$has_space" != x; then
27691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27694      fi
27695
27696      # Use eval to expand a potential ~
27697      eval path="$path"
27698      if test ! -f "$path" && test ! -d "$path"; then
27699        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27700      fi
27701
27702      if test -d "$path"; then
27703        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27704      else
27705        dir="`$DIRNAME "$path"`"
27706        base="`$BASENAME "$path"`"
27707        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27708      fi
27709    fi
27710  fi
27711
27712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27713$as_echo_n "checking for Boot JDK... " >&6; }
27714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27715$as_echo "$BOOT_JDK" >&6; }
27716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27717$as_echo_n "checking Boot JDK version... " >&6; }
27718            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27720$as_echo "$BOOT_JDK_VERSION" >&6; }
27721          fi # end check jdk version
27722        fi # end check javac
27723      fi # end check java
27724    fi # end check boot jdk found
27725  fi
27726
27727  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27728
27729  if test "x$BOOT_JDK_FOUND" = xno; then
27730    # Now execute the test
27731
27732  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27733  BOOT_JDK_SUFFIX="/Contents/Home"
27734  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27735  if test "x$ALL_JDKS_FOUND" != x; then
27736    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27737
27738  if test "x$BOOT_JDK_FOUND" = xno; then
27739    # Now execute the test
27740
27741        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27742        if test -d "$BOOT_JDK"; then
27743          BOOT_JDK_FOUND=maybe
27744          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27745$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27746        fi
27747
27748
27749    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27750    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27751      # Do we have a bin/java?
27752      if test ! -x "$BOOT_JDK/bin/java"; then
27753        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27755        BOOT_JDK_FOUND=no
27756      else
27757        # Do we have a bin/javac?
27758        if test ! -x "$BOOT_JDK/bin/javac"; then
27759          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27761          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27762$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27763          BOOT_JDK_FOUND=no
27764        else
27765          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27766          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27767
27768          # Extra M4 quote needed to protect [] in grep expression.
27769          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27770          if test "x$FOUND_CORRECT_VERSION" = x; then
27771            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27773            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27774$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27775            BOOT_JDK_FOUND=no
27776          else
27777            # We're done! :-)
27778            BOOT_JDK_FOUND=yes
27779
27780  # Only process if variable expands to non-empty
27781
27782  if test "x$BOOT_JDK" != x; then
27783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27784
27785  # Input might be given as Windows format, start by converting to
27786  # unix format.
27787  path="$BOOT_JDK"
27788  new_path=`$CYGPATH -u "$path"`
27789
27790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27793  # "foo.exe" is OK but "foo" is an error.
27794  #
27795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27796  # It is also a way to make sure we got the proper file name for the real test later on.
27797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27798  if test "x$test_shortpath" = x; then
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27800$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27801    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27802  fi
27803
27804  # Call helper function which possibly converts this using DOS-style short mode.
27805  # If so, the updated path is stored in $new_path.
27806
27807  input_path="$new_path"
27808  # Check if we need to convert this using DOS-style short mode. If the path
27809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27810  # take no chances and rewrite it.
27811  # Note: m4 eats our [], so we need to use [ and ] instead.
27812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27813  if test "x$has_forbidden_chars" != x; then
27814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27818      # Going to short mode and back again did indeed matter. Since short mode is
27819      # case insensitive, let's make it lowercase to improve readability.
27820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27821      # Now convert it back to Unix-style (cygpath)
27822      input_path=`$CYGPATH -u "$shortmode_path"`
27823      new_path="$input_path"
27824    fi
27825  fi
27826
27827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27828  if test "x$test_cygdrive_prefix" = x; then
27829    # As a simple fix, exclude /usr/bin since it's not a real path.
27830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27832      # a path prefixed by /cygdrive for fixpath to work.
27833      new_path="$CYGWIN_ROOT_PATH$input_path"
27834    fi
27835  fi
27836
27837
27838  if test "x$path" != "x$new_path"; then
27839    BOOT_JDK="$new_path"
27840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27842  fi
27843
27844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27845
27846  path="$BOOT_JDK"
27847  has_colon=`$ECHO $path | $GREP ^.:`
27848  new_path="$path"
27849  if test "x$has_colon" = x; then
27850    # Not in mixed or Windows style, start by that.
27851    new_path=`cmd //c echo $path`
27852  fi
27853
27854
27855  input_path="$new_path"
27856  # Check if we need to convert this using DOS-style short mode. If the path
27857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27858  # take no chances and rewrite it.
27859  # Note: m4 eats our [], so we need to use [ and ] instead.
27860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27861  if test "x$has_forbidden_chars" != x; then
27862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27864  fi
27865
27866
27867  windows_path="$new_path"
27868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27869    unix_path=`$CYGPATH -u "$windows_path"`
27870    new_path="$unix_path"
27871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27873    new_path="$unix_path"
27874  fi
27875
27876  if test "x$path" != "x$new_path"; then
27877    BOOT_JDK="$new_path"
27878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27880  fi
27881
27882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27884
27885    else
27886      # We're on a unix platform. Hooray! :)
27887      path="$BOOT_JDK"
27888      has_space=`$ECHO "$path" | $GREP " "`
27889      if test "x$has_space" != x; then
27890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27893      fi
27894
27895      # Use eval to expand a potential ~
27896      eval path="$path"
27897      if test ! -f "$path" && test ! -d "$path"; then
27898        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27899      fi
27900
27901      if test -d "$path"; then
27902        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27903      else
27904        dir="`$DIRNAME "$path"`"
27905        base="`$BASENAME "$path"`"
27906        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27907      fi
27908    fi
27909  fi
27910
27911            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27912$as_echo_n "checking for Boot JDK... " >&6; }
27913            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27914$as_echo "$BOOT_JDK" >&6; }
27915            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27916$as_echo_n "checking Boot JDK version... " >&6; }
27917            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27919$as_echo "$BOOT_JDK_VERSION" >&6; }
27920          fi # end check jdk version
27921        fi # end check javac
27922      fi # end check java
27923    fi # end check boot jdk found
27924  fi
27925
27926    done
27927  fi
27928
27929
27930    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27931    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27932      # Do we have a bin/java?
27933      if test ! -x "$BOOT_JDK/bin/java"; then
27934        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27936        BOOT_JDK_FOUND=no
27937      else
27938        # Do we have a bin/javac?
27939        if test ! -x "$BOOT_JDK/bin/javac"; then
27940          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27942          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27943$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27944          BOOT_JDK_FOUND=no
27945        else
27946          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27947          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27948
27949          # Extra M4 quote needed to protect [] in grep expression.
27950          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27951          if test "x$FOUND_CORRECT_VERSION" = x; then
27952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27954            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27955$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27956            BOOT_JDK_FOUND=no
27957          else
27958            # We're done! :-)
27959            BOOT_JDK_FOUND=yes
27960
27961  # Only process if variable expands to non-empty
27962
27963  if test "x$BOOT_JDK" != x; then
27964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27965
27966  # Input might be given as Windows format, start by converting to
27967  # unix format.
27968  path="$BOOT_JDK"
27969  new_path=`$CYGPATH -u "$path"`
27970
27971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27974  # "foo.exe" is OK but "foo" is an error.
27975  #
27976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27977  # It is also a way to make sure we got the proper file name for the real test later on.
27978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27979  if test "x$test_shortpath" = x; then
27980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27983  fi
27984
27985  # Call helper function which possibly converts this using DOS-style short mode.
27986  # If so, the updated path is stored in $new_path.
27987
27988  input_path="$new_path"
27989  # Check if we need to convert this using DOS-style short mode. If the path
27990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27991  # take no chances and rewrite it.
27992  # Note: m4 eats our [], so we need to use [ and ] instead.
27993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27994  if test "x$has_forbidden_chars" != x; then
27995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27999      # Going to short mode and back again did indeed matter. Since short mode is
28000      # case insensitive, let's make it lowercase to improve readability.
28001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28002      # Now convert it back to Unix-style (cygpath)
28003      input_path=`$CYGPATH -u "$shortmode_path"`
28004      new_path="$input_path"
28005    fi
28006  fi
28007
28008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28009  if test "x$test_cygdrive_prefix" = x; then
28010    # As a simple fix, exclude /usr/bin since it's not a real path.
28011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28013      # a path prefixed by /cygdrive for fixpath to work.
28014      new_path="$CYGWIN_ROOT_PATH$input_path"
28015    fi
28016  fi
28017
28018
28019  if test "x$path" != "x$new_path"; then
28020    BOOT_JDK="$new_path"
28021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28023  fi
28024
28025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28026
28027  path="$BOOT_JDK"
28028  has_colon=`$ECHO $path | $GREP ^.:`
28029  new_path="$path"
28030  if test "x$has_colon" = x; then
28031    # Not in mixed or Windows style, start by that.
28032    new_path=`cmd //c echo $path`
28033  fi
28034
28035
28036  input_path="$new_path"
28037  # Check if we need to convert this using DOS-style short mode. If the path
28038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28039  # take no chances and rewrite it.
28040  # Note: m4 eats our [], so we need to use [ and ] instead.
28041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28042  if test "x$has_forbidden_chars" != x; then
28043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28045  fi
28046
28047
28048  windows_path="$new_path"
28049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28050    unix_path=`$CYGPATH -u "$windows_path"`
28051    new_path="$unix_path"
28052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28054    new_path="$unix_path"
28055  fi
28056
28057  if test "x$path" != "x$new_path"; then
28058    BOOT_JDK="$new_path"
28059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28061  fi
28062
28063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28065
28066    else
28067      # We're on a unix platform. Hooray! :)
28068      path="$BOOT_JDK"
28069      has_space=`$ECHO "$path" | $GREP " "`
28070      if test "x$has_space" != x; then
28071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28074      fi
28075
28076      # Use eval to expand a potential ~
28077      eval path="$path"
28078      if test ! -f "$path" && test ! -d "$path"; then
28079        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28080      fi
28081
28082      if test -d "$path"; then
28083        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28084      else
28085        dir="`$DIRNAME "$path"`"
28086        base="`$BASENAME "$path"`"
28087        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28088      fi
28089    fi
28090  fi
28091
28092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28093$as_echo_n "checking for Boot JDK... " >&6; }
28094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28095$as_echo "$BOOT_JDK" >&6; }
28096            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28097$as_echo_n "checking Boot JDK version... " >&6; }
28098            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28100$as_echo "$BOOT_JDK_VERSION" >&6; }
28101          fi # end check jdk version
28102        fi # end check javac
28103      fi # end check java
28104    fi # end check boot jdk found
28105  fi
28106
28107
28108  if test "x$BOOT_JDK_FOUND" = xno; then
28109    # Now execute the test
28110
28111  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28112  BOOT_JDK_SUFFIX="/Contents/Home"
28113  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28114  if test "x$ALL_JDKS_FOUND" != x; then
28115    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28116
28117  if test "x$BOOT_JDK_FOUND" = xno; then
28118    # Now execute the test
28119
28120        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28121        if test -d "$BOOT_JDK"; then
28122          BOOT_JDK_FOUND=maybe
28123          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28124$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28125        fi
28126
28127
28128    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28129    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28130      # Do we have a bin/java?
28131      if test ! -x "$BOOT_JDK/bin/java"; then
28132        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28134        BOOT_JDK_FOUND=no
28135      else
28136        # Do we have a bin/javac?
28137        if test ! -x "$BOOT_JDK/bin/javac"; then
28138          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28140          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28141$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28142          BOOT_JDK_FOUND=no
28143        else
28144          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28145          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28146
28147          # Extra M4 quote needed to protect [] in grep expression.
28148          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28149          if test "x$FOUND_CORRECT_VERSION" = x; then
28150            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28152            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28153$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28154            BOOT_JDK_FOUND=no
28155          else
28156            # We're done! :-)
28157            BOOT_JDK_FOUND=yes
28158
28159  # Only process if variable expands to non-empty
28160
28161  if test "x$BOOT_JDK" != x; then
28162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28163
28164  # Input might be given as Windows format, start by converting to
28165  # unix format.
28166  path="$BOOT_JDK"
28167  new_path=`$CYGPATH -u "$path"`
28168
28169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28172  # "foo.exe" is OK but "foo" is an error.
28173  #
28174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28175  # It is also a way to make sure we got the proper file name for the real test later on.
28176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28177  if test "x$test_shortpath" = x; then
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28179$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28180    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28181  fi
28182
28183  # Call helper function which possibly converts this using DOS-style short mode.
28184  # If so, the updated path is stored in $new_path.
28185
28186  input_path="$new_path"
28187  # Check if we need to convert this using DOS-style short mode. If the path
28188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28189  # take no chances and rewrite it.
28190  # Note: m4 eats our [], so we need to use [ and ] instead.
28191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28192  if test "x$has_forbidden_chars" != x; then
28193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28197      # Going to short mode and back again did indeed matter. Since short mode is
28198      # case insensitive, let's make it lowercase to improve readability.
28199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28200      # Now convert it back to Unix-style (cygpath)
28201      input_path=`$CYGPATH -u "$shortmode_path"`
28202      new_path="$input_path"
28203    fi
28204  fi
28205
28206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28207  if test "x$test_cygdrive_prefix" = x; then
28208    # As a simple fix, exclude /usr/bin since it's not a real path.
28209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28211      # a path prefixed by /cygdrive for fixpath to work.
28212      new_path="$CYGWIN_ROOT_PATH$input_path"
28213    fi
28214  fi
28215
28216
28217  if test "x$path" != "x$new_path"; then
28218    BOOT_JDK="$new_path"
28219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28221  fi
28222
28223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28224
28225  path="$BOOT_JDK"
28226  has_colon=`$ECHO $path | $GREP ^.:`
28227  new_path="$path"
28228  if test "x$has_colon" = x; then
28229    # Not in mixed or Windows style, start by that.
28230    new_path=`cmd //c echo $path`
28231  fi
28232
28233
28234  input_path="$new_path"
28235  # Check if we need to convert this using DOS-style short mode. If the path
28236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28237  # take no chances and rewrite it.
28238  # Note: m4 eats our [], so we need to use [ and ] instead.
28239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28240  if test "x$has_forbidden_chars" != x; then
28241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28243  fi
28244
28245
28246  windows_path="$new_path"
28247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28248    unix_path=`$CYGPATH -u "$windows_path"`
28249    new_path="$unix_path"
28250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28252    new_path="$unix_path"
28253  fi
28254
28255  if test "x$path" != "x$new_path"; then
28256    BOOT_JDK="$new_path"
28257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28259  fi
28260
28261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28263
28264    else
28265      # We're on a unix platform. Hooray! :)
28266      path="$BOOT_JDK"
28267      has_space=`$ECHO "$path" | $GREP " "`
28268      if test "x$has_space" != x; then
28269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28270$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28272      fi
28273
28274      # Use eval to expand a potential ~
28275      eval path="$path"
28276      if test ! -f "$path" && test ! -d "$path"; then
28277        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28278      fi
28279
28280      if test -d "$path"; then
28281        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28282      else
28283        dir="`$DIRNAME "$path"`"
28284        base="`$BASENAME "$path"`"
28285        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28286      fi
28287    fi
28288  fi
28289
28290            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28291$as_echo_n "checking for Boot JDK... " >&6; }
28292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28293$as_echo "$BOOT_JDK" >&6; }
28294            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28295$as_echo_n "checking Boot JDK version... " >&6; }
28296            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28298$as_echo "$BOOT_JDK_VERSION" >&6; }
28299          fi # end check jdk version
28300        fi # end check javac
28301      fi # end check java
28302    fi # end check boot jdk found
28303  fi
28304
28305    done
28306  fi
28307
28308
28309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28311      # Do we have a bin/java?
28312      if test ! -x "$BOOT_JDK/bin/java"; then
28313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28315        BOOT_JDK_FOUND=no
28316      else
28317        # Do we have a bin/javac?
28318        if test ! -x "$BOOT_JDK/bin/javac"; then
28319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28323          BOOT_JDK_FOUND=no
28324        else
28325          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28326          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28327
28328          # Extra M4 quote needed to protect [] in grep expression.
28329          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28330          if test "x$FOUND_CORRECT_VERSION" = x; then
28331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28334$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28335            BOOT_JDK_FOUND=no
28336          else
28337            # We're done! :-)
28338            BOOT_JDK_FOUND=yes
28339
28340  # Only process if variable expands to non-empty
28341
28342  if test "x$BOOT_JDK" != x; then
28343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28344
28345  # Input might be given as Windows format, start by converting to
28346  # unix format.
28347  path="$BOOT_JDK"
28348  new_path=`$CYGPATH -u "$path"`
28349
28350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28353  # "foo.exe" is OK but "foo" is an error.
28354  #
28355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28356  # It is also a way to make sure we got the proper file name for the real test later on.
28357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28358  if test "x$test_shortpath" = x; then
28359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28362  fi
28363
28364  # Call helper function which possibly converts this using DOS-style short mode.
28365  # If so, the updated path is stored in $new_path.
28366
28367  input_path="$new_path"
28368  # Check if we need to convert this using DOS-style short mode. If the path
28369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28370  # take no chances and rewrite it.
28371  # Note: m4 eats our [], so we need to use [ and ] instead.
28372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28373  if test "x$has_forbidden_chars" != x; then
28374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28378      # Going to short mode and back again did indeed matter. Since short mode is
28379      # case insensitive, let's make it lowercase to improve readability.
28380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28381      # Now convert it back to Unix-style (cygpath)
28382      input_path=`$CYGPATH -u "$shortmode_path"`
28383      new_path="$input_path"
28384    fi
28385  fi
28386
28387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28388  if test "x$test_cygdrive_prefix" = x; then
28389    # As a simple fix, exclude /usr/bin since it's not a real path.
28390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28392      # a path prefixed by /cygdrive for fixpath to work.
28393      new_path="$CYGWIN_ROOT_PATH$input_path"
28394    fi
28395  fi
28396
28397
28398  if test "x$path" != "x$new_path"; then
28399    BOOT_JDK="$new_path"
28400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28402  fi
28403
28404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28405
28406  path="$BOOT_JDK"
28407  has_colon=`$ECHO $path | $GREP ^.:`
28408  new_path="$path"
28409  if test "x$has_colon" = x; then
28410    # Not in mixed or Windows style, start by that.
28411    new_path=`cmd //c echo $path`
28412  fi
28413
28414
28415  input_path="$new_path"
28416  # Check if we need to convert this using DOS-style short mode. If the path
28417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418  # take no chances and rewrite it.
28419  # Note: m4 eats our [], so we need to use [ and ] instead.
28420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28421  if test "x$has_forbidden_chars" != x; then
28422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28424  fi
28425
28426
28427  windows_path="$new_path"
28428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28429    unix_path=`$CYGPATH -u "$windows_path"`
28430    new_path="$unix_path"
28431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28433    new_path="$unix_path"
28434  fi
28435
28436  if test "x$path" != "x$new_path"; then
28437    BOOT_JDK="$new_path"
28438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28440  fi
28441
28442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28444
28445    else
28446      # We're on a unix platform. Hooray! :)
28447      path="$BOOT_JDK"
28448      has_space=`$ECHO "$path" | $GREP " "`
28449      if test "x$has_space" != x; then
28450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28453      fi
28454
28455      # Use eval to expand a potential ~
28456      eval path="$path"
28457      if test ! -f "$path" && test ! -d "$path"; then
28458        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28459      fi
28460
28461      if test -d "$path"; then
28462        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28463      else
28464        dir="`$DIRNAME "$path"`"
28465        base="`$BASENAME "$path"`"
28466        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28467      fi
28468    fi
28469  fi
28470
28471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28472$as_echo_n "checking for Boot JDK... " >&6; }
28473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28474$as_echo "$BOOT_JDK" >&6; }
28475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28476$as_echo_n "checking Boot JDK version... " >&6; }
28477            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28479$as_echo "$BOOT_JDK_VERSION" >&6; }
28480          fi # end check jdk version
28481        fi # end check javac
28482      fi # end check java
28483    fi # end check boot jdk found
28484  fi
28485
28486  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28487
28488  if test "x$BOOT_JDK_FOUND" = xno; then
28489    # Now execute the test
28490
28491  BOOT_JDK_PREFIX="/usr/lib/jvm"
28492  BOOT_JDK_SUFFIX=""
28493  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28494  if test "x$ALL_JDKS_FOUND" != x; then
28495    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28496
28497  if test "x$BOOT_JDK_FOUND" = xno; then
28498    # Now execute the test
28499
28500        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28501        if test -d "$BOOT_JDK"; then
28502          BOOT_JDK_FOUND=maybe
28503          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28504$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28505        fi
28506
28507
28508    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28509    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28510      # Do we have a bin/java?
28511      if test ! -x "$BOOT_JDK/bin/java"; then
28512        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28514        BOOT_JDK_FOUND=no
28515      else
28516        # Do we have a bin/javac?
28517        if test ! -x "$BOOT_JDK/bin/javac"; then
28518          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28520          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28521$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28522          BOOT_JDK_FOUND=no
28523        else
28524          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28525          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28526
28527          # Extra M4 quote needed to protect [] in grep expression.
28528          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28529          if test "x$FOUND_CORRECT_VERSION" = x; then
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28533$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28534            BOOT_JDK_FOUND=no
28535          else
28536            # We're done! :-)
28537            BOOT_JDK_FOUND=yes
28538
28539  # Only process if variable expands to non-empty
28540
28541  if test "x$BOOT_JDK" != x; then
28542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28543
28544  # Input might be given as Windows format, start by converting to
28545  # unix format.
28546  path="$BOOT_JDK"
28547  new_path=`$CYGPATH -u "$path"`
28548
28549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28552  # "foo.exe" is OK but "foo" is an error.
28553  #
28554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28555  # It is also a way to make sure we got the proper file name for the real test later on.
28556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28557  if test "x$test_shortpath" = x; then
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28560    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28561  fi
28562
28563  # Call helper function which possibly converts this using DOS-style short mode.
28564  # If so, the updated path is stored in $new_path.
28565
28566  input_path="$new_path"
28567  # Check if we need to convert this using DOS-style short mode. If the path
28568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28569  # take no chances and rewrite it.
28570  # Note: m4 eats our [], so we need to use [ and ] instead.
28571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28572  if test "x$has_forbidden_chars" != x; then
28573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28577      # Going to short mode and back again did indeed matter. Since short mode is
28578      # case insensitive, let's make it lowercase to improve readability.
28579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28580      # Now convert it back to Unix-style (cygpath)
28581      input_path=`$CYGPATH -u "$shortmode_path"`
28582      new_path="$input_path"
28583    fi
28584  fi
28585
28586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28587  if test "x$test_cygdrive_prefix" = x; then
28588    # As a simple fix, exclude /usr/bin since it's not a real path.
28589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28591      # a path prefixed by /cygdrive for fixpath to work.
28592      new_path="$CYGWIN_ROOT_PATH$input_path"
28593    fi
28594  fi
28595
28596
28597  if test "x$path" != "x$new_path"; then
28598    BOOT_JDK="$new_path"
28599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28601  fi
28602
28603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28604
28605  path="$BOOT_JDK"
28606  has_colon=`$ECHO $path | $GREP ^.:`
28607  new_path="$path"
28608  if test "x$has_colon" = x; then
28609    # Not in mixed or Windows style, start by that.
28610    new_path=`cmd //c echo $path`
28611  fi
28612
28613
28614  input_path="$new_path"
28615  # Check if we need to convert this using DOS-style short mode. If the path
28616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28617  # take no chances and rewrite it.
28618  # Note: m4 eats our [], so we need to use [ and ] instead.
28619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28620  if test "x$has_forbidden_chars" != x; then
28621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28623  fi
28624
28625
28626  windows_path="$new_path"
28627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28628    unix_path=`$CYGPATH -u "$windows_path"`
28629    new_path="$unix_path"
28630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28632    new_path="$unix_path"
28633  fi
28634
28635  if test "x$path" != "x$new_path"; then
28636    BOOT_JDK="$new_path"
28637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28639  fi
28640
28641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28643
28644    else
28645      # We're on a unix platform. Hooray! :)
28646      path="$BOOT_JDK"
28647      has_space=`$ECHO "$path" | $GREP " "`
28648      if test "x$has_space" != x; then
28649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28652      fi
28653
28654      # Use eval to expand a potential ~
28655      eval path="$path"
28656      if test ! -f "$path" && test ! -d "$path"; then
28657        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28658      fi
28659
28660      if test -d "$path"; then
28661        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28662      else
28663        dir="`$DIRNAME "$path"`"
28664        base="`$BASENAME "$path"`"
28665        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28666      fi
28667    fi
28668  fi
28669
28670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28671$as_echo_n "checking for Boot JDK... " >&6; }
28672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28673$as_echo "$BOOT_JDK" >&6; }
28674            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28675$as_echo_n "checking Boot JDK version... " >&6; }
28676            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28678$as_echo "$BOOT_JDK_VERSION" >&6; }
28679          fi # end check jdk version
28680        fi # end check javac
28681      fi # end check java
28682    fi # end check boot jdk found
28683  fi
28684
28685    done
28686  fi
28687
28688
28689    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28690    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28691      # Do we have a bin/java?
28692      if test ! -x "$BOOT_JDK/bin/java"; then
28693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28695        BOOT_JDK_FOUND=no
28696      else
28697        # Do we have a bin/javac?
28698        if test ! -x "$BOOT_JDK/bin/javac"; then
28699          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28701          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28702$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28703          BOOT_JDK_FOUND=no
28704        else
28705          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28706          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28707
28708          # Extra M4 quote needed to protect [] in grep expression.
28709          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28710          if test "x$FOUND_CORRECT_VERSION" = x; then
28711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28713            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28714$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28715            BOOT_JDK_FOUND=no
28716          else
28717            # We're done! :-)
28718            BOOT_JDK_FOUND=yes
28719
28720  # Only process if variable expands to non-empty
28721
28722  if test "x$BOOT_JDK" != x; then
28723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28724
28725  # Input might be given as Windows format, start by converting to
28726  # unix format.
28727  path="$BOOT_JDK"
28728  new_path=`$CYGPATH -u "$path"`
28729
28730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28733  # "foo.exe" is OK but "foo" is an error.
28734  #
28735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28736  # It is also a way to make sure we got the proper file name for the real test later on.
28737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28738  if test "x$test_shortpath" = x; then
28739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28741    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28742  fi
28743
28744  # Call helper function which possibly converts this using DOS-style short mode.
28745  # If so, the updated path is stored in $new_path.
28746
28747  input_path="$new_path"
28748  # Check if we need to convert this using DOS-style short mode. If the path
28749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28750  # take no chances and rewrite it.
28751  # Note: m4 eats our [], so we need to use [ and ] instead.
28752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28753  if test "x$has_forbidden_chars" != x; then
28754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28758      # Going to short mode and back again did indeed matter. Since short mode is
28759      # case insensitive, let's make it lowercase to improve readability.
28760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28761      # Now convert it back to Unix-style (cygpath)
28762      input_path=`$CYGPATH -u "$shortmode_path"`
28763      new_path="$input_path"
28764    fi
28765  fi
28766
28767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28768  if test "x$test_cygdrive_prefix" = x; then
28769    # As a simple fix, exclude /usr/bin since it's not a real path.
28770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28772      # a path prefixed by /cygdrive for fixpath to work.
28773      new_path="$CYGWIN_ROOT_PATH$input_path"
28774    fi
28775  fi
28776
28777
28778  if test "x$path" != "x$new_path"; then
28779    BOOT_JDK="$new_path"
28780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28782  fi
28783
28784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28785
28786  path="$BOOT_JDK"
28787  has_colon=`$ECHO $path | $GREP ^.:`
28788  new_path="$path"
28789  if test "x$has_colon" = x; then
28790    # Not in mixed or Windows style, start by that.
28791    new_path=`cmd //c echo $path`
28792  fi
28793
28794
28795  input_path="$new_path"
28796  # Check if we need to convert this using DOS-style short mode. If the path
28797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28798  # take no chances and rewrite it.
28799  # Note: m4 eats our [], so we need to use [ and ] instead.
28800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28801  if test "x$has_forbidden_chars" != x; then
28802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28804  fi
28805
28806
28807  windows_path="$new_path"
28808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28809    unix_path=`$CYGPATH -u "$windows_path"`
28810    new_path="$unix_path"
28811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28813    new_path="$unix_path"
28814  fi
28815
28816  if test "x$path" != "x$new_path"; then
28817    BOOT_JDK="$new_path"
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28820  fi
28821
28822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28824
28825    else
28826      # We're on a unix platform. Hooray! :)
28827      path="$BOOT_JDK"
28828      has_space=`$ECHO "$path" | $GREP " "`
28829      if test "x$has_space" != x; then
28830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28833      fi
28834
28835      # Use eval to expand a potential ~
28836      eval path="$path"
28837      if test ! -f "$path" && test ! -d "$path"; then
28838        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28839      fi
28840
28841      if test -d "$path"; then
28842        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28843      else
28844        dir="`$DIRNAME "$path"`"
28845        base="`$BASENAME "$path"`"
28846        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28847      fi
28848    fi
28849  fi
28850
28851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28852$as_echo_n "checking for Boot JDK... " >&6; }
28853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28854$as_echo "$BOOT_JDK" >&6; }
28855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28856$as_echo_n "checking Boot JDK version... " >&6; }
28857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28859$as_echo "$BOOT_JDK_VERSION" >&6; }
28860          fi # end check jdk version
28861        fi # end check javac
28862      fi # end check java
28863    fi # end check boot jdk found
28864  fi
28865
28866  fi
28867
28868
28869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28871      # Do we have a bin/java?
28872      if test ! -x "$BOOT_JDK/bin/java"; then
28873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28875        BOOT_JDK_FOUND=no
28876      else
28877        # Do we have a bin/javac?
28878        if test ! -x "$BOOT_JDK/bin/javac"; then
28879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28883          BOOT_JDK_FOUND=no
28884        else
28885          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28886          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28887
28888          # Extra M4 quote needed to protect [] in grep expression.
28889          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28890          if test "x$FOUND_CORRECT_VERSION" = x; then
28891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28893            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28894$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28895            BOOT_JDK_FOUND=no
28896          else
28897            # We're done! :-)
28898            BOOT_JDK_FOUND=yes
28899
28900  # Only process if variable expands to non-empty
28901
28902  if test "x$BOOT_JDK" != x; then
28903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28904
28905  # Input might be given as Windows format, start by converting to
28906  # unix format.
28907  path="$BOOT_JDK"
28908  new_path=`$CYGPATH -u "$path"`
28909
28910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28913  # "foo.exe" is OK but "foo" is an error.
28914  #
28915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28916  # It is also a way to make sure we got the proper file name for the real test later on.
28917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28918  if test "x$test_shortpath" = x; then
28919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28920$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28921    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28922  fi
28923
28924  # Call helper function which possibly converts this using DOS-style short mode.
28925  # If so, the updated path is stored in $new_path.
28926
28927  input_path="$new_path"
28928  # Check if we need to convert this using DOS-style short mode. If the path
28929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28930  # take no chances and rewrite it.
28931  # Note: m4 eats our [], so we need to use [ and ] instead.
28932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28933  if test "x$has_forbidden_chars" != x; then
28934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28938      # Going to short mode and back again did indeed matter. Since short mode is
28939      # case insensitive, let's make it lowercase to improve readability.
28940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28941      # Now convert it back to Unix-style (cygpath)
28942      input_path=`$CYGPATH -u "$shortmode_path"`
28943      new_path="$input_path"
28944    fi
28945  fi
28946
28947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28948  if test "x$test_cygdrive_prefix" = x; then
28949    # As a simple fix, exclude /usr/bin since it's not a real path.
28950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28952      # a path prefixed by /cygdrive for fixpath to work.
28953      new_path="$CYGWIN_ROOT_PATH$input_path"
28954    fi
28955  fi
28956
28957
28958  if test "x$path" != "x$new_path"; then
28959    BOOT_JDK="$new_path"
28960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28962  fi
28963
28964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28965
28966  path="$BOOT_JDK"
28967  has_colon=`$ECHO $path | $GREP ^.:`
28968  new_path="$path"
28969  if test "x$has_colon" = x; then
28970    # Not in mixed or Windows style, start by that.
28971    new_path=`cmd //c echo $path`
28972  fi
28973
28974
28975  input_path="$new_path"
28976  # Check if we need to convert this using DOS-style short mode. If the path
28977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28978  # take no chances and rewrite it.
28979  # Note: m4 eats our [], so we need to use [ and ] instead.
28980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28981  if test "x$has_forbidden_chars" != x; then
28982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28984  fi
28985
28986
28987  windows_path="$new_path"
28988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28989    unix_path=`$CYGPATH -u "$windows_path"`
28990    new_path="$unix_path"
28991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28993    new_path="$unix_path"
28994  fi
28995
28996  if test "x$path" != "x$new_path"; then
28997    BOOT_JDK="$new_path"
28998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29000  fi
29001
29002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29004
29005    else
29006      # We're on a unix platform. Hooray! :)
29007      path="$BOOT_JDK"
29008      has_space=`$ECHO "$path" | $GREP " "`
29009      if test "x$has_space" != x; then
29010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29013      fi
29014
29015      # Use eval to expand a potential ~
29016      eval path="$path"
29017      if test ! -f "$path" && test ! -d "$path"; then
29018        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29019      fi
29020
29021      if test -d "$path"; then
29022        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29023      else
29024        dir="`$DIRNAME "$path"`"
29025        base="`$BASENAME "$path"`"
29026        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29027      fi
29028    fi
29029  fi
29030
29031            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29032$as_echo_n "checking for Boot JDK... " >&6; }
29033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29034$as_echo "$BOOT_JDK" >&6; }
29035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29036$as_echo_n "checking Boot JDK version... " >&6; }
29037            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29039$as_echo "$BOOT_JDK_VERSION" >&6; }
29040          fi # end check jdk version
29041        fi # end check javac
29042      fi # end check java
29043    fi # end check boot jdk found
29044  fi
29045
29046
29047  # If we haven't found anything yet, we've truly lost. Give up.
29048  if test "x$BOOT_JDK_FOUND" = xno; then
29049
29050  # Print a helpful message on how to acquire the necessary build dependency.
29051  # openjdk is the help tag: freetype, cups, alsa etc
29052  MISSING_DEPENDENCY=openjdk
29053
29054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29055    cygwin_help $MISSING_DEPENDENCY
29056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29057    msys_help $MISSING_DEPENDENCY
29058  else
29059    PKGHANDLER_COMMAND=
29060
29061    case $PKGHANDLER in
29062      apt-get)
29063        apt_help     $MISSING_DEPENDENCY ;;
29064      yum)
29065        yum_help     $MISSING_DEPENDENCY ;;
29066      port)
29067        port_help    $MISSING_DEPENDENCY ;;
29068      pkgutil)
29069        pkgutil_help $MISSING_DEPENDENCY ;;
29070      pkgadd)
29071        pkgadd_help  $MISSING_DEPENDENCY ;;
29072    esac
29073
29074    if test "x$PKGHANDLER_COMMAND" != x; then
29075      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29076    fi
29077  fi
29078
29079    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29080$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29081    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29082$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29083    as_fn_error $? "Cannot continue" "$LINENO" 5
29084  fi
29085
29086
29087
29088  # Setup tools from the Boot JDK.
29089
29090  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29091
29092  # Publish this variable in the help.
29093
29094
29095  if [ -z "${JAVA+x}" ]; then
29096    # The variable is not set by user, try to locate tool using the code snippet
29097
29098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29099$as_echo_n "checking for java in Boot JDK... " >&6; }
29100      JAVA=$BOOT_JDK/bin/java
29101      if test ! -x $JAVA; then
29102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29103$as_echo "not found" >&6; }
29104        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29105$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29106        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29107      fi
29108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29109$as_echo "ok" >&6; }
29110
29111
29112  else
29113    # The variable is set, but is it from the command line or the environment?
29114
29115    # Try to remove the string !JAVA! from our list.
29116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29118      # If it failed, the variable was not from the command line. Ignore it,
29119      # but warn the user (except for BASH, which is always set by the calling BASH).
29120      if test "xJAVA" != xBASH; then
29121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29122$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29123      fi
29124      # Try to locate tool using the code snippet
29125
29126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29127$as_echo_n "checking for java in Boot JDK... " >&6; }
29128      JAVA=$BOOT_JDK/bin/java
29129      if test ! -x $JAVA; then
29130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29131$as_echo "not found" >&6; }
29132        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29133$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29134        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29135      fi
29136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29137$as_echo "ok" >&6; }
29138
29139
29140    else
29141      # If it succeeded, then it was overridden by the user. We will use it
29142      # for the tool.
29143
29144      # First remove it from the list of overridden variables, so we can test
29145      # for unknown variables in the end.
29146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29147
29148      # Check if we try to supply an empty value
29149      if test "x$JAVA" = x; then
29150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29151$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29153$as_echo_n "checking for JAVA... " >&6; }
29154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29155$as_echo "disabled" >&6; }
29156      else
29157        # Check if the provided tool contains a complete path.
29158        tool_specified="$JAVA"
29159        tool_basename="${tool_specified##*/}"
29160        if test "x$tool_basename" = "x$tool_specified"; then
29161          # A command without a complete path is provided, search $PATH.
29162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29163$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29164          # Extract the first word of "$tool_basename", so it can be a program name with args.
29165set dummy $tool_basename; ac_word=$2
29166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29167$as_echo_n "checking for $ac_word... " >&6; }
29168if ${ac_cv_path_JAVA+:} false; then :
29169  $as_echo_n "(cached) " >&6
29170else
29171  case $JAVA in
29172  [\\/]* | ?:[\\/]*)
29173  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29174  ;;
29175  *)
29176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29177for as_dir in $PATH
29178do
29179  IFS=$as_save_IFS
29180  test -z "$as_dir" && as_dir=.
29181    for ac_exec_ext in '' $ac_executable_extensions; do
29182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29183    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29185    break 2
29186  fi
29187done
29188  done
29189IFS=$as_save_IFS
29190
29191  ;;
29192esac
29193fi
29194JAVA=$ac_cv_path_JAVA
29195if test -n "$JAVA"; then
29196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29197$as_echo "$JAVA" >&6; }
29198else
29199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29200$as_echo "no" >&6; }
29201fi
29202
29203
29204          if test "x$JAVA" = x; then
29205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29206          fi
29207        else
29208          # Otherwise we believe it is a complete path. Use it as it is.
29209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29210$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29212$as_echo_n "checking for JAVA... " >&6; }
29213          if test ! -x "$tool_specified"; then
29214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29215$as_echo "not found" >&6; }
29216            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29217          fi
29218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29219$as_echo "$tool_specified" >&6; }
29220        fi
29221      fi
29222    fi
29223
29224  fi
29225
29226
29227
29228  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29229
29230  # Publish this variable in the help.
29231
29232
29233  if [ -z "${JAVAC+x}" ]; then
29234    # The variable is not set by user, try to locate tool using the code snippet
29235
29236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29237$as_echo_n "checking for javac in Boot JDK... " >&6; }
29238      JAVAC=$BOOT_JDK/bin/javac
29239      if test ! -x $JAVAC; then
29240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29241$as_echo "not found" >&6; }
29242        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29243$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29244        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29245      fi
29246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29247$as_echo "ok" >&6; }
29248
29249
29250  else
29251    # The variable is set, but is it from the command line or the environment?
29252
29253    # Try to remove the string !JAVAC! from our list.
29254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29256      # If it failed, the variable was not from the command line. Ignore it,
29257      # but warn the user (except for BASH, which is always set by the calling BASH).
29258      if test "xJAVAC" != xBASH; then
29259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29260$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29261      fi
29262      # Try to locate tool using the code snippet
29263
29264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29265$as_echo_n "checking for javac in Boot JDK... " >&6; }
29266      JAVAC=$BOOT_JDK/bin/javac
29267      if test ! -x $JAVAC; then
29268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29269$as_echo "not found" >&6; }
29270        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29271$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29272        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29273      fi
29274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29275$as_echo "ok" >&6; }
29276
29277
29278    else
29279      # If it succeeded, then it was overridden by the user. We will use it
29280      # for the tool.
29281
29282      # First remove it from the list of overridden variables, so we can test
29283      # for unknown variables in the end.
29284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29285
29286      # Check if we try to supply an empty value
29287      if test "x$JAVAC" = x; then
29288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29289$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29291$as_echo_n "checking for JAVAC... " >&6; }
29292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29293$as_echo "disabled" >&6; }
29294      else
29295        # Check if the provided tool contains a complete path.
29296        tool_specified="$JAVAC"
29297        tool_basename="${tool_specified##*/}"
29298        if test "x$tool_basename" = "x$tool_specified"; then
29299          # A command without a complete path is provided, search $PATH.
29300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29301$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29302          # Extract the first word of "$tool_basename", so it can be a program name with args.
29303set dummy $tool_basename; ac_word=$2
29304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29305$as_echo_n "checking for $ac_word... " >&6; }
29306if ${ac_cv_path_JAVAC+:} false; then :
29307  $as_echo_n "(cached) " >&6
29308else
29309  case $JAVAC in
29310  [\\/]* | ?:[\\/]*)
29311  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29312  ;;
29313  *)
29314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29315for as_dir in $PATH
29316do
29317  IFS=$as_save_IFS
29318  test -z "$as_dir" && as_dir=.
29319    for ac_exec_ext in '' $ac_executable_extensions; do
29320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29321    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29323    break 2
29324  fi
29325done
29326  done
29327IFS=$as_save_IFS
29328
29329  ;;
29330esac
29331fi
29332JAVAC=$ac_cv_path_JAVAC
29333if test -n "$JAVAC"; then
29334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29335$as_echo "$JAVAC" >&6; }
29336else
29337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29338$as_echo "no" >&6; }
29339fi
29340
29341
29342          if test "x$JAVAC" = x; then
29343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29344          fi
29345        else
29346          # Otherwise we believe it is a complete path. Use it as it is.
29347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29348$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29350$as_echo_n "checking for JAVAC... " >&6; }
29351          if test ! -x "$tool_specified"; then
29352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29353$as_echo "not found" >&6; }
29354            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29355          fi
29356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29357$as_echo "$tool_specified" >&6; }
29358        fi
29359      fi
29360    fi
29361
29362  fi
29363
29364
29365
29366  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29367
29368  # Publish this variable in the help.
29369
29370
29371  if [ -z "${JAVAH+x}" ]; then
29372    # The variable is not set by user, try to locate tool using the code snippet
29373
29374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29375$as_echo_n "checking for javah in Boot JDK... " >&6; }
29376      JAVAH=$BOOT_JDK/bin/javah
29377      if test ! -x $JAVAH; then
29378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29379$as_echo "not found" >&6; }
29380        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29381$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29382        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29383      fi
29384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29385$as_echo "ok" >&6; }
29386
29387
29388  else
29389    # The variable is set, but is it from the command line or the environment?
29390
29391    # Try to remove the string !JAVAH! from our list.
29392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29394      # If it failed, the variable was not from the command line. Ignore it,
29395      # but warn the user (except for BASH, which is always set by the calling BASH).
29396      if test "xJAVAH" != xBASH; then
29397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29398$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29399      fi
29400      # Try to locate tool using the code snippet
29401
29402      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29403$as_echo_n "checking for javah in Boot JDK... " >&6; }
29404      JAVAH=$BOOT_JDK/bin/javah
29405      if test ! -x $JAVAH; then
29406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29407$as_echo "not found" >&6; }
29408        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29409$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29410        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29411      fi
29412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29413$as_echo "ok" >&6; }
29414
29415
29416    else
29417      # If it succeeded, then it was overridden by the user. We will use it
29418      # for the tool.
29419
29420      # First remove it from the list of overridden variables, so we can test
29421      # for unknown variables in the end.
29422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29423
29424      # Check if we try to supply an empty value
29425      if test "x$JAVAH" = x; then
29426        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29427$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29429$as_echo_n "checking for JAVAH... " >&6; }
29430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29431$as_echo "disabled" >&6; }
29432      else
29433        # Check if the provided tool contains a complete path.
29434        tool_specified="$JAVAH"
29435        tool_basename="${tool_specified##*/}"
29436        if test "x$tool_basename" = "x$tool_specified"; then
29437          # A command without a complete path is provided, search $PATH.
29438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29439$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29440          # Extract the first word of "$tool_basename", so it can be a program name with args.
29441set dummy $tool_basename; ac_word=$2
29442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29443$as_echo_n "checking for $ac_word... " >&6; }
29444if ${ac_cv_path_JAVAH+:} false; then :
29445  $as_echo_n "(cached) " >&6
29446else
29447  case $JAVAH in
29448  [\\/]* | ?:[\\/]*)
29449  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29450  ;;
29451  *)
29452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29453for as_dir in $PATH
29454do
29455  IFS=$as_save_IFS
29456  test -z "$as_dir" && as_dir=.
29457    for ac_exec_ext in '' $ac_executable_extensions; do
29458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29459    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29461    break 2
29462  fi
29463done
29464  done
29465IFS=$as_save_IFS
29466
29467  ;;
29468esac
29469fi
29470JAVAH=$ac_cv_path_JAVAH
29471if test -n "$JAVAH"; then
29472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29473$as_echo "$JAVAH" >&6; }
29474else
29475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29476$as_echo "no" >&6; }
29477fi
29478
29479
29480          if test "x$JAVAH" = x; then
29481            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29482          fi
29483        else
29484          # Otherwise we believe it is a complete path. Use it as it is.
29485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29486$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29487          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29488$as_echo_n "checking for JAVAH... " >&6; }
29489          if test ! -x "$tool_specified"; then
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29491$as_echo "not found" >&6; }
29492            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29493          fi
29494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29495$as_echo "$tool_specified" >&6; }
29496        fi
29497      fi
29498    fi
29499
29500  fi
29501
29502
29503
29504  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29505
29506  # Publish this variable in the help.
29507
29508
29509  if [ -z "${JAR+x}" ]; then
29510    # The variable is not set by user, try to locate tool using the code snippet
29511
29512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29513$as_echo_n "checking for jar in Boot JDK... " >&6; }
29514      JAR=$BOOT_JDK/bin/jar
29515      if test ! -x $JAR; then
29516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29517$as_echo "not found" >&6; }
29518        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29519$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29520        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29521      fi
29522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29523$as_echo "ok" >&6; }
29524
29525
29526  else
29527    # The variable is set, but is it from the command line or the environment?
29528
29529    # Try to remove the string !JAR! from our list.
29530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29532      # If it failed, the variable was not from the command line. Ignore it,
29533      # but warn the user (except for BASH, which is always set by the calling BASH).
29534      if test "xJAR" != xBASH; then
29535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29536$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29537      fi
29538      # Try to locate tool using the code snippet
29539
29540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29541$as_echo_n "checking for jar in Boot JDK... " >&6; }
29542      JAR=$BOOT_JDK/bin/jar
29543      if test ! -x $JAR; then
29544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29545$as_echo "not found" >&6; }
29546        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29547$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29548        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29549      fi
29550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29551$as_echo "ok" >&6; }
29552
29553
29554    else
29555      # If it succeeded, then it was overridden by the user. We will use it
29556      # for the tool.
29557
29558      # First remove it from the list of overridden variables, so we can test
29559      # for unknown variables in the end.
29560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29561
29562      # Check if we try to supply an empty value
29563      if test "x$JAR" = x; then
29564        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29565$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29567$as_echo_n "checking for JAR... " >&6; }
29568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29569$as_echo "disabled" >&6; }
29570      else
29571        # Check if the provided tool contains a complete path.
29572        tool_specified="$JAR"
29573        tool_basename="${tool_specified##*/}"
29574        if test "x$tool_basename" = "x$tool_specified"; then
29575          # A command without a complete path is provided, search $PATH.
29576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29577$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29578          # Extract the first word of "$tool_basename", so it can be a program name with args.
29579set dummy $tool_basename; ac_word=$2
29580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29581$as_echo_n "checking for $ac_word... " >&6; }
29582if ${ac_cv_path_JAR+:} false; then :
29583  $as_echo_n "(cached) " >&6
29584else
29585  case $JAR in
29586  [\\/]* | ?:[\\/]*)
29587  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29588  ;;
29589  *)
29590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29591for as_dir in $PATH
29592do
29593  IFS=$as_save_IFS
29594  test -z "$as_dir" && as_dir=.
29595    for ac_exec_ext in '' $ac_executable_extensions; do
29596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29597    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29599    break 2
29600  fi
29601done
29602  done
29603IFS=$as_save_IFS
29604
29605  ;;
29606esac
29607fi
29608JAR=$ac_cv_path_JAR
29609if test -n "$JAR"; then
29610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29611$as_echo "$JAR" >&6; }
29612else
29613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29614$as_echo "no" >&6; }
29615fi
29616
29617
29618          if test "x$JAR" = x; then
29619            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29620          fi
29621        else
29622          # Otherwise we believe it is a complete path. Use it as it is.
29623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29624$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29625          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29626$as_echo_n "checking for JAR... " >&6; }
29627          if test ! -x "$tool_specified"; then
29628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29629$as_echo "not found" >&6; }
29630            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29631          fi
29632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29633$as_echo "$tool_specified" >&6; }
29634        fi
29635      fi
29636    fi
29637
29638  fi
29639
29640
29641
29642  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29643
29644  # Publish this variable in the help.
29645
29646
29647  if [ -z "${JARSIGNER+x}" ]; then
29648    # The variable is not set by user, try to locate tool using the code snippet
29649
29650      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29651$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29652      JARSIGNER=$BOOT_JDK/bin/jarsigner
29653      if test ! -x $JARSIGNER; then
29654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29655$as_echo "not found" >&6; }
29656        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29657$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29658        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29659      fi
29660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29661$as_echo "ok" >&6; }
29662
29663
29664  else
29665    # The variable is set, but is it from the command line or the environment?
29666
29667    # Try to remove the string !JARSIGNER! from our list.
29668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29670      # If it failed, the variable was not from the command line. Ignore it,
29671      # but warn the user (except for BASH, which is always set by the calling BASH).
29672      if test "xJARSIGNER" != xBASH; then
29673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29674$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29675      fi
29676      # Try to locate tool using the code snippet
29677
29678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29679$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29680      JARSIGNER=$BOOT_JDK/bin/jarsigner
29681      if test ! -x $JARSIGNER; then
29682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29683$as_echo "not found" >&6; }
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29685$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29686        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29687      fi
29688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29689$as_echo "ok" >&6; }
29690
29691
29692    else
29693      # If it succeeded, then it was overridden by the user. We will use it
29694      # for the tool.
29695
29696      # First remove it from the list of overridden variables, so we can test
29697      # for unknown variables in the end.
29698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29699
29700      # Check if we try to supply an empty value
29701      if test "x$JARSIGNER" = x; then
29702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29703$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29705$as_echo_n "checking for JARSIGNER... " >&6; }
29706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29707$as_echo "disabled" >&6; }
29708      else
29709        # Check if the provided tool contains a complete path.
29710        tool_specified="$JARSIGNER"
29711        tool_basename="${tool_specified##*/}"
29712        if test "x$tool_basename" = "x$tool_specified"; then
29713          # A command without a complete path is provided, search $PATH.
29714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29715$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29716          # Extract the first word of "$tool_basename", so it can be a program name with args.
29717set dummy $tool_basename; ac_word=$2
29718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29719$as_echo_n "checking for $ac_word... " >&6; }
29720if ${ac_cv_path_JARSIGNER+:} false; then :
29721  $as_echo_n "(cached) " >&6
29722else
29723  case $JARSIGNER in
29724  [\\/]* | ?:[\\/]*)
29725  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29726  ;;
29727  *)
29728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29729for as_dir in $PATH
29730do
29731  IFS=$as_save_IFS
29732  test -z "$as_dir" && as_dir=.
29733    for ac_exec_ext in '' $ac_executable_extensions; do
29734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29735    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29737    break 2
29738  fi
29739done
29740  done
29741IFS=$as_save_IFS
29742
29743  ;;
29744esac
29745fi
29746JARSIGNER=$ac_cv_path_JARSIGNER
29747if test -n "$JARSIGNER"; then
29748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29749$as_echo "$JARSIGNER" >&6; }
29750else
29751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29752$as_echo "no" >&6; }
29753fi
29754
29755
29756          if test "x$JARSIGNER" = x; then
29757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29758          fi
29759        else
29760          # Otherwise we believe it is a complete path. Use it as it is.
29761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29762$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29764$as_echo_n "checking for JARSIGNER... " >&6; }
29765          if test ! -x "$tool_specified"; then
29766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29767$as_echo "not found" >&6; }
29768            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29769          fi
29770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29771$as_echo "$tool_specified" >&6; }
29772        fi
29773      fi
29774    fi
29775
29776  fi
29777
29778
29779
29780  # Finally, set some other options...
29781
29782  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29783  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29784
29785
29786
29787  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
29788  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
29789  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
29790  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
29791  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
29792  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
29793    dummy="$dummy -Xpatch:foo=bar"
29794    JVM_ARG_OK=true
29795  else
29796    $ECHO "Arg failed:" >&5
29797    $ECHO "$OUTPUT" >&5
29798    JVM_ARG_OK=false
29799  fi
29800
29801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
29802$as_echo_n "checking if Boot JDK supports modules... " >&6; }
29803  if test "x$JVM_ARG_OK" = "xtrue"; then
29804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29805$as_echo "yes" >&6; }
29806    BOOT_JDK_MODULAR="true"
29807  else
29808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29809$as_echo "no" >&6; }
29810    BOOT_JDK_MODULAR="false"
29811  fi
29812
29813
29814
29815
29816  # Check if the boot jdk is 32 or 64 bit
29817  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29818    BOOT_JDK_BITS="64"
29819  else
29820    BOOT_JDK_BITS="32"
29821  fi
29822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29823$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29825$as_echo "$BOOT_JDK_BITS" >&6; }
29826
29827
29828
29829
29830# Check whether --with-build-jdk was given.
29831if test "${with_build_jdk+set}" = set; then :
29832  withval=$with_build_jdk;
29833fi
29834
29835
29836  CREATE_BUILDJDK_FOR_HOST=false
29837  BUILD_JDK_FOUND="no"
29838  if test "x$with_build_jdk" != "x"; then
29839
29840  if test "x$BUILD_JDK_FOUND" = xno; then
29841    # Execute the test
29842
29843       if test "x$with_build_jdk" != x; then
29844         BUILD_JDK=$with_build_jdk
29845         BUILD_JDK_FOUND=maybe
29846         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
29847$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
29848       fi
29849
29850    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29851    if test "x$BUILD_JDK_FOUND" = xmaybe; then
29852      # Do we have a bin/java?
29853      if test ! -x "$BUILD_JDK/bin/java"; then
29854        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
29855$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
29856        BUILD_JDK_FOUND=no
29857      elif test ! -x "$BUILD_JDK/bin/jlink"; then
29858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
29859$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
29860        BUILD_JDK_FOUND=no
29861      elif test ! -x "$BUILD_JDK/bin/javac"; then
29862        # Do we have a bin/javac?
29863        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
29864$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
29865        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
29866$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
29867        BUILD_JDK_FOUND=no
29868      else
29869        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29870        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
29871
29872        # Extra M4 quote needed to protect [] in grep expression.
29873        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
29874        if test "x$FOUND_CORRECT_VERSION" = x; then
29875          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
29876$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
29877          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
29878$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
29879          BUILD_JDK_FOUND=no
29880        else
29881          # We're done!
29882          BUILD_JDK_FOUND=yes
29883
29884  # Only process if variable expands to non-empty
29885
29886  if test "x$BUILD_JDK" != x; then
29887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29888
29889  # Input might be given as Windows format, start by converting to
29890  # unix format.
29891  path="$BUILD_JDK"
29892  new_path=`$CYGPATH -u "$path"`
29893
29894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29897  # "foo.exe" is OK but "foo" is an error.
29898  #
29899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29900  # It is also a way to make sure we got the proper file name for the real test later on.
29901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29902  if test "x$test_shortpath" = x; then
29903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
29904$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
29905    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
29906  fi
29907
29908  # Call helper function which possibly converts this using DOS-style short mode.
29909  # If so, the updated path is stored in $new_path.
29910
29911  input_path="$new_path"
29912  # Check if we need to convert this using DOS-style short mode. If the path
29913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29914  # take no chances and rewrite it.
29915  # Note: m4 eats our [], so we need to use [ and ] instead.
29916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29917  if test "x$has_forbidden_chars" != x; then
29918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29922      # Going to short mode and back again did indeed matter. Since short mode is
29923      # case insensitive, let's make it lowercase to improve readability.
29924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29925      # Now convert it back to Unix-style (cygpath)
29926      input_path=`$CYGPATH -u "$shortmode_path"`
29927      new_path="$input_path"
29928    fi
29929  fi
29930
29931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29932  if test "x$test_cygdrive_prefix" = x; then
29933    # As a simple fix, exclude /usr/bin since it's not a real path.
29934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29936      # a path prefixed by /cygdrive for fixpath to work.
29937      new_path="$CYGWIN_ROOT_PATH$input_path"
29938    fi
29939  fi
29940
29941
29942  if test "x$path" != "x$new_path"; then
29943    BUILD_JDK="$new_path"
29944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
29945$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
29946  fi
29947
29948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29949
29950  path="$BUILD_JDK"
29951  has_colon=`$ECHO $path | $GREP ^.:`
29952  new_path="$path"
29953  if test "x$has_colon" = x; then
29954    # Not in mixed or Windows style, start by that.
29955    new_path=`cmd //c echo $path`
29956  fi
29957
29958
29959  input_path="$new_path"
29960  # Check if we need to convert this using DOS-style short mode. If the path
29961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29962  # take no chances and rewrite it.
29963  # Note: m4 eats our [], so we need to use [ and ] instead.
29964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29965  if test "x$has_forbidden_chars" != x; then
29966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29968  fi
29969
29970
29971  windows_path="$new_path"
29972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29973    unix_path=`$CYGPATH -u "$windows_path"`
29974    new_path="$unix_path"
29975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29977    new_path="$unix_path"
29978  fi
29979
29980  if test "x$path" != "x$new_path"; then
29981    BUILD_JDK="$new_path"
29982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
29983$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
29984  fi
29985
29986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29988
29989    else
29990      # We're on a unix platform. Hooray! :)
29991      path="$BUILD_JDK"
29992      has_space=`$ECHO "$path" | $GREP " "`
29993      if test "x$has_space" != x; then
29994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
29995$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
29996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29997      fi
29998
29999      # Use eval to expand a potential ~
30000      eval path="$path"
30001      if test ! -f "$path" && test ! -d "$path"; then
30002        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30003      fi
30004
30005      if test -d "$path"; then
30006        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30007      else
30008        dir="`$DIRNAME "$path"`"
30009        base="`$BASENAME "$path"`"
30010        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30011      fi
30012    fi
30013  fi
30014
30015          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30016$as_echo_n "checking for Build JDK... " >&6; }
30017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30018$as_echo "$BUILD_JDK" >&6; }
30019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30020$as_echo_n "checking Build JDK version... " >&6; }
30021          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30023$as_echo "$BUILD_JDK_VERSION" >&6; }
30024        fi # end check jdk version
30025      fi # end check java
30026    fi # end check build jdk found
30027  fi
30028
30029  else
30030    if test "x$COMPILE_TYPE" = "xcross"; then
30031      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30032      BUILD_JDK_FOUND=yes
30033      CREATE_BUILDJDK=true
30034      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30035$as_echo_n "checking for Build JDK... " >&6; }
30036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30037$as_echo "yes, will build it for the host platform" >&6; }
30038    else
30039      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30040      BUILD_JDK_FOUND=yes
30041      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30042$as_echo_n "checking for Build JDK... " >&6; }
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30044$as_echo "yes, will use output dir" >&6; }
30045    fi
30046  fi
30047
30048  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30050$as_echo_n "checking for Build JDK... " >&6; }
30051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30052$as_echo "no" >&6; }
30053    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30054  fi
30055
30056
30057
30058
30059
30060###############################################################################
30061#
30062# Configure the sources to use. We can add or override individual directories.
30063#
30064###############################################################################
30065
30066
30067  # Where are the sources.
30068  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30069  CORBA_TOPDIR="$SRC_ROOT/corba"
30070  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30071  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30072  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30073  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30074  JDK_TOPDIR="$SRC_ROOT/jdk"
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084  # This feature is no longer supported.
30085
30086
30087
30088# Check whether --with-add-source-root was given.
30089if test "${with_add_source_root+set}" = set; then :
30090  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
30091$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30092fi
30093
30094
30095
30096
30097# Check whether --with-override-source-root was given.
30098if test "${with_override_source_root+set}" = set; then :
30099  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
30100$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30101fi
30102
30103
30104
30105
30106# Check whether --with-adds-and-overrides was given.
30107if test "${with_adds_and_overrides+set}" = set; then :
30108  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
30109$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30110fi
30111
30112
30113
30114
30115# Check whether --with-override-langtools was given.
30116if test "${with_override_langtools+set}" = set; then :
30117  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30118$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30119fi
30120
30121
30122
30123
30124# Check whether --with-override-corba was given.
30125if test "${with_override_corba+set}" = set; then :
30126  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30127$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30128fi
30129
30130
30131
30132
30133# Check whether --with-override-jaxp was given.
30134if test "${with_override_jaxp+set}" = set; then :
30135  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30136$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30137fi
30138
30139
30140
30141
30142# Check whether --with-override-jaxws was given.
30143if test "${with_override_jaxws+set}" = set; then :
30144  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30145$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30146fi
30147
30148
30149
30150
30151# Check whether --with-override-hotspot was given.
30152if test "${with_override_hotspot+set}" = set; then :
30153  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30154$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30155fi
30156
30157
30158
30159
30160# Check whether --with-override-nashorn was given.
30161if test "${with_override_nashorn+set}" = set; then :
30162  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30163$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30164fi
30165
30166
30167
30168
30169# Check whether --with-override-jdk was given.
30170if test "${with_override_jdk+set}" = set; then :
30171  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30172$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30173fi
30174
30175
30176
30177
30178  BUILD_OUTPUT="$OUTPUT_ROOT"
30179
30180
30181  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30182  BUILD_HOTSPOT=true
30183
30184
30185
30186# Check whether --with-import-hotspot was given.
30187if test "${with_import_hotspot+set}" = set; then :
30188  withval=$with_import_hotspot;
30189fi
30190
30191  if test "x$with_import_hotspot" != x; then
30192    CURDIR="$PWD"
30193    cd "$with_import_hotspot"
30194    HOTSPOT_DIST="`pwd`"
30195    cd "$CURDIR"
30196    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30197      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30198    fi
30199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30200$as_echo_n "checking if hotspot should be imported... " >&6; }
30201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30202$as_echo "yes from $HOTSPOT_DIST" >&6; }
30203    BUILD_HOTSPOT=false
30204  fi
30205
30206  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30207
30208
30209
30210
30211# Check whether --with-import-modules was given.
30212if test "${with_import_modules+set}" = set; then :
30213  withval=$with_import_modules;
30214fi
30215
30216
30217  if test "x$with_import_modules" != x \
30218      && test "x$with_import_modules" != "xno"; then
30219    if test -d "$with_import_modules"; then
30220      IMPORT_MODULES_TOPDIR="$with_import_modules"
30221
30222  # Only process if variable expands to non-empty
30223
30224  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30226
30227  # Input might be given as Windows format, start by converting to
30228  # unix format.
30229  path="$IMPORT_MODULES_TOPDIR"
30230  new_path=`$CYGPATH -u "$path"`
30231
30232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30235  # "foo.exe" is OK but "foo" is an error.
30236  #
30237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30238  # It is also a way to make sure we got the proper file name for the real test later on.
30239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30240  if test "x$test_shortpath" = x; then
30241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30242$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30243    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30244  fi
30245
30246  # Call helper function which possibly converts this using DOS-style short mode.
30247  # If so, the updated path is stored in $new_path.
30248
30249  input_path="$new_path"
30250  # Check if we need to convert this using DOS-style short mode. If the path
30251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30252  # take no chances and rewrite it.
30253  # Note: m4 eats our [], so we need to use [ and ] instead.
30254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30255  if test "x$has_forbidden_chars" != x; then
30256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30260      # Going to short mode and back again did indeed matter. Since short mode is
30261      # case insensitive, let's make it lowercase to improve readability.
30262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30263      # Now convert it back to Unix-style (cygpath)
30264      input_path=`$CYGPATH -u "$shortmode_path"`
30265      new_path="$input_path"
30266    fi
30267  fi
30268
30269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30270  if test "x$test_cygdrive_prefix" = x; then
30271    # As a simple fix, exclude /usr/bin since it's not a real path.
30272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30274      # a path prefixed by /cygdrive for fixpath to work.
30275      new_path="$CYGWIN_ROOT_PATH$input_path"
30276    fi
30277  fi
30278
30279
30280  if test "x$path" != "x$new_path"; then
30281    IMPORT_MODULES_TOPDIR="$new_path"
30282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30283$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30284  fi
30285
30286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30287
30288  path="$IMPORT_MODULES_TOPDIR"
30289  has_colon=`$ECHO $path | $GREP ^.:`
30290  new_path="$path"
30291  if test "x$has_colon" = x; then
30292    # Not in mixed or Windows style, start by that.
30293    new_path=`cmd //c echo $path`
30294  fi
30295
30296
30297  input_path="$new_path"
30298  # Check if we need to convert this using DOS-style short mode. If the path
30299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30300  # take no chances and rewrite it.
30301  # Note: m4 eats our [], so we need to use [ and ] instead.
30302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30303  if test "x$has_forbidden_chars" != x; then
30304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30306  fi
30307
30308
30309  windows_path="$new_path"
30310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30311    unix_path=`$CYGPATH -u "$windows_path"`
30312    new_path="$unix_path"
30313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30315    new_path="$unix_path"
30316  fi
30317
30318  if test "x$path" != "x$new_path"; then
30319    IMPORT_MODULES_TOPDIR="$new_path"
30320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30321$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30322  fi
30323
30324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30326
30327    else
30328      # We're on a unix platform. Hooray! :)
30329      path="$IMPORT_MODULES_TOPDIR"
30330      has_space=`$ECHO "$path" | $GREP " "`
30331      if test "x$has_space" != x; then
30332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30333$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30335      fi
30336
30337      # Use eval to expand a potential ~
30338      eval path="$path"
30339      if test ! -f "$path" && test ! -d "$path"; then
30340        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30341      fi
30342
30343      if test -d "$path"; then
30344        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30345      else
30346        dir="`$DIRNAME "$path"`"
30347        base="`$BASENAME "$path"`"
30348        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30349      fi
30350    fi
30351  fi
30352
30353    elif test -e "$with_import_modules"; then
30354      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30355      $RM -rf "$IMPORT_MODULES_TOPDIR"
30356      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30357      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30358        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30359      fi
30360    else
30361      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30362    fi
30363  fi
30364
30365  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30366    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30367  fi
30368  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30369    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30370  fi
30371  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30372    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30373  fi
30374  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30375    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30376  fi
30377  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30378    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30379  fi
30380  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30381    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30382  fi
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392###############################################################################
30393#
30394# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30395# native code.
30396#
30397###############################################################################
30398
30399# See if we are doing a complete static build or not
30400
30401  # Check whether --enable-static-build was given.
30402if test "${enable_static_build+set}" = set; then :
30403  enableval=$enable_static_build;
30404fi
30405
30406  STATIC_BUILD=false
30407  if test "x$enable_static_build" = "xyes"; then
30408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30409$as_echo_n "checking if static build is enabled... " >&6; }
30410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30411$as_echo "yes" >&6; }
30412    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30413      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30414    fi
30415    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30416    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30417    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30418    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30419    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30420    STATIC_BUILD=true
30421  elif test "x$enable_static_build" = "xno"; then
30422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30423$as_echo_n "checking if static build is enabled... " >&6; }
30424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30425$as_echo "no" >&6; }
30426  elif test "x$enable_static_build" != "x"; then
30427    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30428  fi
30429
30430
30431
30432
30433# First determine the toolchain type (compiler family)
30434
30435
30436# Check whether --with-toolchain-type was given.
30437if test "${with_toolchain_type+set}" = set; then :
30438  withval=$with_toolchain_type;
30439fi
30440
30441
30442  # Use indirect variable referencing
30443  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30444  VALID_TOOLCHAINS=${!toolchain_var_name}
30445
30446  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30447    if test -n "$XCODEBUILD"; then
30448      # On Mac OS X, default toolchain to clang after Xcode 5
30449      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30450      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30451      if test $? -ne 0; then
30452        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30453      fi
30454      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30455          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30456          $CUT -f 1 -d .`
30457      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30458$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30459      if test $XCODE_MAJOR_VERSION -ge 5; then
30460          DEFAULT_TOOLCHAIN="clang"
30461      else
30462          DEFAULT_TOOLCHAIN="gcc"
30463      fi
30464    else
30465      # If Xcode is not installed, but the command line tools are
30466      # then we can't run xcodebuild. On these systems we should
30467      # default to clang
30468      DEFAULT_TOOLCHAIN="clang"
30469    fi
30470  else
30471    # First toolchain type in the list is the default
30472    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30473  fi
30474
30475  if test "x$with_toolchain_type" = xlist; then
30476    # List all toolchains
30477    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30478$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30479    for toolchain in $VALID_TOOLCHAINS; do
30480      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30481      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30482      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30483    done
30484
30485    exit 0
30486  elif test "x$with_toolchain_type" != x; then
30487    # User override; check that it is valid
30488    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30489      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30490$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30491      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30492$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30493      as_fn_error $? "Cannot continue." "$LINENO" 5
30494    fi
30495    TOOLCHAIN_TYPE=$with_toolchain_type
30496  else
30497    # No flag given, use default
30498    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30499  fi
30500
30501
30502  TOOLCHAIN_CC_BINARY_clang="clang"
30503  TOOLCHAIN_CC_BINARY_gcc="gcc"
30504  TOOLCHAIN_CC_BINARY_microsoft="cl"
30505  TOOLCHAIN_CC_BINARY_solstudio="cc"
30506  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30507
30508  TOOLCHAIN_CXX_BINARY_clang="clang++"
30509  TOOLCHAIN_CXX_BINARY_gcc="g++"
30510  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30511  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30512  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30513
30514  # Use indirect variable referencing
30515  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30516  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30517  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30518  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30519  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30520  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30521  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30522  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30523
30524
30525  # Define filename patterns
30526  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30527    LIBRARY_PREFIX=
30528    SHARED_LIBRARY_SUFFIX='.dll'
30529    STATIC_LIBRARY_SUFFIX='.lib'
30530    SHARED_LIBRARY='$1.dll'
30531    STATIC_LIBRARY='$1.lib'
30532    OBJ_SUFFIX='.obj'
30533    EXE_SUFFIX='.exe'
30534  else
30535    LIBRARY_PREFIX=lib
30536    SHARED_LIBRARY_SUFFIX='.so'
30537    STATIC_LIBRARY_SUFFIX='.a'
30538    SHARED_LIBRARY='lib$1.so'
30539    STATIC_LIBRARY='lib$1.a'
30540    OBJ_SUFFIX='.o'
30541    EXE_SUFFIX=''
30542    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30543      # For full static builds, we're overloading the SHARED_LIBRARY
30544      # variables in order to limit the amount of changes required.
30545      # It would be better to remove SHARED and just use LIBRARY and
30546      # LIBRARY_SUFFIX for libraries that can be built either
30547      # shared or static and use STATIC_* for libraries that are
30548      # always built statically.
30549      if test "x$STATIC_BUILD" = xtrue; then
30550        SHARED_LIBRARY='lib$1.a'
30551        SHARED_LIBRARY_SUFFIX='.a'
30552      else
30553        SHARED_LIBRARY='lib$1.dylib'
30554        SHARED_LIBRARY_SUFFIX='.dylib'
30555      fi
30556    fi
30557  fi
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30569    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30570$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30571  else
30572    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30573$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30574  fi
30575
30576
30577# User supplied flags should be used when configure detects compilers
30578
30579  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30581$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30582  fi
30583
30584  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30585    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30586$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30587  fi
30588
30589  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30590    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30591$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30592  fi
30593
30594
30595# Check whether --with-extra-cflags was given.
30596if test "${with_extra_cflags+set}" = set; then :
30597  withval=$with_extra_cflags;
30598fi
30599
30600
30601
30602# Check whether --with-extra-cxxflags was given.
30603if test "${with_extra_cxxflags+set}" = set; then :
30604  withval=$with_extra_cxxflags;
30605fi
30606
30607
30608
30609# Check whether --with-extra-ldflags was given.
30610if test "${with_extra_ldflags+set}" = set; then :
30611  withval=$with_extra_ldflags;
30612fi
30613
30614
30615  EXTRA_CFLAGS="$with_extra_cflags"
30616  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30617  EXTRA_LDFLAGS="$with_extra_ldflags"
30618
30619  # Hotspot needs these set in their legacy form
30620  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30621  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30622  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30623
30624
30625
30626
30627
30628  # The global CFLAGS and LDLAGS variables are used by configure tests and
30629  # should include the extra parameters
30630  CFLAGS="$EXTRA_CFLAGS"
30631  CXXFLAGS="$EXTRA_CXXFLAGS"
30632  LDFLAGS="$EXTRA_LDFLAGS"
30633  CPPFLAGS=""
30634
30635# The sysroot cflags are needed for configure to be able to run the compilers
30636
30637  if test "x$SYSROOT" != "x"; then
30638    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30639      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30640        # Solaris Studio does not have a concept of sysroot. Instead we must
30641        # make sure the default include and lib dirs are appended to each
30642        # compile and link command line. Must also add -I-xbuiltin to enable
30643        # inlining of system functions and intrinsics.
30644        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30645        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30646            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30647            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30648      fi
30649    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30650      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30651      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30652    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30653      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30654      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30655    fi
30656    # Propagate the sysroot args to hotspot
30657    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30658    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30659    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30660    # The global CFLAGS and LDFLAGS variables need these for configure to function
30661    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30662    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30663    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30664    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30665  fi
30666
30667  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30668    # We also need -iframework<path>/System/Library/Frameworks
30669    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30670    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30671    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30672    # set this here so it doesn't have to be peppered throughout the forest
30673    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30674    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30675  fi
30676
30677
30678
30679
30680
30681# Then detect the actual binaries needed
30682
30683  # FIXME: Is this needed?
30684  ac_ext=cpp
30685ac_cpp='$CXXCPP $CPPFLAGS'
30686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30689
30690
30691  # Store the CFLAGS etc passed to the configure script.
30692  ORG_CFLAGS="$CFLAGS"
30693  ORG_CXXFLAGS="$CXXFLAGS"
30694
30695  # autoconf magic only relies on PATH, so update it if tools dir is specified
30696  OLD_PATH="$PATH"
30697
30698  # On Windows, we need to detect the visual studio installation first.
30699  # This will change the PATH, but we need to keep that new PATH even
30700  # after toolchain detection is done, since the compiler (on x86) uses
30701  # it for DLL resolution in runtime.
30702  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30703      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30704
30705  # Store path to cygwin link.exe to help excluding it when searching for
30706  # VS linker. This must be done before changing the PATH when looking for VS.
30707  # Extract the first word of "link", so it can be a program name with args.
30708set dummy link; ac_word=$2
30709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30710$as_echo_n "checking for $ac_word... " >&6; }
30711if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30712  $as_echo_n "(cached) " >&6
30713else
30714  case $CYGWIN_LINK in
30715  [\\/]* | ?:[\\/]*)
30716  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30717  ;;
30718  *)
30719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30720for as_dir in $PATH
30721do
30722  IFS=$as_save_IFS
30723  test -z "$as_dir" && as_dir=.
30724    for ac_exec_ext in '' $ac_executable_extensions; do
30725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30726    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30728    break 2
30729  fi
30730done
30731  done
30732IFS=$as_save_IFS
30733
30734  ;;
30735esac
30736fi
30737CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30738if test -n "$CYGWIN_LINK"; then
30739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30740$as_echo "$CYGWIN_LINK" >&6; }
30741else
30742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30743$as_echo "no" >&6; }
30744fi
30745
30746
30747  if test "x$CYGWIN_LINK" != x; then
30748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30749$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30750    "$CYGWIN_LINK" --version > /dev/null
30751    if test $? -eq 0 ; then
30752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30753$as_echo "yes" >&6; }
30754    else
30755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30756$as_echo "no" >&6; }
30757      # This might be the VS linker. Don't exclude it later on.
30758      CYGWIN_LINK=""
30759    fi
30760  fi
30761
30762  # First-hand choice is to locate and run the vsvars bat file.
30763
30764
30765# Check whether --with-toolchain-version was given.
30766if test "${with_toolchain_version+set}" = set; then :
30767  withval=$with_toolchain_version;
30768fi
30769
30770
30771  if test "x$with_toolchain_version" = xlist; then
30772    # List all toolchains
30773    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30774$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30775    for version in $VALID_VS_VERSIONS; do
30776      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30777      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30778    done
30779
30780    exit 0
30781  elif test "x$DEVKIT_VS_VERSION" != x; then
30782    VS_VERSION=$DEVKIT_VS_VERSION
30783    TOOLCHAIN_VERSION=$VS_VERSION
30784    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30785    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30786    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30787    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30788    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30789    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30790
30791    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30792    # can still be exported as INCLUDE for compiler invocations without
30793    # SYSROOT_CFLAGS
30794    OLDIFS="$IFS"
30795    IFS=";"
30796    for i in $DEVKIT_VS_INCLUDE; do
30797      ipath=$i
30798
30799  unix_path="$ipath"
30800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30801    windows_path=`$CYGPATH -m "$unix_path"`
30802    ipath="$windows_path"
30803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30804    windows_path=`cmd //c echo $unix_path`
30805    ipath="$windows_path"
30806  fi
30807
30808      VS_INCLUDE="$VS_INCLUDE;$ipath"
30809    done
30810    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30811    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30812    for i in $DEVKIT_VS_LIB; do
30813      libpath=$i
30814
30815  unix_path="$libpath"
30816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30817    windows_path=`$CYGPATH -m "$unix_path"`
30818    libpath="$windows_path"
30819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30820    windows_path=`cmd //c echo $unix_path`
30821    libpath="$windows_path"
30822  fi
30823
30824      VS_LIB="$VS_LIB;$libpath"
30825    done
30826    IFS="$OLDIFS"
30827
30828    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30829$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30830
30831  elif test "x$with_toolchain_version" != x; then
30832    # User override; check that it is valid
30833    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30834      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30835$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30836      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30837$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30838      as_fn_error $? "Cannot continue." "$LINENO" 5
30839    fi
30840    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30841  else
30842    # No flag given, use default
30843    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30844  fi
30845
30846  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30847
30848  VS_VERSION="$VS_VERSION"
30849  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30850  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30851  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30852  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30853
30854  # When using --with-tools-dir, assume it points to the correct and default
30855  # version of Visual Studio or that --with-toolchain-version was also set.
30856  if test "x$with_tools_dir" != x; then
30857
30858  if test "x$VS_ENV_CMD" = x; then
30859    VS_VERSION="${VS_VERSION}"
30860    VS_BASE="$with_tools_dir/../.."
30861    METHOD="--with-tools-dir"
30862
30863    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30864      VCVARSFILE="vc/bin/vcvars32.bat"
30865    else
30866      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30867    fi
30868
30869
30870  windows_path="$VS_BASE"
30871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30872    unix_path=`$CYGPATH -u "$windows_path"`
30873    VS_BASE="$unix_path"
30874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30876    VS_BASE="$unix_path"
30877  fi
30878
30879    if test -d "$VS_BASE"; then
30880      if test -f "$VS_BASE/$VCVARSFILE"; then
30881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30882$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30883        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30886        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30887      else
30888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30890        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30891$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30892      fi
30893    fi
30894  fi
30895
30896
30897  if test "x$VS_ENV_CMD" = x; then
30898    VS_VERSION="${VS_VERSION}"
30899    VS_BASE="$with_tools_dir/../../.."
30900    METHOD="--with-tools-dir"
30901
30902    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30903      VCVARSFILE="vc/bin/vcvars32.bat"
30904    else
30905      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30906    fi
30907
30908
30909  windows_path="$VS_BASE"
30910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30911    unix_path=`$CYGPATH -u "$windows_path"`
30912    VS_BASE="$unix_path"
30913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30915    VS_BASE="$unix_path"
30916  fi
30917
30918    if test -d "$VS_BASE"; then
30919      if test -f "$VS_BASE/$VCVARSFILE"; then
30920        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30921$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30922        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30923        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30924        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30925        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30926      else
30927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30928$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30929        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30930$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30931      fi
30932    fi
30933  fi
30934
30935    if test "x$VS_ENV_CMD" = x; then
30936      # Having specified an argument which is incorrect will produce an instant failure;
30937      # we should not go on looking
30938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30939$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30941$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30942      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30943$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30944      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30945    fi
30946  fi
30947
30948  VS_ENV_CMD=""
30949  VS_ENV_ARGS=""
30950
30951  if test "x$VS_COMNTOOLS" != x; then
30952
30953  if test "x$VS_ENV_CMD" = x; then
30954    VS_VERSION="${VS_VERSION}"
30955    VS_BASE="$VS_COMNTOOLS/../.."
30956    METHOD="$VS_COMNTOOLS_VAR variable"
30957
30958    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30959      VCVARSFILE="vc/bin/vcvars32.bat"
30960    else
30961      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30962    fi
30963
30964
30965  windows_path="$VS_BASE"
30966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30967    unix_path=`$CYGPATH -u "$windows_path"`
30968    VS_BASE="$unix_path"
30969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30971    VS_BASE="$unix_path"
30972  fi
30973
30974    if test -d "$VS_BASE"; then
30975      if test -f "$VS_BASE/$VCVARSFILE"; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30977$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30978        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30979        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30980        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30981        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30982      else
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30984$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30985        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30986$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30987      fi
30988    fi
30989  fi
30990
30991  fi
30992  if test "x$PROGRAMFILES" != x; then
30993
30994  if test "x$VS_ENV_CMD" = x; then
30995    VS_VERSION="${VS_VERSION}"
30996    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30997    METHOD="well-known name"
30998
30999    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31000      VCVARSFILE="vc/bin/vcvars32.bat"
31001    else
31002      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31003    fi
31004
31005
31006  windows_path="$VS_BASE"
31007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31008    unix_path=`$CYGPATH -u "$windows_path"`
31009    VS_BASE="$unix_path"
31010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31012    VS_BASE="$unix_path"
31013  fi
31014
31015    if test -d "$VS_BASE"; then
31016      if test -f "$VS_BASE/$VCVARSFILE"; then
31017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31018$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31019        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31020        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31021        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31022        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31023      else
31024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31025$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31027$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31028      fi
31029    fi
31030  fi
31031
31032  fi
31033  # Work around the insanely named ProgramFiles(x86) env variable
31034  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31035  if test "x$PROGRAMFILES_X86" != x; then
31036
31037  if test "x$VS_ENV_CMD" = x; then
31038    VS_VERSION="${VS_VERSION}"
31039    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31040    METHOD="well-known name"
31041
31042    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31043      VCVARSFILE="vc/bin/vcvars32.bat"
31044    else
31045      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31046    fi
31047
31048
31049  windows_path="$VS_BASE"
31050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31051    unix_path=`$CYGPATH -u "$windows_path"`
31052    VS_BASE="$unix_path"
31053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31055    VS_BASE="$unix_path"
31056  fi
31057
31058    if test -d "$VS_BASE"; then
31059      if test -f "$VS_BASE/$VCVARSFILE"; then
31060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31061$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31062        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31063        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31064        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31065        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31066      else
31067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31068$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31070$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31071      fi
31072    fi
31073  fi
31074
31075  fi
31076
31077  if test "x$VS_ENV_CMD" = x; then
31078    VS_VERSION="${VS_VERSION}"
31079    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31080    METHOD="well-known name"
31081
31082    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31083      VCVARSFILE="vc/bin/vcvars32.bat"
31084    else
31085      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31086    fi
31087
31088
31089  windows_path="$VS_BASE"
31090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31091    unix_path=`$CYGPATH -u "$windows_path"`
31092    VS_BASE="$unix_path"
31093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31095    VS_BASE="$unix_path"
31096  fi
31097
31098    if test -d "$VS_BASE"; then
31099      if test -f "$VS_BASE/$VCVARSFILE"; then
31100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31101$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31102        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31103        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31104        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31105        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31106      else
31107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31108$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31109        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31110$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31111      fi
31112    fi
31113  fi
31114
31115
31116  if test "x$VS_ENV_CMD" = x; then
31117    VS_VERSION="${VS_VERSION}"
31118    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31119    METHOD="well-known name"
31120
31121    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31122      VCVARSFILE="vc/bin/vcvars32.bat"
31123    else
31124      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31125    fi
31126
31127
31128  windows_path="$VS_BASE"
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130    unix_path=`$CYGPATH -u "$windows_path"`
31131    VS_BASE="$unix_path"
31132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134    VS_BASE="$unix_path"
31135  fi
31136
31137    if test -d "$VS_BASE"; then
31138      if test -f "$VS_BASE/$VCVARSFILE"; then
31139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31140$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31141        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31142        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31143        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31144        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31145      else
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31147$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31148        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31149$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31150      fi
31151    fi
31152  fi
31153
31154
31155  if test "x$SDK_INSTALL_DIR" != x; then
31156    if test "x$ProgramW6432" != x; then
31157
31158  if test "x$VS_ENV_CMD" = x; then
31159    VS_VERSION="${VS_VERSION}"
31160    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31161    METHOD="well-known name"
31162
31163  windows_path="$WIN_SDK_BASE"
31164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31165    unix_path=`$CYGPATH -u "$windows_path"`
31166    WIN_SDK_BASE="$unix_path"
31167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31169    WIN_SDK_BASE="$unix_path"
31170  fi
31171
31172    if test -d "$WIN_SDK_BASE"; then
31173      # There have been cases of partial or broken SDK installations. A missing
31174      # lib dir is not going to work.
31175      if test ! -d "$WIN_SDK_BASE/lib"; then
31176        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31177$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31178        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31179$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31180      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31182$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31183        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31184        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31185          VS_ENV_ARGS="/x86"
31186        else
31187          VS_ENV_ARGS="/x64"
31188        fi
31189        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31190        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31191        # TODO: improve detection for other versions of SDK
31192        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31193      else
31194        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31195$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31196        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31197$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31198      fi
31199    fi
31200  fi
31201
31202    fi
31203    if test "x$PROGRAMW6432" != x; then
31204
31205  if test "x$VS_ENV_CMD" = x; then
31206    VS_VERSION="${VS_VERSION}"
31207    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31208    METHOD="well-known name"
31209
31210  windows_path="$WIN_SDK_BASE"
31211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31212    unix_path=`$CYGPATH -u "$windows_path"`
31213    WIN_SDK_BASE="$unix_path"
31214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31216    WIN_SDK_BASE="$unix_path"
31217  fi
31218
31219    if test -d "$WIN_SDK_BASE"; then
31220      # There have been cases of partial or broken SDK installations. A missing
31221      # lib dir is not going to work.
31222      if test ! -d "$WIN_SDK_BASE/lib"; then
31223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31224$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31225        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31226$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31227      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31228        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31229$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31230        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31231        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31232          VS_ENV_ARGS="/x86"
31233        else
31234          VS_ENV_ARGS="/x64"
31235        fi
31236        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31237        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31238        # TODO: improve detection for other versions of SDK
31239        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31240      else
31241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31242$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31243        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31244$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31245      fi
31246    fi
31247  fi
31248
31249    fi
31250    if test "x$PROGRAMFILES" != x; then
31251
31252  if test "x$VS_ENV_CMD" = x; then
31253    VS_VERSION="${VS_VERSION}"
31254    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31255    METHOD="well-known name"
31256
31257  windows_path="$WIN_SDK_BASE"
31258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31259    unix_path=`$CYGPATH -u "$windows_path"`
31260    WIN_SDK_BASE="$unix_path"
31261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31263    WIN_SDK_BASE="$unix_path"
31264  fi
31265
31266    if test -d "$WIN_SDK_BASE"; then
31267      # There have been cases of partial or broken SDK installations. A missing
31268      # lib dir is not going to work.
31269      if test ! -d "$WIN_SDK_BASE/lib"; then
31270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31271$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31272        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31273$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31274      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31275        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31276$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31277        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31278        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31279          VS_ENV_ARGS="/x86"
31280        else
31281          VS_ENV_ARGS="/x64"
31282        fi
31283        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31284        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31285        # TODO: improve detection for other versions of SDK
31286        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31287      else
31288        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31289$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31290        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31291$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31292      fi
31293    fi
31294  fi
31295
31296    fi
31297
31298  if test "x$VS_ENV_CMD" = x; then
31299    VS_VERSION="${VS_VERSION}"
31300    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31301    METHOD="well-known name"
31302
31303  windows_path="$WIN_SDK_BASE"
31304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31305    unix_path=`$CYGPATH -u "$windows_path"`
31306    WIN_SDK_BASE="$unix_path"
31307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31309    WIN_SDK_BASE="$unix_path"
31310  fi
31311
31312    if test -d "$WIN_SDK_BASE"; then
31313      # There have been cases of partial or broken SDK installations. A missing
31314      # lib dir is not going to work.
31315      if test ! -d "$WIN_SDK_BASE/lib"; then
31316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31317$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31318        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31319$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31320      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31322$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31323        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31324        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31325          VS_ENV_ARGS="/x86"
31326        else
31327          VS_ENV_ARGS="/x64"
31328        fi
31329        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31330        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31331        # TODO: improve detection for other versions of SDK
31332        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31333      else
31334        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31335$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31336        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31337$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31338      fi
31339    fi
31340  fi
31341
31342
31343  if test "x$VS_ENV_CMD" = x; then
31344    VS_VERSION="${VS_VERSION}"
31345    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31346    METHOD="well-known name"
31347
31348  windows_path="$WIN_SDK_BASE"
31349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31350    unix_path=`$CYGPATH -u "$windows_path"`
31351    WIN_SDK_BASE="$unix_path"
31352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31354    WIN_SDK_BASE="$unix_path"
31355  fi
31356
31357    if test -d "$WIN_SDK_BASE"; then
31358      # There have been cases of partial or broken SDK installations. A missing
31359      # lib dir is not going to work.
31360      if test ! -d "$WIN_SDK_BASE/lib"; then
31361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31362$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31364$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31365      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31366        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31367$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31368        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31369        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31370          VS_ENV_ARGS="/x86"
31371        else
31372          VS_ENV_ARGS="/x64"
31373        fi
31374        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31375        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31376        # TODO: improve detection for other versions of SDK
31377        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31378      else
31379        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31380$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31381        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31382$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31383      fi
31384    fi
31385  fi
31386
31387  fi
31388
31389    if test "x$VS_ENV_CMD" != x; then
31390      TOOLCHAIN_VERSION=$VS_VERSION
31391      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31392      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31393      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31394      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31395      # The rest of the variables are already evaled while probing
31396      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31397$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31398      break
31399    fi
31400  done
31401
31402
31403  # If we have a devkit, skip all of the below.
31404  if test "x$DEVKIT_VS_VERSION" = x; then
31405    if test "x$VS_ENV_CMD" != x; then
31406      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31407
31408  # Only process if variable expands to non-empty
31409
31410  if test "x$VS_ENV_CMD" != x; then
31411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31412
31413  # First separate the path from the arguments. This will split at the first
31414  # space.
31415  complete="$VS_ENV_CMD"
31416  path="${complete%% *}"
31417  tmp="$complete EOL"
31418  arguments="${tmp#* }"
31419
31420  # Input might be given as Windows format, start by converting to
31421  # unix format.
31422  new_path=`$CYGPATH -u "$path"`
31423
31424  # Now try to locate executable using which
31425  new_path=`$WHICH "$new_path" 2> /dev/null`
31426  # bat and cmd files are not always considered executable in cygwin causing which
31427  # to not find them
31428  if test "x$new_path" = x \
31429      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31430      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31431    new_path=`$CYGPATH -u "$path"`
31432  fi
31433  if test "x$new_path" = x; then
31434    # Oops. Which didn't find the executable.
31435    # The splitting of arguments from the executable at a space might have been incorrect,
31436    # since paths with space are more likely in Windows. Give it another try with the whole
31437    # argument.
31438    path="$complete"
31439    arguments="EOL"
31440    new_path=`$CYGPATH -u "$path"`
31441    new_path=`$WHICH "$new_path" 2> /dev/null`
31442    # bat and cmd files are not always considered executable in cygwin causing which
31443    # to not find them
31444    if test "x$new_path" = x \
31445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31447      new_path=`$CYGPATH -u "$path"`
31448    fi
31449    if test "x$new_path" = x; then
31450      # It's still not found. Now this is an unrecoverable error.
31451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31452$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31453      has_space=`$ECHO "$complete" | $GREP " "`
31454      if test "x$has_space" != x; then
31455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31457      fi
31458      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31459    fi
31460  fi
31461
31462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31465  # "foo.exe" is OK but "foo" is an error.
31466  #
31467  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31468  # It is also a way to make sure we got the proper file name for the real test later on.
31469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31470  if test "x$test_shortpath" = x; then
31471    # Short path failed, file does not exist as specified.
31472    # Try adding .exe or .cmd
31473    if test -f "${new_path}.exe"; then
31474      input_to_shortpath="${new_path}.exe"
31475    elif test -f "${new_path}.cmd"; then
31476      input_to_shortpath="${new_path}.cmd"
31477    else
31478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31479$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31480      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31481$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31482      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31483    fi
31484  else
31485    input_to_shortpath="$new_path"
31486  fi
31487
31488  # Call helper function which possibly converts this using DOS-style short mode.
31489  # If so, the updated path is stored in $new_path.
31490  new_path="$input_to_shortpath"
31491
31492  input_path="$input_to_shortpath"
31493  # Check if we need to convert this using DOS-style short mode. If the path
31494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31495  # take no chances and rewrite it.
31496  # Note: m4 eats our [], so we need to use [ and ] instead.
31497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31498  if test "x$has_forbidden_chars" != x; then
31499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31503      # Going to short mode and back again did indeed matter. Since short mode is
31504      # case insensitive, let's make it lowercase to improve readability.
31505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31506      # Now convert it back to Unix-style (cygpath)
31507      input_path=`$CYGPATH -u "$shortmode_path"`
31508      new_path="$input_path"
31509    fi
31510  fi
31511
31512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31513  if test "x$test_cygdrive_prefix" = x; then
31514    # As a simple fix, exclude /usr/bin since it's not a real path.
31515    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31517      # a path prefixed by /cygdrive for fixpath to work.
31518      new_path="$CYGWIN_ROOT_PATH$input_path"
31519    fi
31520  fi
31521
31522  # remove trailing .exe if any
31523  new_path="${new_path/%.exe/}"
31524
31525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31526
31527  # First separate the path from the arguments. This will split at the first
31528  # space.
31529  complete="$VS_ENV_CMD"
31530  path="${complete%% *}"
31531  tmp="$complete EOL"
31532  arguments="${tmp#* }"
31533
31534  # Input might be given as Windows format, start by converting to
31535  # unix format.
31536  new_path="$path"
31537
31538  windows_path="$new_path"
31539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31540    unix_path=`$CYGPATH -u "$windows_path"`
31541    new_path="$unix_path"
31542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31544    new_path="$unix_path"
31545  fi
31546
31547
31548  # Now try to locate executable using which
31549  new_path=`$WHICH "$new_path" 2> /dev/null`
31550
31551  if test "x$new_path" = x; then
31552    # Oops. Which didn't find the executable.
31553    # The splitting of arguments from the executable at a space might have been incorrect,
31554    # since paths with space are more likely in Windows. Give it another try with the whole
31555    # argument.
31556    path="$complete"
31557    arguments="EOL"
31558    new_path="$path"
31559
31560  windows_path="$new_path"
31561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31562    unix_path=`$CYGPATH -u "$windows_path"`
31563    new_path="$unix_path"
31564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31566    new_path="$unix_path"
31567  fi
31568
31569
31570    new_path=`$WHICH "$new_path" 2> /dev/null`
31571    # bat and cmd files are not always considered executable in MSYS causing which
31572    # to not find them
31573    if test "x$new_path" = x \
31574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31576      new_path="$path"
31577
31578  windows_path="$new_path"
31579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31580    unix_path=`$CYGPATH -u "$windows_path"`
31581    new_path="$unix_path"
31582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31584    new_path="$unix_path"
31585  fi
31586
31587    fi
31588
31589    if test "x$new_path" = x; then
31590      # It's still not found. Now this is an unrecoverable error.
31591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31592$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31593      has_space=`$ECHO "$complete" | $GREP " "`
31594      if test "x$has_space" != x; then
31595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31597      fi
31598      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31599    fi
31600  fi
31601
31602  # Now new_path has a complete unix path to the binary
31603  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31604    # Keep paths in /bin as-is, but remove trailing .exe if any
31605    new_path="${new_path/%.exe/}"
31606    # Do not save /bin paths to all_fixpath_prefixes!
31607  else
31608    # Not in mixed or Windows style, start by that.
31609    new_path=`cmd //c echo $new_path`
31610
31611  input_path="$new_path"
31612  # Check if we need to convert this using DOS-style short mode. If the path
31613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31614  # take no chances and rewrite it.
31615  # Note: m4 eats our [], so we need to use [ and ] instead.
31616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31617  if test "x$has_forbidden_chars" != x; then
31618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31620  fi
31621
31622    # Output is in $new_path
31623
31624  windows_path="$new_path"
31625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31626    unix_path=`$CYGPATH -u "$windows_path"`
31627    new_path="$unix_path"
31628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31630    new_path="$unix_path"
31631  fi
31632
31633    # remove trailing .exe if any
31634    new_path="${new_path/%.exe/}"
31635
31636    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31637    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31638  fi
31639
31640    else
31641      # We're on a unix platform. Hooray! :)
31642      # First separate the path from the arguments. This will split at the first
31643      # space.
31644      complete="$VS_ENV_CMD"
31645      path="${complete%% *}"
31646      tmp="$complete EOL"
31647      arguments="${tmp#* }"
31648
31649      # Cannot rely on the command "which" here since it doesn't always work.
31650      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31651      if test -z "$is_absolute_path"; then
31652        # Path to executable is not absolute. Find it.
31653        IFS_save="$IFS"
31654        IFS=:
31655        for p in $PATH; do
31656          if test -f "$p/$path" && test -x "$p/$path"; then
31657            new_path="$p/$path"
31658            break
31659          fi
31660        done
31661        IFS="$IFS_save"
31662      else
31663        # This is an absolute path, we can use it without further modifications.
31664        new_path="$path"
31665      fi
31666
31667      if test "x$new_path" = x; then
31668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31669$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31670        has_space=`$ECHO "$complete" | $GREP " "`
31671        if test "x$has_space" != x; then
31672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31674        fi
31675        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31676      fi
31677    fi
31678
31679    # Now join together the path and the arguments once again
31680    if test "x$arguments" != xEOL; then
31681      new_complete="$new_path ${arguments% *}"
31682    else
31683      new_complete="$new_path"
31684    fi
31685
31686    if test "x$complete" != "x$new_complete"; then
31687      VS_ENV_CMD="$new_complete"
31688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31689$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31690    fi
31691  fi
31692
31693
31694      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31695      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31696$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31697
31698      # We need to create a couple of temporary files.
31699      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31700      $MKDIR -p $VS_ENV_TMP_DIR
31701
31702      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31703      # Instead create a shell script which will set the relevant variables when run.
31704      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31705
31706  unix_path="$WINPATH_VS_ENV_CMD"
31707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31708    windows_path=`$CYGPATH -m "$unix_path"`
31709    WINPATH_VS_ENV_CMD="$windows_path"
31710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31711    windows_path=`cmd //c echo $unix_path`
31712    WINPATH_VS_ENV_CMD="$windows_path"
31713  fi
31714
31715      WINPATH_BASH="$BASH"
31716
31717  unix_path="$WINPATH_BASH"
31718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31719    windows_path=`$CYGPATH -m "$unix_path"`
31720    WINPATH_BASH="$windows_path"
31721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31722    windows_path=`cmd //c echo $unix_path`
31723    WINPATH_BASH="$windows_path"
31724  fi
31725
31726
31727      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31728      # script (executable by bash) that will setup the important variables.
31729      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31730      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31731      # This will end up something like:
31732      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31733      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31734      # These will end up something like:
31735      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31736      # The trailing space for everyone except PATH is no typo, but is needed due
31737      # to trailing \ in the Windows paths. These will be stripped later.
31738      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31739          >> $EXTRACT_VC_ENV_BAT_FILE
31740      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31741          >> $EXTRACT_VC_ENV_BAT_FILE
31742      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31743          >> $EXTRACT_VC_ENV_BAT_FILE
31744      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31745          >> $EXTRACT_VC_ENV_BAT_FILE
31746      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31747          >> $EXTRACT_VC_ENV_BAT_FILE
31748      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31749          >> $EXTRACT_VC_ENV_BAT_FILE
31750
31751      # Now execute the newly created bat file.
31752      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31753      # Change directory so we don't need to mess with Windows paths in redirects.
31754      cd $VS_ENV_TMP_DIR
31755      cmd /c extract-vs-env.bat | $CAT
31756      cd $CURDIR
31757
31758      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31760$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31761        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31762$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31763        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31764$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31765        as_fn_error $? "Cannot continue" "$LINENO" 5
31766      fi
31767
31768      # Now set all paths and other env variables. This will allow the rest of
31769      # the configure script to find and run the compiler in the proper way.
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31771$as_echo "$as_me: Setting extracted environment variables" >&6;}
31772      . $VS_ENV_TMP_DIR/set-vs-env.sh
31773      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31774      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31775    else
31776      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31777      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31778$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31779    fi
31780  fi
31781
31782  # At this point, we should have correct variables in the environment, or we can't continue.
31783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31784$as_echo_n "checking for Visual Studio variables... " >&6; }
31785
31786  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31787      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31788    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31790$as_echo "present but broken" >&6; }
31791      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31792    else
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31794$as_echo "ok" >&6; }
31795      # Remove any trailing "\" ";" and " " from the variables.
31796      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31797      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31798      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31799      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31800      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31801      # Remove any paths containing # (typically F#) as that messes up make. This
31802      # is needed if visual studio was installed with F# support.
31803      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31804
31805
31806
31807
31808
31809      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31810      OLDIFS="$IFS"
31811      IFS=";"
31812      for i in $VS_INCLUDE; do
31813        ipath=$i
31814        # Only process non-empty elements
31815        if test "x$ipath" != x; then
31816          IFS="$OLDIFS"
31817          # Check that directory exists before calling fixup_path
31818          testpath=$ipath
31819
31820  windows_path="$testpath"
31821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31822    unix_path=`$CYGPATH -u "$windows_path"`
31823    testpath="$unix_path"
31824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31826    testpath="$unix_path"
31827  fi
31828
31829          if test -d "$testpath"; then
31830
31831  # Only process if variable expands to non-empty
31832
31833  if test "x$ipath" != x; then
31834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31835
31836  # Input might be given as Windows format, start by converting to
31837  # unix format.
31838  path="$ipath"
31839  new_path=`$CYGPATH -u "$path"`
31840
31841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31844  # "foo.exe" is OK but "foo" is an error.
31845  #
31846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31847  # It is also a way to make sure we got the proper file name for the real test later on.
31848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31849  if test "x$test_shortpath" = x; then
31850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31851$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31852    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31853  fi
31854
31855  # Call helper function which possibly converts this using DOS-style short mode.
31856  # If so, the updated path is stored in $new_path.
31857
31858  input_path="$new_path"
31859  # Check if we need to convert this using DOS-style short mode. If the path
31860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31861  # take no chances and rewrite it.
31862  # Note: m4 eats our [], so we need to use [ and ] instead.
31863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31864  if test "x$has_forbidden_chars" != x; then
31865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31869      # Going to short mode and back again did indeed matter. Since short mode is
31870      # case insensitive, let's make it lowercase to improve readability.
31871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31872      # Now convert it back to Unix-style (cygpath)
31873      input_path=`$CYGPATH -u "$shortmode_path"`
31874      new_path="$input_path"
31875    fi
31876  fi
31877
31878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31879  if test "x$test_cygdrive_prefix" = x; then
31880    # As a simple fix, exclude /usr/bin since it's not a real path.
31881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31883      # a path prefixed by /cygdrive for fixpath to work.
31884      new_path="$CYGWIN_ROOT_PATH$input_path"
31885    fi
31886  fi
31887
31888
31889  if test "x$path" != "x$new_path"; then
31890    ipath="$new_path"
31891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31892$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31893  fi
31894
31895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31896
31897  path="$ipath"
31898  has_colon=`$ECHO $path | $GREP ^.:`
31899  new_path="$path"
31900  if test "x$has_colon" = x; then
31901    # Not in mixed or Windows style, start by that.
31902    new_path=`cmd //c echo $path`
31903  fi
31904
31905
31906  input_path="$new_path"
31907  # Check if we need to convert this using DOS-style short mode. If the path
31908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31909  # take no chances and rewrite it.
31910  # Note: m4 eats our [], so we need to use [ and ] instead.
31911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31912  if test "x$has_forbidden_chars" != x; then
31913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31915  fi
31916
31917
31918  windows_path="$new_path"
31919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31920    unix_path=`$CYGPATH -u "$windows_path"`
31921    new_path="$unix_path"
31922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31924    new_path="$unix_path"
31925  fi
31926
31927  if test "x$path" != "x$new_path"; then
31928    ipath="$new_path"
31929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31930$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31931  fi
31932
31933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31935
31936    else
31937      # We're on a unix platform. Hooray! :)
31938      path="$ipath"
31939      has_space=`$ECHO "$path" | $GREP " "`
31940      if test "x$has_space" != x; then
31941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31942$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31944      fi
31945
31946      # Use eval to expand a potential ~
31947      eval path="$path"
31948      if test ! -f "$path" && test ! -d "$path"; then
31949        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31950      fi
31951
31952      if test -d "$path"; then
31953        ipath="`cd "$path"; $THEPWDCMD -L`"
31954      else
31955        dir="`$DIRNAME "$path"`"
31956        base="`$BASENAME "$path"`"
31957        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31958      fi
31959    fi
31960  fi
31961
31962            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31963          fi
31964          IFS=";"
31965        fi
31966      done
31967      # Convert VS_LIB into SYSROOT_LDFLAGS
31968      for i in $VS_LIB; do
31969        libpath=$i
31970        # Only process non-empty elements
31971        if test "x$libpath" != x; then
31972          IFS="$OLDIFS"
31973          # Check that directory exists before calling fixup_path
31974          testpath=$libpath
31975
31976  windows_path="$testpath"
31977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31978    unix_path=`$CYGPATH -u "$windows_path"`
31979    testpath="$unix_path"
31980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31982    testpath="$unix_path"
31983  fi
31984
31985          if test -d "$testpath"; then
31986
31987  # Only process if variable expands to non-empty
31988
31989  if test "x$libpath" != x; then
31990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31991
31992  # Input might be given as Windows format, start by converting to
31993  # unix format.
31994  path="$libpath"
31995  new_path=`$CYGPATH -u "$path"`
31996
31997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32000  # "foo.exe" is OK but "foo" is an error.
32001  #
32002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32003  # It is also a way to make sure we got the proper file name for the real test later on.
32004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32005  if test "x$test_shortpath" = x; then
32006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32007$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32008    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32009  fi
32010
32011  # Call helper function which possibly converts this using DOS-style short mode.
32012  # If so, the updated path is stored in $new_path.
32013
32014  input_path="$new_path"
32015  # Check if we need to convert this using DOS-style short mode. If the path
32016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32017  # take no chances and rewrite it.
32018  # Note: m4 eats our [], so we need to use [ and ] instead.
32019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32020  if test "x$has_forbidden_chars" != x; then
32021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32025      # Going to short mode and back again did indeed matter. Since short mode is
32026      # case insensitive, let's make it lowercase to improve readability.
32027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32028      # Now convert it back to Unix-style (cygpath)
32029      input_path=`$CYGPATH -u "$shortmode_path"`
32030      new_path="$input_path"
32031    fi
32032  fi
32033
32034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32035  if test "x$test_cygdrive_prefix" = x; then
32036    # As a simple fix, exclude /usr/bin since it's not a real path.
32037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32039      # a path prefixed by /cygdrive for fixpath to work.
32040      new_path="$CYGWIN_ROOT_PATH$input_path"
32041    fi
32042  fi
32043
32044
32045  if test "x$path" != "x$new_path"; then
32046    libpath="$new_path"
32047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32048$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32049  fi
32050
32051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052
32053  path="$libpath"
32054  has_colon=`$ECHO $path | $GREP ^.:`
32055  new_path="$path"
32056  if test "x$has_colon" = x; then
32057    # Not in mixed or Windows style, start by that.
32058    new_path=`cmd //c echo $path`
32059  fi
32060
32061
32062  input_path="$new_path"
32063  # Check if we need to convert this using DOS-style short mode. If the path
32064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32065  # take no chances and rewrite it.
32066  # Note: m4 eats our [], so we need to use [ and ] instead.
32067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32068  if test "x$has_forbidden_chars" != x; then
32069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32071  fi
32072
32073
32074  windows_path="$new_path"
32075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32076    unix_path=`$CYGPATH -u "$windows_path"`
32077    new_path="$unix_path"
32078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32080    new_path="$unix_path"
32081  fi
32082
32083  if test "x$path" != "x$new_path"; then
32084    libpath="$new_path"
32085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32086$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32087  fi
32088
32089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32091
32092    else
32093      # We're on a unix platform. Hooray! :)
32094      path="$libpath"
32095      has_space=`$ECHO "$path" | $GREP " "`
32096      if test "x$has_space" != x; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32098$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32100      fi
32101
32102      # Use eval to expand a potential ~
32103      eval path="$path"
32104      if test ! -f "$path" && test ! -d "$path"; then
32105        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32106      fi
32107
32108      if test -d "$path"; then
32109        libpath="`cd "$path"; $THEPWDCMD -L`"
32110      else
32111        dir="`$DIRNAME "$path"`"
32112        base="`$BASENAME "$path"`"
32113        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32114      fi
32115    fi
32116  fi
32117
32118            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32119          fi
32120          IFS=";"
32121        fi
32122      done
32123      IFS="$OLDIFS"
32124    fi
32125  else
32126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32127$as_echo "not found" >&6; }
32128
32129    if test "x$VS_ENV_CMD" = x; then
32130      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32131$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32132      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32133$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32134    else
32135      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32136$as_echo "$as_me: Running the extraction script failed." >&6;}
32137    fi
32138    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32139$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32140    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32141$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32142    as_fn_error $? "Cannot continue" "$LINENO" 5
32143  fi
32144
32145    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32146    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32147    PATH="$VS_PATH"
32148    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32149    export INCLUDE="$VS_INCLUDE"
32150    export LIB="$VS_LIB"
32151  else
32152    if test "x$XCODE_VERSION_OUTPUT" != x; then
32153      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32154      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32155      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32156    else
32157      # Currently we do not define this for other toolchains. This might change as the need arise.
32158      TOOLCHAIN_VERSION=
32159    fi
32160  fi
32161
32162
32163  # For solaris we really need solaris tools, and not the GNU equivalent.
32164  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32165  # so add that to path before starting to probe.
32166  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32167  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32168    PATH="/usr/ccs/bin:$PATH"
32169  fi
32170
32171  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32172  # override all other locations.
32173  if test "x$TOOLCHAIN_PATH" != x; then
32174    PATH=$TOOLCHAIN_PATH:$PATH
32175  fi
32176
32177
32178  #
32179  # Setup the compilers (CC and CXX)
32180  #
32181
32182  COMPILER_NAME=C
32183  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32184
32185  if test "x$CC" != x; then
32186    # User has supplied compiler name already, always let that override.
32187    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32188$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32189    if test "x`basename $CC`" = "x$CC"; then
32190      # A command without a complete path is provided, search $PATH.
32191
32192      for ac_prog in $CC
32193do
32194  # Extract the first word of "$ac_prog", so it can be a program name with args.
32195set dummy $ac_prog; ac_word=$2
32196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32197$as_echo_n "checking for $ac_word... " >&6; }
32198if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32199  $as_echo_n "(cached) " >&6
32200else
32201  case $POTENTIAL_CC in
32202  [\\/]* | ?:[\\/]*)
32203  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32204  ;;
32205  *)
32206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32207for as_dir in $PATH
32208do
32209  IFS=$as_save_IFS
32210  test -z "$as_dir" && as_dir=.
32211    for ac_exec_ext in '' $ac_executable_extensions; do
32212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32213    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32215    break 2
32216  fi
32217done
32218  done
32219IFS=$as_save_IFS
32220
32221  ;;
32222esac
32223fi
32224POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32225if test -n "$POTENTIAL_CC"; then
32226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32227$as_echo "$POTENTIAL_CC" >&6; }
32228else
32229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32230$as_echo "no" >&6; }
32231fi
32232
32233
32234  test -n "$POTENTIAL_CC" && break
32235done
32236
32237      if test "x$POTENTIAL_CC" != x; then
32238        CC=$POTENTIAL_CC
32239      else
32240        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32241      fi
32242    else
32243      # Otherwise it might already be a complete path
32244      if test ! -x "$CC"; then
32245        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32246      fi
32247    fi
32248  else
32249    # No user supplied value. Locate compiler ourselves.
32250
32251    # If we are cross compiling, assume cross compilation tools follows the
32252    # cross compilation standard where they are prefixed with the autoconf
32253    # standard name for the target. For example the binary
32254    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32255    # If we are not cross compiling, then the default compiler name will be
32256    # used.
32257
32258    CC=
32259    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32260    # before checking the rest of the PATH.
32261    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32262    # step, this should not be necessary.
32263    if test -n "$TOOLCHAIN_PATH"; then
32264      PATH_save="$PATH"
32265      PATH="$TOOLCHAIN_PATH"
32266      for ac_prog in $SEARCH_LIST
32267do
32268  # Extract the first word of "$ac_prog", so it can be a program name with args.
32269set dummy $ac_prog; ac_word=$2
32270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32271$as_echo_n "checking for $ac_word... " >&6; }
32272if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32273  $as_echo_n "(cached) " >&6
32274else
32275  case $TOOLCHAIN_PATH_CC in
32276  [\\/]* | ?:[\\/]*)
32277  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32278  ;;
32279  *)
32280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32281for as_dir in $PATH
32282do
32283  IFS=$as_save_IFS
32284  test -z "$as_dir" && as_dir=.
32285    for ac_exec_ext in '' $ac_executable_extensions; do
32286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32287    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32289    break 2
32290  fi
32291done
32292  done
32293IFS=$as_save_IFS
32294
32295  ;;
32296esac
32297fi
32298TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32299if test -n "$TOOLCHAIN_PATH_CC"; then
32300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32301$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32302else
32303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32304$as_echo "no" >&6; }
32305fi
32306
32307
32308  test -n "$TOOLCHAIN_PATH_CC" && break
32309done
32310
32311      CC=$TOOLCHAIN_PATH_CC
32312      PATH="$PATH_save"
32313    fi
32314
32315    # AC_PATH_PROGS can't be run multiple times with the same variable,
32316    # so create a new name for this run.
32317    if test "x$CC" = x; then
32318      for ac_prog in $SEARCH_LIST
32319do
32320  # Extract the first word of "$ac_prog", so it can be a program name with args.
32321set dummy $ac_prog; ac_word=$2
32322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32323$as_echo_n "checking for $ac_word... " >&6; }
32324if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32325  $as_echo_n "(cached) " >&6
32326else
32327  case $POTENTIAL_CC in
32328  [\\/]* | ?:[\\/]*)
32329  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32330  ;;
32331  *)
32332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32333for as_dir in $PATH
32334do
32335  IFS=$as_save_IFS
32336  test -z "$as_dir" && as_dir=.
32337    for ac_exec_ext in '' $ac_executable_extensions; do
32338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32339    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32341    break 2
32342  fi
32343done
32344  done
32345IFS=$as_save_IFS
32346
32347  ;;
32348esac
32349fi
32350POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32351if test -n "$POTENTIAL_CC"; then
32352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32353$as_echo "$POTENTIAL_CC" >&6; }
32354else
32355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32356$as_echo "no" >&6; }
32357fi
32358
32359
32360  test -n "$POTENTIAL_CC" && break
32361done
32362
32363      CC=$POTENTIAL_CC
32364    fi
32365
32366    if test "x$CC" = x; then
32367
32368  # Print a helpful message on how to acquire the necessary build dependency.
32369  # devkit is the help tag: freetype, cups, alsa etc
32370  MISSING_DEPENDENCY=devkit
32371
32372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32373    cygwin_help $MISSING_DEPENDENCY
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375    msys_help $MISSING_DEPENDENCY
32376  else
32377    PKGHANDLER_COMMAND=
32378
32379    case $PKGHANDLER in
32380      apt-get)
32381        apt_help     $MISSING_DEPENDENCY ;;
32382      yum)
32383        yum_help     $MISSING_DEPENDENCY ;;
32384      port)
32385        port_help    $MISSING_DEPENDENCY ;;
32386      pkgutil)
32387        pkgutil_help $MISSING_DEPENDENCY ;;
32388      pkgadd)
32389        pkgadd_help  $MISSING_DEPENDENCY ;;
32390    esac
32391
32392    if test "x$PKGHANDLER_COMMAND" != x; then
32393      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32394    fi
32395  fi
32396
32397      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32398    fi
32399  fi
32400
32401  # Now we have a compiler binary in CC. Make sure it's okay.
32402
32403  # Only process if variable expands to non-empty
32404
32405  if test "x$CC" != x; then
32406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407
32408  # First separate the path from the arguments. This will split at the first
32409  # space.
32410  complete="$CC"
32411  path="${complete%% *}"
32412  tmp="$complete EOL"
32413  arguments="${tmp#* }"
32414
32415  # Input might be given as Windows format, start by converting to
32416  # unix format.
32417  new_path=`$CYGPATH -u "$path"`
32418
32419  # Now try to locate executable using which
32420  new_path=`$WHICH "$new_path" 2> /dev/null`
32421  # bat and cmd files are not always considered executable in cygwin causing which
32422  # to not find them
32423  if test "x$new_path" = x \
32424      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32425      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32426    new_path=`$CYGPATH -u "$path"`
32427  fi
32428  if test "x$new_path" = x; then
32429    # Oops. Which didn't find the executable.
32430    # The splitting of arguments from the executable at a space might have been incorrect,
32431    # since paths with space are more likely in Windows. Give it another try with the whole
32432    # argument.
32433    path="$complete"
32434    arguments="EOL"
32435    new_path=`$CYGPATH -u "$path"`
32436    new_path=`$WHICH "$new_path" 2> /dev/null`
32437    # bat and cmd files are not always considered executable in cygwin causing which
32438    # to not find them
32439    if test "x$new_path" = x \
32440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32442      new_path=`$CYGPATH -u "$path"`
32443    fi
32444    if test "x$new_path" = x; then
32445      # It's still not found. Now this is an unrecoverable error.
32446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32447$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32448      has_space=`$ECHO "$complete" | $GREP " "`
32449      if test "x$has_space" != x; then
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32452      fi
32453      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32454    fi
32455  fi
32456
32457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32460  # "foo.exe" is OK but "foo" is an error.
32461  #
32462  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32463  # It is also a way to make sure we got the proper file name for the real test later on.
32464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32465  if test "x$test_shortpath" = x; then
32466    # Short path failed, file does not exist as specified.
32467    # Try adding .exe or .cmd
32468    if test -f "${new_path}.exe"; then
32469      input_to_shortpath="${new_path}.exe"
32470    elif test -f "${new_path}.cmd"; then
32471      input_to_shortpath="${new_path}.cmd"
32472    else
32473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32474$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32475      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32476$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32477      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32478    fi
32479  else
32480    input_to_shortpath="$new_path"
32481  fi
32482
32483  # Call helper function which possibly converts this using DOS-style short mode.
32484  # If so, the updated path is stored in $new_path.
32485  new_path="$input_to_shortpath"
32486
32487  input_path="$input_to_shortpath"
32488  # Check if we need to convert this using DOS-style short mode. If the path
32489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32490  # take no chances and rewrite it.
32491  # Note: m4 eats our [], so we need to use [ and ] instead.
32492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32493  if test "x$has_forbidden_chars" != x; then
32494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32498      # Going to short mode and back again did indeed matter. Since short mode is
32499      # case insensitive, let's make it lowercase to improve readability.
32500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32501      # Now convert it back to Unix-style (cygpath)
32502      input_path=`$CYGPATH -u "$shortmode_path"`
32503      new_path="$input_path"
32504    fi
32505  fi
32506
32507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32508  if test "x$test_cygdrive_prefix" = x; then
32509    # As a simple fix, exclude /usr/bin since it's not a real path.
32510    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32512      # a path prefixed by /cygdrive for fixpath to work.
32513      new_path="$CYGWIN_ROOT_PATH$input_path"
32514    fi
32515  fi
32516
32517  # remove trailing .exe if any
32518  new_path="${new_path/%.exe/}"
32519
32520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32521
32522  # First separate the path from the arguments. This will split at the first
32523  # space.
32524  complete="$CC"
32525  path="${complete%% *}"
32526  tmp="$complete EOL"
32527  arguments="${tmp#* }"
32528
32529  # Input might be given as Windows format, start by converting to
32530  # unix format.
32531  new_path="$path"
32532
32533  windows_path="$new_path"
32534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32535    unix_path=`$CYGPATH -u "$windows_path"`
32536    new_path="$unix_path"
32537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32539    new_path="$unix_path"
32540  fi
32541
32542
32543  # Now try to locate executable using which
32544  new_path=`$WHICH "$new_path" 2> /dev/null`
32545
32546  if test "x$new_path" = x; then
32547    # Oops. Which didn't find the executable.
32548    # The splitting of arguments from the executable at a space might have been incorrect,
32549    # since paths with space are more likely in Windows. Give it another try with the whole
32550    # argument.
32551    path="$complete"
32552    arguments="EOL"
32553    new_path="$path"
32554
32555  windows_path="$new_path"
32556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32557    unix_path=`$CYGPATH -u "$windows_path"`
32558    new_path="$unix_path"
32559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32561    new_path="$unix_path"
32562  fi
32563
32564
32565    new_path=`$WHICH "$new_path" 2> /dev/null`
32566    # bat and cmd files are not always considered executable in MSYS causing which
32567    # to not find them
32568    if test "x$new_path" = x \
32569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32571      new_path="$path"
32572
32573  windows_path="$new_path"
32574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32575    unix_path=`$CYGPATH -u "$windows_path"`
32576    new_path="$unix_path"
32577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32579    new_path="$unix_path"
32580  fi
32581
32582    fi
32583
32584    if test "x$new_path" = x; then
32585      # It's still not found. Now this is an unrecoverable error.
32586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32587$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32588      has_space=`$ECHO "$complete" | $GREP " "`
32589      if test "x$has_space" != x; then
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32592      fi
32593      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32594    fi
32595  fi
32596
32597  # Now new_path has a complete unix path to the binary
32598  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32599    # Keep paths in /bin as-is, but remove trailing .exe if any
32600    new_path="${new_path/%.exe/}"
32601    # Do not save /bin paths to all_fixpath_prefixes!
32602  else
32603    # Not in mixed or Windows style, start by that.
32604    new_path=`cmd //c echo $new_path`
32605
32606  input_path="$new_path"
32607  # Check if we need to convert this using DOS-style short mode. If the path
32608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32609  # take no chances and rewrite it.
32610  # Note: m4 eats our [], so we need to use [ and ] instead.
32611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32612  if test "x$has_forbidden_chars" != x; then
32613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32615  fi
32616
32617    # Output is in $new_path
32618
32619  windows_path="$new_path"
32620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32621    unix_path=`$CYGPATH -u "$windows_path"`
32622    new_path="$unix_path"
32623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32625    new_path="$unix_path"
32626  fi
32627
32628    # remove trailing .exe if any
32629    new_path="${new_path/%.exe/}"
32630
32631    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32632    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32633  fi
32634
32635    else
32636      # We're on a unix platform. Hooray! :)
32637      # First separate the path from the arguments. This will split at the first
32638      # space.
32639      complete="$CC"
32640      path="${complete%% *}"
32641      tmp="$complete EOL"
32642      arguments="${tmp#* }"
32643
32644      # Cannot rely on the command "which" here since it doesn't always work.
32645      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32646      if test -z "$is_absolute_path"; then
32647        # Path to executable is not absolute. Find it.
32648        IFS_save="$IFS"
32649        IFS=:
32650        for p in $PATH; do
32651          if test -f "$p/$path" && test -x "$p/$path"; then
32652            new_path="$p/$path"
32653            break
32654          fi
32655        done
32656        IFS="$IFS_save"
32657      else
32658        # This is an absolute path, we can use it without further modifications.
32659        new_path="$path"
32660      fi
32661
32662      if test "x$new_path" = x; then
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32664$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32665        has_space=`$ECHO "$complete" | $GREP " "`
32666        if test "x$has_space" != x; then
32667          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32668$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32669        fi
32670        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32671      fi
32672    fi
32673
32674    # Now join together the path and the arguments once again
32675    if test "x$arguments" != xEOL; then
32676      new_complete="$new_path ${arguments% *}"
32677    else
32678      new_complete="$new_path"
32679    fi
32680
32681    if test "x$complete" != "x$new_complete"; then
32682      CC="$new_complete"
32683      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32684$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32685    fi
32686  fi
32687
32688  TEST_COMPILER="$CC"
32689
32690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32691$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32692  SYMLINK_ORIGINAL="$TEST_COMPILER"
32693
32694  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32695    # Follow a chain of symbolic links. Use readlink
32696    # where it exists, else fall back to horribly
32697    # complicated shell code.
32698    if test "x$READLINK_TESTED" != yes; then
32699      # On MacOSX there is a readlink tool with a different
32700      # purpose than the GNU readlink tool. Check the found readlink.
32701      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32702      if test "x$ISGNU" = x; then
32703        # A readlink that we do not know how to use.
32704        # Are there other non-GNU readlinks out there?
32705        READLINK_TESTED=yes
32706        READLINK=
32707      fi
32708    fi
32709
32710    if test "x$READLINK" != x; then
32711      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32712    else
32713      # Save the current directory for restoring afterwards
32714      STARTDIR=$PWD
32715      COUNTER=0
32716      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32717      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32718      cd $sym_link_dir
32719      # Use -P flag to resolve symlinks in directories.
32720      cd `$THEPWDCMD -P`
32721      sym_link_dir=`$THEPWDCMD -P`
32722      # Resolve file symlinks
32723      while test $COUNTER -lt 20; do
32724        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32725        if test "x$ISLINK" == x; then
32726          # This is not a symbolic link! We are done!
32727          break
32728        fi
32729        # Again resolve directory symlinks since the target of the just found
32730        # link could be in a different directory
32731        cd `$DIRNAME $ISLINK`
32732        sym_link_dir=`$THEPWDCMD -P`
32733        sym_link_file=`$BASENAME $ISLINK`
32734        let COUNTER=COUNTER+1
32735      done
32736      cd $STARTDIR
32737      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32738    fi
32739  fi
32740
32741  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32743$as_echo "no symlink" >&6; }
32744  else
32745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32746$as_echo "$SYMLINK_ORIGINAL" >&6; }
32747
32748    # We can't handle ccache by gcc wrappers, since we need to know if we're
32749    # using ccache. Instead ccache usage must be controlled by a configure option.
32750    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32751    if test "x$COMPILER_BASENAME" = "xccache"; then
32752      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32753$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32754      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32755    fi
32756  fi
32757
32758
32759  COMPILER=$CC
32760  COMPILER_NAME=$COMPILER_NAME
32761
32762  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32763    # cc -V output typically looks like
32764    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32765    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32766    # Check that this is likely to be the Solaris Studio cc.
32767    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32768    if test $? -ne 0; then
32769      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32770      { $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
32771$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32772      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32773$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32774      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32775$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32776      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32777    fi
32778    # Remove usage instructions (if present), and
32779    # collapse compiler output into a single line
32780    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32781        $SED -e 's/ *[Uu]sage:.*//'`
32782    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32783        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32784  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32785    # xlc -qversion output typically looks like
32786    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32787    #     Version: 11.01.0000.0015
32788    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32789    # Check that this is likely to be the IBM XL C compiler.
32790    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32791    if test $? -ne 0; then
32792      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32793      { $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
32794$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32795      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32796$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32797      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32798$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32799      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32800    fi
32801    # Collapse compiler output into a single line
32802    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32803    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32804        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32805  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32806    # There is no specific version flag, but all output starts with a version string.
32807    # First line typically looks something like:
32808    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32809    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32810    # Check that this is likely to be Microsoft CL.EXE.
32811    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32812    if test $? -ne 0; then
32813      { $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
32814$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32815      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32816$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32817      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32818    fi
32819    # Collapse compiler output into a single line
32820    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32821    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32822        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32823  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32824    # gcc --version output typically looks like
32825    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32826    #     Copyright (C) 2013 Free Software Foundation, Inc.
32827    #     This is free software; see the source for copying conditions.  There is NO
32828    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32829    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32830    # Check that this is likely to be GCC.
32831    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32832    if test $? -ne 0; then
32833      { $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
32834$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32835      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32836$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32837      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32838    fi
32839    # Remove Copyright and legalese from version string, and
32840    # collapse into a single line
32841    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32842        $SED -e 's/ *Copyright .*//'`
32843    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32844        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
32845  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32846    # clang --version output typically looks like
32847    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32848    #    clang version 3.3 (tags/RELEASE_33/final)
32849    # or
32850    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32851    #    Target: x86_64-pc-linux-gnu
32852    #    Thread model: posix
32853    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32854    # Check that this is likely to be clang
32855    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32856    if test $? -ne 0; then
32857      { $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
32858$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32859      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32860$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32861      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32862    fi
32863    # Collapse compiler output into a single line
32864    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32865    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32866        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
32867  else
32868      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32869  fi
32870  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32871  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32872  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32873  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32874
32875  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32876$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32877
32878
32879  # Now that we have resolved CC ourself, let autoconf have its go at it
32880  ac_ext=c
32881ac_cpp='$CPP $CPPFLAGS'
32882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32884ac_compiler_gnu=$ac_cv_c_compiler_gnu
32885if test -n "$ac_tool_prefix"; then
32886  for ac_prog in $CC
32887  do
32888    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32891$as_echo_n "checking for $ac_word... " >&6; }
32892if ${ac_cv_prog_CC+:} false; then :
32893  $as_echo_n "(cached) " >&6
32894else
32895  if test -n "$CC"; then
32896  ac_cv_prog_CC="$CC" # Let the user override the test.
32897else
32898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32899for as_dir in $PATH
32900do
32901  IFS=$as_save_IFS
32902  test -z "$as_dir" && as_dir=.
32903    for ac_exec_ext in '' $ac_executable_extensions; do
32904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32905    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32907    break 2
32908  fi
32909done
32910  done
32911IFS=$as_save_IFS
32912
32913fi
32914fi
32915CC=$ac_cv_prog_CC
32916if test -n "$CC"; then
32917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32918$as_echo "$CC" >&6; }
32919else
32920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32921$as_echo "no" >&6; }
32922fi
32923
32924
32925    test -n "$CC" && break
32926  done
32927fi
32928if test -z "$CC"; then
32929  ac_ct_CC=$CC
32930  for ac_prog in $CC
32931do
32932  # Extract the first word of "$ac_prog", so it can be a program name with args.
32933set dummy $ac_prog; ac_word=$2
32934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32935$as_echo_n "checking for $ac_word... " >&6; }
32936if ${ac_cv_prog_ac_ct_CC+:} false; then :
32937  $as_echo_n "(cached) " >&6
32938else
32939  if test -n "$ac_ct_CC"; then
32940  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32941else
32942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32943for as_dir in $PATH
32944do
32945  IFS=$as_save_IFS
32946  test -z "$as_dir" && as_dir=.
32947    for ac_exec_ext in '' $ac_executable_extensions; do
32948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32949    ac_cv_prog_ac_ct_CC="$ac_prog"
32950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32951    break 2
32952  fi
32953done
32954  done
32955IFS=$as_save_IFS
32956
32957fi
32958fi
32959ac_ct_CC=$ac_cv_prog_ac_ct_CC
32960if test -n "$ac_ct_CC"; then
32961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32962$as_echo "$ac_ct_CC" >&6; }
32963else
32964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32965$as_echo "no" >&6; }
32966fi
32967
32968
32969  test -n "$ac_ct_CC" && break
32970done
32971
32972  if test "x$ac_ct_CC" = x; then
32973    CC=""
32974  else
32975    case $cross_compiling:$ac_tool_warned in
32976yes:)
32977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32979ac_tool_warned=yes ;;
32980esac
32981    CC=$ac_ct_CC
32982  fi
32983fi
32984
32985
32986test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32988as_fn_error $? "no acceptable C compiler found in \$PATH
32989See \`config.log' for more details" "$LINENO" 5; }
32990
32991# Provide some information about the compiler.
32992$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32993set X $ac_compile
32994ac_compiler=$2
32995for ac_option in --version -v -V -qversion; do
32996  { { ac_try="$ac_compiler $ac_option >&5"
32997case "(($ac_try" in
32998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32999  *) ac_try_echo=$ac_try;;
33000esac
33001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33002$as_echo "$ac_try_echo"; } >&5
33003  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33004  ac_status=$?
33005  if test -s conftest.err; then
33006    sed '10a\
33007... rest of stderr output deleted ...
33008         10q' conftest.err >conftest.er1
33009    cat conftest.er1 >&5
33010  fi
33011  rm -f conftest.er1 conftest.err
33012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33013  test $ac_status = 0; }
33014done
33015
33016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33017/* end confdefs.h.  */
33018
33019int
33020main ()
33021{
33022
33023  ;
33024  return 0;
33025}
33026_ACEOF
33027ac_clean_files_save=$ac_clean_files
33028ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33029# Try to create an executable without -o first, disregard a.out.
33030# It will help us diagnose broken compilers, and finding out an intuition
33031# of exeext.
33032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33033$as_echo_n "checking whether the C compiler works... " >&6; }
33034ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33035
33036# The possible output files:
33037ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33038
33039ac_rmfiles=
33040for ac_file in $ac_files
33041do
33042  case $ac_file in
33043    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33044    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33045  esac
33046done
33047rm -f $ac_rmfiles
33048
33049if { { ac_try="$ac_link_default"
33050case "(($ac_try" in
33051  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33052  *) ac_try_echo=$ac_try;;
33053esac
33054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33055$as_echo "$ac_try_echo"; } >&5
33056  (eval "$ac_link_default") 2>&5
33057  ac_status=$?
33058  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33059  test $ac_status = 0; }; then :
33060  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33061# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33062# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33063# so that the user can short-circuit this test for compilers unknown to
33064# Autoconf.
33065for ac_file in $ac_files ''
33066do
33067  test -f "$ac_file" || continue
33068  case $ac_file in
33069    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33070	;;
33071    [ab].out )
33072	# We found the default executable, but exeext='' is most
33073	# certainly right.
33074	break;;
33075    *.* )
33076	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33077	then :; else
33078	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33079	fi
33080	# We set ac_cv_exeext here because the later test for it is not
33081	# safe: cross compilers may not add the suffix if given an `-o'
33082	# argument, so we may need to know it at that point already.
33083	# Even if this section looks crufty: it has the advantage of
33084	# actually working.
33085	break;;
33086    * )
33087	break;;
33088  esac
33089done
33090test "$ac_cv_exeext" = no && ac_cv_exeext=
33091
33092else
33093  ac_file=''
33094fi
33095if test -z "$ac_file"; then :
33096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33097$as_echo "no" >&6; }
33098$as_echo "$as_me: failed program was:" >&5
33099sed 's/^/| /' conftest.$ac_ext >&5
33100
33101{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33103as_fn_error 77 "C compiler cannot create executables
33104See \`config.log' for more details" "$LINENO" 5; }
33105else
33106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33107$as_echo "yes" >&6; }
33108fi
33109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33110$as_echo_n "checking for C compiler default output file name... " >&6; }
33111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33112$as_echo "$ac_file" >&6; }
33113ac_exeext=$ac_cv_exeext
33114
33115rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33116ac_clean_files=$ac_clean_files_save
33117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33118$as_echo_n "checking for suffix of executables... " >&6; }
33119if { { ac_try="$ac_link"
33120case "(($ac_try" in
33121  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33122  *) ac_try_echo=$ac_try;;
33123esac
33124eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33125$as_echo "$ac_try_echo"; } >&5
33126  (eval "$ac_link") 2>&5
33127  ac_status=$?
33128  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33129  test $ac_status = 0; }; then :
33130  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33131# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33132# work properly (i.e., refer to `conftest.exe'), while it won't with
33133# `rm'.
33134for ac_file in conftest.exe conftest conftest.*; do
33135  test -f "$ac_file" || continue
33136  case $ac_file in
33137    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33138    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33139	  break;;
33140    * ) break;;
33141  esac
33142done
33143else
33144  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33146as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33147See \`config.log' for more details" "$LINENO" 5; }
33148fi
33149rm -f conftest conftest$ac_cv_exeext
33150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33151$as_echo "$ac_cv_exeext" >&6; }
33152
33153rm -f conftest.$ac_ext
33154EXEEXT=$ac_cv_exeext
33155ac_exeext=$EXEEXT
33156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33157/* end confdefs.h.  */
33158#include <stdio.h>
33159int
33160main ()
33161{
33162FILE *f = fopen ("conftest.out", "w");
33163 return ferror (f) || fclose (f) != 0;
33164
33165  ;
33166  return 0;
33167}
33168_ACEOF
33169ac_clean_files="$ac_clean_files conftest.out"
33170# Check that the compiler produces executables we can run.  If not, either
33171# the compiler is broken, or we cross compile.
33172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33173$as_echo_n "checking whether we are cross compiling... " >&6; }
33174if test "$cross_compiling" != yes; then
33175  { { ac_try="$ac_link"
33176case "(($ac_try" in
33177  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33178  *) ac_try_echo=$ac_try;;
33179esac
33180eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33181$as_echo "$ac_try_echo"; } >&5
33182  (eval "$ac_link") 2>&5
33183  ac_status=$?
33184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33185  test $ac_status = 0; }
33186  if { ac_try='./conftest$ac_cv_exeext'
33187  { { case "(($ac_try" in
33188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33189  *) ac_try_echo=$ac_try;;
33190esac
33191eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33192$as_echo "$ac_try_echo"; } >&5
33193  (eval "$ac_try") 2>&5
33194  ac_status=$?
33195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33196  test $ac_status = 0; }; }; then
33197    cross_compiling=no
33198  else
33199    if test "$cross_compiling" = maybe; then
33200	cross_compiling=yes
33201    else
33202	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33204as_fn_error $? "cannot run C compiled programs.
33205If you meant to cross compile, use \`--host'.
33206See \`config.log' for more details" "$LINENO" 5; }
33207    fi
33208  fi
33209fi
33210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33211$as_echo "$cross_compiling" >&6; }
33212
33213rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33214ac_clean_files=$ac_clean_files_save
33215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33216$as_echo_n "checking for suffix of object files... " >&6; }
33217if ${ac_cv_objext+:} false; then :
33218  $as_echo_n "(cached) " >&6
33219else
33220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33221/* end confdefs.h.  */
33222
33223int
33224main ()
33225{
33226
33227  ;
33228  return 0;
33229}
33230_ACEOF
33231rm -f conftest.o conftest.obj
33232if { { ac_try="$ac_compile"
33233case "(($ac_try" in
33234  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33235  *) ac_try_echo=$ac_try;;
33236esac
33237eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33238$as_echo "$ac_try_echo"; } >&5
33239  (eval "$ac_compile") 2>&5
33240  ac_status=$?
33241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33242  test $ac_status = 0; }; then :
33243  for ac_file in conftest.o conftest.obj conftest.*; do
33244  test -f "$ac_file" || continue;
33245  case $ac_file in
33246    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33247    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33248       break;;
33249  esac
33250done
33251else
33252  $as_echo "$as_me: failed program was:" >&5
33253sed 's/^/| /' conftest.$ac_ext >&5
33254
33255{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33257as_fn_error $? "cannot compute suffix of object files: cannot compile
33258See \`config.log' for more details" "$LINENO" 5; }
33259fi
33260rm -f conftest.$ac_cv_objext conftest.$ac_ext
33261fi
33262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33263$as_echo "$ac_cv_objext" >&6; }
33264OBJEXT=$ac_cv_objext
33265ac_objext=$OBJEXT
33266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33267$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33268if ${ac_cv_c_compiler_gnu+:} false; then :
33269  $as_echo_n "(cached) " >&6
33270else
33271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33272/* end confdefs.h.  */
33273
33274int
33275main ()
33276{
33277#ifndef __GNUC__
33278       choke me
33279#endif
33280
33281  ;
33282  return 0;
33283}
33284_ACEOF
33285if ac_fn_c_try_compile "$LINENO"; then :
33286  ac_compiler_gnu=yes
33287else
33288  ac_compiler_gnu=no
33289fi
33290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33291ac_cv_c_compiler_gnu=$ac_compiler_gnu
33292
33293fi
33294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33295$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33296if test $ac_compiler_gnu = yes; then
33297  GCC=yes
33298else
33299  GCC=
33300fi
33301ac_test_CFLAGS=${CFLAGS+set}
33302ac_save_CFLAGS=$CFLAGS
33303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33304$as_echo_n "checking whether $CC accepts -g... " >&6; }
33305if ${ac_cv_prog_cc_g+:} false; then :
33306  $as_echo_n "(cached) " >&6
33307else
33308  ac_save_c_werror_flag=$ac_c_werror_flag
33309   ac_c_werror_flag=yes
33310   ac_cv_prog_cc_g=no
33311   CFLAGS="-g"
33312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33313/* end confdefs.h.  */
33314
33315int
33316main ()
33317{
33318
33319  ;
33320  return 0;
33321}
33322_ACEOF
33323if ac_fn_c_try_compile "$LINENO"; then :
33324  ac_cv_prog_cc_g=yes
33325else
33326  CFLAGS=""
33327      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33328/* end confdefs.h.  */
33329
33330int
33331main ()
33332{
33333
33334  ;
33335  return 0;
33336}
33337_ACEOF
33338if ac_fn_c_try_compile "$LINENO"; then :
33339
33340else
33341  ac_c_werror_flag=$ac_save_c_werror_flag
33342	 CFLAGS="-g"
33343	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33344/* end confdefs.h.  */
33345
33346int
33347main ()
33348{
33349
33350  ;
33351  return 0;
33352}
33353_ACEOF
33354if ac_fn_c_try_compile "$LINENO"; then :
33355  ac_cv_prog_cc_g=yes
33356fi
33357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33358fi
33359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33360fi
33361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33362   ac_c_werror_flag=$ac_save_c_werror_flag
33363fi
33364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33365$as_echo "$ac_cv_prog_cc_g" >&6; }
33366if test "$ac_test_CFLAGS" = set; then
33367  CFLAGS=$ac_save_CFLAGS
33368elif test $ac_cv_prog_cc_g = yes; then
33369  if test "$GCC" = yes; then
33370    CFLAGS="-g -O2"
33371  else
33372    CFLAGS="-g"
33373  fi
33374else
33375  if test "$GCC" = yes; then
33376    CFLAGS="-O2"
33377  else
33378    CFLAGS=
33379  fi
33380fi
33381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33382$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33383if ${ac_cv_prog_cc_c89+:} false; then :
33384  $as_echo_n "(cached) " >&6
33385else
33386  ac_cv_prog_cc_c89=no
33387ac_save_CC=$CC
33388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33389/* end confdefs.h.  */
33390#include <stdarg.h>
33391#include <stdio.h>
33392struct stat;
33393/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33394struct buf { int x; };
33395FILE * (*rcsopen) (struct buf *, struct stat *, int);
33396static char *e (p, i)
33397     char **p;
33398     int i;
33399{
33400  return p[i];
33401}
33402static char *f (char * (*g) (char **, int), char **p, ...)
33403{
33404  char *s;
33405  va_list v;
33406  va_start (v,p);
33407  s = g (p, va_arg (v,int));
33408  va_end (v);
33409  return s;
33410}
33411
33412/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33413   function prototypes and stuff, but not '\xHH' hex character constants.
33414   These don't provoke an error unfortunately, instead are silently treated
33415   as 'x'.  The following induces an error, until -std is added to get
33416   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33417   array size at least.  It's necessary to write '\x00'==0 to get something
33418   that's true only with -std.  */
33419int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33420
33421/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33422   inside strings and character constants.  */
33423#define FOO(x) 'x'
33424int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33425
33426int test (int i, double x);
33427struct s1 {int (*f) (int a);};
33428struct s2 {int (*f) (double a);};
33429int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33430int argc;
33431char **argv;
33432int
33433main ()
33434{
33435return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33436  ;
33437  return 0;
33438}
33439_ACEOF
33440for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33441	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33442do
33443  CC="$ac_save_CC $ac_arg"
33444  if ac_fn_c_try_compile "$LINENO"; then :
33445  ac_cv_prog_cc_c89=$ac_arg
33446fi
33447rm -f core conftest.err conftest.$ac_objext
33448  test "x$ac_cv_prog_cc_c89" != "xno" && break
33449done
33450rm -f conftest.$ac_ext
33451CC=$ac_save_CC
33452
33453fi
33454# AC_CACHE_VAL
33455case "x$ac_cv_prog_cc_c89" in
33456  x)
33457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33458$as_echo "none needed" >&6; } ;;
33459  xno)
33460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33461$as_echo "unsupported" >&6; } ;;
33462  *)
33463    CC="$CC $ac_cv_prog_cc_c89"
33464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33465$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33466esac
33467if test "x$ac_cv_prog_cc_c89" != xno; then :
33468
33469fi
33470
33471ac_ext=cpp
33472ac_cpp='$CXXCPP $CPPFLAGS'
33473ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33474ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33475ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33476
33477
33478
33479  COMPILER_NAME=C++
33480  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33481
33482  if test "x$CXX" != x; then
33483    # User has supplied compiler name already, always let that override.
33484    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33485$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33486    if test "x`basename $CXX`" = "x$CXX"; then
33487      # A command without a complete path is provided, search $PATH.
33488
33489      for ac_prog in $CXX
33490do
33491  # Extract the first word of "$ac_prog", so it can be a program name with args.
33492set dummy $ac_prog; ac_word=$2
33493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33494$as_echo_n "checking for $ac_word... " >&6; }
33495if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33496  $as_echo_n "(cached) " >&6
33497else
33498  case $POTENTIAL_CXX in
33499  [\\/]* | ?:[\\/]*)
33500  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33501  ;;
33502  *)
33503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33504for as_dir in $PATH
33505do
33506  IFS=$as_save_IFS
33507  test -z "$as_dir" && as_dir=.
33508    for ac_exec_ext in '' $ac_executable_extensions; do
33509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33510    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33512    break 2
33513  fi
33514done
33515  done
33516IFS=$as_save_IFS
33517
33518  ;;
33519esac
33520fi
33521POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33522if test -n "$POTENTIAL_CXX"; then
33523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33524$as_echo "$POTENTIAL_CXX" >&6; }
33525else
33526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33527$as_echo "no" >&6; }
33528fi
33529
33530
33531  test -n "$POTENTIAL_CXX" && break
33532done
33533
33534      if test "x$POTENTIAL_CXX" != x; then
33535        CXX=$POTENTIAL_CXX
33536      else
33537        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33538      fi
33539    else
33540      # Otherwise it might already be a complete path
33541      if test ! -x "$CXX"; then
33542        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33543      fi
33544    fi
33545  else
33546    # No user supplied value. Locate compiler ourselves.
33547
33548    # If we are cross compiling, assume cross compilation tools follows the
33549    # cross compilation standard where they are prefixed with the autoconf
33550    # standard name for the target. For example the binary
33551    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33552    # If we are not cross compiling, then the default compiler name will be
33553    # used.
33554
33555    CXX=
33556    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33557    # before checking the rest of the PATH.
33558    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33559    # step, this should not be necessary.
33560    if test -n "$TOOLCHAIN_PATH"; then
33561      PATH_save="$PATH"
33562      PATH="$TOOLCHAIN_PATH"
33563      for ac_prog in $SEARCH_LIST
33564do
33565  # Extract the first word of "$ac_prog", so it can be a program name with args.
33566set dummy $ac_prog; ac_word=$2
33567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33568$as_echo_n "checking for $ac_word... " >&6; }
33569if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33570  $as_echo_n "(cached) " >&6
33571else
33572  case $TOOLCHAIN_PATH_CXX in
33573  [\\/]* | ?:[\\/]*)
33574  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33575  ;;
33576  *)
33577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33578for as_dir in $PATH
33579do
33580  IFS=$as_save_IFS
33581  test -z "$as_dir" && as_dir=.
33582    for ac_exec_ext in '' $ac_executable_extensions; do
33583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33584    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33586    break 2
33587  fi
33588done
33589  done
33590IFS=$as_save_IFS
33591
33592  ;;
33593esac
33594fi
33595TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33596if test -n "$TOOLCHAIN_PATH_CXX"; then
33597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33598$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33599else
33600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33601$as_echo "no" >&6; }
33602fi
33603
33604
33605  test -n "$TOOLCHAIN_PATH_CXX" && break
33606done
33607
33608      CXX=$TOOLCHAIN_PATH_CXX
33609      PATH="$PATH_save"
33610    fi
33611
33612    # AC_PATH_PROGS can't be run multiple times with the same variable,
33613    # so create a new name for this run.
33614    if test "x$CXX" = x; then
33615      for ac_prog in $SEARCH_LIST
33616do
33617  # Extract the first word of "$ac_prog", so it can be a program name with args.
33618set dummy $ac_prog; ac_word=$2
33619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33620$as_echo_n "checking for $ac_word... " >&6; }
33621if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33622  $as_echo_n "(cached) " >&6
33623else
33624  case $POTENTIAL_CXX in
33625  [\\/]* | ?:[\\/]*)
33626  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33627  ;;
33628  *)
33629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33630for as_dir in $PATH
33631do
33632  IFS=$as_save_IFS
33633  test -z "$as_dir" && as_dir=.
33634    for ac_exec_ext in '' $ac_executable_extensions; do
33635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33636    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33638    break 2
33639  fi
33640done
33641  done
33642IFS=$as_save_IFS
33643
33644  ;;
33645esac
33646fi
33647POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33648if test -n "$POTENTIAL_CXX"; then
33649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33650$as_echo "$POTENTIAL_CXX" >&6; }
33651else
33652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33653$as_echo "no" >&6; }
33654fi
33655
33656
33657  test -n "$POTENTIAL_CXX" && break
33658done
33659
33660      CXX=$POTENTIAL_CXX
33661    fi
33662
33663    if test "x$CXX" = x; then
33664
33665  # Print a helpful message on how to acquire the necessary build dependency.
33666  # devkit is the help tag: freetype, cups, alsa etc
33667  MISSING_DEPENDENCY=devkit
33668
33669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33670    cygwin_help $MISSING_DEPENDENCY
33671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33672    msys_help $MISSING_DEPENDENCY
33673  else
33674    PKGHANDLER_COMMAND=
33675
33676    case $PKGHANDLER in
33677      apt-get)
33678        apt_help     $MISSING_DEPENDENCY ;;
33679      yum)
33680        yum_help     $MISSING_DEPENDENCY ;;
33681      port)
33682        port_help    $MISSING_DEPENDENCY ;;
33683      pkgutil)
33684        pkgutil_help $MISSING_DEPENDENCY ;;
33685      pkgadd)
33686        pkgadd_help  $MISSING_DEPENDENCY ;;
33687    esac
33688
33689    if test "x$PKGHANDLER_COMMAND" != x; then
33690      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33691    fi
33692  fi
33693
33694      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33695    fi
33696  fi
33697
33698  # Now we have a compiler binary in CXX. Make sure it's okay.
33699
33700  # Only process if variable expands to non-empty
33701
33702  if test "x$CXX" != x; then
33703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33704
33705  # First separate the path from the arguments. This will split at the first
33706  # space.
33707  complete="$CXX"
33708  path="${complete%% *}"
33709  tmp="$complete EOL"
33710  arguments="${tmp#* }"
33711
33712  # Input might be given as Windows format, start by converting to
33713  # unix format.
33714  new_path=`$CYGPATH -u "$path"`
33715
33716  # Now try to locate executable using which
33717  new_path=`$WHICH "$new_path" 2> /dev/null`
33718  # bat and cmd files are not always considered executable in cygwin causing which
33719  # to not find them
33720  if test "x$new_path" = x \
33721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33723    new_path=`$CYGPATH -u "$path"`
33724  fi
33725  if test "x$new_path" = x; then
33726    # Oops. Which didn't find the executable.
33727    # The splitting of arguments from the executable at a space might have been incorrect,
33728    # since paths with space are more likely in Windows. Give it another try with the whole
33729    # argument.
33730    path="$complete"
33731    arguments="EOL"
33732    new_path=`$CYGPATH -u "$path"`
33733    new_path=`$WHICH "$new_path" 2> /dev/null`
33734    # bat and cmd files are not always considered executable in cygwin causing which
33735    # to not find them
33736    if test "x$new_path" = x \
33737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33739      new_path=`$CYGPATH -u "$path"`
33740    fi
33741    if test "x$new_path" = x; then
33742      # It's still not found. Now this is an unrecoverable error.
33743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33744$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33745      has_space=`$ECHO "$complete" | $GREP " "`
33746      if test "x$has_space" != x; then
33747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33749      fi
33750      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33751    fi
33752  fi
33753
33754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33757  # "foo.exe" is OK but "foo" is an error.
33758  #
33759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33760  # It is also a way to make sure we got the proper file name for the real test later on.
33761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33762  if test "x$test_shortpath" = x; then
33763    # Short path failed, file does not exist as specified.
33764    # Try adding .exe or .cmd
33765    if test -f "${new_path}.exe"; then
33766      input_to_shortpath="${new_path}.exe"
33767    elif test -f "${new_path}.cmd"; then
33768      input_to_shortpath="${new_path}.cmd"
33769    else
33770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33771$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33774      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33775    fi
33776  else
33777    input_to_shortpath="$new_path"
33778  fi
33779
33780  # Call helper function which possibly converts this using DOS-style short mode.
33781  # If so, the updated path is stored in $new_path.
33782  new_path="$input_to_shortpath"
33783
33784  input_path="$input_to_shortpath"
33785  # Check if we need to convert this using DOS-style short mode. If the path
33786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33787  # take no chances and rewrite it.
33788  # Note: m4 eats our [], so we need to use [ and ] instead.
33789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33790  if test "x$has_forbidden_chars" != x; then
33791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33795      # Going to short mode and back again did indeed matter. Since short mode is
33796      # case insensitive, let's make it lowercase to improve readability.
33797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33798      # Now convert it back to Unix-style (cygpath)
33799      input_path=`$CYGPATH -u "$shortmode_path"`
33800      new_path="$input_path"
33801    fi
33802  fi
33803
33804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33805  if test "x$test_cygdrive_prefix" = x; then
33806    # As a simple fix, exclude /usr/bin since it's not a real path.
33807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33809      # a path prefixed by /cygdrive for fixpath to work.
33810      new_path="$CYGWIN_ROOT_PATH$input_path"
33811    fi
33812  fi
33813
33814  # remove trailing .exe if any
33815  new_path="${new_path/%.exe/}"
33816
33817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33818
33819  # First separate the path from the arguments. This will split at the first
33820  # space.
33821  complete="$CXX"
33822  path="${complete%% *}"
33823  tmp="$complete EOL"
33824  arguments="${tmp#* }"
33825
33826  # Input might be given as Windows format, start by converting to
33827  # unix format.
33828  new_path="$path"
33829
33830  windows_path="$new_path"
33831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33832    unix_path=`$CYGPATH -u "$windows_path"`
33833    new_path="$unix_path"
33834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33836    new_path="$unix_path"
33837  fi
33838
33839
33840  # Now try to locate executable using which
33841  new_path=`$WHICH "$new_path" 2> /dev/null`
33842
33843  if test "x$new_path" = x; then
33844    # Oops. Which didn't find the executable.
33845    # The splitting of arguments from the executable at a space might have been incorrect,
33846    # since paths with space are more likely in Windows. Give it another try with the whole
33847    # argument.
33848    path="$complete"
33849    arguments="EOL"
33850    new_path="$path"
33851
33852  windows_path="$new_path"
33853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33854    unix_path=`$CYGPATH -u "$windows_path"`
33855    new_path="$unix_path"
33856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33858    new_path="$unix_path"
33859  fi
33860
33861
33862    new_path=`$WHICH "$new_path" 2> /dev/null`
33863    # bat and cmd files are not always considered executable in MSYS causing which
33864    # to not find them
33865    if test "x$new_path" = x \
33866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33868      new_path="$path"
33869
33870  windows_path="$new_path"
33871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33872    unix_path=`$CYGPATH -u "$windows_path"`
33873    new_path="$unix_path"
33874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33876    new_path="$unix_path"
33877  fi
33878
33879    fi
33880
33881    if test "x$new_path" = x; then
33882      # It's still not found. Now this is an unrecoverable error.
33883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33884$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33885      has_space=`$ECHO "$complete" | $GREP " "`
33886      if test "x$has_space" != x; then
33887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33889      fi
33890      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33891    fi
33892  fi
33893
33894  # Now new_path has a complete unix path to the binary
33895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33896    # Keep paths in /bin as-is, but remove trailing .exe if any
33897    new_path="${new_path/%.exe/}"
33898    # Do not save /bin paths to all_fixpath_prefixes!
33899  else
33900    # Not in mixed or Windows style, start by that.
33901    new_path=`cmd //c echo $new_path`
33902
33903  input_path="$new_path"
33904  # Check if we need to convert this using DOS-style short mode. If the path
33905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33906  # take no chances and rewrite it.
33907  # Note: m4 eats our [], so we need to use [ and ] instead.
33908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33909  if test "x$has_forbidden_chars" != x; then
33910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33912  fi
33913
33914    # Output is in $new_path
33915
33916  windows_path="$new_path"
33917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33918    unix_path=`$CYGPATH -u "$windows_path"`
33919    new_path="$unix_path"
33920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33922    new_path="$unix_path"
33923  fi
33924
33925    # remove trailing .exe if any
33926    new_path="${new_path/%.exe/}"
33927
33928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33930  fi
33931
33932    else
33933      # We're on a unix platform. Hooray! :)
33934      # First separate the path from the arguments. This will split at the first
33935      # space.
33936      complete="$CXX"
33937      path="${complete%% *}"
33938      tmp="$complete EOL"
33939      arguments="${tmp#* }"
33940
33941      # Cannot rely on the command "which" here since it doesn't always work.
33942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33943      if test -z "$is_absolute_path"; then
33944        # Path to executable is not absolute. Find it.
33945        IFS_save="$IFS"
33946        IFS=:
33947        for p in $PATH; do
33948          if test -f "$p/$path" && test -x "$p/$path"; then
33949            new_path="$p/$path"
33950            break
33951          fi
33952        done
33953        IFS="$IFS_save"
33954      else
33955        # This is an absolute path, we can use it without further modifications.
33956        new_path="$path"
33957      fi
33958
33959      if test "x$new_path" = x; then
33960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33961$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33962        has_space=`$ECHO "$complete" | $GREP " "`
33963        if test "x$has_space" != x; then
33964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33966        fi
33967        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33968      fi
33969    fi
33970
33971    # Now join together the path and the arguments once again
33972    if test "x$arguments" != xEOL; then
33973      new_complete="$new_path ${arguments% *}"
33974    else
33975      new_complete="$new_path"
33976    fi
33977
33978    if test "x$complete" != "x$new_complete"; then
33979      CXX="$new_complete"
33980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33981$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33982    fi
33983  fi
33984
33985  TEST_COMPILER="$CXX"
33986
33987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33988$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33989  SYMLINK_ORIGINAL="$TEST_COMPILER"
33990
33991  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33992    # Follow a chain of symbolic links. Use readlink
33993    # where it exists, else fall back to horribly
33994    # complicated shell code.
33995    if test "x$READLINK_TESTED" != yes; then
33996      # On MacOSX there is a readlink tool with a different
33997      # purpose than the GNU readlink tool. Check the found readlink.
33998      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33999      if test "x$ISGNU" = x; then
34000        # A readlink that we do not know how to use.
34001        # Are there other non-GNU readlinks out there?
34002        READLINK_TESTED=yes
34003        READLINK=
34004      fi
34005    fi
34006
34007    if test "x$READLINK" != x; then
34008      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34009    else
34010      # Save the current directory for restoring afterwards
34011      STARTDIR=$PWD
34012      COUNTER=0
34013      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34014      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34015      cd $sym_link_dir
34016      # Use -P flag to resolve symlinks in directories.
34017      cd `$THEPWDCMD -P`
34018      sym_link_dir=`$THEPWDCMD -P`
34019      # Resolve file symlinks
34020      while test $COUNTER -lt 20; do
34021        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34022        if test "x$ISLINK" == x; then
34023          # This is not a symbolic link! We are done!
34024          break
34025        fi
34026        # Again resolve directory symlinks since the target of the just found
34027        # link could be in a different directory
34028        cd `$DIRNAME $ISLINK`
34029        sym_link_dir=`$THEPWDCMD -P`
34030        sym_link_file=`$BASENAME $ISLINK`
34031        let COUNTER=COUNTER+1
34032      done
34033      cd $STARTDIR
34034      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34035    fi
34036  fi
34037
34038  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34040$as_echo "no symlink" >&6; }
34041  else
34042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34043$as_echo "$SYMLINK_ORIGINAL" >&6; }
34044
34045    # We can't handle ccache by gcc wrappers, since we need to know if we're
34046    # using ccache. Instead ccache usage must be controlled by a configure option.
34047    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34048    if test "x$COMPILER_BASENAME" = "xccache"; then
34049      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34050$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34051      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34052    fi
34053  fi
34054
34055
34056  COMPILER=$CXX
34057  COMPILER_NAME=$COMPILER_NAME
34058
34059  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34060    # cc -V output typically looks like
34061    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34062    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34063    # Check that this is likely to be the Solaris Studio cc.
34064    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34065    if test $? -ne 0; then
34066      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34067      { $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
34068$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34069      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34070$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34071      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34072$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34073      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34074    fi
34075    # Remove usage instructions (if present), and
34076    # collapse compiler output into a single line
34077    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34078        $SED -e 's/ *[Uu]sage:.*//'`
34079    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34080        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34081  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34082    # xlc -qversion output typically looks like
34083    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34084    #     Version: 11.01.0000.0015
34085    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34086    # Check that this is likely to be the IBM XL C compiler.
34087    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34088    if test $? -ne 0; then
34089      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34090      { $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
34091$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34093$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34095$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34096      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34097    fi
34098    # Collapse compiler output into a single line
34099    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34100    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34101        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34102  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34103    # There is no specific version flag, but all output starts with a version string.
34104    # First line typically looks something like:
34105    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34106    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34107    # Check that this is likely to be Microsoft CL.EXE.
34108    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34109    if test $? -ne 0; then
34110      { $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
34111$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34112      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34113$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34114      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34115    fi
34116    # Collapse compiler output into a single line
34117    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34118    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34119        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34120  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34121    # gcc --version output typically looks like
34122    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34123    #     Copyright (C) 2013 Free Software Foundation, Inc.
34124    #     This is free software; see the source for copying conditions.  There is NO
34125    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34126    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34127    # Check that this is likely to be GCC.
34128    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34129    if test $? -ne 0; then
34130      { $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
34131$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34132      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34133$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34134      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34135    fi
34136    # Remove Copyright and legalese from version string, and
34137    # collapse into a single line
34138    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34139        $SED -e 's/ *Copyright .*//'`
34140    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34141        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34142  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34143    # clang --version output typically looks like
34144    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34145    #    clang version 3.3 (tags/RELEASE_33/final)
34146    # or
34147    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34148    #    Target: x86_64-pc-linux-gnu
34149    #    Thread model: posix
34150    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34151    # Check that this is likely to be clang
34152    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34153    if test $? -ne 0; then
34154      { $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
34155$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34156      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34157$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34158      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34159    fi
34160    # Collapse compiler output into a single line
34161    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34162    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34163        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34164  else
34165      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34166  fi
34167  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34168  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34169  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34170  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34171
34172  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34173$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34174
34175
34176  # Now that we have resolved CXX ourself, let autoconf have its go at it
34177  ac_ext=cpp
34178ac_cpp='$CXXCPP $CPPFLAGS'
34179ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34180ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34181ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34182if test -z "$CXX"; then
34183  if test -n "$CCC"; then
34184    CXX=$CCC
34185  else
34186    if test -n "$ac_tool_prefix"; then
34187  for ac_prog in $CXX
34188  do
34189    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34190set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34192$as_echo_n "checking for $ac_word... " >&6; }
34193if ${ac_cv_prog_CXX+:} false; then :
34194  $as_echo_n "(cached) " >&6
34195else
34196  if test -n "$CXX"; then
34197  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34198else
34199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34200for as_dir in $PATH
34201do
34202  IFS=$as_save_IFS
34203  test -z "$as_dir" && as_dir=.
34204    for ac_exec_ext in '' $ac_executable_extensions; do
34205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34206    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34208    break 2
34209  fi
34210done
34211  done
34212IFS=$as_save_IFS
34213
34214fi
34215fi
34216CXX=$ac_cv_prog_CXX
34217if test -n "$CXX"; then
34218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34219$as_echo "$CXX" >&6; }
34220else
34221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34222$as_echo "no" >&6; }
34223fi
34224
34225
34226    test -n "$CXX" && break
34227  done
34228fi
34229if test -z "$CXX"; then
34230  ac_ct_CXX=$CXX
34231  for ac_prog in $CXX
34232do
34233  # Extract the first word of "$ac_prog", so it can be a program name with args.
34234set dummy $ac_prog; ac_word=$2
34235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34236$as_echo_n "checking for $ac_word... " >&6; }
34237if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34238  $as_echo_n "(cached) " >&6
34239else
34240  if test -n "$ac_ct_CXX"; then
34241  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34242else
34243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34244for as_dir in $PATH
34245do
34246  IFS=$as_save_IFS
34247  test -z "$as_dir" && as_dir=.
34248    for ac_exec_ext in '' $ac_executable_extensions; do
34249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34250    ac_cv_prog_ac_ct_CXX="$ac_prog"
34251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34252    break 2
34253  fi
34254done
34255  done
34256IFS=$as_save_IFS
34257
34258fi
34259fi
34260ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34261if test -n "$ac_ct_CXX"; then
34262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34263$as_echo "$ac_ct_CXX" >&6; }
34264else
34265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34266$as_echo "no" >&6; }
34267fi
34268
34269
34270  test -n "$ac_ct_CXX" && break
34271done
34272
34273  if test "x$ac_ct_CXX" = x; then
34274    CXX="g++"
34275  else
34276    case $cross_compiling:$ac_tool_warned in
34277yes:)
34278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34280ac_tool_warned=yes ;;
34281esac
34282    CXX=$ac_ct_CXX
34283  fi
34284fi
34285
34286  fi
34287fi
34288# Provide some information about the compiler.
34289$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34290set X $ac_compile
34291ac_compiler=$2
34292for ac_option in --version -v -V -qversion; do
34293  { { ac_try="$ac_compiler $ac_option >&5"
34294case "(($ac_try" in
34295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34296  *) ac_try_echo=$ac_try;;
34297esac
34298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34299$as_echo "$ac_try_echo"; } >&5
34300  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34301  ac_status=$?
34302  if test -s conftest.err; then
34303    sed '10a\
34304... rest of stderr output deleted ...
34305         10q' conftest.err >conftest.er1
34306    cat conftest.er1 >&5
34307  fi
34308  rm -f conftest.er1 conftest.err
34309  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34310  test $ac_status = 0; }
34311done
34312
34313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34314$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34315if ${ac_cv_cxx_compiler_gnu+:} false; then :
34316  $as_echo_n "(cached) " >&6
34317else
34318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34319/* end confdefs.h.  */
34320
34321int
34322main ()
34323{
34324#ifndef __GNUC__
34325       choke me
34326#endif
34327
34328  ;
34329  return 0;
34330}
34331_ACEOF
34332if ac_fn_cxx_try_compile "$LINENO"; then :
34333  ac_compiler_gnu=yes
34334else
34335  ac_compiler_gnu=no
34336fi
34337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34338ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34339
34340fi
34341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34342$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34343if test $ac_compiler_gnu = yes; then
34344  GXX=yes
34345else
34346  GXX=
34347fi
34348ac_test_CXXFLAGS=${CXXFLAGS+set}
34349ac_save_CXXFLAGS=$CXXFLAGS
34350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34351$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34352if ${ac_cv_prog_cxx_g+:} false; then :
34353  $as_echo_n "(cached) " >&6
34354else
34355  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34356   ac_cxx_werror_flag=yes
34357   ac_cv_prog_cxx_g=no
34358   CXXFLAGS="-g"
34359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34360/* end confdefs.h.  */
34361
34362int
34363main ()
34364{
34365
34366  ;
34367  return 0;
34368}
34369_ACEOF
34370if ac_fn_cxx_try_compile "$LINENO"; then :
34371  ac_cv_prog_cxx_g=yes
34372else
34373  CXXFLAGS=""
34374      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34375/* end confdefs.h.  */
34376
34377int
34378main ()
34379{
34380
34381  ;
34382  return 0;
34383}
34384_ACEOF
34385if ac_fn_cxx_try_compile "$LINENO"; then :
34386
34387else
34388  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34389	 CXXFLAGS="-g"
34390	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34391/* end confdefs.h.  */
34392
34393int
34394main ()
34395{
34396
34397  ;
34398  return 0;
34399}
34400_ACEOF
34401if ac_fn_cxx_try_compile "$LINENO"; then :
34402  ac_cv_prog_cxx_g=yes
34403fi
34404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34405fi
34406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34407fi
34408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34409   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34410fi
34411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34412$as_echo "$ac_cv_prog_cxx_g" >&6; }
34413if test "$ac_test_CXXFLAGS" = set; then
34414  CXXFLAGS=$ac_save_CXXFLAGS
34415elif test $ac_cv_prog_cxx_g = yes; then
34416  if test "$GXX" = yes; then
34417    CXXFLAGS="-g -O2"
34418  else
34419    CXXFLAGS="-g"
34420  fi
34421else
34422  if test "$GXX" = yes; then
34423    CXXFLAGS="-O2"
34424  else
34425    CXXFLAGS=
34426  fi
34427fi
34428ac_ext=cpp
34429ac_cpp='$CXXCPP $CPPFLAGS'
34430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34433
34434
34435  # This is the compiler version number on the form X.Y[.Z]
34436
34437
34438
34439
34440  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34442$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34444$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34445  fi
34446
34447  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34448  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34450$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34451  fi
34452
34453  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
34455$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34456  fi
34457
34458  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34459
34460
34461  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504    # Execute function body
34505
34506  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34507  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34508
34509  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34510    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34511  fi
34512
34513  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34514    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34515  fi
34516
34517  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34518  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34519
34520  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34521    :
34522
34523  else
34524    :
34525
34526          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
34527$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34528
34529
34530  fi
34531
34532
34533
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543  fi
34544
34545  #
34546  # Setup the preprocessor (CPP and CXXCPP)
34547  #
34548  ac_ext=c
34549ac_cpp='$CPP $CPPFLAGS'
34550ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34551ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34552ac_compiler_gnu=$ac_cv_c_compiler_gnu
34553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34554$as_echo_n "checking how to run the C preprocessor... " >&6; }
34555# On Suns, sometimes $CPP names a directory.
34556if test -n "$CPP" && test -d "$CPP"; then
34557  CPP=
34558fi
34559if test -z "$CPP"; then
34560  if ${ac_cv_prog_CPP+:} false; then :
34561  $as_echo_n "(cached) " >&6
34562else
34563      # Double quotes because CPP needs to be expanded
34564    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34565    do
34566      ac_preproc_ok=false
34567for ac_c_preproc_warn_flag in '' yes
34568do
34569  # Use a header file that comes with gcc, so configuring glibc
34570  # with a fresh cross-compiler works.
34571  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34572  # <limits.h> exists even on freestanding compilers.
34573  # On the NeXT, cc -E runs the code through the compiler's parser,
34574  # not just through cpp. "Syntax error" is here to catch this case.
34575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34576/* end confdefs.h.  */
34577#ifdef __STDC__
34578# include <limits.h>
34579#else
34580# include <assert.h>
34581#endif
34582		     Syntax error
34583_ACEOF
34584if ac_fn_c_try_cpp "$LINENO"; then :
34585
34586else
34587  # Broken: fails on valid input.
34588continue
34589fi
34590rm -f conftest.err conftest.i conftest.$ac_ext
34591
34592  # OK, works on sane cases.  Now check whether nonexistent headers
34593  # can be detected and how.
34594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34595/* end confdefs.h.  */
34596#include <ac_nonexistent.h>
34597_ACEOF
34598if ac_fn_c_try_cpp "$LINENO"; then :
34599  # Broken: success on invalid input.
34600continue
34601else
34602  # Passes both tests.
34603ac_preproc_ok=:
34604break
34605fi
34606rm -f conftest.err conftest.i conftest.$ac_ext
34607
34608done
34609# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34610rm -f conftest.i conftest.err conftest.$ac_ext
34611if $ac_preproc_ok; then :
34612  break
34613fi
34614
34615    done
34616    ac_cv_prog_CPP=$CPP
34617
34618fi
34619  CPP=$ac_cv_prog_CPP
34620else
34621  ac_cv_prog_CPP=$CPP
34622fi
34623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34624$as_echo "$CPP" >&6; }
34625ac_preproc_ok=false
34626for ac_c_preproc_warn_flag in '' yes
34627do
34628  # Use a header file that comes with gcc, so configuring glibc
34629  # with a fresh cross-compiler works.
34630  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34631  # <limits.h> exists even on freestanding compilers.
34632  # On the NeXT, cc -E runs the code through the compiler's parser,
34633  # not just through cpp. "Syntax error" is here to catch this case.
34634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34635/* end confdefs.h.  */
34636#ifdef __STDC__
34637# include <limits.h>
34638#else
34639# include <assert.h>
34640#endif
34641		     Syntax error
34642_ACEOF
34643if ac_fn_c_try_cpp "$LINENO"; then :
34644
34645else
34646  # Broken: fails on valid input.
34647continue
34648fi
34649rm -f conftest.err conftest.i conftest.$ac_ext
34650
34651  # OK, works on sane cases.  Now check whether nonexistent headers
34652  # can be detected and how.
34653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34654/* end confdefs.h.  */
34655#include <ac_nonexistent.h>
34656_ACEOF
34657if ac_fn_c_try_cpp "$LINENO"; then :
34658  # Broken: success on invalid input.
34659continue
34660else
34661  # Passes both tests.
34662ac_preproc_ok=:
34663break
34664fi
34665rm -f conftest.err conftest.i conftest.$ac_ext
34666
34667done
34668# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34669rm -f conftest.i conftest.err conftest.$ac_ext
34670if $ac_preproc_ok; then :
34671
34672else
34673  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34675as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34676See \`config.log' for more details" "$LINENO" 5; }
34677fi
34678
34679ac_ext=cpp
34680ac_cpp='$CXXCPP $CPPFLAGS'
34681ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34682ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34683ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34684
34685
34686  # Only process if variable expands to non-empty
34687
34688  if test "x$CPP" != x; then
34689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34690
34691  # First separate the path from the arguments. This will split at the first
34692  # space.
34693  complete="$CPP"
34694  path="${complete%% *}"
34695  tmp="$complete EOL"
34696  arguments="${tmp#* }"
34697
34698  # Input might be given as Windows format, start by converting to
34699  # unix format.
34700  new_path=`$CYGPATH -u "$path"`
34701
34702  # Now try to locate executable using which
34703  new_path=`$WHICH "$new_path" 2> /dev/null`
34704  # bat and cmd files are not always considered executable in cygwin causing which
34705  # to not find them
34706  if test "x$new_path" = x \
34707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34709    new_path=`$CYGPATH -u "$path"`
34710  fi
34711  if test "x$new_path" = x; then
34712    # Oops. Which didn't find the executable.
34713    # The splitting of arguments from the executable at a space might have been incorrect,
34714    # since paths with space are more likely in Windows. Give it another try with the whole
34715    # argument.
34716    path="$complete"
34717    arguments="EOL"
34718    new_path=`$CYGPATH -u "$path"`
34719    new_path=`$WHICH "$new_path" 2> /dev/null`
34720    # bat and cmd files are not always considered executable in cygwin causing which
34721    # to not find them
34722    if test "x$new_path" = x \
34723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34725      new_path=`$CYGPATH -u "$path"`
34726    fi
34727    if test "x$new_path" = x; then
34728      # It's still not found. Now this is an unrecoverable error.
34729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34730$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34731      has_space=`$ECHO "$complete" | $GREP " "`
34732      if test "x$has_space" != x; then
34733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34735      fi
34736      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34737    fi
34738  fi
34739
34740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34743  # "foo.exe" is OK but "foo" is an error.
34744  #
34745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34746  # It is also a way to make sure we got the proper file name for the real test later on.
34747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34748  if test "x$test_shortpath" = x; then
34749    # Short path failed, file does not exist as specified.
34750    # Try adding .exe or .cmd
34751    if test -f "${new_path}.exe"; then
34752      input_to_shortpath="${new_path}.exe"
34753    elif test -f "${new_path}.cmd"; then
34754      input_to_shortpath="${new_path}.cmd"
34755    else
34756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34757$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34760      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34761    fi
34762  else
34763    input_to_shortpath="$new_path"
34764  fi
34765
34766  # Call helper function which possibly converts this using DOS-style short mode.
34767  # If so, the updated path is stored in $new_path.
34768  new_path="$input_to_shortpath"
34769
34770  input_path="$input_to_shortpath"
34771  # Check if we need to convert this using DOS-style short mode. If the path
34772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34773  # take no chances and rewrite it.
34774  # Note: m4 eats our [], so we need to use [ and ] instead.
34775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34776  if test "x$has_forbidden_chars" != x; then
34777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34781      # Going to short mode and back again did indeed matter. Since short mode is
34782      # case insensitive, let's make it lowercase to improve readability.
34783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34784      # Now convert it back to Unix-style (cygpath)
34785      input_path=`$CYGPATH -u "$shortmode_path"`
34786      new_path="$input_path"
34787    fi
34788  fi
34789
34790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34791  if test "x$test_cygdrive_prefix" = x; then
34792    # As a simple fix, exclude /usr/bin since it's not a real path.
34793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34795      # a path prefixed by /cygdrive for fixpath to work.
34796      new_path="$CYGWIN_ROOT_PATH$input_path"
34797    fi
34798  fi
34799
34800  # remove trailing .exe if any
34801  new_path="${new_path/%.exe/}"
34802
34803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34804
34805  # First separate the path from the arguments. This will split at the first
34806  # space.
34807  complete="$CPP"
34808  path="${complete%% *}"
34809  tmp="$complete EOL"
34810  arguments="${tmp#* }"
34811
34812  # Input might be given as Windows format, start by converting to
34813  # unix format.
34814  new_path="$path"
34815
34816  windows_path="$new_path"
34817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34818    unix_path=`$CYGPATH -u "$windows_path"`
34819    new_path="$unix_path"
34820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34822    new_path="$unix_path"
34823  fi
34824
34825
34826  # Now try to locate executable using which
34827  new_path=`$WHICH "$new_path" 2> /dev/null`
34828
34829  if test "x$new_path" = x; then
34830    # Oops. Which didn't find the executable.
34831    # The splitting of arguments from the executable at a space might have been incorrect,
34832    # since paths with space are more likely in Windows. Give it another try with the whole
34833    # argument.
34834    path="$complete"
34835    arguments="EOL"
34836    new_path="$path"
34837
34838  windows_path="$new_path"
34839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34840    unix_path=`$CYGPATH -u "$windows_path"`
34841    new_path="$unix_path"
34842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34844    new_path="$unix_path"
34845  fi
34846
34847
34848    new_path=`$WHICH "$new_path" 2> /dev/null`
34849    # bat and cmd files are not always considered executable in MSYS causing which
34850    # to not find them
34851    if test "x$new_path" = x \
34852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34854      new_path="$path"
34855
34856  windows_path="$new_path"
34857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34858    unix_path=`$CYGPATH -u "$windows_path"`
34859    new_path="$unix_path"
34860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34862    new_path="$unix_path"
34863  fi
34864
34865    fi
34866
34867    if test "x$new_path" = x; then
34868      # It's still not found. Now this is an unrecoverable error.
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34870$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34871      has_space=`$ECHO "$complete" | $GREP " "`
34872      if test "x$has_space" != x; then
34873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34875      fi
34876      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34877    fi
34878  fi
34879
34880  # Now new_path has a complete unix path to the binary
34881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34882    # Keep paths in /bin as-is, but remove trailing .exe if any
34883    new_path="${new_path/%.exe/}"
34884    # Do not save /bin paths to all_fixpath_prefixes!
34885  else
34886    # Not in mixed or Windows style, start by that.
34887    new_path=`cmd //c echo $new_path`
34888
34889  input_path="$new_path"
34890  # Check if we need to convert this using DOS-style short mode. If the path
34891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34892  # take no chances and rewrite it.
34893  # Note: m4 eats our [], so we need to use [ and ] instead.
34894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34895  if test "x$has_forbidden_chars" != x; then
34896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34898  fi
34899
34900    # Output is in $new_path
34901
34902  windows_path="$new_path"
34903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34904    unix_path=`$CYGPATH -u "$windows_path"`
34905    new_path="$unix_path"
34906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34908    new_path="$unix_path"
34909  fi
34910
34911    # remove trailing .exe if any
34912    new_path="${new_path/%.exe/}"
34913
34914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34916  fi
34917
34918    else
34919      # We're on a unix platform. Hooray! :)
34920      # First separate the path from the arguments. This will split at the first
34921      # space.
34922      complete="$CPP"
34923      path="${complete%% *}"
34924      tmp="$complete EOL"
34925      arguments="${tmp#* }"
34926
34927      # Cannot rely on the command "which" here since it doesn't always work.
34928      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34929      if test -z "$is_absolute_path"; then
34930        # Path to executable is not absolute. Find it.
34931        IFS_save="$IFS"
34932        IFS=:
34933        for p in $PATH; do
34934          if test -f "$p/$path" && test -x "$p/$path"; then
34935            new_path="$p/$path"
34936            break
34937          fi
34938        done
34939        IFS="$IFS_save"
34940      else
34941        # This is an absolute path, we can use it without further modifications.
34942        new_path="$path"
34943      fi
34944
34945      if test "x$new_path" = x; then
34946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34947$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34948        has_space=`$ECHO "$complete" | $GREP " "`
34949        if test "x$has_space" != x; then
34950          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34952        fi
34953        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34954      fi
34955    fi
34956
34957    # Now join together the path and the arguments once again
34958    if test "x$arguments" != xEOL; then
34959      new_complete="$new_path ${arguments% *}"
34960    else
34961      new_complete="$new_path"
34962    fi
34963
34964    if test "x$complete" != "x$new_complete"; then
34965      CPP="$new_complete"
34966      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34967$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34968    fi
34969  fi
34970
34971  ac_ext=cpp
34972ac_cpp='$CXXCPP $CPPFLAGS'
34973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34977$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34978if test -z "$CXXCPP"; then
34979  if ${ac_cv_prog_CXXCPP+:} false; then :
34980  $as_echo_n "(cached) " >&6
34981else
34982      # Double quotes because CXXCPP needs to be expanded
34983    for CXXCPP in "$CXX -E" "/lib/cpp"
34984    do
34985      ac_preproc_ok=false
34986for ac_cxx_preproc_warn_flag in '' yes
34987do
34988  # Use a header file that comes with gcc, so configuring glibc
34989  # with a fresh cross-compiler works.
34990  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34991  # <limits.h> exists even on freestanding compilers.
34992  # On the NeXT, cc -E runs the code through the compiler's parser,
34993  # not just through cpp. "Syntax error" is here to catch this case.
34994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34995/* end confdefs.h.  */
34996#ifdef __STDC__
34997# include <limits.h>
34998#else
34999# include <assert.h>
35000#endif
35001		     Syntax error
35002_ACEOF
35003if ac_fn_cxx_try_cpp "$LINENO"; then :
35004
35005else
35006  # Broken: fails on valid input.
35007continue
35008fi
35009rm -f conftest.err conftest.i conftest.$ac_ext
35010
35011  # OK, works on sane cases.  Now check whether nonexistent headers
35012  # can be detected and how.
35013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35014/* end confdefs.h.  */
35015#include <ac_nonexistent.h>
35016_ACEOF
35017if ac_fn_cxx_try_cpp "$LINENO"; then :
35018  # Broken: success on invalid input.
35019continue
35020else
35021  # Passes both tests.
35022ac_preproc_ok=:
35023break
35024fi
35025rm -f conftest.err conftest.i conftest.$ac_ext
35026
35027done
35028# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35029rm -f conftest.i conftest.err conftest.$ac_ext
35030if $ac_preproc_ok; then :
35031  break
35032fi
35033
35034    done
35035    ac_cv_prog_CXXCPP=$CXXCPP
35036
35037fi
35038  CXXCPP=$ac_cv_prog_CXXCPP
35039else
35040  ac_cv_prog_CXXCPP=$CXXCPP
35041fi
35042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35043$as_echo "$CXXCPP" >&6; }
35044ac_preproc_ok=false
35045for ac_cxx_preproc_warn_flag in '' yes
35046do
35047  # Use a header file that comes with gcc, so configuring glibc
35048  # with a fresh cross-compiler works.
35049  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35050  # <limits.h> exists even on freestanding compilers.
35051  # On the NeXT, cc -E runs the code through the compiler's parser,
35052  # not just through cpp. "Syntax error" is here to catch this case.
35053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35054/* end confdefs.h.  */
35055#ifdef __STDC__
35056# include <limits.h>
35057#else
35058# include <assert.h>
35059#endif
35060		     Syntax error
35061_ACEOF
35062if ac_fn_cxx_try_cpp "$LINENO"; then :
35063
35064else
35065  # Broken: fails on valid input.
35066continue
35067fi
35068rm -f conftest.err conftest.i conftest.$ac_ext
35069
35070  # OK, works on sane cases.  Now check whether nonexistent headers
35071  # can be detected and how.
35072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35073/* end confdefs.h.  */
35074#include <ac_nonexistent.h>
35075_ACEOF
35076if ac_fn_cxx_try_cpp "$LINENO"; then :
35077  # Broken: success on invalid input.
35078continue
35079else
35080  # Passes both tests.
35081ac_preproc_ok=:
35082break
35083fi
35084rm -f conftest.err conftest.i conftest.$ac_ext
35085
35086done
35087# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35088rm -f conftest.i conftest.err conftest.$ac_ext
35089if $ac_preproc_ok; then :
35090
35091else
35092  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35094as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35095See \`config.log' for more details" "$LINENO" 5; }
35096fi
35097
35098ac_ext=cpp
35099ac_cpp='$CXXCPP $CPPFLAGS'
35100ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35101ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35102ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35103
35104
35105  # Only process if variable expands to non-empty
35106
35107  if test "x$CXXCPP" != x; then
35108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35109
35110  # First separate the path from the arguments. This will split at the first
35111  # space.
35112  complete="$CXXCPP"
35113  path="${complete%% *}"
35114  tmp="$complete EOL"
35115  arguments="${tmp#* }"
35116
35117  # Input might be given as Windows format, start by converting to
35118  # unix format.
35119  new_path=`$CYGPATH -u "$path"`
35120
35121  # Now try to locate executable using which
35122  new_path=`$WHICH "$new_path" 2> /dev/null`
35123  # bat and cmd files are not always considered executable in cygwin causing which
35124  # to not find them
35125  if test "x$new_path" = x \
35126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35128    new_path=`$CYGPATH -u "$path"`
35129  fi
35130  if test "x$new_path" = x; then
35131    # Oops. Which didn't find the executable.
35132    # The splitting of arguments from the executable at a space might have been incorrect,
35133    # since paths with space are more likely in Windows. Give it another try with the whole
35134    # argument.
35135    path="$complete"
35136    arguments="EOL"
35137    new_path=`$CYGPATH -u "$path"`
35138    new_path=`$WHICH "$new_path" 2> /dev/null`
35139    # bat and cmd files are not always considered executable in cygwin causing which
35140    # to not find them
35141    if test "x$new_path" = x \
35142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35144      new_path=`$CYGPATH -u "$path"`
35145    fi
35146    if test "x$new_path" = x; then
35147      # It's still not found. Now this is an unrecoverable error.
35148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35149$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35150      has_space=`$ECHO "$complete" | $GREP " "`
35151      if test "x$has_space" != x; then
35152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35154      fi
35155      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35156    fi
35157  fi
35158
35159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35162  # "foo.exe" is OK but "foo" is an error.
35163  #
35164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35165  # It is also a way to make sure we got the proper file name for the real test later on.
35166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35167  if test "x$test_shortpath" = x; then
35168    # Short path failed, file does not exist as specified.
35169    # Try adding .exe or .cmd
35170    if test -f "${new_path}.exe"; then
35171      input_to_shortpath="${new_path}.exe"
35172    elif test -f "${new_path}.cmd"; then
35173      input_to_shortpath="${new_path}.cmd"
35174    else
35175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35176$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35179      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35180    fi
35181  else
35182    input_to_shortpath="$new_path"
35183  fi
35184
35185  # Call helper function which possibly converts this using DOS-style short mode.
35186  # If so, the updated path is stored in $new_path.
35187  new_path="$input_to_shortpath"
35188
35189  input_path="$input_to_shortpath"
35190  # Check if we need to convert this using DOS-style short mode. If the path
35191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35192  # take no chances and rewrite it.
35193  # Note: m4 eats our [], so we need to use [ and ] instead.
35194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35195  if test "x$has_forbidden_chars" != x; then
35196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35200      # Going to short mode and back again did indeed matter. Since short mode is
35201      # case insensitive, let's make it lowercase to improve readability.
35202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35203      # Now convert it back to Unix-style (cygpath)
35204      input_path=`$CYGPATH -u "$shortmode_path"`
35205      new_path="$input_path"
35206    fi
35207  fi
35208
35209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35210  if test "x$test_cygdrive_prefix" = x; then
35211    # As a simple fix, exclude /usr/bin since it's not a real path.
35212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35214      # a path prefixed by /cygdrive for fixpath to work.
35215      new_path="$CYGWIN_ROOT_PATH$input_path"
35216    fi
35217  fi
35218
35219  # remove trailing .exe if any
35220  new_path="${new_path/%.exe/}"
35221
35222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35223
35224  # First separate the path from the arguments. This will split at the first
35225  # space.
35226  complete="$CXXCPP"
35227  path="${complete%% *}"
35228  tmp="$complete EOL"
35229  arguments="${tmp#* }"
35230
35231  # Input might be given as Windows format, start by converting to
35232  # unix format.
35233  new_path="$path"
35234
35235  windows_path="$new_path"
35236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35237    unix_path=`$CYGPATH -u "$windows_path"`
35238    new_path="$unix_path"
35239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35241    new_path="$unix_path"
35242  fi
35243
35244
35245  # Now try to locate executable using which
35246  new_path=`$WHICH "$new_path" 2> /dev/null`
35247
35248  if test "x$new_path" = x; then
35249    # Oops. Which didn't find the executable.
35250    # The splitting of arguments from the executable at a space might have been incorrect,
35251    # since paths with space are more likely in Windows. Give it another try with the whole
35252    # argument.
35253    path="$complete"
35254    arguments="EOL"
35255    new_path="$path"
35256
35257  windows_path="$new_path"
35258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35259    unix_path=`$CYGPATH -u "$windows_path"`
35260    new_path="$unix_path"
35261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35263    new_path="$unix_path"
35264  fi
35265
35266
35267    new_path=`$WHICH "$new_path" 2> /dev/null`
35268    # bat and cmd files are not always considered executable in MSYS causing which
35269    # to not find them
35270    if test "x$new_path" = x \
35271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35273      new_path="$path"
35274
35275  windows_path="$new_path"
35276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35277    unix_path=`$CYGPATH -u "$windows_path"`
35278    new_path="$unix_path"
35279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35281    new_path="$unix_path"
35282  fi
35283
35284    fi
35285
35286    if test "x$new_path" = x; then
35287      # It's still not found. Now this is an unrecoverable error.
35288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35289$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35290      has_space=`$ECHO "$complete" | $GREP " "`
35291      if test "x$has_space" != x; then
35292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35294      fi
35295      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35296    fi
35297  fi
35298
35299  # Now new_path has a complete unix path to the binary
35300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35301    # Keep paths in /bin as-is, but remove trailing .exe if any
35302    new_path="${new_path/%.exe/}"
35303    # Do not save /bin paths to all_fixpath_prefixes!
35304  else
35305    # Not in mixed or Windows style, start by that.
35306    new_path=`cmd //c echo $new_path`
35307
35308  input_path="$new_path"
35309  # Check if we need to convert this using DOS-style short mode. If the path
35310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35311  # take no chances and rewrite it.
35312  # Note: m4 eats our [], so we need to use [ and ] instead.
35313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35314  if test "x$has_forbidden_chars" != x; then
35315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35317  fi
35318
35319    # Output is in $new_path
35320
35321  windows_path="$new_path"
35322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35323    unix_path=`$CYGPATH -u "$windows_path"`
35324    new_path="$unix_path"
35325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35327    new_path="$unix_path"
35328  fi
35329
35330    # remove trailing .exe if any
35331    new_path="${new_path/%.exe/}"
35332
35333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35335  fi
35336
35337    else
35338      # We're on a unix platform. Hooray! :)
35339      # First separate the path from the arguments. This will split at the first
35340      # space.
35341      complete="$CXXCPP"
35342      path="${complete%% *}"
35343      tmp="$complete EOL"
35344      arguments="${tmp#* }"
35345
35346      # Cannot rely on the command "which" here since it doesn't always work.
35347      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35348      if test -z "$is_absolute_path"; then
35349        # Path to executable is not absolute. Find it.
35350        IFS_save="$IFS"
35351        IFS=:
35352        for p in $PATH; do
35353          if test -f "$p/$path" && test -x "$p/$path"; then
35354            new_path="$p/$path"
35355            break
35356          fi
35357        done
35358        IFS="$IFS_save"
35359      else
35360        # This is an absolute path, we can use it without further modifications.
35361        new_path="$path"
35362      fi
35363
35364      if test "x$new_path" = x; then
35365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35366$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35367        has_space=`$ECHO "$complete" | $GREP " "`
35368        if test "x$has_space" != x; then
35369          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35371        fi
35372        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35373      fi
35374    fi
35375
35376    # Now join together the path and the arguments once again
35377    if test "x$arguments" != xEOL; then
35378      new_complete="$new_path ${arguments% *}"
35379    else
35380      new_complete="$new_path"
35381    fi
35382
35383    if test "x$complete" != "x$new_complete"; then
35384      CXXCPP="$new_complete"
35385      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35386$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35387    fi
35388  fi
35389
35390
35391  #
35392  # Setup the linker (LD)
35393  #
35394  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35395    # In the Microsoft toolchain we have a separate LD command "link".
35396    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35397    # a cygwin program for something completely different.
35398    # Extract the first word of "link", so it can be a program name with args.
35399set dummy link; ac_word=$2
35400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35401$as_echo_n "checking for $ac_word... " >&6; }
35402if ${ac_cv_prog_LD+:} false; then :
35403  $as_echo_n "(cached) " >&6
35404else
35405  if test -n "$LD"; then
35406  ac_cv_prog_LD="$LD" # Let the user override the test.
35407else
35408  ac_prog_rejected=no
35409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35410for as_dir in $PATH
35411do
35412  IFS=$as_save_IFS
35413  test -z "$as_dir" && as_dir=.
35414    for ac_exec_ext in '' $ac_executable_extensions; do
35415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35416    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35417       ac_prog_rejected=yes
35418       continue
35419     fi
35420    ac_cv_prog_LD="link"
35421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35422    break 2
35423  fi
35424done
35425  done
35426IFS=$as_save_IFS
35427
35428if test $ac_prog_rejected = yes; then
35429  # We found a bogon in the path, so make sure we never use it.
35430  set dummy $ac_cv_prog_LD
35431  shift
35432  if test $# != 0; then
35433    # We chose a different compiler from the bogus one.
35434    # However, it has the same basename, so the bogon will be chosen
35435    # first if we set LD to just the basename; use the full file name.
35436    shift
35437    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35438  fi
35439fi
35440fi
35441fi
35442LD=$ac_cv_prog_LD
35443if test -n "$LD"; then
35444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35445$as_echo "$LD" >&6; }
35446else
35447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35448$as_echo "no" >&6; }
35449fi
35450
35451
35452
35453  # Only process if variable expands to non-empty
35454
35455  if test "x$LD" != x; then
35456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35457
35458  # First separate the path from the arguments. This will split at the first
35459  # space.
35460  complete="$LD"
35461  path="${complete%% *}"
35462  tmp="$complete EOL"
35463  arguments="${tmp#* }"
35464
35465  # Input might be given as Windows format, start by converting to
35466  # unix format.
35467  new_path=`$CYGPATH -u "$path"`
35468
35469  # Now try to locate executable using which
35470  new_path=`$WHICH "$new_path" 2> /dev/null`
35471  # bat and cmd files are not always considered executable in cygwin causing which
35472  # to not find them
35473  if test "x$new_path" = x \
35474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35476    new_path=`$CYGPATH -u "$path"`
35477  fi
35478  if test "x$new_path" = x; then
35479    # Oops. Which didn't find the executable.
35480    # The splitting of arguments from the executable at a space might have been incorrect,
35481    # since paths with space are more likely in Windows. Give it another try with the whole
35482    # argument.
35483    path="$complete"
35484    arguments="EOL"
35485    new_path=`$CYGPATH -u "$path"`
35486    new_path=`$WHICH "$new_path" 2> /dev/null`
35487    # bat and cmd files are not always considered executable in cygwin causing which
35488    # to not find them
35489    if test "x$new_path" = x \
35490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35492      new_path=`$CYGPATH -u "$path"`
35493    fi
35494    if test "x$new_path" = x; then
35495      # It's still not found. Now this is an unrecoverable error.
35496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35497$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35498      has_space=`$ECHO "$complete" | $GREP " "`
35499      if test "x$has_space" != x; then
35500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35502      fi
35503      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35504    fi
35505  fi
35506
35507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35510  # "foo.exe" is OK but "foo" is an error.
35511  #
35512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35513  # It is also a way to make sure we got the proper file name for the real test later on.
35514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35515  if test "x$test_shortpath" = x; then
35516    # Short path failed, file does not exist as specified.
35517    # Try adding .exe or .cmd
35518    if test -f "${new_path}.exe"; then
35519      input_to_shortpath="${new_path}.exe"
35520    elif test -f "${new_path}.cmd"; then
35521      input_to_shortpath="${new_path}.cmd"
35522    else
35523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35524$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35527      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35528    fi
35529  else
35530    input_to_shortpath="$new_path"
35531  fi
35532
35533  # Call helper function which possibly converts this using DOS-style short mode.
35534  # If so, the updated path is stored in $new_path.
35535  new_path="$input_to_shortpath"
35536
35537  input_path="$input_to_shortpath"
35538  # Check if we need to convert this using DOS-style short mode. If the path
35539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35540  # take no chances and rewrite it.
35541  # Note: m4 eats our [], so we need to use [ and ] instead.
35542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35543  if test "x$has_forbidden_chars" != x; then
35544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35548      # Going to short mode and back again did indeed matter. Since short mode is
35549      # case insensitive, let's make it lowercase to improve readability.
35550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35551      # Now convert it back to Unix-style (cygpath)
35552      input_path=`$CYGPATH -u "$shortmode_path"`
35553      new_path="$input_path"
35554    fi
35555  fi
35556
35557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35558  if test "x$test_cygdrive_prefix" = x; then
35559    # As a simple fix, exclude /usr/bin since it's not a real path.
35560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35562      # a path prefixed by /cygdrive for fixpath to work.
35563      new_path="$CYGWIN_ROOT_PATH$input_path"
35564    fi
35565  fi
35566
35567  # remove trailing .exe if any
35568  new_path="${new_path/%.exe/}"
35569
35570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35571
35572  # First separate the path from the arguments. This will split at the first
35573  # space.
35574  complete="$LD"
35575  path="${complete%% *}"
35576  tmp="$complete EOL"
35577  arguments="${tmp#* }"
35578
35579  # Input might be given as Windows format, start by converting to
35580  # unix format.
35581  new_path="$path"
35582
35583  windows_path="$new_path"
35584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35585    unix_path=`$CYGPATH -u "$windows_path"`
35586    new_path="$unix_path"
35587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35589    new_path="$unix_path"
35590  fi
35591
35592
35593  # Now try to locate executable using which
35594  new_path=`$WHICH "$new_path" 2> /dev/null`
35595
35596  if test "x$new_path" = x; then
35597    # Oops. Which didn't find the executable.
35598    # The splitting of arguments from the executable at a space might have been incorrect,
35599    # since paths with space are more likely in Windows. Give it another try with the whole
35600    # argument.
35601    path="$complete"
35602    arguments="EOL"
35603    new_path="$path"
35604
35605  windows_path="$new_path"
35606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35607    unix_path=`$CYGPATH -u "$windows_path"`
35608    new_path="$unix_path"
35609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35611    new_path="$unix_path"
35612  fi
35613
35614
35615    new_path=`$WHICH "$new_path" 2> /dev/null`
35616    # bat and cmd files are not always considered executable in MSYS causing which
35617    # to not find them
35618    if test "x$new_path" = x \
35619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35621      new_path="$path"
35622
35623  windows_path="$new_path"
35624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35625    unix_path=`$CYGPATH -u "$windows_path"`
35626    new_path="$unix_path"
35627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35629    new_path="$unix_path"
35630  fi
35631
35632    fi
35633
35634    if test "x$new_path" = x; then
35635      # It's still not found. Now this is an unrecoverable error.
35636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35637$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35638      has_space=`$ECHO "$complete" | $GREP " "`
35639      if test "x$has_space" != x; then
35640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35642      fi
35643      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35644    fi
35645  fi
35646
35647  # Now new_path has a complete unix path to the binary
35648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35649    # Keep paths in /bin as-is, but remove trailing .exe if any
35650    new_path="${new_path/%.exe/}"
35651    # Do not save /bin paths to all_fixpath_prefixes!
35652  else
35653    # Not in mixed or Windows style, start by that.
35654    new_path=`cmd //c echo $new_path`
35655
35656  input_path="$new_path"
35657  # Check if we need to convert this using DOS-style short mode. If the path
35658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35659  # take no chances and rewrite it.
35660  # Note: m4 eats our [], so we need to use [ and ] instead.
35661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35662  if test "x$has_forbidden_chars" != x; then
35663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35665  fi
35666
35667    # Output is in $new_path
35668
35669  windows_path="$new_path"
35670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35671    unix_path=`$CYGPATH -u "$windows_path"`
35672    new_path="$unix_path"
35673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35675    new_path="$unix_path"
35676  fi
35677
35678    # remove trailing .exe if any
35679    new_path="${new_path/%.exe/}"
35680
35681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35683  fi
35684
35685    else
35686      # We're on a unix platform. Hooray! :)
35687      # First separate the path from the arguments. This will split at the first
35688      # space.
35689      complete="$LD"
35690      path="${complete%% *}"
35691      tmp="$complete EOL"
35692      arguments="${tmp#* }"
35693
35694      # Cannot rely on the command "which" here since it doesn't always work.
35695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35696      if test -z "$is_absolute_path"; then
35697        # Path to executable is not absolute. Find it.
35698        IFS_save="$IFS"
35699        IFS=:
35700        for p in $PATH; do
35701          if test -f "$p/$path" && test -x "$p/$path"; then
35702            new_path="$p/$path"
35703            break
35704          fi
35705        done
35706        IFS="$IFS_save"
35707      else
35708        # This is an absolute path, we can use it without further modifications.
35709        new_path="$path"
35710      fi
35711
35712      if test "x$new_path" = x; then
35713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35714$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35715        has_space=`$ECHO "$complete" | $GREP " "`
35716        if test "x$has_space" != x; then
35717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35719        fi
35720        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35721      fi
35722    fi
35723
35724    # Now join together the path and the arguments once again
35725    if test "x$arguments" != xEOL; then
35726      new_complete="$new_path ${arguments% *}"
35727    else
35728      new_complete="$new_path"
35729    fi
35730
35731    if test "x$complete" != "x$new_complete"; then
35732      LD="$new_complete"
35733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35734$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35735    fi
35736  fi
35737
35738    # Verify that we indeed succeeded with this trick.
35739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35740$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35741    "$LD" --version > /dev/null
35742    if test $? -eq 0 ; then
35743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35744$as_echo "no" >&6; }
35745      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35746    else
35747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35748$as_echo "yes" >&6; }
35749    fi
35750    LDCXX="$LD"
35751  else
35752    # All other toolchains use the compiler to link.
35753    LD="$CC"
35754    LDCXX="$CXX"
35755  fi
35756
35757  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35758
35759
35760  #
35761  # Setup the assembler (AS)
35762  #
35763  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35764    # FIXME: should this really be solaris, or solstudio?
35765
35766
35767  # Publish this variable in the help.
35768
35769
35770  if [ -z "${AS+x}" ]; then
35771    # The variable is not set by user, try to locate tool using the code snippet
35772    for ac_prog in as
35773do
35774  # Extract the first word of "$ac_prog", so it can be a program name with args.
35775set dummy $ac_prog; ac_word=$2
35776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35777$as_echo_n "checking for $ac_word... " >&6; }
35778if ${ac_cv_path_AS+:} false; then :
35779  $as_echo_n "(cached) " >&6
35780else
35781  case $AS in
35782  [\\/]* | ?:[\\/]*)
35783  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35784  ;;
35785  *)
35786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35787for as_dir in $PATH
35788do
35789  IFS=$as_save_IFS
35790  test -z "$as_dir" && as_dir=.
35791    for ac_exec_ext in '' $ac_executable_extensions; do
35792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35793    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35795    break 2
35796  fi
35797done
35798  done
35799IFS=$as_save_IFS
35800
35801  ;;
35802esac
35803fi
35804AS=$ac_cv_path_AS
35805if test -n "$AS"; then
35806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35807$as_echo "$AS" >&6; }
35808else
35809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35810$as_echo "no" >&6; }
35811fi
35812
35813
35814  test -n "$AS" && break
35815done
35816
35817  else
35818    # The variable is set, but is it from the command line or the environment?
35819
35820    # Try to remove the string !AS! from our list.
35821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35823      # If it failed, the variable was not from the command line. Ignore it,
35824      # but warn the user (except for BASH, which is always set by the calling BASH).
35825      if test "xAS" != xBASH; then
35826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35827$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35828      fi
35829      # Try to locate tool using the code snippet
35830      for ac_prog in as
35831do
35832  # Extract the first word of "$ac_prog", so it can be a program name with args.
35833set dummy $ac_prog; ac_word=$2
35834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35835$as_echo_n "checking for $ac_word... " >&6; }
35836if ${ac_cv_path_AS+:} false; then :
35837  $as_echo_n "(cached) " >&6
35838else
35839  case $AS in
35840  [\\/]* | ?:[\\/]*)
35841  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35842  ;;
35843  *)
35844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35845for as_dir in $PATH
35846do
35847  IFS=$as_save_IFS
35848  test -z "$as_dir" && as_dir=.
35849    for ac_exec_ext in '' $ac_executable_extensions; do
35850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35851    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35853    break 2
35854  fi
35855done
35856  done
35857IFS=$as_save_IFS
35858
35859  ;;
35860esac
35861fi
35862AS=$ac_cv_path_AS
35863if test -n "$AS"; then
35864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35865$as_echo "$AS" >&6; }
35866else
35867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35868$as_echo "no" >&6; }
35869fi
35870
35871
35872  test -n "$AS" && break
35873done
35874
35875    else
35876      # If it succeeded, then it was overridden by the user. We will use it
35877      # for the tool.
35878
35879      # First remove it from the list of overridden variables, so we can test
35880      # for unknown variables in the end.
35881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35882
35883      # Check if we try to supply an empty value
35884      if test "x$AS" = x; then
35885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35886$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35888$as_echo_n "checking for AS... " >&6; }
35889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35890$as_echo "disabled" >&6; }
35891      else
35892        # Check if the provided tool contains a complete path.
35893        tool_specified="$AS"
35894        tool_basename="${tool_specified##*/}"
35895        if test "x$tool_basename" = "x$tool_specified"; then
35896          # A command without a complete path is provided, search $PATH.
35897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35898$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35899          # Extract the first word of "$tool_basename", so it can be a program name with args.
35900set dummy $tool_basename; ac_word=$2
35901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35902$as_echo_n "checking for $ac_word... " >&6; }
35903if ${ac_cv_path_AS+:} false; then :
35904  $as_echo_n "(cached) " >&6
35905else
35906  case $AS in
35907  [\\/]* | ?:[\\/]*)
35908  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35909  ;;
35910  *)
35911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35912for as_dir in $PATH
35913do
35914  IFS=$as_save_IFS
35915  test -z "$as_dir" && as_dir=.
35916    for ac_exec_ext in '' $ac_executable_extensions; do
35917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35918    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35920    break 2
35921  fi
35922done
35923  done
35924IFS=$as_save_IFS
35925
35926  ;;
35927esac
35928fi
35929AS=$ac_cv_path_AS
35930if test -n "$AS"; then
35931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35932$as_echo "$AS" >&6; }
35933else
35934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35935$as_echo "no" >&6; }
35936fi
35937
35938
35939          if test "x$AS" = x; then
35940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35941          fi
35942        else
35943          # Otherwise we believe it is a complete path. Use it as it is.
35944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35945$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35947$as_echo_n "checking for AS... " >&6; }
35948          if test ! -x "$tool_specified"; then
35949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35950$as_echo "not found" >&6; }
35951            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35952          fi
35953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35954$as_echo "$tool_specified" >&6; }
35955        fi
35956      fi
35957    fi
35958
35959  fi
35960
35961
35962
35963  # Only process if variable expands to non-empty
35964
35965  if test "x$AS" != x; then
35966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35967
35968  # First separate the path from the arguments. This will split at the first
35969  # space.
35970  complete="$AS"
35971  path="${complete%% *}"
35972  tmp="$complete EOL"
35973  arguments="${tmp#* }"
35974
35975  # Input might be given as Windows format, start by converting to
35976  # unix format.
35977  new_path=`$CYGPATH -u "$path"`
35978
35979  # Now try to locate executable using which
35980  new_path=`$WHICH "$new_path" 2> /dev/null`
35981  # bat and cmd files are not always considered executable in cygwin causing which
35982  # to not find them
35983  if test "x$new_path" = x \
35984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35986    new_path=`$CYGPATH -u "$path"`
35987  fi
35988  if test "x$new_path" = x; then
35989    # Oops. Which didn't find the executable.
35990    # The splitting of arguments from the executable at a space might have been incorrect,
35991    # since paths with space are more likely in Windows. Give it another try with the whole
35992    # argument.
35993    path="$complete"
35994    arguments="EOL"
35995    new_path=`$CYGPATH -u "$path"`
35996    new_path=`$WHICH "$new_path" 2> /dev/null`
35997    # bat and cmd files are not always considered executable in cygwin causing which
35998    # to not find them
35999    if test "x$new_path" = x \
36000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36002      new_path=`$CYGPATH -u "$path"`
36003    fi
36004    if test "x$new_path" = x; then
36005      # It's still not found. Now this is an unrecoverable error.
36006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36007$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36008      has_space=`$ECHO "$complete" | $GREP " "`
36009      if test "x$has_space" != x; then
36010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36012      fi
36013      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36014    fi
36015  fi
36016
36017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36020  # "foo.exe" is OK but "foo" is an error.
36021  #
36022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36023  # It is also a way to make sure we got the proper file name for the real test later on.
36024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36025  if test "x$test_shortpath" = x; then
36026    # Short path failed, file does not exist as specified.
36027    # Try adding .exe or .cmd
36028    if test -f "${new_path}.exe"; then
36029      input_to_shortpath="${new_path}.exe"
36030    elif test -f "${new_path}.cmd"; then
36031      input_to_shortpath="${new_path}.cmd"
36032    else
36033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36034$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36037      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36038    fi
36039  else
36040    input_to_shortpath="$new_path"
36041  fi
36042
36043  # Call helper function which possibly converts this using DOS-style short mode.
36044  # If so, the updated path is stored in $new_path.
36045  new_path="$input_to_shortpath"
36046
36047  input_path="$input_to_shortpath"
36048  # Check if we need to convert this using DOS-style short mode. If the path
36049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36050  # take no chances and rewrite it.
36051  # Note: m4 eats our [], so we need to use [ and ] instead.
36052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36053  if test "x$has_forbidden_chars" != x; then
36054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36058      # Going to short mode and back again did indeed matter. Since short mode is
36059      # case insensitive, let's make it lowercase to improve readability.
36060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36061      # Now convert it back to Unix-style (cygpath)
36062      input_path=`$CYGPATH -u "$shortmode_path"`
36063      new_path="$input_path"
36064    fi
36065  fi
36066
36067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36068  if test "x$test_cygdrive_prefix" = x; then
36069    # As a simple fix, exclude /usr/bin since it's not a real path.
36070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36072      # a path prefixed by /cygdrive for fixpath to work.
36073      new_path="$CYGWIN_ROOT_PATH$input_path"
36074    fi
36075  fi
36076
36077  # remove trailing .exe if any
36078  new_path="${new_path/%.exe/}"
36079
36080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36081
36082  # First separate the path from the arguments. This will split at the first
36083  # space.
36084  complete="$AS"
36085  path="${complete%% *}"
36086  tmp="$complete EOL"
36087  arguments="${tmp#* }"
36088
36089  # Input might be given as Windows format, start by converting to
36090  # unix format.
36091  new_path="$path"
36092
36093  windows_path="$new_path"
36094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36095    unix_path=`$CYGPATH -u "$windows_path"`
36096    new_path="$unix_path"
36097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36099    new_path="$unix_path"
36100  fi
36101
36102
36103  # Now try to locate executable using which
36104  new_path=`$WHICH "$new_path" 2> /dev/null`
36105
36106  if test "x$new_path" = x; then
36107    # Oops. Which didn't find the executable.
36108    # The splitting of arguments from the executable at a space might have been incorrect,
36109    # since paths with space are more likely in Windows. Give it another try with the whole
36110    # argument.
36111    path="$complete"
36112    arguments="EOL"
36113    new_path="$path"
36114
36115  windows_path="$new_path"
36116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36117    unix_path=`$CYGPATH -u "$windows_path"`
36118    new_path="$unix_path"
36119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36121    new_path="$unix_path"
36122  fi
36123
36124
36125    new_path=`$WHICH "$new_path" 2> /dev/null`
36126    # bat and cmd files are not always considered executable in MSYS causing which
36127    # to not find them
36128    if test "x$new_path" = x \
36129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36131      new_path="$path"
36132
36133  windows_path="$new_path"
36134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36135    unix_path=`$CYGPATH -u "$windows_path"`
36136    new_path="$unix_path"
36137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36139    new_path="$unix_path"
36140  fi
36141
36142    fi
36143
36144    if test "x$new_path" = x; then
36145      # It's still not found. Now this is an unrecoverable error.
36146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36147$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36148      has_space=`$ECHO "$complete" | $GREP " "`
36149      if test "x$has_space" != x; then
36150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36152      fi
36153      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36154    fi
36155  fi
36156
36157  # Now new_path has a complete unix path to the binary
36158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36159    # Keep paths in /bin as-is, but remove trailing .exe if any
36160    new_path="${new_path/%.exe/}"
36161    # Do not save /bin paths to all_fixpath_prefixes!
36162  else
36163    # Not in mixed or Windows style, start by that.
36164    new_path=`cmd //c echo $new_path`
36165
36166  input_path="$new_path"
36167  # Check if we need to convert this using DOS-style short mode. If the path
36168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36169  # take no chances and rewrite it.
36170  # Note: m4 eats our [], so we need to use [ and ] instead.
36171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36172  if test "x$has_forbidden_chars" != x; then
36173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36175  fi
36176
36177    # Output is in $new_path
36178
36179  windows_path="$new_path"
36180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36181    unix_path=`$CYGPATH -u "$windows_path"`
36182    new_path="$unix_path"
36183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36185    new_path="$unix_path"
36186  fi
36187
36188    # remove trailing .exe if any
36189    new_path="${new_path/%.exe/}"
36190
36191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36193  fi
36194
36195    else
36196      # We're on a unix platform. Hooray! :)
36197      # First separate the path from the arguments. This will split at the first
36198      # space.
36199      complete="$AS"
36200      path="${complete%% *}"
36201      tmp="$complete EOL"
36202      arguments="${tmp#* }"
36203
36204      # Cannot rely on the command "which" here since it doesn't always work.
36205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36206      if test -z "$is_absolute_path"; then
36207        # Path to executable is not absolute. Find it.
36208        IFS_save="$IFS"
36209        IFS=:
36210        for p in $PATH; do
36211          if test -f "$p/$path" && test -x "$p/$path"; then
36212            new_path="$p/$path"
36213            break
36214          fi
36215        done
36216        IFS="$IFS_save"
36217      else
36218        # This is an absolute path, we can use it without further modifications.
36219        new_path="$path"
36220      fi
36221
36222      if test "x$new_path" = x; then
36223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36224$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36225        has_space=`$ECHO "$complete" | $GREP " "`
36226        if test "x$has_space" != x; then
36227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36229        fi
36230        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36231      fi
36232    fi
36233
36234    # Now join together the path and the arguments once again
36235    if test "x$arguments" != xEOL; then
36236      new_complete="$new_path ${arguments% *}"
36237    else
36238      new_complete="$new_path"
36239    fi
36240
36241    if test "x$complete" != "x$new_complete"; then
36242      AS="$new_complete"
36243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36244$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36245    fi
36246  fi
36247
36248  else
36249    # FIXME: is this correct for microsoft?
36250    AS="$CC -c"
36251  fi
36252
36253
36254  #
36255  # Setup the archiver (AR)
36256  #
36257  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36258    # The corresponding ar tool is lib.exe (used to create static libraries)
36259    # Extract the first word of "lib", so it can be a program name with args.
36260set dummy lib; ac_word=$2
36261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36262$as_echo_n "checking for $ac_word... " >&6; }
36263if ${ac_cv_prog_AR+:} false; then :
36264  $as_echo_n "(cached) " >&6
36265else
36266  if test -n "$AR"; then
36267  ac_cv_prog_AR="$AR" # Let the user override the test.
36268else
36269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36270for as_dir in $PATH
36271do
36272  IFS=$as_save_IFS
36273  test -z "$as_dir" && as_dir=.
36274    for ac_exec_ext in '' $ac_executable_extensions; do
36275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36276    ac_cv_prog_AR="lib"
36277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36278    break 2
36279  fi
36280done
36281  done
36282IFS=$as_save_IFS
36283
36284fi
36285fi
36286AR=$ac_cv_prog_AR
36287if test -n "$AR"; then
36288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36289$as_echo "$AR" >&6; }
36290else
36291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36292$as_echo "no" >&6; }
36293fi
36294
36295
36296  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36297
36298
36299  # Publish this variable in the help.
36300
36301
36302  if [ -z "${AR+x}" ]; then
36303    # The variable is not set by user, try to locate tool using the code snippet
36304    if test -n "$ac_tool_prefix"; then
36305  for ac_prog in ar gcc-ar
36306  do
36307    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36308set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36310$as_echo_n "checking for $ac_word... " >&6; }
36311if ${ac_cv_prog_AR+:} false; then :
36312  $as_echo_n "(cached) " >&6
36313else
36314  if test -n "$AR"; then
36315  ac_cv_prog_AR="$AR" # Let the user override the test.
36316else
36317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36318for as_dir in $PATH
36319do
36320  IFS=$as_save_IFS
36321  test -z "$as_dir" && as_dir=.
36322    for ac_exec_ext in '' $ac_executable_extensions; do
36323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36324    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36326    break 2
36327  fi
36328done
36329  done
36330IFS=$as_save_IFS
36331
36332fi
36333fi
36334AR=$ac_cv_prog_AR
36335if test -n "$AR"; then
36336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36337$as_echo "$AR" >&6; }
36338else
36339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36340$as_echo "no" >&6; }
36341fi
36342
36343
36344    test -n "$AR" && break
36345  done
36346fi
36347if test -z "$AR"; then
36348  ac_ct_AR=$AR
36349  for ac_prog in ar gcc-ar
36350do
36351  # Extract the first word of "$ac_prog", so it can be a program name with args.
36352set dummy $ac_prog; ac_word=$2
36353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36354$as_echo_n "checking for $ac_word... " >&6; }
36355if ${ac_cv_prog_ac_ct_AR+:} false; then :
36356  $as_echo_n "(cached) " >&6
36357else
36358  if test -n "$ac_ct_AR"; then
36359  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36360else
36361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36362for as_dir in $PATH
36363do
36364  IFS=$as_save_IFS
36365  test -z "$as_dir" && as_dir=.
36366    for ac_exec_ext in '' $ac_executable_extensions; do
36367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36368    ac_cv_prog_ac_ct_AR="$ac_prog"
36369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36370    break 2
36371  fi
36372done
36373  done
36374IFS=$as_save_IFS
36375
36376fi
36377fi
36378ac_ct_AR=$ac_cv_prog_ac_ct_AR
36379if test -n "$ac_ct_AR"; then
36380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36381$as_echo "$ac_ct_AR" >&6; }
36382else
36383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36384$as_echo "no" >&6; }
36385fi
36386
36387
36388  test -n "$ac_ct_AR" && break
36389done
36390
36391  if test "x$ac_ct_AR" = x; then
36392    AR=""
36393  else
36394    case $cross_compiling:$ac_tool_warned in
36395yes:)
36396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36398ac_tool_warned=yes ;;
36399esac
36400    AR=$ac_ct_AR
36401  fi
36402fi
36403
36404  else
36405    # The variable is set, but is it from the command line or the environment?
36406
36407    # Try to remove the string !AR! from our list.
36408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36410      # If it failed, the variable was not from the command line. Ignore it,
36411      # but warn the user (except for BASH, which is always set by the calling BASH).
36412      if test "xAR" != xBASH; then
36413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36414$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36415      fi
36416      # Try to locate tool using the code snippet
36417      if test -n "$ac_tool_prefix"; then
36418  for ac_prog in ar gcc-ar
36419  do
36420    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36421set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36423$as_echo_n "checking for $ac_word... " >&6; }
36424if ${ac_cv_prog_AR+:} false; then :
36425  $as_echo_n "(cached) " >&6
36426else
36427  if test -n "$AR"; then
36428  ac_cv_prog_AR="$AR" # Let the user override the test.
36429else
36430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36431for as_dir in $PATH
36432do
36433  IFS=$as_save_IFS
36434  test -z "$as_dir" && as_dir=.
36435    for ac_exec_ext in '' $ac_executable_extensions; do
36436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36437    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36439    break 2
36440  fi
36441done
36442  done
36443IFS=$as_save_IFS
36444
36445fi
36446fi
36447AR=$ac_cv_prog_AR
36448if test -n "$AR"; then
36449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36450$as_echo "$AR" >&6; }
36451else
36452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36453$as_echo "no" >&6; }
36454fi
36455
36456
36457    test -n "$AR" && break
36458  done
36459fi
36460if test -z "$AR"; then
36461  ac_ct_AR=$AR
36462  for ac_prog in ar gcc-ar
36463do
36464  # Extract the first word of "$ac_prog", so it can be a program name with args.
36465set dummy $ac_prog; ac_word=$2
36466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36467$as_echo_n "checking for $ac_word... " >&6; }
36468if ${ac_cv_prog_ac_ct_AR+:} false; then :
36469  $as_echo_n "(cached) " >&6
36470else
36471  if test -n "$ac_ct_AR"; then
36472  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36473else
36474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36475for as_dir in $PATH
36476do
36477  IFS=$as_save_IFS
36478  test -z "$as_dir" && as_dir=.
36479    for ac_exec_ext in '' $ac_executable_extensions; do
36480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36481    ac_cv_prog_ac_ct_AR="$ac_prog"
36482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36483    break 2
36484  fi
36485done
36486  done
36487IFS=$as_save_IFS
36488
36489fi
36490fi
36491ac_ct_AR=$ac_cv_prog_ac_ct_AR
36492if test -n "$ac_ct_AR"; then
36493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36494$as_echo "$ac_ct_AR" >&6; }
36495else
36496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36497$as_echo "no" >&6; }
36498fi
36499
36500
36501  test -n "$ac_ct_AR" && break
36502done
36503
36504  if test "x$ac_ct_AR" = x; then
36505    AR=""
36506  else
36507    case $cross_compiling:$ac_tool_warned in
36508yes:)
36509{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36510$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36511ac_tool_warned=yes ;;
36512esac
36513    AR=$ac_ct_AR
36514  fi
36515fi
36516
36517    else
36518      # If it succeeded, then it was overridden by the user. We will use it
36519      # for the tool.
36520
36521      # First remove it from the list of overridden variables, so we can test
36522      # for unknown variables in the end.
36523      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36524
36525      # Check if we try to supply an empty value
36526      if test "x$AR" = x; then
36527        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36528$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36530$as_echo_n "checking for AR... " >&6; }
36531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36532$as_echo "disabled" >&6; }
36533      else
36534        # Check if the provided tool contains a complete path.
36535        tool_specified="$AR"
36536        tool_basename="${tool_specified##*/}"
36537        if test "x$tool_basename" = "x$tool_specified"; then
36538          # A command without a complete path is provided, search $PATH.
36539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36540$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36541          # Extract the first word of "$tool_basename", so it can be a program name with args.
36542set dummy $tool_basename; ac_word=$2
36543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36544$as_echo_n "checking for $ac_word... " >&6; }
36545if ${ac_cv_path_AR+:} false; then :
36546  $as_echo_n "(cached) " >&6
36547else
36548  case $AR in
36549  [\\/]* | ?:[\\/]*)
36550  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36551  ;;
36552  *)
36553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36554for as_dir in $PATH
36555do
36556  IFS=$as_save_IFS
36557  test -z "$as_dir" && as_dir=.
36558    for ac_exec_ext in '' $ac_executable_extensions; do
36559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36560    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36562    break 2
36563  fi
36564done
36565  done
36566IFS=$as_save_IFS
36567
36568  ;;
36569esac
36570fi
36571AR=$ac_cv_path_AR
36572if test -n "$AR"; then
36573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36574$as_echo "$AR" >&6; }
36575else
36576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36577$as_echo "no" >&6; }
36578fi
36579
36580
36581          if test "x$AR" = x; then
36582            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36583          fi
36584        else
36585          # Otherwise we believe it is a complete path. Use it as it is.
36586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36587$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36588          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36589$as_echo_n "checking for AR... " >&6; }
36590          if test ! -x "$tool_specified"; then
36591            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36592$as_echo "not found" >&6; }
36593            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36594          fi
36595          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36596$as_echo "$tool_specified" >&6; }
36597        fi
36598      fi
36599    fi
36600
36601  fi
36602
36603
36604  else
36605
36606
36607  # Publish this variable in the help.
36608
36609
36610  if [ -z "${AR+x}" ]; then
36611    # The variable is not set by user, try to locate tool using the code snippet
36612    if test -n "$ac_tool_prefix"; then
36613  for ac_prog in ar
36614  do
36615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36618$as_echo_n "checking for $ac_word... " >&6; }
36619if ${ac_cv_prog_AR+:} false; then :
36620  $as_echo_n "(cached) " >&6
36621else
36622  if test -n "$AR"; then
36623  ac_cv_prog_AR="$AR" # Let the user override the test.
36624else
36625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36626for as_dir in $PATH
36627do
36628  IFS=$as_save_IFS
36629  test -z "$as_dir" && as_dir=.
36630    for ac_exec_ext in '' $ac_executable_extensions; do
36631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36632    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36634    break 2
36635  fi
36636done
36637  done
36638IFS=$as_save_IFS
36639
36640fi
36641fi
36642AR=$ac_cv_prog_AR
36643if test -n "$AR"; then
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36645$as_echo "$AR" >&6; }
36646else
36647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36648$as_echo "no" >&6; }
36649fi
36650
36651
36652    test -n "$AR" && break
36653  done
36654fi
36655if test -z "$AR"; then
36656  ac_ct_AR=$AR
36657  for ac_prog in ar
36658do
36659  # Extract the first word of "$ac_prog", so it can be a program name with args.
36660set dummy $ac_prog; ac_word=$2
36661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36662$as_echo_n "checking for $ac_word... " >&6; }
36663if ${ac_cv_prog_ac_ct_AR+:} false; then :
36664  $as_echo_n "(cached) " >&6
36665else
36666  if test -n "$ac_ct_AR"; then
36667  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36668else
36669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36670for as_dir in $PATH
36671do
36672  IFS=$as_save_IFS
36673  test -z "$as_dir" && as_dir=.
36674    for ac_exec_ext in '' $ac_executable_extensions; do
36675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36676    ac_cv_prog_ac_ct_AR="$ac_prog"
36677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36678    break 2
36679  fi
36680done
36681  done
36682IFS=$as_save_IFS
36683
36684fi
36685fi
36686ac_ct_AR=$ac_cv_prog_ac_ct_AR
36687if test -n "$ac_ct_AR"; then
36688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36689$as_echo "$ac_ct_AR" >&6; }
36690else
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36692$as_echo "no" >&6; }
36693fi
36694
36695
36696  test -n "$ac_ct_AR" && break
36697done
36698
36699  if test "x$ac_ct_AR" = x; then
36700    AR=""
36701  else
36702    case $cross_compiling:$ac_tool_warned in
36703yes:)
36704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36706ac_tool_warned=yes ;;
36707esac
36708    AR=$ac_ct_AR
36709  fi
36710fi
36711
36712  else
36713    # The variable is set, but is it from the command line or the environment?
36714
36715    # Try to remove the string !AR! from our list.
36716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36718      # If it failed, the variable was not from the command line. Ignore it,
36719      # but warn the user (except for BASH, which is always set by the calling BASH).
36720      if test "xAR" != xBASH; then
36721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36722$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36723      fi
36724      # Try to locate tool using the code snippet
36725      if test -n "$ac_tool_prefix"; then
36726  for ac_prog in ar
36727  do
36728    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36731$as_echo_n "checking for $ac_word... " >&6; }
36732if ${ac_cv_prog_AR+:} false; then :
36733  $as_echo_n "(cached) " >&6
36734else
36735  if test -n "$AR"; then
36736  ac_cv_prog_AR="$AR" # Let the user override the test.
36737else
36738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36739for as_dir in $PATH
36740do
36741  IFS=$as_save_IFS
36742  test -z "$as_dir" && as_dir=.
36743    for ac_exec_ext in '' $ac_executable_extensions; do
36744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36745    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36747    break 2
36748  fi
36749done
36750  done
36751IFS=$as_save_IFS
36752
36753fi
36754fi
36755AR=$ac_cv_prog_AR
36756if test -n "$AR"; then
36757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36758$as_echo "$AR" >&6; }
36759else
36760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36761$as_echo "no" >&6; }
36762fi
36763
36764
36765    test -n "$AR" && break
36766  done
36767fi
36768if test -z "$AR"; then
36769  ac_ct_AR=$AR
36770  for ac_prog in ar
36771do
36772  # Extract the first word of "$ac_prog", so it can be a program name with args.
36773set dummy $ac_prog; ac_word=$2
36774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36775$as_echo_n "checking for $ac_word... " >&6; }
36776if ${ac_cv_prog_ac_ct_AR+:} false; then :
36777  $as_echo_n "(cached) " >&6
36778else
36779  if test -n "$ac_ct_AR"; then
36780  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36781else
36782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36783for as_dir in $PATH
36784do
36785  IFS=$as_save_IFS
36786  test -z "$as_dir" && as_dir=.
36787    for ac_exec_ext in '' $ac_executable_extensions; do
36788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36789    ac_cv_prog_ac_ct_AR="$ac_prog"
36790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36791    break 2
36792  fi
36793done
36794  done
36795IFS=$as_save_IFS
36796
36797fi
36798fi
36799ac_ct_AR=$ac_cv_prog_ac_ct_AR
36800if test -n "$ac_ct_AR"; then
36801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36802$as_echo "$ac_ct_AR" >&6; }
36803else
36804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36805$as_echo "no" >&6; }
36806fi
36807
36808
36809  test -n "$ac_ct_AR" && break
36810done
36811
36812  if test "x$ac_ct_AR" = x; then
36813    AR=""
36814  else
36815    case $cross_compiling:$ac_tool_warned in
36816yes:)
36817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36819ac_tool_warned=yes ;;
36820esac
36821    AR=$ac_ct_AR
36822  fi
36823fi
36824
36825    else
36826      # If it succeeded, then it was overridden by the user. We will use it
36827      # for the tool.
36828
36829      # First remove it from the list of overridden variables, so we can test
36830      # for unknown variables in the end.
36831      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36832
36833      # Check if we try to supply an empty value
36834      if test "x$AR" = x; then
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36836$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36838$as_echo_n "checking for AR... " >&6; }
36839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36840$as_echo "disabled" >&6; }
36841      else
36842        # Check if the provided tool contains a complete path.
36843        tool_specified="$AR"
36844        tool_basename="${tool_specified##*/}"
36845        if test "x$tool_basename" = "x$tool_specified"; then
36846          # A command without a complete path is provided, search $PATH.
36847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36848$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36849          # Extract the first word of "$tool_basename", so it can be a program name with args.
36850set dummy $tool_basename; ac_word=$2
36851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36852$as_echo_n "checking for $ac_word... " >&6; }
36853if ${ac_cv_path_AR+:} false; then :
36854  $as_echo_n "(cached) " >&6
36855else
36856  case $AR in
36857  [\\/]* | ?:[\\/]*)
36858  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36859  ;;
36860  *)
36861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36862for as_dir in $PATH
36863do
36864  IFS=$as_save_IFS
36865  test -z "$as_dir" && as_dir=.
36866    for ac_exec_ext in '' $ac_executable_extensions; do
36867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36868    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36870    break 2
36871  fi
36872done
36873  done
36874IFS=$as_save_IFS
36875
36876  ;;
36877esac
36878fi
36879AR=$ac_cv_path_AR
36880if test -n "$AR"; then
36881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36882$as_echo "$AR" >&6; }
36883else
36884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36885$as_echo "no" >&6; }
36886fi
36887
36888
36889          if test "x$AR" = x; then
36890            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36891          fi
36892        else
36893          # Otherwise we believe it is a complete path. Use it as it is.
36894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36895$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36896          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36897$as_echo_n "checking for AR... " >&6; }
36898          if test ! -x "$tool_specified"; then
36899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36900$as_echo "not found" >&6; }
36901            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36902          fi
36903          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36904$as_echo "$tool_specified" >&6; }
36905        fi
36906      fi
36907    fi
36908
36909  fi
36910
36911
36912  fi
36913
36914  # Only process if variable expands to non-empty
36915
36916  if test "x$AR" != x; then
36917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36918
36919  # First separate the path from the arguments. This will split at the first
36920  # space.
36921  complete="$AR"
36922  path="${complete%% *}"
36923  tmp="$complete EOL"
36924  arguments="${tmp#* }"
36925
36926  # Input might be given as Windows format, start by converting to
36927  # unix format.
36928  new_path=`$CYGPATH -u "$path"`
36929
36930  # Now try to locate executable using which
36931  new_path=`$WHICH "$new_path" 2> /dev/null`
36932  # bat and cmd files are not always considered executable in cygwin causing which
36933  # to not find them
36934  if test "x$new_path" = x \
36935      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36936      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36937    new_path=`$CYGPATH -u "$path"`
36938  fi
36939  if test "x$new_path" = x; then
36940    # Oops. Which didn't find the executable.
36941    # The splitting of arguments from the executable at a space might have been incorrect,
36942    # since paths with space are more likely in Windows. Give it another try with the whole
36943    # argument.
36944    path="$complete"
36945    arguments="EOL"
36946    new_path=`$CYGPATH -u "$path"`
36947    new_path=`$WHICH "$new_path" 2> /dev/null`
36948    # bat and cmd files are not always considered executable in cygwin causing which
36949    # to not find them
36950    if test "x$new_path" = x \
36951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36953      new_path=`$CYGPATH -u "$path"`
36954    fi
36955    if test "x$new_path" = x; then
36956      # It's still not found. Now this is an unrecoverable error.
36957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36958$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36959      has_space=`$ECHO "$complete" | $GREP " "`
36960      if test "x$has_space" != x; then
36961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36963      fi
36964      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36965    fi
36966  fi
36967
36968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36971  # "foo.exe" is OK but "foo" is an error.
36972  #
36973  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36974  # It is also a way to make sure we got the proper file name for the real test later on.
36975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36976  if test "x$test_shortpath" = x; then
36977    # Short path failed, file does not exist as specified.
36978    # Try adding .exe or .cmd
36979    if test -f "${new_path}.exe"; then
36980      input_to_shortpath="${new_path}.exe"
36981    elif test -f "${new_path}.cmd"; then
36982      input_to_shortpath="${new_path}.cmd"
36983    else
36984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36985$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36988      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36989    fi
36990  else
36991    input_to_shortpath="$new_path"
36992  fi
36993
36994  # Call helper function which possibly converts this using DOS-style short mode.
36995  # If so, the updated path is stored in $new_path.
36996  new_path="$input_to_shortpath"
36997
36998  input_path="$input_to_shortpath"
36999  # Check if we need to convert this using DOS-style short mode. If the path
37000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37001  # take no chances and rewrite it.
37002  # Note: m4 eats our [], so we need to use [ and ] instead.
37003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37004  if test "x$has_forbidden_chars" != x; then
37005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37009      # Going to short mode and back again did indeed matter. Since short mode is
37010      # case insensitive, let's make it lowercase to improve readability.
37011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37012      # Now convert it back to Unix-style (cygpath)
37013      input_path=`$CYGPATH -u "$shortmode_path"`
37014      new_path="$input_path"
37015    fi
37016  fi
37017
37018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37019  if test "x$test_cygdrive_prefix" = x; then
37020    # As a simple fix, exclude /usr/bin since it's not a real path.
37021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37023      # a path prefixed by /cygdrive for fixpath to work.
37024      new_path="$CYGWIN_ROOT_PATH$input_path"
37025    fi
37026  fi
37027
37028  # remove trailing .exe if any
37029  new_path="${new_path/%.exe/}"
37030
37031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37032
37033  # First separate the path from the arguments. This will split at the first
37034  # space.
37035  complete="$AR"
37036  path="${complete%% *}"
37037  tmp="$complete EOL"
37038  arguments="${tmp#* }"
37039
37040  # Input might be given as Windows format, start by converting to
37041  # unix format.
37042  new_path="$path"
37043
37044  windows_path="$new_path"
37045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37046    unix_path=`$CYGPATH -u "$windows_path"`
37047    new_path="$unix_path"
37048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37050    new_path="$unix_path"
37051  fi
37052
37053
37054  # Now try to locate executable using which
37055  new_path=`$WHICH "$new_path" 2> /dev/null`
37056
37057  if test "x$new_path" = x; then
37058    # Oops. Which didn't find the executable.
37059    # The splitting of arguments from the executable at a space might have been incorrect,
37060    # since paths with space are more likely in Windows. Give it another try with the whole
37061    # argument.
37062    path="$complete"
37063    arguments="EOL"
37064    new_path="$path"
37065
37066  windows_path="$new_path"
37067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37068    unix_path=`$CYGPATH -u "$windows_path"`
37069    new_path="$unix_path"
37070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37072    new_path="$unix_path"
37073  fi
37074
37075
37076    new_path=`$WHICH "$new_path" 2> /dev/null`
37077    # bat and cmd files are not always considered executable in MSYS causing which
37078    # to not find them
37079    if test "x$new_path" = x \
37080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37082      new_path="$path"
37083
37084  windows_path="$new_path"
37085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37086    unix_path=`$CYGPATH -u "$windows_path"`
37087    new_path="$unix_path"
37088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37090    new_path="$unix_path"
37091  fi
37092
37093    fi
37094
37095    if test "x$new_path" = x; then
37096      # It's still not found. Now this is an unrecoverable error.
37097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37098$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37099      has_space=`$ECHO "$complete" | $GREP " "`
37100      if test "x$has_space" != x; then
37101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37103      fi
37104      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37105    fi
37106  fi
37107
37108  # Now new_path has a complete unix path to the binary
37109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37110    # Keep paths in /bin as-is, but remove trailing .exe if any
37111    new_path="${new_path/%.exe/}"
37112    # Do not save /bin paths to all_fixpath_prefixes!
37113  else
37114    # Not in mixed or Windows style, start by that.
37115    new_path=`cmd //c echo $new_path`
37116
37117  input_path="$new_path"
37118  # Check if we need to convert this using DOS-style short mode. If the path
37119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37120  # take no chances and rewrite it.
37121  # Note: m4 eats our [], so we need to use [ and ] instead.
37122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37123  if test "x$has_forbidden_chars" != x; then
37124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37126  fi
37127
37128    # Output is in $new_path
37129
37130  windows_path="$new_path"
37131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37132    unix_path=`$CYGPATH -u "$windows_path"`
37133    new_path="$unix_path"
37134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37136    new_path="$unix_path"
37137  fi
37138
37139    # remove trailing .exe if any
37140    new_path="${new_path/%.exe/}"
37141
37142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37144  fi
37145
37146    else
37147      # We're on a unix platform. Hooray! :)
37148      # First separate the path from the arguments. This will split at the first
37149      # space.
37150      complete="$AR"
37151      path="${complete%% *}"
37152      tmp="$complete EOL"
37153      arguments="${tmp#* }"
37154
37155      # Cannot rely on the command "which" here since it doesn't always work.
37156      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37157      if test -z "$is_absolute_path"; then
37158        # Path to executable is not absolute. Find it.
37159        IFS_save="$IFS"
37160        IFS=:
37161        for p in $PATH; do
37162          if test -f "$p/$path" && test -x "$p/$path"; then
37163            new_path="$p/$path"
37164            break
37165          fi
37166        done
37167        IFS="$IFS_save"
37168      else
37169        # This is an absolute path, we can use it without further modifications.
37170        new_path="$path"
37171      fi
37172
37173      if test "x$new_path" = x; then
37174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37175$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37176        has_space=`$ECHO "$complete" | $GREP " "`
37177        if test "x$has_space" != x; then
37178          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37180        fi
37181        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37182      fi
37183    fi
37184
37185    # Now join together the path and the arguments once again
37186    if test "x$arguments" != xEOL; then
37187      new_complete="$new_path ${arguments% *}"
37188    else
37189      new_complete="$new_path"
37190    fi
37191
37192    if test "x$complete" != "x$new_complete"; then
37193      AR="$new_complete"
37194      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37195$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37196    fi
37197  fi
37198
37199
37200
37201  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37202
37203
37204  # Publish this variable in the help.
37205
37206
37207  if [ -z "${LIPO+x}" ]; then
37208    # The variable is not set by user, try to locate tool using the code snippet
37209    for ac_prog in lipo
37210do
37211  # Extract the first word of "$ac_prog", so it can be a program name with args.
37212set dummy $ac_prog; ac_word=$2
37213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37214$as_echo_n "checking for $ac_word... " >&6; }
37215if ${ac_cv_path_LIPO+:} false; then :
37216  $as_echo_n "(cached) " >&6
37217else
37218  case $LIPO in
37219  [\\/]* | ?:[\\/]*)
37220  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37221  ;;
37222  *)
37223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37224for as_dir in $PATH
37225do
37226  IFS=$as_save_IFS
37227  test -z "$as_dir" && as_dir=.
37228    for ac_exec_ext in '' $ac_executable_extensions; do
37229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37230    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37232    break 2
37233  fi
37234done
37235  done
37236IFS=$as_save_IFS
37237
37238  ;;
37239esac
37240fi
37241LIPO=$ac_cv_path_LIPO
37242if test -n "$LIPO"; then
37243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37244$as_echo "$LIPO" >&6; }
37245else
37246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37247$as_echo "no" >&6; }
37248fi
37249
37250
37251  test -n "$LIPO" && break
37252done
37253
37254  else
37255    # The variable is set, but is it from the command line or the environment?
37256
37257    # Try to remove the string !LIPO! from our list.
37258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37260      # If it failed, the variable was not from the command line. Ignore it,
37261      # but warn the user (except for BASH, which is always set by the calling BASH).
37262      if test "xLIPO" != xBASH; then
37263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37264$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37265      fi
37266      # Try to locate tool using the code snippet
37267      for ac_prog in lipo
37268do
37269  # Extract the first word of "$ac_prog", so it can be a program name with args.
37270set dummy $ac_prog; ac_word=$2
37271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37272$as_echo_n "checking for $ac_word... " >&6; }
37273if ${ac_cv_path_LIPO+:} false; then :
37274  $as_echo_n "(cached) " >&6
37275else
37276  case $LIPO in
37277  [\\/]* | ?:[\\/]*)
37278  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37279  ;;
37280  *)
37281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37282for as_dir in $PATH
37283do
37284  IFS=$as_save_IFS
37285  test -z "$as_dir" && as_dir=.
37286    for ac_exec_ext in '' $ac_executable_extensions; do
37287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37288    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37290    break 2
37291  fi
37292done
37293  done
37294IFS=$as_save_IFS
37295
37296  ;;
37297esac
37298fi
37299LIPO=$ac_cv_path_LIPO
37300if test -n "$LIPO"; then
37301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37302$as_echo "$LIPO" >&6; }
37303else
37304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37305$as_echo "no" >&6; }
37306fi
37307
37308
37309  test -n "$LIPO" && break
37310done
37311
37312    else
37313      # If it succeeded, then it was overridden by the user. We will use it
37314      # for the tool.
37315
37316      # First remove it from the list of overridden variables, so we can test
37317      # for unknown variables in the end.
37318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37319
37320      # Check if we try to supply an empty value
37321      if test "x$LIPO" = x; then
37322        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37323$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37325$as_echo_n "checking for LIPO... " >&6; }
37326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37327$as_echo "disabled" >&6; }
37328      else
37329        # Check if the provided tool contains a complete path.
37330        tool_specified="$LIPO"
37331        tool_basename="${tool_specified##*/}"
37332        if test "x$tool_basename" = "x$tool_specified"; then
37333          # A command without a complete path is provided, search $PATH.
37334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37335$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37336          # Extract the first word of "$tool_basename", so it can be a program name with args.
37337set dummy $tool_basename; ac_word=$2
37338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37339$as_echo_n "checking for $ac_word... " >&6; }
37340if ${ac_cv_path_LIPO+:} false; then :
37341  $as_echo_n "(cached) " >&6
37342else
37343  case $LIPO in
37344  [\\/]* | ?:[\\/]*)
37345  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37346  ;;
37347  *)
37348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37349for as_dir in $PATH
37350do
37351  IFS=$as_save_IFS
37352  test -z "$as_dir" && as_dir=.
37353    for ac_exec_ext in '' $ac_executable_extensions; do
37354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37355    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37357    break 2
37358  fi
37359done
37360  done
37361IFS=$as_save_IFS
37362
37363  ;;
37364esac
37365fi
37366LIPO=$ac_cv_path_LIPO
37367if test -n "$LIPO"; then
37368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37369$as_echo "$LIPO" >&6; }
37370else
37371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37372$as_echo "no" >&6; }
37373fi
37374
37375
37376          if test "x$LIPO" = x; then
37377            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37378          fi
37379        else
37380          # Otherwise we believe it is a complete path. Use it as it is.
37381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37382$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37383          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37384$as_echo_n "checking for LIPO... " >&6; }
37385          if test ! -x "$tool_specified"; then
37386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37387$as_echo "not found" >&6; }
37388            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37389          fi
37390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37391$as_echo "$tool_specified" >&6; }
37392        fi
37393      fi
37394    fi
37395
37396  fi
37397
37398
37399
37400  # Only process if variable expands to non-empty
37401
37402  if test "x$LIPO" != x; then
37403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37404
37405  # First separate the path from the arguments. This will split at the first
37406  # space.
37407  complete="$LIPO"
37408  path="${complete%% *}"
37409  tmp="$complete EOL"
37410  arguments="${tmp#* }"
37411
37412  # Input might be given as Windows format, start by converting to
37413  # unix format.
37414  new_path=`$CYGPATH -u "$path"`
37415
37416  # Now try to locate executable using which
37417  new_path=`$WHICH "$new_path" 2> /dev/null`
37418  # bat and cmd files are not always considered executable in cygwin causing which
37419  # to not find them
37420  if test "x$new_path" = x \
37421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37423    new_path=`$CYGPATH -u "$path"`
37424  fi
37425  if test "x$new_path" = x; then
37426    # Oops. Which didn't find the executable.
37427    # The splitting of arguments from the executable at a space might have been incorrect,
37428    # since paths with space are more likely in Windows. Give it another try with the whole
37429    # argument.
37430    path="$complete"
37431    arguments="EOL"
37432    new_path=`$CYGPATH -u "$path"`
37433    new_path=`$WHICH "$new_path" 2> /dev/null`
37434    # bat and cmd files are not always considered executable in cygwin causing which
37435    # to not find them
37436    if test "x$new_path" = x \
37437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37439      new_path=`$CYGPATH -u "$path"`
37440    fi
37441    if test "x$new_path" = x; then
37442      # It's still not found. Now this is an unrecoverable error.
37443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37444$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37445      has_space=`$ECHO "$complete" | $GREP " "`
37446      if test "x$has_space" != x; then
37447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37449      fi
37450      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37451    fi
37452  fi
37453
37454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37457  # "foo.exe" is OK but "foo" is an error.
37458  #
37459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37460  # It is also a way to make sure we got the proper file name for the real test later on.
37461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37462  if test "x$test_shortpath" = x; then
37463    # Short path failed, file does not exist as specified.
37464    # Try adding .exe or .cmd
37465    if test -f "${new_path}.exe"; then
37466      input_to_shortpath="${new_path}.exe"
37467    elif test -f "${new_path}.cmd"; then
37468      input_to_shortpath="${new_path}.cmd"
37469    else
37470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37471$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37474      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37475    fi
37476  else
37477    input_to_shortpath="$new_path"
37478  fi
37479
37480  # Call helper function which possibly converts this using DOS-style short mode.
37481  # If so, the updated path is stored in $new_path.
37482  new_path="$input_to_shortpath"
37483
37484  input_path="$input_to_shortpath"
37485  # Check if we need to convert this using DOS-style short mode. If the path
37486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37487  # take no chances and rewrite it.
37488  # Note: m4 eats our [], so we need to use [ and ] instead.
37489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37490  if test "x$has_forbidden_chars" != x; then
37491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37495      # Going to short mode and back again did indeed matter. Since short mode is
37496      # case insensitive, let's make it lowercase to improve readability.
37497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37498      # Now convert it back to Unix-style (cygpath)
37499      input_path=`$CYGPATH -u "$shortmode_path"`
37500      new_path="$input_path"
37501    fi
37502  fi
37503
37504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37505  if test "x$test_cygdrive_prefix" = x; then
37506    # As a simple fix, exclude /usr/bin since it's not a real path.
37507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37509      # a path prefixed by /cygdrive for fixpath to work.
37510      new_path="$CYGWIN_ROOT_PATH$input_path"
37511    fi
37512  fi
37513
37514  # remove trailing .exe if any
37515  new_path="${new_path/%.exe/}"
37516
37517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37518
37519  # First separate the path from the arguments. This will split at the first
37520  # space.
37521  complete="$LIPO"
37522  path="${complete%% *}"
37523  tmp="$complete EOL"
37524  arguments="${tmp#* }"
37525
37526  # Input might be given as Windows format, start by converting to
37527  # unix format.
37528  new_path="$path"
37529
37530  windows_path="$new_path"
37531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37532    unix_path=`$CYGPATH -u "$windows_path"`
37533    new_path="$unix_path"
37534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37536    new_path="$unix_path"
37537  fi
37538
37539
37540  # Now try to locate executable using which
37541  new_path=`$WHICH "$new_path" 2> /dev/null`
37542
37543  if test "x$new_path" = x; then
37544    # Oops. Which didn't find the executable.
37545    # The splitting of arguments from the executable at a space might have been incorrect,
37546    # since paths with space are more likely in Windows. Give it another try with the whole
37547    # argument.
37548    path="$complete"
37549    arguments="EOL"
37550    new_path="$path"
37551
37552  windows_path="$new_path"
37553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37554    unix_path=`$CYGPATH -u "$windows_path"`
37555    new_path="$unix_path"
37556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37558    new_path="$unix_path"
37559  fi
37560
37561
37562    new_path=`$WHICH "$new_path" 2> /dev/null`
37563    # bat and cmd files are not always considered executable in MSYS causing which
37564    # to not find them
37565    if test "x$new_path" = x \
37566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37568      new_path="$path"
37569
37570  windows_path="$new_path"
37571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37572    unix_path=`$CYGPATH -u "$windows_path"`
37573    new_path="$unix_path"
37574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37576    new_path="$unix_path"
37577  fi
37578
37579    fi
37580
37581    if test "x$new_path" = x; then
37582      # It's still not found. Now this is an unrecoverable error.
37583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37584$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37585      has_space=`$ECHO "$complete" | $GREP " "`
37586      if test "x$has_space" != x; then
37587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37589      fi
37590      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37591    fi
37592  fi
37593
37594  # Now new_path has a complete unix path to the binary
37595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37596    # Keep paths in /bin as-is, but remove trailing .exe if any
37597    new_path="${new_path/%.exe/}"
37598    # Do not save /bin paths to all_fixpath_prefixes!
37599  else
37600    # Not in mixed or Windows style, start by that.
37601    new_path=`cmd //c echo $new_path`
37602
37603  input_path="$new_path"
37604  # Check if we need to convert this using DOS-style short mode. If the path
37605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37606  # take no chances and rewrite it.
37607  # Note: m4 eats our [], so we need to use [ and ] instead.
37608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37609  if test "x$has_forbidden_chars" != x; then
37610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37612  fi
37613
37614    # Output is in $new_path
37615
37616  windows_path="$new_path"
37617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37618    unix_path=`$CYGPATH -u "$windows_path"`
37619    new_path="$unix_path"
37620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37622    new_path="$unix_path"
37623  fi
37624
37625    # remove trailing .exe if any
37626    new_path="${new_path/%.exe/}"
37627
37628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37630  fi
37631
37632    else
37633      # We're on a unix platform. Hooray! :)
37634      # First separate the path from the arguments. This will split at the first
37635      # space.
37636      complete="$LIPO"
37637      path="${complete%% *}"
37638      tmp="$complete EOL"
37639      arguments="${tmp#* }"
37640
37641      # Cannot rely on the command "which" here since it doesn't always work.
37642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37643      if test -z "$is_absolute_path"; then
37644        # Path to executable is not absolute. Find it.
37645        IFS_save="$IFS"
37646        IFS=:
37647        for p in $PATH; do
37648          if test -f "$p/$path" && test -x "$p/$path"; then
37649            new_path="$p/$path"
37650            break
37651          fi
37652        done
37653        IFS="$IFS_save"
37654      else
37655        # This is an absolute path, we can use it without further modifications.
37656        new_path="$path"
37657      fi
37658
37659      if test "x$new_path" = x; then
37660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37661$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37662        has_space=`$ECHO "$complete" | $GREP " "`
37663        if test "x$has_space" != x; then
37664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37666        fi
37667        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37668      fi
37669    fi
37670
37671    # Now join together the path and the arguments once again
37672    if test "x$arguments" != xEOL; then
37673      new_complete="$new_path ${arguments% *}"
37674    else
37675      new_complete="$new_path"
37676    fi
37677
37678    if test "x$complete" != "x$new_complete"; then
37679      LIPO="$new_complete"
37680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37681$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37682    fi
37683  fi
37684
37685  fi
37686
37687  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37688    # Extract the first word of "mt", so it can be a program name with args.
37689set dummy mt; ac_word=$2
37690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37691$as_echo_n "checking for $ac_word... " >&6; }
37692if ${ac_cv_prog_MT+:} false; then :
37693  $as_echo_n "(cached) " >&6
37694else
37695  if test -n "$MT"; then
37696  ac_cv_prog_MT="$MT" # Let the user override the test.
37697else
37698  ac_prog_rejected=no
37699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37707       ac_prog_rejected=yes
37708       continue
37709     fi
37710    ac_cv_prog_MT="mt"
37711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37712    break 2
37713  fi
37714done
37715  done
37716IFS=$as_save_IFS
37717
37718if test $ac_prog_rejected = yes; then
37719  # We found a bogon in the path, so make sure we never use it.
37720  set dummy $ac_cv_prog_MT
37721  shift
37722  if test $# != 0; then
37723    # We chose a different compiler from the bogus one.
37724    # However, it has the same basename, so the bogon will be chosen
37725    # first if we set MT to just the basename; use the full file name.
37726    shift
37727    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37728  fi
37729fi
37730fi
37731fi
37732MT=$ac_cv_prog_MT
37733if test -n "$MT"; then
37734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37735$as_echo "$MT" >&6; }
37736else
37737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37738$as_echo "no" >&6; }
37739fi
37740
37741
37742
37743  # Only process if variable expands to non-empty
37744
37745  if test "x$MT" != x; then
37746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37747
37748  # First separate the path from the arguments. This will split at the first
37749  # space.
37750  complete="$MT"
37751  path="${complete%% *}"
37752  tmp="$complete EOL"
37753  arguments="${tmp#* }"
37754
37755  # Input might be given as Windows format, start by converting to
37756  # unix format.
37757  new_path=`$CYGPATH -u "$path"`
37758
37759  # Now try to locate executable using which
37760  new_path=`$WHICH "$new_path" 2> /dev/null`
37761  # bat and cmd files are not always considered executable in cygwin causing which
37762  # to not find them
37763  if test "x$new_path" = x \
37764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37766    new_path=`$CYGPATH -u "$path"`
37767  fi
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=`$CYGPATH -u "$path"`
37776    new_path=`$WHICH "$new_path" 2> /dev/null`
37777    # bat and cmd files are not always considered executable in cygwin causing which
37778    # to not find them
37779    if test "x$new_path" = x \
37780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37782      new_path=`$CYGPATH -u "$path"`
37783    fi
37784    if test "x$new_path" = x; then
37785      # It's still not found. Now this is an unrecoverable error.
37786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37787$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37788      has_space=`$ECHO "$complete" | $GREP " "`
37789      if test "x$has_space" != x; then
37790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37792      fi
37793      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37794    fi
37795  fi
37796
37797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37800  # "foo.exe" is OK but "foo" is an error.
37801  #
37802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37803  # It is also a way to make sure we got the proper file name for the real test later on.
37804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37805  if test "x$test_shortpath" = x; then
37806    # Short path failed, file does not exist as specified.
37807    # Try adding .exe or .cmd
37808    if test -f "${new_path}.exe"; then
37809      input_to_shortpath="${new_path}.exe"
37810    elif test -f "${new_path}.cmd"; then
37811      input_to_shortpath="${new_path}.cmd"
37812    else
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37814$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37817      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37818    fi
37819  else
37820    input_to_shortpath="$new_path"
37821  fi
37822
37823  # Call helper function which possibly converts this using DOS-style short mode.
37824  # If so, the updated path is stored in $new_path.
37825  new_path="$input_to_shortpath"
37826
37827  input_path="$input_to_shortpath"
37828  # Check if we need to convert this using DOS-style short mode. If the path
37829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37830  # take no chances and rewrite it.
37831  # Note: m4 eats our [], so we need to use [ and ] instead.
37832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37833  if test "x$has_forbidden_chars" != x; then
37834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37838      # Going to short mode and back again did indeed matter. Since short mode is
37839      # case insensitive, let's make it lowercase to improve readability.
37840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37841      # Now convert it back to Unix-style (cygpath)
37842      input_path=`$CYGPATH -u "$shortmode_path"`
37843      new_path="$input_path"
37844    fi
37845  fi
37846
37847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37848  if test "x$test_cygdrive_prefix" = x; then
37849    # As a simple fix, exclude /usr/bin since it's not a real path.
37850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37852      # a path prefixed by /cygdrive for fixpath to work.
37853      new_path="$CYGWIN_ROOT_PATH$input_path"
37854    fi
37855  fi
37856
37857  # remove trailing .exe if any
37858  new_path="${new_path/%.exe/}"
37859
37860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37861
37862  # First separate the path from the arguments. This will split at the first
37863  # space.
37864  complete="$MT"
37865  path="${complete%% *}"
37866  tmp="$complete EOL"
37867  arguments="${tmp#* }"
37868
37869  # Input might be given as Windows format, start by converting to
37870  # unix format.
37871  new_path="$path"
37872
37873  windows_path="$new_path"
37874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37875    unix_path=`$CYGPATH -u "$windows_path"`
37876    new_path="$unix_path"
37877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37879    new_path="$unix_path"
37880  fi
37881
37882
37883  # Now try to locate executable using which
37884  new_path=`$WHICH "$new_path" 2> /dev/null`
37885
37886  if test "x$new_path" = x; then
37887    # Oops. Which didn't find the executable.
37888    # The splitting of arguments from the executable at a space might have been incorrect,
37889    # since paths with space are more likely in Windows. Give it another try with the whole
37890    # argument.
37891    path="$complete"
37892    arguments="EOL"
37893    new_path="$path"
37894
37895  windows_path="$new_path"
37896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37897    unix_path=`$CYGPATH -u "$windows_path"`
37898    new_path="$unix_path"
37899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37901    new_path="$unix_path"
37902  fi
37903
37904
37905    new_path=`$WHICH "$new_path" 2> /dev/null`
37906    # bat and cmd files are not always considered executable in MSYS causing which
37907    # to not find them
37908    if test "x$new_path" = x \
37909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37911      new_path="$path"
37912
37913  windows_path="$new_path"
37914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37915    unix_path=`$CYGPATH -u "$windows_path"`
37916    new_path="$unix_path"
37917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37919    new_path="$unix_path"
37920  fi
37921
37922    fi
37923
37924    if test "x$new_path" = x; then
37925      # It's still not found. Now this is an unrecoverable error.
37926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37927$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37928      has_space=`$ECHO "$complete" | $GREP " "`
37929      if test "x$has_space" != x; then
37930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37932      fi
37933      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37934    fi
37935  fi
37936
37937  # Now new_path has a complete unix path to the binary
37938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37939    # Keep paths in /bin as-is, but remove trailing .exe if any
37940    new_path="${new_path/%.exe/}"
37941    # Do not save /bin paths to all_fixpath_prefixes!
37942  else
37943    # Not in mixed or Windows style, start by that.
37944    new_path=`cmd //c echo $new_path`
37945
37946  input_path="$new_path"
37947  # Check if we need to convert this using DOS-style short mode. If the path
37948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37949  # take no chances and rewrite it.
37950  # Note: m4 eats our [], so we need to use [ and ] instead.
37951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37952  if test "x$has_forbidden_chars" != x; then
37953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37955  fi
37956
37957    # Output is in $new_path
37958
37959  windows_path="$new_path"
37960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37961    unix_path=`$CYGPATH -u "$windows_path"`
37962    new_path="$unix_path"
37963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37965    new_path="$unix_path"
37966  fi
37967
37968    # remove trailing .exe if any
37969    new_path="${new_path/%.exe/}"
37970
37971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37973  fi
37974
37975    else
37976      # We're on a unix platform. Hooray! :)
37977      # First separate the path from the arguments. This will split at the first
37978      # space.
37979      complete="$MT"
37980      path="${complete%% *}"
37981      tmp="$complete EOL"
37982      arguments="${tmp#* }"
37983
37984      # Cannot rely on the command "which" here since it doesn't always work.
37985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37986      if test -z "$is_absolute_path"; then
37987        # Path to executable is not absolute. Find it.
37988        IFS_save="$IFS"
37989        IFS=:
37990        for p in $PATH; do
37991          if test -f "$p/$path" && test -x "$p/$path"; then
37992            new_path="$p/$path"
37993            break
37994          fi
37995        done
37996        IFS="$IFS_save"
37997      else
37998        # This is an absolute path, we can use it without further modifications.
37999        new_path="$path"
38000      fi
38001
38002      if test "x$new_path" = x; then
38003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38004$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38005        has_space=`$ECHO "$complete" | $GREP " "`
38006        if test "x$has_space" != x; then
38007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38009        fi
38010        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38011      fi
38012    fi
38013
38014    # Now join together the path and the arguments once again
38015    if test "x$arguments" != xEOL; then
38016      new_complete="$new_path ${arguments% *}"
38017    else
38018      new_complete="$new_path"
38019    fi
38020
38021    if test "x$complete" != "x$new_complete"; then
38022      MT="$new_complete"
38023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38024$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38025    fi
38026  fi
38027
38028    # Setup the resource compiler (RC)
38029    # Extract the first word of "rc", so it can be a program name with args.
38030set dummy rc; ac_word=$2
38031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38032$as_echo_n "checking for $ac_word... " >&6; }
38033if ${ac_cv_prog_RC+:} false; then :
38034  $as_echo_n "(cached) " >&6
38035else
38036  if test -n "$RC"; then
38037  ac_cv_prog_RC="$RC" # Let the user override the test.
38038else
38039  ac_prog_rejected=no
38040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38041for as_dir in $PATH
38042do
38043  IFS=$as_save_IFS
38044  test -z "$as_dir" && as_dir=.
38045    for ac_exec_ext in '' $ac_executable_extensions; do
38046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38047    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38048       ac_prog_rejected=yes
38049       continue
38050     fi
38051    ac_cv_prog_RC="rc"
38052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38053    break 2
38054  fi
38055done
38056  done
38057IFS=$as_save_IFS
38058
38059if test $ac_prog_rejected = yes; then
38060  # We found a bogon in the path, so make sure we never use it.
38061  set dummy $ac_cv_prog_RC
38062  shift
38063  if test $# != 0; then
38064    # We chose a different compiler from the bogus one.
38065    # However, it has the same basename, so the bogon will be chosen
38066    # first if we set RC to just the basename; use the full file name.
38067    shift
38068    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38069  fi
38070fi
38071fi
38072fi
38073RC=$ac_cv_prog_RC
38074if test -n "$RC"; then
38075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38076$as_echo "$RC" >&6; }
38077else
38078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38079$as_echo "no" >&6; }
38080fi
38081
38082
38083
38084  # Only process if variable expands to non-empty
38085
38086  if test "x$RC" != x; then
38087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38088
38089  # First separate the path from the arguments. This will split at the first
38090  # space.
38091  complete="$RC"
38092  path="${complete%% *}"
38093  tmp="$complete EOL"
38094  arguments="${tmp#* }"
38095
38096  # Input might be given as Windows format, start by converting to
38097  # unix format.
38098  new_path=`$CYGPATH -u "$path"`
38099
38100  # Now try to locate executable using which
38101  new_path=`$WHICH "$new_path" 2> /dev/null`
38102  # bat and cmd files are not always considered executable in cygwin causing which
38103  # to not find them
38104  if test "x$new_path" = x \
38105      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38106      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38107    new_path=`$CYGPATH -u "$path"`
38108  fi
38109  if test "x$new_path" = x; then
38110    # Oops. Which didn't find the executable.
38111    # The splitting of arguments from the executable at a space might have been incorrect,
38112    # since paths with space are more likely in Windows. Give it another try with the whole
38113    # argument.
38114    path="$complete"
38115    arguments="EOL"
38116    new_path=`$CYGPATH -u "$path"`
38117    new_path=`$WHICH "$new_path" 2> /dev/null`
38118    # bat and cmd files are not always considered executable in cygwin causing which
38119    # to not find them
38120    if test "x$new_path" = x \
38121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38123      new_path=`$CYGPATH -u "$path"`
38124    fi
38125    if test "x$new_path" = x; then
38126      # It's still not found. Now this is an unrecoverable error.
38127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38128$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38129      has_space=`$ECHO "$complete" | $GREP " "`
38130      if test "x$has_space" != x; then
38131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38133      fi
38134      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38135    fi
38136  fi
38137
38138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38141  # "foo.exe" is OK but "foo" is an error.
38142  #
38143  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38144  # It is also a way to make sure we got the proper file name for the real test later on.
38145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38146  if test "x$test_shortpath" = x; then
38147    # Short path failed, file does not exist as specified.
38148    # Try adding .exe or .cmd
38149    if test -f "${new_path}.exe"; then
38150      input_to_shortpath="${new_path}.exe"
38151    elif test -f "${new_path}.cmd"; then
38152      input_to_shortpath="${new_path}.cmd"
38153    else
38154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38155$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38156      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38157$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38158      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38159    fi
38160  else
38161    input_to_shortpath="$new_path"
38162  fi
38163
38164  # Call helper function which possibly converts this using DOS-style short mode.
38165  # If so, the updated path is stored in $new_path.
38166  new_path="$input_to_shortpath"
38167
38168  input_path="$input_to_shortpath"
38169  # Check if we need to convert this using DOS-style short mode. If the path
38170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38171  # take no chances and rewrite it.
38172  # Note: m4 eats our [], so we need to use [ and ] instead.
38173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38174  if test "x$has_forbidden_chars" != x; then
38175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38179      # Going to short mode and back again did indeed matter. Since short mode is
38180      # case insensitive, let's make it lowercase to improve readability.
38181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38182      # Now convert it back to Unix-style (cygpath)
38183      input_path=`$CYGPATH -u "$shortmode_path"`
38184      new_path="$input_path"
38185    fi
38186  fi
38187
38188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38189  if test "x$test_cygdrive_prefix" = x; then
38190    # As a simple fix, exclude /usr/bin since it's not a real path.
38191    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38193      # a path prefixed by /cygdrive for fixpath to work.
38194      new_path="$CYGWIN_ROOT_PATH$input_path"
38195    fi
38196  fi
38197
38198  # remove trailing .exe if any
38199  new_path="${new_path/%.exe/}"
38200
38201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38202
38203  # First separate the path from the arguments. This will split at the first
38204  # space.
38205  complete="$RC"
38206  path="${complete%% *}"
38207  tmp="$complete EOL"
38208  arguments="${tmp#* }"
38209
38210  # Input might be given as Windows format, start by converting to
38211  # unix format.
38212  new_path="$path"
38213
38214  windows_path="$new_path"
38215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38216    unix_path=`$CYGPATH -u "$windows_path"`
38217    new_path="$unix_path"
38218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38220    new_path="$unix_path"
38221  fi
38222
38223
38224  # Now try to locate executable using which
38225  new_path=`$WHICH "$new_path" 2> /dev/null`
38226
38227  if test "x$new_path" = x; then
38228    # Oops. Which didn't find the executable.
38229    # The splitting of arguments from the executable at a space might have been incorrect,
38230    # since paths with space are more likely in Windows. Give it another try with the whole
38231    # argument.
38232    path="$complete"
38233    arguments="EOL"
38234    new_path="$path"
38235
38236  windows_path="$new_path"
38237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38238    unix_path=`$CYGPATH -u "$windows_path"`
38239    new_path="$unix_path"
38240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38242    new_path="$unix_path"
38243  fi
38244
38245
38246    new_path=`$WHICH "$new_path" 2> /dev/null`
38247    # bat and cmd files are not always considered executable in MSYS causing which
38248    # to not find them
38249    if test "x$new_path" = x \
38250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38252      new_path="$path"
38253
38254  windows_path="$new_path"
38255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38256    unix_path=`$CYGPATH -u "$windows_path"`
38257    new_path="$unix_path"
38258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38260    new_path="$unix_path"
38261  fi
38262
38263    fi
38264
38265    if test "x$new_path" = x; then
38266      # It's still not found. Now this is an unrecoverable error.
38267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38268$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38269      has_space=`$ECHO "$complete" | $GREP " "`
38270      if test "x$has_space" != x; then
38271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38273      fi
38274      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38275    fi
38276  fi
38277
38278  # Now new_path has a complete unix path to the binary
38279  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38280    # Keep paths in /bin as-is, but remove trailing .exe if any
38281    new_path="${new_path/%.exe/}"
38282    # Do not save /bin paths to all_fixpath_prefixes!
38283  else
38284    # Not in mixed or Windows style, start by that.
38285    new_path=`cmd //c echo $new_path`
38286
38287  input_path="$new_path"
38288  # Check if we need to convert this using DOS-style short mode. If the path
38289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38290  # take no chances and rewrite it.
38291  # Note: m4 eats our [], so we need to use [ and ] instead.
38292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38293  if test "x$has_forbidden_chars" != x; then
38294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38296  fi
38297
38298    # Output is in $new_path
38299
38300  windows_path="$new_path"
38301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38302    unix_path=`$CYGPATH -u "$windows_path"`
38303    new_path="$unix_path"
38304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38306    new_path="$unix_path"
38307  fi
38308
38309    # remove trailing .exe if any
38310    new_path="${new_path/%.exe/}"
38311
38312    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38313    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38314  fi
38315
38316    else
38317      # We're on a unix platform. Hooray! :)
38318      # First separate the path from the arguments. This will split at the first
38319      # space.
38320      complete="$RC"
38321      path="${complete%% *}"
38322      tmp="$complete EOL"
38323      arguments="${tmp#* }"
38324
38325      # Cannot rely on the command "which" here since it doesn't always work.
38326      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38327      if test -z "$is_absolute_path"; then
38328        # Path to executable is not absolute. Find it.
38329        IFS_save="$IFS"
38330        IFS=:
38331        for p in $PATH; do
38332          if test -f "$p/$path" && test -x "$p/$path"; then
38333            new_path="$p/$path"
38334            break
38335          fi
38336        done
38337        IFS="$IFS_save"
38338      else
38339        # This is an absolute path, we can use it without further modifications.
38340        new_path="$path"
38341      fi
38342
38343      if test "x$new_path" = x; then
38344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38345$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38346        has_space=`$ECHO "$complete" | $GREP " "`
38347        if test "x$has_space" != x; then
38348          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38350        fi
38351        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38352      fi
38353    fi
38354
38355    # Now join together the path and the arguments once again
38356    if test "x$arguments" != xEOL; then
38357      new_complete="$new_path ${arguments% *}"
38358    else
38359      new_complete="$new_path"
38360    fi
38361
38362    if test "x$complete" != "x$new_complete"; then
38363      RC="$new_complete"
38364      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38365$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38366    fi
38367  fi
38368
38369    # Extract the first word of "dumpbin", so it can be a program name with args.
38370set dummy dumpbin; ac_word=$2
38371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38372$as_echo_n "checking for $ac_word... " >&6; }
38373if ${ac_cv_prog_DUMPBIN+:} false; then :
38374  $as_echo_n "(cached) " >&6
38375else
38376  if test -n "$DUMPBIN"; then
38377  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38378else
38379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38380for as_dir in $PATH
38381do
38382  IFS=$as_save_IFS
38383  test -z "$as_dir" && as_dir=.
38384    for ac_exec_ext in '' $ac_executable_extensions; do
38385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38386    ac_cv_prog_DUMPBIN="dumpbin"
38387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38388    break 2
38389  fi
38390done
38391  done
38392IFS=$as_save_IFS
38393
38394fi
38395fi
38396DUMPBIN=$ac_cv_prog_DUMPBIN
38397if test -n "$DUMPBIN"; then
38398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38399$as_echo "$DUMPBIN" >&6; }
38400else
38401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38402$as_echo "no" >&6; }
38403fi
38404
38405
38406
38407  # Only process if variable expands to non-empty
38408
38409  if test "x$DUMPBIN" != x; then
38410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38411
38412  # First separate the path from the arguments. This will split at the first
38413  # space.
38414  complete="$DUMPBIN"
38415  path="${complete%% *}"
38416  tmp="$complete EOL"
38417  arguments="${tmp#* }"
38418
38419  # Input might be given as Windows format, start by converting to
38420  # unix format.
38421  new_path=`$CYGPATH -u "$path"`
38422
38423  # Now try to locate executable using which
38424  new_path=`$WHICH "$new_path" 2> /dev/null`
38425  # bat and cmd files are not always considered executable in cygwin causing which
38426  # to not find them
38427  if test "x$new_path" = x \
38428      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38429      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38430    new_path=`$CYGPATH -u "$path"`
38431  fi
38432  if test "x$new_path" = x; then
38433    # Oops. Which didn't find the executable.
38434    # The splitting of arguments from the executable at a space might have been incorrect,
38435    # since paths with space are more likely in Windows. Give it another try with the whole
38436    # argument.
38437    path="$complete"
38438    arguments="EOL"
38439    new_path=`$CYGPATH -u "$path"`
38440    new_path=`$WHICH "$new_path" 2> /dev/null`
38441    # bat and cmd files are not always considered executable in cygwin causing which
38442    # to not find them
38443    if test "x$new_path" = x \
38444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38446      new_path=`$CYGPATH -u "$path"`
38447    fi
38448    if test "x$new_path" = x; then
38449      # It's still not found. Now this is an unrecoverable error.
38450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38451$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38452      has_space=`$ECHO "$complete" | $GREP " "`
38453      if test "x$has_space" != x; then
38454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38456      fi
38457      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38458    fi
38459  fi
38460
38461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38464  # "foo.exe" is OK but "foo" is an error.
38465  #
38466  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38467  # It is also a way to make sure we got the proper file name for the real test later on.
38468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38469  if test "x$test_shortpath" = x; then
38470    # Short path failed, file does not exist as specified.
38471    # Try adding .exe or .cmd
38472    if test -f "${new_path}.exe"; then
38473      input_to_shortpath="${new_path}.exe"
38474    elif test -f "${new_path}.cmd"; then
38475      input_to_shortpath="${new_path}.cmd"
38476    else
38477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38478$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38479      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38480$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38481      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38482    fi
38483  else
38484    input_to_shortpath="$new_path"
38485  fi
38486
38487  # Call helper function which possibly converts this using DOS-style short mode.
38488  # If so, the updated path is stored in $new_path.
38489  new_path="$input_to_shortpath"
38490
38491  input_path="$input_to_shortpath"
38492  # Check if we need to convert this using DOS-style short mode. If the path
38493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38494  # take no chances and rewrite it.
38495  # Note: m4 eats our [], so we need to use [ and ] instead.
38496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38497  if test "x$has_forbidden_chars" != x; then
38498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38502      # Going to short mode and back again did indeed matter. Since short mode is
38503      # case insensitive, let's make it lowercase to improve readability.
38504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38505      # Now convert it back to Unix-style (cygpath)
38506      input_path=`$CYGPATH -u "$shortmode_path"`
38507      new_path="$input_path"
38508    fi
38509  fi
38510
38511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38512  if test "x$test_cygdrive_prefix" = x; then
38513    # As a simple fix, exclude /usr/bin since it's not a real path.
38514    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38516      # a path prefixed by /cygdrive for fixpath to work.
38517      new_path="$CYGWIN_ROOT_PATH$input_path"
38518    fi
38519  fi
38520
38521  # remove trailing .exe if any
38522  new_path="${new_path/%.exe/}"
38523
38524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38525
38526  # First separate the path from the arguments. This will split at the first
38527  # space.
38528  complete="$DUMPBIN"
38529  path="${complete%% *}"
38530  tmp="$complete EOL"
38531  arguments="${tmp#* }"
38532
38533  # Input might be given as Windows format, start by converting to
38534  # unix format.
38535  new_path="$path"
38536
38537  windows_path="$new_path"
38538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38539    unix_path=`$CYGPATH -u "$windows_path"`
38540    new_path="$unix_path"
38541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38543    new_path="$unix_path"
38544  fi
38545
38546
38547  # Now try to locate executable using which
38548  new_path=`$WHICH "$new_path" 2> /dev/null`
38549
38550  if test "x$new_path" = x; then
38551    # Oops. Which didn't find the executable.
38552    # The splitting of arguments from the executable at a space might have been incorrect,
38553    # since paths with space are more likely in Windows. Give it another try with the whole
38554    # argument.
38555    path="$complete"
38556    arguments="EOL"
38557    new_path="$path"
38558
38559  windows_path="$new_path"
38560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38561    unix_path=`$CYGPATH -u "$windows_path"`
38562    new_path="$unix_path"
38563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38565    new_path="$unix_path"
38566  fi
38567
38568
38569    new_path=`$WHICH "$new_path" 2> /dev/null`
38570    # bat and cmd files are not always considered executable in MSYS causing which
38571    # to not find them
38572    if test "x$new_path" = x \
38573        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38574        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38575      new_path="$path"
38576
38577  windows_path="$new_path"
38578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38579    unix_path=`$CYGPATH -u "$windows_path"`
38580    new_path="$unix_path"
38581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38583    new_path="$unix_path"
38584  fi
38585
38586    fi
38587
38588    if test "x$new_path" = x; then
38589      # It's still not found. Now this is an unrecoverable error.
38590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38591$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38592      has_space=`$ECHO "$complete" | $GREP " "`
38593      if test "x$has_space" != x; then
38594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38596      fi
38597      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38598    fi
38599  fi
38600
38601  # Now new_path has a complete unix path to the binary
38602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38603    # Keep paths in /bin as-is, but remove trailing .exe if any
38604    new_path="${new_path/%.exe/}"
38605    # Do not save /bin paths to all_fixpath_prefixes!
38606  else
38607    # Not in mixed or Windows style, start by that.
38608    new_path=`cmd //c echo $new_path`
38609
38610  input_path="$new_path"
38611  # Check if we need to convert this using DOS-style short mode. If the path
38612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38613  # take no chances and rewrite it.
38614  # Note: m4 eats our [], so we need to use [ and ] instead.
38615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38616  if test "x$has_forbidden_chars" != x; then
38617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38619  fi
38620
38621    # Output is in $new_path
38622
38623  windows_path="$new_path"
38624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38625    unix_path=`$CYGPATH -u "$windows_path"`
38626    new_path="$unix_path"
38627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38629    new_path="$unix_path"
38630  fi
38631
38632    # remove trailing .exe if any
38633    new_path="${new_path/%.exe/}"
38634
38635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38637  fi
38638
38639    else
38640      # We're on a unix platform. Hooray! :)
38641      # First separate the path from the arguments. This will split at the first
38642      # space.
38643      complete="$DUMPBIN"
38644      path="${complete%% *}"
38645      tmp="$complete EOL"
38646      arguments="${tmp#* }"
38647
38648      # Cannot rely on the command "which" here since it doesn't always work.
38649      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38650      if test -z "$is_absolute_path"; then
38651        # Path to executable is not absolute. Find it.
38652        IFS_save="$IFS"
38653        IFS=:
38654        for p in $PATH; do
38655          if test -f "$p/$path" && test -x "$p/$path"; then
38656            new_path="$p/$path"
38657            break
38658          fi
38659        done
38660        IFS="$IFS_save"
38661      else
38662        # This is an absolute path, we can use it without further modifications.
38663        new_path="$path"
38664      fi
38665
38666      if test "x$new_path" = x; then
38667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38668$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38669        has_space=`$ECHO "$complete" | $GREP " "`
38670        if test "x$has_space" != x; then
38671          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38673        fi
38674        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38675      fi
38676    fi
38677
38678    # Now join together the path and the arguments once again
38679    if test "x$arguments" != xEOL; then
38680      new_complete="$new_path ${arguments% *}"
38681    else
38682      new_complete="$new_path"
38683    fi
38684
38685    if test "x$complete" != "x$new_complete"; then
38686      DUMPBIN="$new_complete"
38687      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38688$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38689    fi
38690  fi
38691
38692    # We need to check for 'msbuild.exe' because at the place where we expect to
38693    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38694    # won't find the 'msbuild.exe' executable in that case (and the
38695    # 'ac_executable_extensions' is unusable due to performance reasons).
38696    # Notice that we intentionally don't fix up the path to MSBUILD because we
38697    # will call it in a DOS shell during freetype detection on Windows (see
38698    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38699    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38700set dummy msbuild.exe; ac_word=$2
38701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38702$as_echo_n "checking for $ac_word... " >&6; }
38703if ${ac_cv_prog_MSBUILD+:} false; then :
38704  $as_echo_n "(cached) " >&6
38705else
38706  if test -n "$MSBUILD"; then
38707  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38708else
38709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38710for as_dir in $PATH
38711do
38712  IFS=$as_save_IFS
38713  test -z "$as_dir" && as_dir=.
38714    for ac_exec_ext in '' $ac_executable_extensions; do
38715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38716    ac_cv_prog_MSBUILD="msbuild.exe"
38717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38718    break 2
38719  fi
38720done
38721  done
38722IFS=$as_save_IFS
38723
38724fi
38725fi
38726MSBUILD=$ac_cv_prog_MSBUILD
38727if test -n "$MSBUILD"; then
38728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38729$as_echo "$MSBUILD" >&6; }
38730else
38731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38732$as_echo "no" >&6; }
38733fi
38734
38735
38736  fi
38737
38738  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38739
38740
38741  # Publish this variable in the help.
38742
38743
38744  if [ -z "${STRIP+x}" ]; then
38745    # The variable is not set by user, try to locate tool using the code snippet
38746    for ac_prog in strip
38747do
38748  # Extract the first word of "$ac_prog", so it can be a program name with args.
38749set dummy $ac_prog; ac_word=$2
38750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38751$as_echo_n "checking for $ac_word... " >&6; }
38752if ${ac_cv_path_STRIP+:} false; then :
38753  $as_echo_n "(cached) " >&6
38754else
38755  case $STRIP in
38756  [\\/]* | ?:[\\/]*)
38757  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38758  ;;
38759  *)
38760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38761for as_dir in $PATH
38762do
38763  IFS=$as_save_IFS
38764  test -z "$as_dir" && as_dir=.
38765    for ac_exec_ext in '' $ac_executable_extensions; do
38766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38767    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38769    break 2
38770  fi
38771done
38772  done
38773IFS=$as_save_IFS
38774
38775  ;;
38776esac
38777fi
38778STRIP=$ac_cv_path_STRIP
38779if test -n "$STRIP"; then
38780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38781$as_echo "$STRIP" >&6; }
38782else
38783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38784$as_echo "no" >&6; }
38785fi
38786
38787
38788  test -n "$STRIP" && break
38789done
38790
38791  else
38792    # The variable is set, but is it from the command line or the environment?
38793
38794    # Try to remove the string !STRIP! from our list.
38795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38797      # If it failed, the variable was not from the command line. Ignore it,
38798      # but warn the user (except for BASH, which is always set by the calling BASH).
38799      if test "xSTRIP" != xBASH; then
38800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38801$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38802      fi
38803      # Try to locate tool using the code snippet
38804      for ac_prog in strip
38805do
38806  # Extract the first word of "$ac_prog", so it can be a program name with args.
38807set dummy $ac_prog; ac_word=$2
38808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38809$as_echo_n "checking for $ac_word... " >&6; }
38810if ${ac_cv_path_STRIP+:} false; then :
38811  $as_echo_n "(cached) " >&6
38812else
38813  case $STRIP in
38814  [\\/]* | ?:[\\/]*)
38815  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38816  ;;
38817  *)
38818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38819for as_dir in $PATH
38820do
38821  IFS=$as_save_IFS
38822  test -z "$as_dir" && as_dir=.
38823    for ac_exec_ext in '' $ac_executable_extensions; do
38824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38825    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38827    break 2
38828  fi
38829done
38830  done
38831IFS=$as_save_IFS
38832
38833  ;;
38834esac
38835fi
38836STRIP=$ac_cv_path_STRIP
38837if test -n "$STRIP"; then
38838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38839$as_echo "$STRIP" >&6; }
38840else
38841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38842$as_echo "no" >&6; }
38843fi
38844
38845
38846  test -n "$STRIP" && break
38847done
38848
38849    else
38850      # If it succeeded, then it was overridden by the user. We will use it
38851      # for the tool.
38852
38853      # First remove it from the list of overridden variables, so we can test
38854      # for unknown variables in the end.
38855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38856
38857      # Check if we try to supply an empty value
38858      if test "x$STRIP" = x; then
38859        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38860$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38862$as_echo_n "checking for STRIP... " >&6; }
38863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38864$as_echo "disabled" >&6; }
38865      else
38866        # Check if the provided tool contains a complete path.
38867        tool_specified="$STRIP"
38868        tool_basename="${tool_specified##*/}"
38869        if test "x$tool_basename" = "x$tool_specified"; then
38870          # A command without a complete path is provided, search $PATH.
38871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38872$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38873          # Extract the first word of "$tool_basename", so it can be a program name with args.
38874set dummy $tool_basename; ac_word=$2
38875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38876$as_echo_n "checking for $ac_word... " >&6; }
38877if ${ac_cv_path_STRIP+:} false; then :
38878  $as_echo_n "(cached) " >&6
38879else
38880  case $STRIP in
38881  [\\/]* | ?:[\\/]*)
38882  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38883  ;;
38884  *)
38885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38886for as_dir in $PATH
38887do
38888  IFS=$as_save_IFS
38889  test -z "$as_dir" && as_dir=.
38890    for ac_exec_ext in '' $ac_executable_extensions; do
38891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38892    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38894    break 2
38895  fi
38896done
38897  done
38898IFS=$as_save_IFS
38899
38900  ;;
38901esac
38902fi
38903STRIP=$ac_cv_path_STRIP
38904if test -n "$STRIP"; then
38905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38906$as_echo "$STRIP" >&6; }
38907else
38908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38909$as_echo "no" >&6; }
38910fi
38911
38912
38913          if test "x$STRIP" = x; then
38914            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38915          fi
38916        else
38917          # Otherwise we believe it is a complete path. Use it as it is.
38918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38919$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38920          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38921$as_echo_n "checking for STRIP... " >&6; }
38922          if test ! -x "$tool_specified"; then
38923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38924$as_echo "not found" >&6; }
38925            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38926          fi
38927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38928$as_echo "$tool_specified" >&6; }
38929        fi
38930      fi
38931    fi
38932
38933  fi
38934
38935
38936
38937  # Only process if variable expands to non-empty
38938
38939  if test "x$STRIP" != x; then
38940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38941
38942  # First separate the path from the arguments. This will split at the first
38943  # space.
38944  complete="$STRIP"
38945  path="${complete%% *}"
38946  tmp="$complete EOL"
38947  arguments="${tmp#* }"
38948
38949  # Input might be given as Windows format, start by converting to
38950  # unix format.
38951  new_path=`$CYGPATH -u "$path"`
38952
38953  # Now try to locate executable using which
38954  new_path=`$WHICH "$new_path" 2> /dev/null`
38955  # bat and cmd files are not always considered executable in cygwin causing which
38956  # to not find them
38957  if test "x$new_path" = x \
38958      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38959      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38960    new_path=`$CYGPATH -u "$path"`
38961  fi
38962  if test "x$new_path" = x; then
38963    # Oops. Which didn't find the executable.
38964    # The splitting of arguments from the executable at a space might have been incorrect,
38965    # since paths with space are more likely in Windows. Give it another try with the whole
38966    # argument.
38967    path="$complete"
38968    arguments="EOL"
38969    new_path=`$CYGPATH -u "$path"`
38970    new_path=`$WHICH "$new_path" 2> /dev/null`
38971    # bat and cmd files are not always considered executable in cygwin causing which
38972    # to not find them
38973    if test "x$new_path" = x \
38974        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38975        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38976      new_path=`$CYGPATH -u "$path"`
38977    fi
38978    if test "x$new_path" = x; then
38979      # It's still not found. Now this is an unrecoverable error.
38980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38981$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38982      has_space=`$ECHO "$complete" | $GREP " "`
38983      if test "x$has_space" != x; then
38984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38986      fi
38987      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38988    fi
38989  fi
38990
38991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38994  # "foo.exe" is OK but "foo" is an error.
38995  #
38996  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38997  # It is also a way to make sure we got the proper file name for the real test later on.
38998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38999  if test "x$test_shortpath" = x; then
39000    # Short path failed, file does not exist as specified.
39001    # Try adding .exe or .cmd
39002    if test -f "${new_path}.exe"; then
39003      input_to_shortpath="${new_path}.exe"
39004    elif test -f "${new_path}.cmd"; then
39005      input_to_shortpath="${new_path}.cmd"
39006    else
39007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39008$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39009      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39011      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39012    fi
39013  else
39014    input_to_shortpath="$new_path"
39015  fi
39016
39017  # Call helper function which possibly converts this using DOS-style short mode.
39018  # If so, the updated path is stored in $new_path.
39019  new_path="$input_to_shortpath"
39020
39021  input_path="$input_to_shortpath"
39022  # Check if we need to convert this using DOS-style short mode. If the path
39023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39024  # take no chances and rewrite it.
39025  # Note: m4 eats our [], so we need to use [ and ] instead.
39026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39027  if test "x$has_forbidden_chars" != x; then
39028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39032      # Going to short mode and back again did indeed matter. Since short mode is
39033      # case insensitive, let's make it lowercase to improve readability.
39034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39035      # Now convert it back to Unix-style (cygpath)
39036      input_path=`$CYGPATH -u "$shortmode_path"`
39037      new_path="$input_path"
39038    fi
39039  fi
39040
39041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39042  if test "x$test_cygdrive_prefix" = x; then
39043    # As a simple fix, exclude /usr/bin since it's not a real path.
39044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39046      # a path prefixed by /cygdrive for fixpath to work.
39047      new_path="$CYGWIN_ROOT_PATH$input_path"
39048    fi
39049  fi
39050
39051  # remove trailing .exe if any
39052  new_path="${new_path/%.exe/}"
39053
39054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39055
39056  # First separate the path from the arguments. This will split at the first
39057  # space.
39058  complete="$STRIP"
39059  path="${complete%% *}"
39060  tmp="$complete EOL"
39061  arguments="${tmp#* }"
39062
39063  # Input might be given as Windows format, start by converting to
39064  # unix format.
39065  new_path="$path"
39066
39067  windows_path="$new_path"
39068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39069    unix_path=`$CYGPATH -u "$windows_path"`
39070    new_path="$unix_path"
39071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39073    new_path="$unix_path"
39074  fi
39075
39076
39077  # Now try to locate executable using which
39078  new_path=`$WHICH "$new_path" 2> /dev/null`
39079
39080  if test "x$new_path" = x; then
39081    # Oops. Which didn't find the executable.
39082    # The splitting of arguments from the executable at a space might have been incorrect,
39083    # since paths with space are more likely in Windows. Give it another try with the whole
39084    # argument.
39085    path="$complete"
39086    arguments="EOL"
39087    new_path="$path"
39088
39089  windows_path="$new_path"
39090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39091    unix_path=`$CYGPATH -u "$windows_path"`
39092    new_path="$unix_path"
39093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39095    new_path="$unix_path"
39096  fi
39097
39098
39099    new_path=`$WHICH "$new_path" 2> /dev/null`
39100    # bat and cmd files are not always considered executable in MSYS causing which
39101    # to not find them
39102    if test "x$new_path" = x \
39103        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39104        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39105      new_path="$path"
39106
39107  windows_path="$new_path"
39108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39109    unix_path=`$CYGPATH -u "$windows_path"`
39110    new_path="$unix_path"
39111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39113    new_path="$unix_path"
39114  fi
39115
39116    fi
39117
39118    if test "x$new_path" = x; then
39119      # It's still not found. Now this is an unrecoverable error.
39120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39121$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39122      has_space=`$ECHO "$complete" | $GREP " "`
39123      if test "x$has_space" != x; then
39124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39126      fi
39127      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39128    fi
39129  fi
39130
39131  # Now new_path has a complete unix path to the binary
39132  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39133    # Keep paths in /bin as-is, but remove trailing .exe if any
39134    new_path="${new_path/%.exe/}"
39135    # Do not save /bin paths to all_fixpath_prefixes!
39136  else
39137    # Not in mixed or Windows style, start by that.
39138    new_path=`cmd //c echo $new_path`
39139
39140  input_path="$new_path"
39141  # Check if we need to convert this using DOS-style short mode. If the path
39142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39143  # take no chances and rewrite it.
39144  # Note: m4 eats our [], so we need to use [ and ] instead.
39145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39146  if test "x$has_forbidden_chars" != x; then
39147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39149  fi
39150
39151    # Output is in $new_path
39152
39153  windows_path="$new_path"
39154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39155    unix_path=`$CYGPATH -u "$windows_path"`
39156    new_path="$unix_path"
39157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39159    new_path="$unix_path"
39160  fi
39161
39162    # remove trailing .exe if any
39163    new_path="${new_path/%.exe/}"
39164
39165    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39166    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39167  fi
39168
39169    else
39170      # We're on a unix platform. Hooray! :)
39171      # First separate the path from the arguments. This will split at the first
39172      # space.
39173      complete="$STRIP"
39174      path="${complete%% *}"
39175      tmp="$complete EOL"
39176      arguments="${tmp#* }"
39177
39178      # Cannot rely on the command "which" here since it doesn't always work.
39179      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39180      if test -z "$is_absolute_path"; then
39181        # Path to executable is not absolute. Find it.
39182        IFS_save="$IFS"
39183        IFS=:
39184        for p in $PATH; do
39185          if test -f "$p/$path" && test -x "$p/$path"; then
39186            new_path="$p/$path"
39187            break
39188          fi
39189        done
39190        IFS="$IFS_save"
39191      else
39192        # This is an absolute path, we can use it without further modifications.
39193        new_path="$path"
39194      fi
39195
39196      if test "x$new_path" = x; then
39197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39198$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39199        has_space=`$ECHO "$complete" | $GREP " "`
39200        if test "x$has_space" != x; then
39201          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39202$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39203        fi
39204        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39205      fi
39206    fi
39207
39208    # Now join together the path and the arguments once again
39209    if test "x$arguments" != xEOL; then
39210      new_complete="$new_path ${arguments% *}"
39211    else
39212      new_complete="$new_path"
39213    fi
39214
39215    if test "x$complete" != "x$new_complete"; then
39216      STRIP="$new_complete"
39217      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39218$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39219    fi
39220  fi
39221
39222
39223
39224  # Publish this variable in the help.
39225
39226
39227  if [ -z "${NM+x}" ]; then
39228    # The variable is not set by user, try to locate tool using the code snippet
39229    for ac_prog in nm
39230do
39231  # Extract the first word of "$ac_prog", so it can be a program name with args.
39232set dummy $ac_prog; ac_word=$2
39233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39234$as_echo_n "checking for $ac_word... " >&6; }
39235if ${ac_cv_path_NM+:} false; then :
39236  $as_echo_n "(cached) " >&6
39237else
39238  case $NM in
39239  [\\/]* | ?:[\\/]*)
39240  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39241  ;;
39242  *)
39243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39244for as_dir in $PATH
39245do
39246  IFS=$as_save_IFS
39247  test -z "$as_dir" && as_dir=.
39248    for ac_exec_ext in '' $ac_executable_extensions; do
39249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39250    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39252    break 2
39253  fi
39254done
39255  done
39256IFS=$as_save_IFS
39257
39258  ;;
39259esac
39260fi
39261NM=$ac_cv_path_NM
39262if test -n "$NM"; then
39263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39264$as_echo "$NM" >&6; }
39265else
39266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39267$as_echo "no" >&6; }
39268fi
39269
39270
39271  test -n "$NM" && break
39272done
39273
39274  else
39275    # The variable is set, but is it from the command line or the environment?
39276
39277    # Try to remove the string !NM! from our list.
39278    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39279    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39280      # If it failed, the variable was not from the command line. Ignore it,
39281      # but warn the user (except for BASH, which is always set by the calling BASH).
39282      if test "xNM" != xBASH; then
39283        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39284$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39285      fi
39286      # Try to locate tool using the code snippet
39287      for ac_prog in nm
39288do
39289  # Extract the first word of "$ac_prog", so it can be a program name with args.
39290set dummy $ac_prog; ac_word=$2
39291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39292$as_echo_n "checking for $ac_word... " >&6; }
39293if ${ac_cv_path_NM+:} false; then :
39294  $as_echo_n "(cached) " >&6
39295else
39296  case $NM in
39297  [\\/]* | ?:[\\/]*)
39298  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39299  ;;
39300  *)
39301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39302for as_dir in $PATH
39303do
39304  IFS=$as_save_IFS
39305  test -z "$as_dir" && as_dir=.
39306    for ac_exec_ext in '' $ac_executable_extensions; do
39307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39308    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39310    break 2
39311  fi
39312done
39313  done
39314IFS=$as_save_IFS
39315
39316  ;;
39317esac
39318fi
39319NM=$ac_cv_path_NM
39320if test -n "$NM"; then
39321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39322$as_echo "$NM" >&6; }
39323else
39324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39325$as_echo "no" >&6; }
39326fi
39327
39328
39329  test -n "$NM" && break
39330done
39331
39332    else
39333      # If it succeeded, then it was overridden by the user. We will use it
39334      # for the tool.
39335
39336      # First remove it from the list of overridden variables, so we can test
39337      # for unknown variables in the end.
39338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39339
39340      # Check if we try to supply an empty value
39341      if test "x$NM" = x; then
39342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39343$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39345$as_echo_n "checking for NM... " >&6; }
39346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39347$as_echo "disabled" >&6; }
39348      else
39349        # Check if the provided tool contains a complete path.
39350        tool_specified="$NM"
39351        tool_basename="${tool_specified##*/}"
39352        if test "x$tool_basename" = "x$tool_specified"; then
39353          # A command without a complete path is provided, search $PATH.
39354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39355$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39356          # Extract the first word of "$tool_basename", so it can be a program name with args.
39357set dummy $tool_basename; ac_word=$2
39358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39359$as_echo_n "checking for $ac_word... " >&6; }
39360if ${ac_cv_path_NM+:} false; then :
39361  $as_echo_n "(cached) " >&6
39362else
39363  case $NM in
39364  [\\/]* | ?:[\\/]*)
39365  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39366  ;;
39367  *)
39368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39369for as_dir in $PATH
39370do
39371  IFS=$as_save_IFS
39372  test -z "$as_dir" && as_dir=.
39373    for ac_exec_ext in '' $ac_executable_extensions; do
39374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39375    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39377    break 2
39378  fi
39379done
39380  done
39381IFS=$as_save_IFS
39382
39383  ;;
39384esac
39385fi
39386NM=$ac_cv_path_NM
39387if test -n "$NM"; then
39388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39389$as_echo "$NM" >&6; }
39390else
39391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39392$as_echo "no" >&6; }
39393fi
39394
39395
39396          if test "x$NM" = x; then
39397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39398          fi
39399        else
39400          # Otherwise we believe it is a complete path. Use it as it is.
39401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39402$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39404$as_echo_n "checking for NM... " >&6; }
39405          if test ! -x "$tool_specified"; then
39406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39407$as_echo "not found" >&6; }
39408            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39409          fi
39410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39411$as_echo "$tool_specified" >&6; }
39412        fi
39413      fi
39414    fi
39415
39416  fi
39417
39418
39419
39420  # Only process if variable expands to non-empty
39421
39422  if test "x$NM" != x; then
39423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39424
39425  # First separate the path from the arguments. This will split at the first
39426  # space.
39427  complete="$NM"
39428  path="${complete%% *}"
39429  tmp="$complete EOL"
39430  arguments="${tmp#* }"
39431
39432  # Input might be given as Windows format, start by converting to
39433  # unix format.
39434  new_path=`$CYGPATH -u "$path"`
39435
39436  # Now try to locate executable using which
39437  new_path=`$WHICH "$new_path" 2> /dev/null`
39438  # bat and cmd files are not always considered executable in cygwin causing which
39439  # to not find them
39440  if test "x$new_path" = x \
39441      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39442      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39443    new_path=`$CYGPATH -u "$path"`
39444  fi
39445  if test "x$new_path" = x; then
39446    # Oops. Which didn't find the executable.
39447    # The splitting of arguments from the executable at a space might have been incorrect,
39448    # since paths with space are more likely in Windows. Give it another try with the whole
39449    # argument.
39450    path="$complete"
39451    arguments="EOL"
39452    new_path=`$CYGPATH -u "$path"`
39453    new_path=`$WHICH "$new_path" 2> /dev/null`
39454    # bat and cmd files are not always considered executable in cygwin causing which
39455    # to not find them
39456    if test "x$new_path" = x \
39457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39459      new_path=`$CYGPATH -u "$path"`
39460    fi
39461    if test "x$new_path" = x; then
39462      # It's still not found. Now this is an unrecoverable error.
39463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39464$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39465      has_space=`$ECHO "$complete" | $GREP " "`
39466      if test "x$has_space" != x; then
39467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39469      fi
39470      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39471    fi
39472  fi
39473
39474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39477  # "foo.exe" is OK but "foo" is an error.
39478  #
39479  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39480  # It is also a way to make sure we got the proper file name for the real test later on.
39481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39482  if test "x$test_shortpath" = x; then
39483    # Short path failed, file does not exist as specified.
39484    # Try adding .exe or .cmd
39485    if test -f "${new_path}.exe"; then
39486      input_to_shortpath="${new_path}.exe"
39487    elif test -f "${new_path}.cmd"; then
39488      input_to_shortpath="${new_path}.cmd"
39489    else
39490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39491$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39492      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39493$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39494      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39495    fi
39496  else
39497    input_to_shortpath="$new_path"
39498  fi
39499
39500  # Call helper function which possibly converts this using DOS-style short mode.
39501  # If so, the updated path is stored in $new_path.
39502  new_path="$input_to_shortpath"
39503
39504  input_path="$input_to_shortpath"
39505  # Check if we need to convert this using DOS-style short mode. If the path
39506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39507  # take no chances and rewrite it.
39508  # Note: m4 eats our [], so we need to use [ and ] instead.
39509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39510  if test "x$has_forbidden_chars" != x; then
39511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39515      # Going to short mode and back again did indeed matter. Since short mode is
39516      # case insensitive, let's make it lowercase to improve readability.
39517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39518      # Now convert it back to Unix-style (cygpath)
39519      input_path=`$CYGPATH -u "$shortmode_path"`
39520      new_path="$input_path"
39521    fi
39522  fi
39523
39524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39525  if test "x$test_cygdrive_prefix" = x; then
39526    # As a simple fix, exclude /usr/bin since it's not a real path.
39527    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39529      # a path prefixed by /cygdrive for fixpath to work.
39530      new_path="$CYGWIN_ROOT_PATH$input_path"
39531    fi
39532  fi
39533
39534  # remove trailing .exe if any
39535  new_path="${new_path/%.exe/}"
39536
39537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39538
39539  # First separate the path from the arguments. This will split at the first
39540  # space.
39541  complete="$NM"
39542  path="${complete%% *}"
39543  tmp="$complete EOL"
39544  arguments="${tmp#* }"
39545
39546  # Input might be given as Windows format, start by converting to
39547  # unix format.
39548  new_path="$path"
39549
39550  windows_path="$new_path"
39551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39552    unix_path=`$CYGPATH -u "$windows_path"`
39553    new_path="$unix_path"
39554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39556    new_path="$unix_path"
39557  fi
39558
39559
39560  # Now try to locate executable using which
39561  new_path=`$WHICH "$new_path" 2> /dev/null`
39562
39563  if test "x$new_path" = x; then
39564    # Oops. Which didn't find the executable.
39565    # The splitting of arguments from the executable at a space might have been incorrect,
39566    # since paths with space are more likely in Windows. Give it another try with the whole
39567    # argument.
39568    path="$complete"
39569    arguments="EOL"
39570    new_path="$path"
39571
39572  windows_path="$new_path"
39573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39574    unix_path=`$CYGPATH -u "$windows_path"`
39575    new_path="$unix_path"
39576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39578    new_path="$unix_path"
39579  fi
39580
39581
39582    new_path=`$WHICH "$new_path" 2> /dev/null`
39583    # bat and cmd files are not always considered executable in MSYS causing which
39584    # to not find them
39585    if test "x$new_path" = x \
39586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39588      new_path="$path"
39589
39590  windows_path="$new_path"
39591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39592    unix_path=`$CYGPATH -u "$windows_path"`
39593    new_path="$unix_path"
39594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39596    new_path="$unix_path"
39597  fi
39598
39599    fi
39600
39601    if test "x$new_path" = x; then
39602      # It's still not found. Now this is an unrecoverable error.
39603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39604$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39605      has_space=`$ECHO "$complete" | $GREP " "`
39606      if test "x$has_space" != x; then
39607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39609      fi
39610      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39611    fi
39612  fi
39613
39614  # Now new_path has a complete unix path to the binary
39615  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39616    # Keep paths in /bin as-is, but remove trailing .exe if any
39617    new_path="${new_path/%.exe/}"
39618    # Do not save /bin paths to all_fixpath_prefixes!
39619  else
39620    # Not in mixed or Windows style, start by that.
39621    new_path=`cmd //c echo $new_path`
39622
39623  input_path="$new_path"
39624  # Check if we need to convert this using DOS-style short mode. If the path
39625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39626  # take no chances and rewrite it.
39627  # Note: m4 eats our [], so we need to use [ and ] instead.
39628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39629  if test "x$has_forbidden_chars" != x; then
39630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39632  fi
39633
39634    # Output is in $new_path
39635
39636  windows_path="$new_path"
39637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39638    unix_path=`$CYGPATH -u "$windows_path"`
39639    new_path="$unix_path"
39640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39642    new_path="$unix_path"
39643  fi
39644
39645    # remove trailing .exe if any
39646    new_path="${new_path/%.exe/}"
39647
39648    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39649    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39650  fi
39651
39652    else
39653      # We're on a unix platform. Hooray! :)
39654      # First separate the path from the arguments. This will split at the first
39655      # space.
39656      complete="$NM"
39657      path="${complete%% *}"
39658      tmp="$complete EOL"
39659      arguments="${tmp#* }"
39660
39661      # Cannot rely on the command "which" here since it doesn't always work.
39662      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39663      if test -z "$is_absolute_path"; then
39664        # Path to executable is not absolute. Find it.
39665        IFS_save="$IFS"
39666        IFS=:
39667        for p in $PATH; do
39668          if test -f "$p/$path" && test -x "$p/$path"; then
39669            new_path="$p/$path"
39670            break
39671          fi
39672        done
39673        IFS="$IFS_save"
39674      else
39675        # This is an absolute path, we can use it without further modifications.
39676        new_path="$path"
39677      fi
39678
39679      if test "x$new_path" = x; then
39680        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39681$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39682        has_space=`$ECHO "$complete" | $GREP " "`
39683        if test "x$has_space" != x; then
39684          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39685$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39686        fi
39687        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39688      fi
39689    fi
39690
39691    # Now join together the path and the arguments once again
39692    if test "x$arguments" != xEOL; then
39693      new_complete="$new_path ${arguments% *}"
39694    else
39695      new_complete="$new_path"
39696    fi
39697
39698    if test "x$complete" != "x$new_complete"; then
39699      NM="$new_complete"
39700      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39701$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39702    fi
39703  fi
39704
39705
39706
39707  # Publish this variable in the help.
39708
39709
39710  if [ -z "${GNM+x}" ]; then
39711    # The variable is not set by user, try to locate tool using the code snippet
39712    for ac_prog in gnm
39713do
39714  # Extract the first word of "$ac_prog", so it can be a program name with args.
39715set dummy $ac_prog; ac_word=$2
39716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39717$as_echo_n "checking for $ac_word... " >&6; }
39718if ${ac_cv_path_GNM+:} false; then :
39719  $as_echo_n "(cached) " >&6
39720else
39721  case $GNM in
39722  [\\/]* | ?:[\\/]*)
39723  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39724  ;;
39725  *)
39726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39727for as_dir in $PATH
39728do
39729  IFS=$as_save_IFS
39730  test -z "$as_dir" && as_dir=.
39731    for ac_exec_ext in '' $ac_executable_extensions; do
39732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39733    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39735    break 2
39736  fi
39737done
39738  done
39739IFS=$as_save_IFS
39740
39741  ;;
39742esac
39743fi
39744GNM=$ac_cv_path_GNM
39745if test -n "$GNM"; then
39746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39747$as_echo "$GNM" >&6; }
39748else
39749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39750$as_echo "no" >&6; }
39751fi
39752
39753
39754  test -n "$GNM" && break
39755done
39756
39757  else
39758    # The variable is set, but is it from the command line or the environment?
39759
39760    # Try to remove the string !GNM! from our list.
39761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39763      # If it failed, the variable was not from the command line. Ignore it,
39764      # but warn the user (except for BASH, which is always set by the calling BASH).
39765      if test "xGNM" != xBASH; then
39766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39767$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39768      fi
39769      # Try to locate tool using the code snippet
39770      for ac_prog in gnm
39771do
39772  # Extract the first word of "$ac_prog", so it can be a program name with args.
39773set dummy $ac_prog; ac_word=$2
39774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39775$as_echo_n "checking for $ac_word... " >&6; }
39776if ${ac_cv_path_GNM+:} false; then :
39777  $as_echo_n "(cached) " >&6
39778else
39779  case $GNM in
39780  [\\/]* | ?:[\\/]*)
39781  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39782  ;;
39783  *)
39784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39785for as_dir in $PATH
39786do
39787  IFS=$as_save_IFS
39788  test -z "$as_dir" && as_dir=.
39789    for ac_exec_ext in '' $ac_executable_extensions; do
39790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39791    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39793    break 2
39794  fi
39795done
39796  done
39797IFS=$as_save_IFS
39798
39799  ;;
39800esac
39801fi
39802GNM=$ac_cv_path_GNM
39803if test -n "$GNM"; then
39804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39805$as_echo "$GNM" >&6; }
39806else
39807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39808$as_echo "no" >&6; }
39809fi
39810
39811
39812  test -n "$GNM" && break
39813done
39814
39815    else
39816      # If it succeeded, then it was overridden by the user. We will use it
39817      # for the tool.
39818
39819      # First remove it from the list of overridden variables, so we can test
39820      # for unknown variables in the end.
39821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39822
39823      # Check if we try to supply an empty value
39824      if test "x$GNM" = x; then
39825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39826$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39828$as_echo_n "checking for GNM... " >&6; }
39829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39830$as_echo "disabled" >&6; }
39831      else
39832        # Check if the provided tool contains a complete path.
39833        tool_specified="$GNM"
39834        tool_basename="${tool_specified##*/}"
39835        if test "x$tool_basename" = "x$tool_specified"; then
39836          # A command without a complete path is provided, search $PATH.
39837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39838$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39839          # Extract the first word of "$tool_basename", so it can be a program name with args.
39840set dummy $tool_basename; ac_word=$2
39841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39842$as_echo_n "checking for $ac_word... " >&6; }
39843if ${ac_cv_path_GNM+:} false; then :
39844  $as_echo_n "(cached) " >&6
39845else
39846  case $GNM in
39847  [\\/]* | ?:[\\/]*)
39848  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39849  ;;
39850  *)
39851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39852for as_dir in $PATH
39853do
39854  IFS=$as_save_IFS
39855  test -z "$as_dir" && as_dir=.
39856    for ac_exec_ext in '' $ac_executable_extensions; do
39857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39858    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39860    break 2
39861  fi
39862done
39863  done
39864IFS=$as_save_IFS
39865
39866  ;;
39867esac
39868fi
39869GNM=$ac_cv_path_GNM
39870if test -n "$GNM"; then
39871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39872$as_echo "$GNM" >&6; }
39873else
39874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39875$as_echo "no" >&6; }
39876fi
39877
39878
39879          if test "x$GNM" = x; then
39880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39881          fi
39882        else
39883          # Otherwise we believe it is a complete path. Use it as it is.
39884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39885$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39887$as_echo_n "checking for GNM... " >&6; }
39888          if test ! -x "$tool_specified"; then
39889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39890$as_echo "not found" >&6; }
39891            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39892          fi
39893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39894$as_echo "$tool_specified" >&6; }
39895        fi
39896      fi
39897    fi
39898
39899  fi
39900
39901
39902
39903  # Only process if variable expands to non-empty
39904
39905  if test "x$GNM" != x; then
39906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907
39908  # First separate the path from the arguments. This will split at the first
39909  # space.
39910  complete="$GNM"
39911  path="${complete%% *}"
39912  tmp="$complete EOL"
39913  arguments="${tmp#* }"
39914
39915  # Input might be given as Windows format, start by converting to
39916  # unix format.
39917  new_path=`$CYGPATH -u "$path"`
39918
39919  # Now try to locate executable using which
39920  new_path=`$WHICH "$new_path" 2> /dev/null`
39921  # bat and cmd files are not always considered executable in cygwin causing which
39922  # to not find them
39923  if test "x$new_path" = x \
39924      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39925      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39926    new_path=`$CYGPATH -u "$path"`
39927  fi
39928  if test "x$new_path" = x; then
39929    # Oops. Which didn't find the executable.
39930    # The splitting of arguments from the executable at a space might have been incorrect,
39931    # since paths with space are more likely in Windows. Give it another try with the whole
39932    # argument.
39933    path="$complete"
39934    arguments="EOL"
39935    new_path=`$CYGPATH -u "$path"`
39936    new_path=`$WHICH "$new_path" 2> /dev/null`
39937    # bat and cmd files are not always considered executable in cygwin causing which
39938    # to not find them
39939    if test "x$new_path" = x \
39940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39942      new_path=`$CYGPATH -u "$path"`
39943    fi
39944    if test "x$new_path" = x; then
39945      # It's still not found. Now this is an unrecoverable error.
39946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39947$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39948      has_space=`$ECHO "$complete" | $GREP " "`
39949      if test "x$has_space" != x; then
39950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39952      fi
39953      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39954    fi
39955  fi
39956
39957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39960  # "foo.exe" is OK but "foo" is an error.
39961  #
39962  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39963  # It is also a way to make sure we got the proper file name for the real test later on.
39964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39965  if test "x$test_shortpath" = x; then
39966    # Short path failed, file does not exist as specified.
39967    # Try adding .exe or .cmd
39968    if test -f "${new_path}.exe"; then
39969      input_to_shortpath="${new_path}.exe"
39970    elif test -f "${new_path}.cmd"; then
39971      input_to_shortpath="${new_path}.cmd"
39972    else
39973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39974$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39977      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39978    fi
39979  else
39980    input_to_shortpath="$new_path"
39981  fi
39982
39983  # Call helper function which possibly converts this using DOS-style short mode.
39984  # If so, the updated path is stored in $new_path.
39985  new_path="$input_to_shortpath"
39986
39987  input_path="$input_to_shortpath"
39988  # Check if we need to convert this using DOS-style short mode. If the path
39989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39990  # take no chances and rewrite it.
39991  # Note: m4 eats our [], so we need to use [ and ] instead.
39992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39993  if test "x$has_forbidden_chars" != x; then
39994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39998      # Going to short mode and back again did indeed matter. Since short mode is
39999      # case insensitive, let's make it lowercase to improve readability.
40000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40001      # Now convert it back to Unix-style (cygpath)
40002      input_path=`$CYGPATH -u "$shortmode_path"`
40003      new_path="$input_path"
40004    fi
40005  fi
40006
40007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40008  if test "x$test_cygdrive_prefix" = x; then
40009    # As a simple fix, exclude /usr/bin since it's not a real path.
40010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40012      # a path prefixed by /cygdrive for fixpath to work.
40013      new_path="$CYGWIN_ROOT_PATH$input_path"
40014    fi
40015  fi
40016
40017  # remove trailing .exe if any
40018  new_path="${new_path/%.exe/}"
40019
40020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40021
40022  # First separate the path from the arguments. This will split at the first
40023  # space.
40024  complete="$GNM"
40025  path="${complete%% *}"
40026  tmp="$complete EOL"
40027  arguments="${tmp#* }"
40028
40029  # Input might be given as Windows format, start by converting to
40030  # unix format.
40031  new_path="$path"
40032
40033  windows_path="$new_path"
40034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40035    unix_path=`$CYGPATH -u "$windows_path"`
40036    new_path="$unix_path"
40037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40039    new_path="$unix_path"
40040  fi
40041
40042
40043  # Now try to locate executable using which
40044  new_path=`$WHICH "$new_path" 2> /dev/null`
40045
40046  if test "x$new_path" = x; then
40047    # Oops. Which didn't find the executable.
40048    # The splitting of arguments from the executable at a space might have been incorrect,
40049    # since paths with space are more likely in Windows. Give it another try with the whole
40050    # argument.
40051    path="$complete"
40052    arguments="EOL"
40053    new_path="$path"
40054
40055  windows_path="$new_path"
40056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40057    unix_path=`$CYGPATH -u "$windows_path"`
40058    new_path="$unix_path"
40059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40061    new_path="$unix_path"
40062  fi
40063
40064
40065    new_path=`$WHICH "$new_path" 2> /dev/null`
40066    # bat and cmd files are not always considered executable in MSYS causing which
40067    # to not find them
40068    if test "x$new_path" = x \
40069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40071      new_path="$path"
40072
40073  windows_path="$new_path"
40074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40075    unix_path=`$CYGPATH -u "$windows_path"`
40076    new_path="$unix_path"
40077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40079    new_path="$unix_path"
40080  fi
40081
40082    fi
40083
40084    if test "x$new_path" = x; then
40085      # It's still not found. Now this is an unrecoverable error.
40086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40087$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40088      has_space=`$ECHO "$complete" | $GREP " "`
40089      if test "x$has_space" != x; then
40090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40092      fi
40093      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40094    fi
40095  fi
40096
40097  # Now new_path has a complete unix path to the binary
40098  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40099    # Keep paths in /bin as-is, but remove trailing .exe if any
40100    new_path="${new_path/%.exe/}"
40101    # Do not save /bin paths to all_fixpath_prefixes!
40102  else
40103    # Not in mixed or Windows style, start by that.
40104    new_path=`cmd //c echo $new_path`
40105
40106  input_path="$new_path"
40107  # Check if we need to convert this using DOS-style short mode. If the path
40108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40109  # take no chances and rewrite it.
40110  # Note: m4 eats our [], so we need to use [ and ] instead.
40111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40112  if test "x$has_forbidden_chars" != x; then
40113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40115  fi
40116
40117    # Output is in $new_path
40118
40119  windows_path="$new_path"
40120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40121    unix_path=`$CYGPATH -u "$windows_path"`
40122    new_path="$unix_path"
40123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40125    new_path="$unix_path"
40126  fi
40127
40128    # remove trailing .exe if any
40129    new_path="${new_path/%.exe/}"
40130
40131    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40132    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40133  fi
40134
40135    else
40136      # We're on a unix platform. Hooray! :)
40137      # First separate the path from the arguments. This will split at the first
40138      # space.
40139      complete="$GNM"
40140      path="${complete%% *}"
40141      tmp="$complete EOL"
40142      arguments="${tmp#* }"
40143
40144      # Cannot rely on the command "which" here since it doesn't always work.
40145      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40146      if test -z "$is_absolute_path"; then
40147        # Path to executable is not absolute. Find it.
40148        IFS_save="$IFS"
40149        IFS=:
40150        for p in $PATH; do
40151          if test -f "$p/$path" && test -x "$p/$path"; then
40152            new_path="$p/$path"
40153            break
40154          fi
40155        done
40156        IFS="$IFS_save"
40157      else
40158        # This is an absolute path, we can use it without further modifications.
40159        new_path="$path"
40160      fi
40161
40162      if test "x$new_path" = x; then
40163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40164$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40165        has_space=`$ECHO "$complete" | $GREP " "`
40166        if test "x$has_space" != x; then
40167          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40169        fi
40170        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40171      fi
40172    fi
40173
40174    # Now join together the path and the arguments once again
40175    if test "x$arguments" != xEOL; then
40176      new_complete="$new_path ${arguments% *}"
40177    else
40178      new_complete="$new_path"
40179    fi
40180
40181    if test "x$complete" != "x$new_complete"; then
40182      GNM="$new_complete"
40183      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40184$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40185    fi
40186  fi
40187
40188  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40189    # FIXME: we should unify this with the solaris case above.
40190
40191
40192  # Publish this variable in the help.
40193
40194
40195  if [ -z "${STRIP+x}" ]; then
40196    # The variable is not set by user, try to locate tool using the code snippet
40197    if test -n "$ac_tool_prefix"; then
40198  for ac_prog in strip
40199  do
40200    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40201set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40203$as_echo_n "checking for $ac_word... " >&6; }
40204if ${ac_cv_prog_STRIP+:} false; then :
40205  $as_echo_n "(cached) " >&6
40206else
40207  if test -n "$STRIP"; then
40208  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40209else
40210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40211for as_dir in $PATH
40212do
40213  IFS=$as_save_IFS
40214  test -z "$as_dir" && as_dir=.
40215    for ac_exec_ext in '' $ac_executable_extensions; do
40216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40217    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40219    break 2
40220  fi
40221done
40222  done
40223IFS=$as_save_IFS
40224
40225fi
40226fi
40227STRIP=$ac_cv_prog_STRIP
40228if test -n "$STRIP"; then
40229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40230$as_echo "$STRIP" >&6; }
40231else
40232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40233$as_echo "no" >&6; }
40234fi
40235
40236
40237    test -n "$STRIP" && break
40238  done
40239fi
40240if test -z "$STRIP"; then
40241  ac_ct_STRIP=$STRIP
40242  for ac_prog in strip
40243do
40244  # Extract the first word of "$ac_prog", so it can be a program name with args.
40245set dummy $ac_prog; ac_word=$2
40246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40247$as_echo_n "checking for $ac_word... " >&6; }
40248if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40249  $as_echo_n "(cached) " >&6
40250else
40251  if test -n "$ac_ct_STRIP"; then
40252  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40253else
40254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40255for as_dir in $PATH
40256do
40257  IFS=$as_save_IFS
40258  test -z "$as_dir" && as_dir=.
40259    for ac_exec_ext in '' $ac_executable_extensions; do
40260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40261    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40263    break 2
40264  fi
40265done
40266  done
40267IFS=$as_save_IFS
40268
40269fi
40270fi
40271ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40272if test -n "$ac_ct_STRIP"; then
40273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40274$as_echo "$ac_ct_STRIP" >&6; }
40275else
40276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40277$as_echo "no" >&6; }
40278fi
40279
40280
40281  test -n "$ac_ct_STRIP" && break
40282done
40283
40284  if test "x$ac_ct_STRIP" = x; then
40285    STRIP=""
40286  else
40287    case $cross_compiling:$ac_tool_warned in
40288yes:)
40289{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40290$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40291ac_tool_warned=yes ;;
40292esac
40293    STRIP=$ac_ct_STRIP
40294  fi
40295fi
40296
40297  else
40298    # The variable is set, but is it from the command line or the environment?
40299
40300    # Try to remove the string !STRIP! from our list.
40301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40303      # If it failed, the variable was not from the command line. Ignore it,
40304      # but warn the user (except for BASH, which is always set by the calling BASH).
40305      if test "xSTRIP" != xBASH; then
40306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40307$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40308      fi
40309      # Try to locate tool using the code snippet
40310      if test -n "$ac_tool_prefix"; then
40311  for ac_prog in strip
40312  do
40313    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40314set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40316$as_echo_n "checking for $ac_word... " >&6; }
40317if ${ac_cv_prog_STRIP+:} false; then :
40318  $as_echo_n "(cached) " >&6
40319else
40320  if test -n "$STRIP"; then
40321  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40322else
40323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40324for as_dir in $PATH
40325do
40326  IFS=$as_save_IFS
40327  test -z "$as_dir" && as_dir=.
40328    for ac_exec_ext in '' $ac_executable_extensions; do
40329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40330    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40332    break 2
40333  fi
40334done
40335  done
40336IFS=$as_save_IFS
40337
40338fi
40339fi
40340STRIP=$ac_cv_prog_STRIP
40341if test -n "$STRIP"; then
40342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40343$as_echo "$STRIP" >&6; }
40344else
40345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40346$as_echo "no" >&6; }
40347fi
40348
40349
40350    test -n "$STRIP" && break
40351  done
40352fi
40353if test -z "$STRIP"; then
40354  ac_ct_STRIP=$STRIP
40355  for ac_prog in strip
40356do
40357  # Extract the first word of "$ac_prog", so it can be a program name with args.
40358set dummy $ac_prog; ac_word=$2
40359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40360$as_echo_n "checking for $ac_word... " >&6; }
40361if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40362  $as_echo_n "(cached) " >&6
40363else
40364  if test -n "$ac_ct_STRIP"; then
40365  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40366else
40367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40368for as_dir in $PATH
40369do
40370  IFS=$as_save_IFS
40371  test -z "$as_dir" && as_dir=.
40372    for ac_exec_ext in '' $ac_executable_extensions; do
40373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40374    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40376    break 2
40377  fi
40378done
40379  done
40380IFS=$as_save_IFS
40381
40382fi
40383fi
40384ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40385if test -n "$ac_ct_STRIP"; then
40386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40387$as_echo "$ac_ct_STRIP" >&6; }
40388else
40389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40390$as_echo "no" >&6; }
40391fi
40392
40393
40394  test -n "$ac_ct_STRIP" && break
40395done
40396
40397  if test "x$ac_ct_STRIP" = x; then
40398    STRIP=""
40399  else
40400    case $cross_compiling:$ac_tool_warned in
40401yes:)
40402{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40403$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40404ac_tool_warned=yes ;;
40405esac
40406    STRIP=$ac_ct_STRIP
40407  fi
40408fi
40409
40410    else
40411      # If it succeeded, then it was overridden by the user. We will use it
40412      # for the tool.
40413
40414      # First remove it from the list of overridden variables, so we can test
40415      # for unknown variables in the end.
40416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40417
40418      # Check if we try to supply an empty value
40419      if test "x$STRIP" = x; then
40420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40421$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40423$as_echo_n "checking for STRIP... " >&6; }
40424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40425$as_echo "disabled" >&6; }
40426      else
40427        # Check if the provided tool contains a complete path.
40428        tool_specified="$STRIP"
40429        tool_basename="${tool_specified##*/}"
40430        if test "x$tool_basename" = "x$tool_specified"; then
40431          # A command without a complete path is provided, search $PATH.
40432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40433$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40434          # Extract the first word of "$tool_basename", so it can be a program name with args.
40435set dummy $tool_basename; ac_word=$2
40436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40437$as_echo_n "checking for $ac_word... " >&6; }
40438if ${ac_cv_path_STRIP+:} false; then :
40439  $as_echo_n "(cached) " >&6
40440else
40441  case $STRIP in
40442  [\\/]* | ?:[\\/]*)
40443  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40444  ;;
40445  *)
40446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40447for as_dir in $PATH
40448do
40449  IFS=$as_save_IFS
40450  test -z "$as_dir" && as_dir=.
40451    for ac_exec_ext in '' $ac_executable_extensions; do
40452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40453    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40455    break 2
40456  fi
40457done
40458  done
40459IFS=$as_save_IFS
40460
40461  ;;
40462esac
40463fi
40464STRIP=$ac_cv_path_STRIP
40465if test -n "$STRIP"; then
40466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40467$as_echo "$STRIP" >&6; }
40468else
40469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40470$as_echo "no" >&6; }
40471fi
40472
40473
40474          if test "x$STRIP" = x; then
40475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40476          fi
40477        else
40478          # Otherwise we believe it is a complete path. Use it as it is.
40479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40480$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40482$as_echo_n "checking for STRIP... " >&6; }
40483          if test ! -x "$tool_specified"; then
40484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40485$as_echo "not found" >&6; }
40486            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40487          fi
40488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40489$as_echo "$tool_specified" >&6; }
40490        fi
40491      fi
40492    fi
40493
40494  fi
40495
40496
40497
40498  # Only process if variable expands to non-empty
40499
40500  if test "x$STRIP" != x; then
40501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40502
40503  # First separate the path from the arguments. This will split at the first
40504  # space.
40505  complete="$STRIP"
40506  path="${complete%% *}"
40507  tmp="$complete EOL"
40508  arguments="${tmp#* }"
40509
40510  # Input might be given as Windows format, start by converting to
40511  # unix format.
40512  new_path=`$CYGPATH -u "$path"`
40513
40514  # Now try to locate executable using which
40515  new_path=`$WHICH "$new_path" 2> /dev/null`
40516  # bat and cmd files are not always considered executable in cygwin causing which
40517  # to not find them
40518  if test "x$new_path" = x \
40519      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40520      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40521    new_path=`$CYGPATH -u "$path"`
40522  fi
40523  if test "x$new_path" = x; then
40524    # Oops. Which didn't find the executable.
40525    # The splitting of arguments from the executable at a space might have been incorrect,
40526    # since paths with space are more likely in Windows. Give it another try with the whole
40527    # argument.
40528    path="$complete"
40529    arguments="EOL"
40530    new_path=`$CYGPATH -u "$path"`
40531    new_path=`$WHICH "$new_path" 2> /dev/null`
40532    # bat and cmd files are not always considered executable in cygwin causing which
40533    # to not find them
40534    if test "x$new_path" = x \
40535        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40536        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40537      new_path=`$CYGPATH -u "$path"`
40538    fi
40539    if test "x$new_path" = x; then
40540      # It's still not found. Now this is an unrecoverable error.
40541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40542$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40543      has_space=`$ECHO "$complete" | $GREP " "`
40544      if test "x$has_space" != x; then
40545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40547      fi
40548      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40549    fi
40550  fi
40551
40552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40555  # "foo.exe" is OK but "foo" is an error.
40556  #
40557  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40558  # It is also a way to make sure we got the proper file name for the real test later on.
40559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40560  if test "x$test_shortpath" = x; then
40561    # Short path failed, file does not exist as specified.
40562    # Try adding .exe or .cmd
40563    if test -f "${new_path}.exe"; then
40564      input_to_shortpath="${new_path}.exe"
40565    elif test -f "${new_path}.cmd"; then
40566      input_to_shortpath="${new_path}.cmd"
40567    else
40568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40569$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40570      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40571$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40572      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40573    fi
40574  else
40575    input_to_shortpath="$new_path"
40576  fi
40577
40578  # Call helper function which possibly converts this using DOS-style short mode.
40579  # If so, the updated path is stored in $new_path.
40580  new_path="$input_to_shortpath"
40581
40582  input_path="$input_to_shortpath"
40583  # Check if we need to convert this using DOS-style short mode. If the path
40584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40585  # take no chances and rewrite it.
40586  # Note: m4 eats our [], so we need to use [ and ] instead.
40587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40588  if test "x$has_forbidden_chars" != x; then
40589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40593      # Going to short mode and back again did indeed matter. Since short mode is
40594      # case insensitive, let's make it lowercase to improve readability.
40595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40596      # Now convert it back to Unix-style (cygpath)
40597      input_path=`$CYGPATH -u "$shortmode_path"`
40598      new_path="$input_path"
40599    fi
40600  fi
40601
40602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40603  if test "x$test_cygdrive_prefix" = x; then
40604    # As a simple fix, exclude /usr/bin since it's not a real path.
40605    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40607      # a path prefixed by /cygdrive for fixpath to work.
40608      new_path="$CYGWIN_ROOT_PATH$input_path"
40609    fi
40610  fi
40611
40612  # remove trailing .exe if any
40613  new_path="${new_path/%.exe/}"
40614
40615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40616
40617  # First separate the path from the arguments. This will split at the first
40618  # space.
40619  complete="$STRIP"
40620  path="${complete%% *}"
40621  tmp="$complete EOL"
40622  arguments="${tmp#* }"
40623
40624  # Input might be given as Windows format, start by converting to
40625  # unix format.
40626  new_path="$path"
40627
40628  windows_path="$new_path"
40629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40630    unix_path=`$CYGPATH -u "$windows_path"`
40631    new_path="$unix_path"
40632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40634    new_path="$unix_path"
40635  fi
40636
40637
40638  # Now try to locate executable using which
40639  new_path=`$WHICH "$new_path" 2> /dev/null`
40640
40641  if test "x$new_path" = x; then
40642    # Oops. Which didn't find the executable.
40643    # The splitting of arguments from the executable at a space might have been incorrect,
40644    # since paths with space are more likely in Windows. Give it another try with the whole
40645    # argument.
40646    path="$complete"
40647    arguments="EOL"
40648    new_path="$path"
40649
40650  windows_path="$new_path"
40651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40652    unix_path=`$CYGPATH -u "$windows_path"`
40653    new_path="$unix_path"
40654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40656    new_path="$unix_path"
40657  fi
40658
40659
40660    new_path=`$WHICH "$new_path" 2> /dev/null`
40661    # bat and cmd files are not always considered executable in MSYS causing which
40662    # to not find them
40663    if test "x$new_path" = x \
40664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40666      new_path="$path"
40667
40668  windows_path="$new_path"
40669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40670    unix_path=`$CYGPATH -u "$windows_path"`
40671    new_path="$unix_path"
40672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40674    new_path="$unix_path"
40675  fi
40676
40677    fi
40678
40679    if test "x$new_path" = x; then
40680      # It's still not found. Now this is an unrecoverable error.
40681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40682$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40683      has_space=`$ECHO "$complete" | $GREP " "`
40684      if test "x$has_space" != x; then
40685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40687      fi
40688      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40689    fi
40690  fi
40691
40692  # Now new_path has a complete unix path to the binary
40693  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40694    # Keep paths in /bin as-is, but remove trailing .exe if any
40695    new_path="${new_path/%.exe/}"
40696    # Do not save /bin paths to all_fixpath_prefixes!
40697  else
40698    # Not in mixed or Windows style, start by that.
40699    new_path=`cmd //c echo $new_path`
40700
40701  input_path="$new_path"
40702  # Check if we need to convert this using DOS-style short mode. If the path
40703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40704  # take no chances and rewrite it.
40705  # Note: m4 eats our [], so we need to use [ and ] instead.
40706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40707  if test "x$has_forbidden_chars" != x; then
40708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40710  fi
40711
40712    # Output is in $new_path
40713
40714  windows_path="$new_path"
40715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40716    unix_path=`$CYGPATH -u "$windows_path"`
40717    new_path="$unix_path"
40718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40720    new_path="$unix_path"
40721  fi
40722
40723    # remove trailing .exe if any
40724    new_path="${new_path/%.exe/}"
40725
40726    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40727    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40728  fi
40729
40730    else
40731      # We're on a unix platform. Hooray! :)
40732      # First separate the path from the arguments. This will split at the first
40733      # space.
40734      complete="$STRIP"
40735      path="${complete%% *}"
40736      tmp="$complete EOL"
40737      arguments="${tmp#* }"
40738
40739      # Cannot rely on the command "which" here since it doesn't always work.
40740      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40741      if test -z "$is_absolute_path"; then
40742        # Path to executable is not absolute. Find it.
40743        IFS_save="$IFS"
40744        IFS=:
40745        for p in $PATH; do
40746          if test -f "$p/$path" && test -x "$p/$path"; then
40747            new_path="$p/$path"
40748            break
40749          fi
40750        done
40751        IFS="$IFS_save"
40752      else
40753        # This is an absolute path, we can use it without further modifications.
40754        new_path="$path"
40755      fi
40756
40757      if test "x$new_path" = x; then
40758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40759$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40760        has_space=`$ECHO "$complete" | $GREP " "`
40761        if test "x$has_space" != x; then
40762          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40763$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40764        fi
40765        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40766      fi
40767    fi
40768
40769    # Now join together the path and the arguments once again
40770    if test "x$arguments" != xEOL; then
40771      new_complete="$new_path ${arguments% *}"
40772    else
40773      new_complete="$new_path"
40774    fi
40775
40776    if test "x$complete" != "x$new_complete"; then
40777      STRIP="$new_complete"
40778      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40779$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40780    fi
40781  fi
40782
40783    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40784
40785
40786  # Publish this variable in the help.
40787
40788
40789  if [ -z "${NM+x}" ]; then
40790    # The variable is not set by user, try to locate tool using the code snippet
40791    if test -n "$ac_tool_prefix"; then
40792  for ac_prog in nm gcc-nm
40793  do
40794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40797$as_echo_n "checking for $ac_word... " >&6; }
40798if ${ac_cv_prog_NM+:} false; then :
40799  $as_echo_n "(cached) " >&6
40800else
40801  if test -n "$NM"; then
40802  ac_cv_prog_NM="$NM" # Let the user override the test.
40803else
40804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40805for as_dir in $PATH
40806do
40807  IFS=$as_save_IFS
40808  test -z "$as_dir" && as_dir=.
40809    for ac_exec_ext in '' $ac_executable_extensions; do
40810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40811    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40813    break 2
40814  fi
40815done
40816  done
40817IFS=$as_save_IFS
40818
40819fi
40820fi
40821NM=$ac_cv_prog_NM
40822if test -n "$NM"; then
40823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40824$as_echo "$NM" >&6; }
40825else
40826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40827$as_echo "no" >&6; }
40828fi
40829
40830
40831    test -n "$NM" && break
40832  done
40833fi
40834if test -z "$NM"; then
40835  ac_ct_NM=$NM
40836  for ac_prog in nm gcc-nm
40837do
40838  # Extract the first word of "$ac_prog", so it can be a program name with args.
40839set dummy $ac_prog; ac_word=$2
40840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40841$as_echo_n "checking for $ac_word... " >&6; }
40842if ${ac_cv_prog_ac_ct_NM+:} false; then :
40843  $as_echo_n "(cached) " >&6
40844else
40845  if test -n "$ac_ct_NM"; then
40846  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40847else
40848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40849for as_dir in $PATH
40850do
40851  IFS=$as_save_IFS
40852  test -z "$as_dir" && as_dir=.
40853    for ac_exec_ext in '' $ac_executable_extensions; do
40854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40855    ac_cv_prog_ac_ct_NM="$ac_prog"
40856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40857    break 2
40858  fi
40859done
40860  done
40861IFS=$as_save_IFS
40862
40863fi
40864fi
40865ac_ct_NM=$ac_cv_prog_ac_ct_NM
40866if test -n "$ac_ct_NM"; then
40867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40868$as_echo "$ac_ct_NM" >&6; }
40869else
40870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40871$as_echo "no" >&6; }
40872fi
40873
40874
40875  test -n "$ac_ct_NM" && break
40876done
40877
40878  if test "x$ac_ct_NM" = x; then
40879    NM=""
40880  else
40881    case $cross_compiling:$ac_tool_warned in
40882yes:)
40883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40885ac_tool_warned=yes ;;
40886esac
40887    NM=$ac_ct_NM
40888  fi
40889fi
40890
40891  else
40892    # The variable is set, but is it from the command line or the environment?
40893
40894    # Try to remove the string !NM! from our list.
40895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40897      # If it failed, the variable was not from the command line. Ignore it,
40898      # but warn the user (except for BASH, which is always set by the calling BASH).
40899      if test "xNM" != xBASH; then
40900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40901$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40902      fi
40903      # Try to locate tool using the code snippet
40904      if test -n "$ac_tool_prefix"; then
40905  for ac_prog in nm gcc-nm
40906  do
40907    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40908set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40910$as_echo_n "checking for $ac_word... " >&6; }
40911if ${ac_cv_prog_NM+:} false; then :
40912  $as_echo_n "(cached) " >&6
40913else
40914  if test -n "$NM"; then
40915  ac_cv_prog_NM="$NM" # Let the user override the test.
40916else
40917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40918for as_dir in $PATH
40919do
40920  IFS=$as_save_IFS
40921  test -z "$as_dir" && as_dir=.
40922    for ac_exec_ext in '' $ac_executable_extensions; do
40923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40924    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40926    break 2
40927  fi
40928done
40929  done
40930IFS=$as_save_IFS
40931
40932fi
40933fi
40934NM=$ac_cv_prog_NM
40935if test -n "$NM"; then
40936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40937$as_echo "$NM" >&6; }
40938else
40939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40940$as_echo "no" >&6; }
40941fi
40942
40943
40944    test -n "$NM" && break
40945  done
40946fi
40947if test -z "$NM"; then
40948  ac_ct_NM=$NM
40949  for ac_prog in nm gcc-nm
40950do
40951  # Extract the first word of "$ac_prog", so it can be a program name with args.
40952set dummy $ac_prog; ac_word=$2
40953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40954$as_echo_n "checking for $ac_word... " >&6; }
40955if ${ac_cv_prog_ac_ct_NM+:} false; then :
40956  $as_echo_n "(cached) " >&6
40957else
40958  if test -n "$ac_ct_NM"; then
40959  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40960else
40961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40962for as_dir in $PATH
40963do
40964  IFS=$as_save_IFS
40965  test -z "$as_dir" && as_dir=.
40966    for ac_exec_ext in '' $ac_executable_extensions; do
40967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40968    ac_cv_prog_ac_ct_NM="$ac_prog"
40969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40970    break 2
40971  fi
40972done
40973  done
40974IFS=$as_save_IFS
40975
40976fi
40977fi
40978ac_ct_NM=$ac_cv_prog_ac_ct_NM
40979if test -n "$ac_ct_NM"; then
40980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40981$as_echo "$ac_ct_NM" >&6; }
40982else
40983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40984$as_echo "no" >&6; }
40985fi
40986
40987
40988  test -n "$ac_ct_NM" && break
40989done
40990
40991  if test "x$ac_ct_NM" = x; then
40992    NM=""
40993  else
40994    case $cross_compiling:$ac_tool_warned in
40995yes:)
40996{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40997$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40998ac_tool_warned=yes ;;
40999esac
41000    NM=$ac_ct_NM
41001  fi
41002fi
41003
41004    else
41005      # If it succeeded, then it was overridden by the user. We will use it
41006      # for the tool.
41007
41008      # First remove it from the list of overridden variables, so we can test
41009      # for unknown variables in the end.
41010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41011
41012      # Check if we try to supply an empty value
41013      if test "x$NM" = x; then
41014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41015$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41017$as_echo_n "checking for NM... " >&6; }
41018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41019$as_echo "disabled" >&6; }
41020      else
41021        # Check if the provided tool contains a complete path.
41022        tool_specified="$NM"
41023        tool_basename="${tool_specified##*/}"
41024        if test "x$tool_basename" = "x$tool_specified"; then
41025          # A command without a complete path is provided, search $PATH.
41026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41027$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41028          # Extract the first word of "$tool_basename", so it can be a program name with args.
41029set dummy $tool_basename; ac_word=$2
41030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41031$as_echo_n "checking for $ac_word... " >&6; }
41032if ${ac_cv_path_NM+:} false; then :
41033  $as_echo_n "(cached) " >&6
41034else
41035  case $NM in
41036  [\\/]* | ?:[\\/]*)
41037  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41038  ;;
41039  *)
41040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41041for as_dir in $PATH
41042do
41043  IFS=$as_save_IFS
41044  test -z "$as_dir" && as_dir=.
41045    for ac_exec_ext in '' $ac_executable_extensions; do
41046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41047    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41049    break 2
41050  fi
41051done
41052  done
41053IFS=$as_save_IFS
41054
41055  ;;
41056esac
41057fi
41058NM=$ac_cv_path_NM
41059if test -n "$NM"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41061$as_echo "$NM" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068          if test "x$NM" = x; then
41069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41070          fi
41071        else
41072          # Otherwise we believe it is a complete path. Use it as it is.
41073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41074$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41076$as_echo_n "checking for NM... " >&6; }
41077          if test ! -x "$tool_specified"; then
41078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41079$as_echo "not found" >&6; }
41080            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41081          fi
41082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41083$as_echo "$tool_specified" >&6; }
41084        fi
41085      fi
41086    fi
41087
41088  fi
41089
41090
41091    else
41092
41093
41094  # Publish this variable in the help.
41095
41096
41097  if [ -z "${NM+x}" ]; then
41098    # The variable is not set by user, try to locate tool using the code snippet
41099    if test -n "$ac_tool_prefix"; then
41100  for ac_prog in nm
41101  do
41102    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41105$as_echo_n "checking for $ac_word... " >&6; }
41106if ${ac_cv_prog_NM+:} false; then :
41107  $as_echo_n "(cached) " >&6
41108else
41109  if test -n "$NM"; then
41110  ac_cv_prog_NM="$NM" # Let the user override the test.
41111else
41112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41113for as_dir in $PATH
41114do
41115  IFS=$as_save_IFS
41116  test -z "$as_dir" && as_dir=.
41117    for ac_exec_ext in '' $ac_executable_extensions; do
41118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41119    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41121    break 2
41122  fi
41123done
41124  done
41125IFS=$as_save_IFS
41126
41127fi
41128fi
41129NM=$ac_cv_prog_NM
41130if test -n "$NM"; then
41131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41132$as_echo "$NM" >&6; }
41133else
41134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41135$as_echo "no" >&6; }
41136fi
41137
41138
41139    test -n "$NM" && break
41140  done
41141fi
41142if test -z "$NM"; then
41143  ac_ct_NM=$NM
41144  for ac_prog in nm
41145do
41146  # Extract the first word of "$ac_prog", so it can be a program name with args.
41147set dummy $ac_prog; ac_word=$2
41148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41149$as_echo_n "checking for $ac_word... " >&6; }
41150if ${ac_cv_prog_ac_ct_NM+:} false; then :
41151  $as_echo_n "(cached) " >&6
41152else
41153  if test -n "$ac_ct_NM"; then
41154  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41155else
41156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41157for as_dir in $PATH
41158do
41159  IFS=$as_save_IFS
41160  test -z "$as_dir" && as_dir=.
41161    for ac_exec_ext in '' $ac_executable_extensions; do
41162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41163    ac_cv_prog_ac_ct_NM="$ac_prog"
41164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41165    break 2
41166  fi
41167done
41168  done
41169IFS=$as_save_IFS
41170
41171fi
41172fi
41173ac_ct_NM=$ac_cv_prog_ac_ct_NM
41174if test -n "$ac_ct_NM"; then
41175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41176$as_echo "$ac_ct_NM" >&6; }
41177else
41178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41179$as_echo "no" >&6; }
41180fi
41181
41182
41183  test -n "$ac_ct_NM" && break
41184done
41185
41186  if test "x$ac_ct_NM" = x; then
41187    NM=""
41188  else
41189    case $cross_compiling:$ac_tool_warned in
41190yes:)
41191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41193ac_tool_warned=yes ;;
41194esac
41195    NM=$ac_ct_NM
41196  fi
41197fi
41198
41199  else
41200    # The variable is set, but is it from the command line or the environment?
41201
41202    # Try to remove the string !NM! from our list.
41203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41205      # If it failed, the variable was not from the command line. Ignore it,
41206      # but warn the user (except for BASH, which is always set by the calling BASH).
41207      if test "xNM" != xBASH; then
41208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41209$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41210      fi
41211      # Try to locate tool using the code snippet
41212      if test -n "$ac_tool_prefix"; then
41213  for ac_prog in nm
41214  do
41215    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41216set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41218$as_echo_n "checking for $ac_word... " >&6; }
41219if ${ac_cv_prog_NM+:} false; then :
41220  $as_echo_n "(cached) " >&6
41221else
41222  if test -n "$NM"; then
41223  ac_cv_prog_NM="$NM" # Let the user override the test.
41224else
41225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41226for as_dir in $PATH
41227do
41228  IFS=$as_save_IFS
41229  test -z "$as_dir" && as_dir=.
41230    for ac_exec_ext in '' $ac_executable_extensions; do
41231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41232    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41234    break 2
41235  fi
41236done
41237  done
41238IFS=$as_save_IFS
41239
41240fi
41241fi
41242NM=$ac_cv_prog_NM
41243if test -n "$NM"; then
41244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41245$as_echo "$NM" >&6; }
41246else
41247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41248$as_echo "no" >&6; }
41249fi
41250
41251
41252    test -n "$NM" && break
41253  done
41254fi
41255if test -z "$NM"; then
41256  ac_ct_NM=$NM
41257  for ac_prog in nm
41258do
41259  # Extract the first word of "$ac_prog", so it can be a program name with args.
41260set dummy $ac_prog; ac_word=$2
41261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41262$as_echo_n "checking for $ac_word... " >&6; }
41263if ${ac_cv_prog_ac_ct_NM+:} false; then :
41264  $as_echo_n "(cached) " >&6
41265else
41266  if test -n "$ac_ct_NM"; then
41267  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41268else
41269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41270for as_dir in $PATH
41271do
41272  IFS=$as_save_IFS
41273  test -z "$as_dir" && as_dir=.
41274    for ac_exec_ext in '' $ac_executable_extensions; do
41275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41276    ac_cv_prog_ac_ct_NM="$ac_prog"
41277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41278    break 2
41279  fi
41280done
41281  done
41282IFS=$as_save_IFS
41283
41284fi
41285fi
41286ac_ct_NM=$ac_cv_prog_ac_ct_NM
41287if test -n "$ac_ct_NM"; then
41288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41289$as_echo "$ac_ct_NM" >&6; }
41290else
41291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41292$as_echo "no" >&6; }
41293fi
41294
41295
41296  test -n "$ac_ct_NM" && break
41297done
41298
41299  if test "x$ac_ct_NM" = x; then
41300    NM=""
41301  else
41302    case $cross_compiling:$ac_tool_warned in
41303yes:)
41304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41306ac_tool_warned=yes ;;
41307esac
41308    NM=$ac_ct_NM
41309  fi
41310fi
41311
41312    else
41313      # If it succeeded, then it was overridden by the user. We will use it
41314      # for the tool.
41315
41316      # First remove it from the list of overridden variables, so we can test
41317      # for unknown variables in the end.
41318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41319
41320      # Check if we try to supply an empty value
41321      if test "x$NM" = x; then
41322        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41323$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41325$as_echo_n "checking for NM... " >&6; }
41326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41327$as_echo "disabled" >&6; }
41328      else
41329        # Check if the provided tool contains a complete path.
41330        tool_specified="$NM"
41331        tool_basename="${tool_specified##*/}"
41332        if test "x$tool_basename" = "x$tool_specified"; then
41333          # A command without a complete path is provided, search $PATH.
41334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41335$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41336          # Extract the first word of "$tool_basename", so it can be a program name with args.
41337set dummy $tool_basename; ac_word=$2
41338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41339$as_echo_n "checking for $ac_word... " >&6; }
41340if ${ac_cv_path_NM+:} false; then :
41341  $as_echo_n "(cached) " >&6
41342else
41343  case $NM in
41344  [\\/]* | ?:[\\/]*)
41345  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41346  ;;
41347  *)
41348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41349for as_dir in $PATH
41350do
41351  IFS=$as_save_IFS
41352  test -z "$as_dir" && as_dir=.
41353    for ac_exec_ext in '' $ac_executable_extensions; do
41354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41355    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41357    break 2
41358  fi
41359done
41360  done
41361IFS=$as_save_IFS
41362
41363  ;;
41364esac
41365fi
41366NM=$ac_cv_path_NM
41367if test -n "$NM"; then
41368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41369$as_echo "$NM" >&6; }
41370else
41371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41372$as_echo "no" >&6; }
41373fi
41374
41375
41376          if test "x$NM" = x; then
41377            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41378          fi
41379        else
41380          # Otherwise we believe it is a complete path. Use it as it is.
41381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41382$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41383          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41384$as_echo_n "checking for NM... " >&6; }
41385          if test ! -x "$tool_specified"; then
41386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41387$as_echo "not found" >&6; }
41388            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41389          fi
41390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41391$as_echo "$tool_specified" >&6; }
41392        fi
41393      fi
41394    fi
41395
41396  fi
41397
41398
41399    fi
41400
41401  # Only process if variable expands to non-empty
41402
41403  if test "x$NM" != x; then
41404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41405
41406  # First separate the path from the arguments. This will split at the first
41407  # space.
41408  complete="$NM"
41409  path="${complete%% *}"
41410  tmp="$complete EOL"
41411  arguments="${tmp#* }"
41412
41413  # Input might be given as Windows format, start by converting to
41414  # unix format.
41415  new_path=`$CYGPATH -u "$path"`
41416
41417  # Now try to locate executable using which
41418  new_path=`$WHICH "$new_path" 2> /dev/null`
41419  # bat and cmd files are not always considered executable in cygwin causing which
41420  # to not find them
41421  if test "x$new_path" = x \
41422      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41423      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41424    new_path=`$CYGPATH -u "$path"`
41425  fi
41426  if test "x$new_path" = x; then
41427    # Oops. Which didn't find the executable.
41428    # The splitting of arguments from the executable at a space might have been incorrect,
41429    # since paths with space are more likely in Windows. Give it another try with the whole
41430    # argument.
41431    path="$complete"
41432    arguments="EOL"
41433    new_path=`$CYGPATH -u "$path"`
41434    new_path=`$WHICH "$new_path" 2> /dev/null`
41435    # bat and cmd files are not always considered executable in cygwin causing which
41436    # to not find them
41437    if test "x$new_path" = x \
41438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41440      new_path=`$CYGPATH -u "$path"`
41441    fi
41442    if test "x$new_path" = x; then
41443      # It's still not found. Now this is an unrecoverable error.
41444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41445$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41446      has_space=`$ECHO "$complete" | $GREP " "`
41447      if test "x$has_space" != x; then
41448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41450      fi
41451      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41452    fi
41453  fi
41454
41455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41458  # "foo.exe" is OK but "foo" is an error.
41459  #
41460  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41461  # It is also a way to make sure we got the proper file name for the real test later on.
41462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41463  if test "x$test_shortpath" = x; then
41464    # Short path failed, file does not exist as specified.
41465    # Try adding .exe or .cmd
41466    if test -f "${new_path}.exe"; then
41467      input_to_shortpath="${new_path}.exe"
41468    elif test -f "${new_path}.cmd"; then
41469      input_to_shortpath="${new_path}.cmd"
41470    else
41471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41472$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41473      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41474$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41475      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41476    fi
41477  else
41478    input_to_shortpath="$new_path"
41479  fi
41480
41481  # Call helper function which possibly converts this using DOS-style short mode.
41482  # If so, the updated path is stored in $new_path.
41483  new_path="$input_to_shortpath"
41484
41485  input_path="$input_to_shortpath"
41486  # Check if we need to convert this using DOS-style short mode. If the path
41487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41488  # take no chances and rewrite it.
41489  # Note: m4 eats our [], so we need to use [ and ] instead.
41490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41491  if test "x$has_forbidden_chars" != x; then
41492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41496      # Going to short mode and back again did indeed matter. Since short mode is
41497      # case insensitive, let's make it lowercase to improve readability.
41498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41499      # Now convert it back to Unix-style (cygpath)
41500      input_path=`$CYGPATH -u "$shortmode_path"`
41501      new_path="$input_path"
41502    fi
41503  fi
41504
41505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41506  if test "x$test_cygdrive_prefix" = x; then
41507    # As a simple fix, exclude /usr/bin since it's not a real path.
41508    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41510      # a path prefixed by /cygdrive for fixpath to work.
41511      new_path="$CYGWIN_ROOT_PATH$input_path"
41512    fi
41513  fi
41514
41515  # remove trailing .exe if any
41516  new_path="${new_path/%.exe/}"
41517
41518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41519
41520  # First separate the path from the arguments. This will split at the first
41521  # space.
41522  complete="$NM"
41523  path="${complete%% *}"
41524  tmp="$complete EOL"
41525  arguments="${tmp#* }"
41526
41527  # Input might be given as Windows format, start by converting to
41528  # unix format.
41529  new_path="$path"
41530
41531  windows_path="$new_path"
41532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41533    unix_path=`$CYGPATH -u "$windows_path"`
41534    new_path="$unix_path"
41535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41537    new_path="$unix_path"
41538  fi
41539
41540
41541  # Now try to locate executable using which
41542  new_path=`$WHICH "$new_path" 2> /dev/null`
41543
41544  if test "x$new_path" = x; then
41545    # Oops. Which didn't find the executable.
41546    # The splitting of arguments from the executable at a space might have been incorrect,
41547    # since paths with space are more likely in Windows. Give it another try with the whole
41548    # argument.
41549    path="$complete"
41550    arguments="EOL"
41551    new_path="$path"
41552
41553  windows_path="$new_path"
41554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41555    unix_path=`$CYGPATH -u "$windows_path"`
41556    new_path="$unix_path"
41557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41559    new_path="$unix_path"
41560  fi
41561
41562
41563    new_path=`$WHICH "$new_path" 2> /dev/null`
41564    # bat and cmd files are not always considered executable in MSYS causing which
41565    # to not find them
41566    if test "x$new_path" = x \
41567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41569      new_path="$path"
41570
41571  windows_path="$new_path"
41572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41573    unix_path=`$CYGPATH -u "$windows_path"`
41574    new_path="$unix_path"
41575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41577    new_path="$unix_path"
41578  fi
41579
41580    fi
41581
41582    if test "x$new_path" = x; then
41583      # It's still not found. Now this is an unrecoverable error.
41584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41585$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41586      has_space=`$ECHO "$complete" | $GREP " "`
41587      if test "x$has_space" != x; then
41588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41590      fi
41591      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41592    fi
41593  fi
41594
41595  # Now new_path has a complete unix path to the binary
41596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41597    # Keep paths in /bin as-is, but remove trailing .exe if any
41598    new_path="${new_path/%.exe/}"
41599    # Do not save /bin paths to all_fixpath_prefixes!
41600  else
41601    # Not in mixed or Windows style, start by that.
41602    new_path=`cmd //c echo $new_path`
41603
41604  input_path="$new_path"
41605  # Check if we need to convert this using DOS-style short mode. If the path
41606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41607  # take no chances and rewrite it.
41608  # Note: m4 eats our [], so we need to use [ and ] instead.
41609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41610  if test "x$has_forbidden_chars" != x; then
41611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41613  fi
41614
41615    # Output is in $new_path
41616
41617  windows_path="$new_path"
41618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41619    unix_path=`$CYGPATH -u "$windows_path"`
41620    new_path="$unix_path"
41621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41623    new_path="$unix_path"
41624  fi
41625
41626    # remove trailing .exe if any
41627    new_path="${new_path/%.exe/}"
41628
41629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41631  fi
41632
41633    else
41634      # We're on a unix platform. Hooray! :)
41635      # First separate the path from the arguments. This will split at the first
41636      # space.
41637      complete="$NM"
41638      path="${complete%% *}"
41639      tmp="$complete EOL"
41640      arguments="${tmp#* }"
41641
41642      # Cannot rely on the command "which" here since it doesn't always work.
41643      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41644      if test -z "$is_absolute_path"; then
41645        # Path to executable is not absolute. Find it.
41646        IFS_save="$IFS"
41647        IFS=:
41648        for p in $PATH; do
41649          if test -f "$p/$path" && test -x "$p/$path"; then
41650            new_path="$p/$path"
41651            break
41652          fi
41653        done
41654        IFS="$IFS_save"
41655      else
41656        # This is an absolute path, we can use it without further modifications.
41657        new_path="$path"
41658      fi
41659
41660      if test "x$new_path" = x; then
41661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41662$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41663        has_space=`$ECHO "$complete" | $GREP " "`
41664        if test "x$has_space" != x; then
41665          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41667        fi
41668        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41669      fi
41670    fi
41671
41672    # Now join together the path and the arguments once again
41673    if test "x$arguments" != xEOL; then
41674      new_complete="$new_path ${arguments% *}"
41675    else
41676      new_complete="$new_path"
41677    fi
41678
41679    if test "x$complete" != "x$new_complete"; then
41680      NM="$new_complete"
41681      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41682$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41683    fi
41684  fi
41685
41686    GNM="$NM"
41687
41688  fi
41689
41690  # objcopy is used for moving debug symbols to separate files when
41691  # full debug symbols are enabled.
41692  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41693
41694
41695  # Publish this variable in the help.
41696
41697
41698  if [ -z "${OBJCOPY+x}" ]; then
41699    # The variable is not set by user, try to locate tool using the code snippet
41700    if test -n "$ac_tool_prefix"; then
41701  for ac_prog in gobjcopy objcopy
41702  do
41703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41706$as_echo_n "checking for $ac_word... " >&6; }
41707if ${ac_cv_prog_OBJCOPY+:} false; then :
41708  $as_echo_n "(cached) " >&6
41709else
41710  if test -n "$OBJCOPY"; then
41711  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41712else
41713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41714for as_dir in $PATH
41715do
41716  IFS=$as_save_IFS
41717  test -z "$as_dir" && as_dir=.
41718    for ac_exec_ext in '' $ac_executable_extensions; do
41719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41720    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41722    break 2
41723  fi
41724done
41725  done
41726IFS=$as_save_IFS
41727
41728fi
41729fi
41730OBJCOPY=$ac_cv_prog_OBJCOPY
41731if test -n "$OBJCOPY"; then
41732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41733$as_echo "$OBJCOPY" >&6; }
41734else
41735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41736$as_echo "no" >&6; }
41737fi
41738
41739
41740    test -n "$OBJCOPY" && break
41741  done
41742fi
41743if test -z "$OBJCOPY"; then
41744  ac_ct_OBJCOPY=$OBJCOPY
41745  for ac_prog in gobjcopy objcopy
41746do
41747  # Extract the first word of "$ac_prog", so it can be a program name with args.
41748set dummy $ac_prog; ac_word=$2
41749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41750$as_echo_n "checking for $ac_word... " >&6; }
41751if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41752  $as_echo_n "(cached) " >&6
41753else
41754  if test -n "$ac_ct_OBJCOPY"; then
41755  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41756else
41757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41758for as_dir in $PATH
41759do
41760  IFS=$as_save_IFS
41761  test -z "$as_dir" && as_dir=.
41762    for ac_exec_ext in '' $ac_executable_extensions; do
41763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41764    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41766    break 2
41767  fi
41768done
41769  done
41770IFS=$as_save_IFS
41771
41772fi
41773fi
41774ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41775if test -n "$ac_ct_OBJCOPY"; then
41776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41777$as_echo "$ac_ct_OBJCOPY" >&6; }
41778else
41779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41780$as_echo "no" >&6; }
41781fi
41782
41783
41784  test -n "$ac_ct_OBJCOPY" && break
41785done
41786
41787  if test "x$ac_ct_OBJCOPY" = x; then
41788    OBJCOPY=""
41789  else
41790    case $cross_compiling:$ac_tool_warned in
41791yes:)
41792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41794ac_tool_warned=yes ;;
41795esac
41796    OBJCOPY=$ac_ct_OBJCOPY
41797  fi
41798fi
41799
41800  else
41801    # The variable is set, but is it from the command line or the environment?
41802
41803    # Try to remove the string !OBJCOPY! from our list.
41804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41806      # If it failed, the variable was not from the command line. Ignore it,
41807      # but warn the user (except for BASH, which is always set by the calling BASH).
41808      if test "xOBJCOPY" != xBASH; then
41809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41810$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41811      fi
41812      # Try to locate tool using the code snippet
41813      if test -n "$ac_tool_prefix"; then
41814  for ac_prog in gobjcopy objcopy
41815  do
41816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41819$as_echo_n "checking for $ac_word... " >&6; }
41820if ${ac_cv_prog_OBJCOPY+:} false; then :
41821  $as_echo_n "(cached) " >&6
41822else
41823  if test -n "$OBJCOPY"; then
41824  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41825else
41826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41827for as_dir in $PATH
41828do
41829  IFS=$as_save_IFS
41830  test -z "$as_dir" && as_dir=.
41831    for ac_exec_ext in '' $ac_executable_extensions; do
41832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41833    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41835    break 2
41836  fi
41837done
41838  done
41839IFS=$as_save_IFS
41840
41841fi
41842fi
41843OBJCOPY=$ac_cv_prog_OBJCOPY
41844if test -n "$OBJCOPY"; then
41845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41846$as_echo "$OBJCOPY" >&6; }
41847else
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41849$as_echo "no" >&6; }
41850fi
41851
41852
41853    test -n "$OBJCOPY" && break
41854  done
41855fi
41856if test -z "$OBJCOPY"; then
41857  ac_ct_OBJCOPY=$OBJCOPY
41858  for ac_prog in gobjcopy objcopy
41859do
41860  # Extract the first word of "$ac_prog", so it can be a program name with args.
41861set dummy $ac_prog; ac_word=$2
41862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41863$as_echo_n "checking for $ac_word... " >&6; }
41864if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41865  $as_echo_n "(cached) " >&6
41866else
41867  if test -n "$ac_ct_OBJCOPY"; then
41868  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41869else
41870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41871for as_dir in $PATH
41872do
41873  IFS=$as_save_IFS
41874  test -z "$as_dir" && as_dir=.
41875    for ac_exec_ext in '' $ac_executable_extensions; do
41876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41877    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41879    break 2
41880  fi
41881done
41882  done
41883IFS=$as_save_IFS
41884
41885fi
41886fi
41887ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41888if test -n "$ac_ct_OBJCOPY"; then
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41890$as_echo "$ac_ct_OBJCOPY" >&6; }
41891else
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41893$as_echo "no" >&6; }
41894fi
41895
41896
41897  test -n "$ac_ct_OBJCOPY" && break
41898done
41899
41900  if test "x$ac_ct_OBJCOPY" = x; then
41901    OBJCOPY=""
41902  else
41903    case $cross_compiling:$ac_tool_warned in
41904yes:)
41905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41907ac_tool_warned=yes ;;
41908esac
41909    OBJCOPY=$ac_ct_OBJCOPY
41910  fi
41911fi
41912
41913    else
41914      # If it succeeded, then it was overridden by the user. We will use it
41915      # for the tool.
41916
41917      # First remove it from the list of overridden variables, so we can test
41918      # for unknown variables in the end.
41919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41920
41921      # Check if we try to supply an empty value
41922      if test "x$OBJCOPY" = x; then
41923        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41924$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41926$as_echo_n "checking for OBJCOPY... " >&6; }
41927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41928$as_echo "disabled" >&6; }
41929      else
41930        # Check if the provided tool contains a complete path.
41931        tool_specified="$OBJCOPY"
41932        tool_basename="${tool_specified##*/}"
41933        if test "x$tool_basename" = "x$tool_specified"; then
41934          # A command without a complete path is provided, search $PATH.
41935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41936$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41937          # Extract the first word of "$tool_basename", so it can be a program name with args.
41938set dummy $tool_basename; ac_word=$2
41939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41940$as_echo_n "checking for $ac_word... " >&6; }
41941if ${ac_cv_path_OBJCOPY+:} false; then :
41942  $as_echo_n "(cached) " >&6
41943else
41944  case $OBJCOPY in
41945  [\\/]* | ?:[\\/]*)
41946  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41947  ;;
41948  *)
41949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41950for as_dir in $PATH
41951do
41952  IFS=$as_save_IFS
41953  test -z "$as_dir" && as_dir=.
41954    for ac_exec_ext in '' $ac_executable_extensions; do
41955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41956    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41958    break 2
41959  fi
41960done
41961  done
41962IFS=$as_save_IFS
41963
41964  ;;
41965esac
41966fi
41967OBJCOPY=$ac_cv_path_OBJCOPY
41968if test -n "$OBJCOPY"; then
41969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41970$as_echo "$OBJCOPY" >&6; }
41971else
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973$as_echo "no" >&6; }
41974fi
41975
41976
41977          if test "x$OBJCOPY" = x; then
41978            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41979          fi
41980        else
41981          # Otherwise we believe it is a complete path. Use it as it is.
41982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41983$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41984          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41985$as_echo_n "checking for OBJCOPY... " >&6; }
41986          if test ! -x "$tool_specified"; then
41987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41988$as_echo "not found" >&6; }
41989            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41990          fi
41991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41992$as_echo "$tool_specified" >&6; }
41993        fi
41994      fi
41995    fi
41996
41997  fi
41998
41999
42000    # Only call fixup if objcopy was found.
42001    if test -n "$OBJCOPY"; then
42002
42003  # Only process if variable expands to non-empty
42004
42005  if test "x$OBJCOPY" != x; then
42006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42007
42008  # First separate the path from the arguments. This will split at the first
42009  # space.
42010  complete="$OBJCOPY"
42011  path="${complete%% *}"
42012  tmp="$complete EOL"
42013  arguments="${tmp#* }"
42014
42015  # Input might be given as Windows format, start by converting to
42016  # unix format.
42017  new_path=`$CYGPATH -u "$path"`
42018
42019  # Now try to locate executable using which
42020  new_path=`$WHICH "$new_path" 2> /dev/null`
42021  # bat and cmd files are not always considered executable in cygwin causing which
42022  # to not find them
42023  if test "x$new_path" = x \
42024      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42025      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42026    new_path=`$CYGPATH -u "$path"`
42027  fi
42028  if test "x$new_path" = x; then
42029    # Oops. Which didn't find the executable.
42030    # The splitting of arguments from the executable at a space might have been incorrect,
42031    # since paths with space are more likely in Windows. Give it another try with the whole
42032    # argument.
42033    path="$complete"
42034    arguments="EOL"
42035    new_path=`$CYGPATH -u "$path"`
42036    new_path=`$WHICH "$new_path" 2> /dev/null`
42037    # bat and cmd files are not always considered executable in cygwin causing which
42038    # to not find them
42039    if test "x$new_path" = x \
42040        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42041        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42042      new_path=`$CYGPATH -u "$path"`
42043    fi
42044    if test "x$new_path" = x; then
42045      # It's still not found. Now this is an unrecoverable error.
42046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42047$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42048      has_space=`$ECHO "$complete" | $GREP " "`
42049      if test "x$has_space" != x; then
42050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42052      fi
42053      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42054    fi
42055  fi
42056
42057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42060  # "foo.exe" is OK but "foo" is an error.
42061  #
42062  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42063  # It is also a way to make sure we got the proper file name for the real test later on.
42064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42065  if test "x$test_shortpath" = x; then
42066    # Short path failed, file does not exist as specified.
42067    # Try adding .exe or .cmd
42068    if test -f "${new_path}.exe"; then
42069      input_to_shortpath="${new_path}.exe"
42070    elif test -f "${new_path}.cmd"; then
42071      input_to_shortpath="${new_path}.cmd"
42072    else
42073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42074$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42075      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42076$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42077      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42078    fi
42079  else
42080    input_to_shortpath="$new_path"
42081  fi
42082
42083  # Call helper function which possibly converts this using DOS-style short mode.
42084  # If so, the updated path is stored in $new_path.
42085  new_path="$input_to_shortpath"
42086
42087  input_path="$input_to_shortpath"
42088  # Check if we need to convert this using DOS-style short mode. If the path
42089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42090  # take no chances and rewrite it.
42091  # Note: m4 eats our [], so we need to use [ and ] instead.
42092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42093  if test "x$has_forbidden_chars" != x; then
42094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42098      # Going to short mode and back again did indeed matter. Since short mode is
42099      # case insensitive, let's make it lowercase to improve readability.
42100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42101      # Now convert it back to Unix-style (cygpath)
42102      input_path=`$CYGPATH -u "$shortmode_path"`
42103      new_path="$input_path"
42104    fi
42105  fi
42106
42107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42108  if test "x$test_cygdrive_prefix" = x; then
42109    # As a simple fix, exclude /usr/bin since it's not a real path.
42110    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42112      # a path prefixed by /cygdrive for fixpath to work.
42113      new_path="$CYGWIN_ROOT_PATH$input_path"
42114    fi
42115  fi
42116
42117  # remove trailing .exe if any
42118  new_path="${new_path/%.exe/}"
42119
42120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42121
42122  # First separate the path from the arguments. This will split at the first
42123  # space.
42124  complete="$OBJCOPY"
42125  path="${complete%% *}"
42126  tmp="$complete EOL"
42127  arguments="${tmp#* }"
42128
42129  # Input might be given as Windows format, start by converting to
42130  # unix format.
42131  new_path="$path"
42132
42133  windows_path="$new_path"
42134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42135    unix_path=`$CYGPATH -u "$windows_path"`
42136    new_path="$unix_path"
42137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42139    new_path="$unix_path"
42140  fi
42141
42142
42143  # Now try to locate executable using which
42144  new_path=`$WHICH "$new_path" 2> /dev/null`
42145
42146  if test "x$new_path" = x; then
42147    # Oops. Which didn't find the executable.
42148    # The splitting of arguments from the executable at a space might have been incorrect,
42149    # since paths with space are more likely in Windows. Give it another try with the whole
42150    # argument.
42151    path="$complete"
42152    arguments="EOL"
42153    new_path="$path"
42154
42155  windows_path="$new_path"
42156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42157    unix_path=`$CYGPATH -u "$windows_path"`
42158    new_path="$unix_path"
42159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42161    new_path="$unix_path"
42162  fi
42163
42164
42165    new_path=`$WHICH "$new_path" 2> /dev/null`
42166    # bat and cmd files are not always considered executable in MSYS causing which
42167    # to not find them
42168    if test "x$new_path" = x \
42169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42171      new_path="$path"
42172
42173  windows_path="$new_path"
42174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42175    unix_path=`$CYGPATH -u "$windows_path"`
42176    new_path="$unix_path"
42177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42179    new_path="$unix_path"
42180  fi
42181
42182    fi
42183
42184    if test "x$new_path" = x; then
42185      # It's still not found. Now this is an unrecoverable error.
42186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42187$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42188      has_space=`$ECHO "$complete" | $GREP " "`
42189      if test "x$has_space" != x; then
42190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42192      fi
42193      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42194    fi
42195  fi
42196
42197  # Now new_path has a complete unix path to the binary
42198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42199    # Keep paths in /bin as-is, but remove trailing .exe if any
42200    new_path="${new_path/%.exe/}"
42201    # Do not save /bin paths to all_fixpath_prefixes!
42202  else
42203    # Not in mixed or Windows style, start by that.
42204    new_path=`cmd //c echo $new_path`
42205
42206  input_path="$new_path"
42207  # Check if we need to convert this using DOS-style short mode. If the path
42208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42209  # take no chances and rewrite it.
42210  # Note: m4 eats our [], so we need to use [ and ] instead.
42211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42212  if test "x$has_forbidden_chars" != x; then
42213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42215  fi
42216
42217    # Output is in $new_path
42218
42219  windows_path="$new_path"
42220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42221    unix_path=`$CYGPATH -u "$windows_path"`
42222    new_path="$unix_path"
42223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42225    new_path="$unix_path"
42226  fi
42227
42228    # remove trailing .exe if any
42229    new_path="${new_path/%.exe/}"
42230
42231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42233  fi
42234
42235    else
42236      # We're on a unix platform. Hooray! :)
42237      # First separate the path from the arguments. This will split at the first
42238      # space.
42239      complete="$OBJCOPY"
42240      path="${complete%% *}"
42241      tmp="$complete EOL"
42242      arguments="${tmp#* }"
42243
42244      # Cannot rely on the command "which" here since it doesn't always work.
42245      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42246      if test -z "$is_absolute_path"; then
42247        # Path to executable is not absolute. Find it.
42248        IFS_save="$IFS"
42249        IFS=:
42250        for p in $PATH; do
42251          if test -f "$p/$path" && test -x "$p/$path"; then
42252            new_path="$p/$path"
42253            break
42254          fi
42255        done
42256        IFS="$IFS_save"
42257      else
42258        # This is an absolute path, we can use it without further modifications.
42259        new_path="$path"
42260      fi
42261
42262      if test "x$new_path" = x; then
42263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42264$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42265        has_space=`$ECHO "$complete" | $GREP " "`
42266        if test "x$has_space" != x; then
42267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42269        fi
42270        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42271      fi
42272    fi
42273
42274    # Now join together the path and the arguments once again
42275    if test "x$arguments" != xEOL; then
42276      new_complete="$new_path ${arguments% *}"
42277    else
42278      new_complete="$new_path"
42279    fi
42280
42281    if test "x$complete" != "x$new_complete"; then
42282      OBJCOPY="$new_complete"
42283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42284$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42285    fi
42286  fi
42287
42288      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42289        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42290        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42291        # - version number is last blank separate word on first line
42292        # - version number formats that have been seen:
42293        #   - <major>.<minor>
42294        #   - <major>.<minor>.<micro>
42295        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42296        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42297         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42298              -e 's/.* //' \
42299              -e '/^[01]\./b bad' \
42300              -e '/^2\./{' \
42301              -e '  s/^2\.//' \
42302              -e '  /^[0-9]$/b bad' \
42303              -e '  /^[0-9]\./b bad' \
42304              -e '  /^1[0-9]$/b bad' \
42305              -e '  /^1[0-9]\./b bad' \
42306              -e '  /^20\./b bad' \
42307              -e '  /^21\.0$/b bad' \
42308              -e '  /^21\.0\./b bad' \
42309              -e '}' \
42310              -e ':good' \
42311              -e 's/.*/VALID_VERSION/p' \
42312              -e 'q' \
42313              -e ':bad' \
42314              -e 's/.*/BAD_VERSION/p' \
42315              -e 'q'`
42316        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42317          OBJCOPY=
42318          { $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
42319$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42320          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42321$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42322          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42323$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42324          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42325$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42326          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42327$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42328        fi
42329      fi
42330    fi
42331  fi
42332
42333
42334
42335  # Publish this variable in the help.
42336
42337
42338  if [ -z "${OBJDUMP+x}" ]; then
42339    # The variable is not set by user, try to locate tool using the code snippet
42340    if test -n "$ac_tool_prefix"; then
42341  for ac_prog in gobjdump objdump
42342  do
42343    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42344set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42346$as_echo_n "checking for $ac_word... " >&6; }
42347if ${ac_cv_prog_OBJDUMP+:} false; then :
42348  $as_echo_n "(cached) " >&6
42349else
42350  if test -n "$OBJDUMP"; then
42351  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42352else
42353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42354for as_dir in $PATH
42355do
42356  IFS=$as_save_IFS
42357  test -z "$as_dir" && as_dir=.
42358    for ac_exec_ext in '' $ac_executable_extensions; do
42359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42360    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42362    break 2
42363  fi
42364done
42365  done
42366IFS=$as_save_IFS
42367
42368fi
42369fi
42370OBJDUMP=$ac_cv_prog_OBJDUMP
42371if test -n "$OBJDUMP"; then
42372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42373$as_echo "$OBJDUMP" >&6; }
42374else
42375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42376$as_echo "no" >&6; }
42377fi
42378
42379
42380    test -n "$OBJDUMP" && break
42381  done
42382fi
42383if test -z "$OBJDUMP"; then
42384  ac_ct_OBJDUMP=$OBJDUMP
42385  for ac_prog in gobjdump objdump
42386do
42387  # Extract the first word of "$ac_prog", so it can be a program name with args.
42388set dummy $ac_prog; ac_word=$2
42389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42390$as_echo_n "checking for $ac_word... " >&6; }
42391if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42392  $as_echo_n "(cached) " >&6
42393else
42394  if test -n "$ac_ct_OBJDUMP"; then
42395  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42396else
42397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42398for as_dir in $PATH
42399do
42400  IFS=$as_save_IFS
42401  test -z "$as_dir" && as_dir=.
42402    for ac_exec_ext in '' $ac_executable_extensions; do
42403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42404    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42406    break 2
42407  fi
42408done
42409  done
42410IFS=$as_save_IFS
42411
42412fi
42413fi
42414ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42415if test -n "$ac_ct_OBJDUMP"; then
42416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42417$as_echo "$ac_ct_OBJDUMP" >&6; }
42418else
42419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42420$as_echo "no" >&6; }
42421fi
42422
42423
42424  test -n "$ac_ct_OBJDUMP" && break
42425done
42426
42427  if test "x$ac_ct_OBJDUMP" = x; then
42428    OBJDUMP=""
42429  else
42430    case $cross_compiling:$ac_tool_warned in
42431yes:)
42432{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42433$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42434ac_tool_warned=yes ;;
42435esac
42436    OBJDUMP=$ac_ct_OBJDUMP
42437  fi
42438fi
42439
42440  else
42441    # The variable is set, but is it from the command line or the environment?
42442
42443    # Try to remove the string !OBJDUMP! from our list.
42444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42446      # If it failed, the variable was not from the command line. Ignore it,
42447      # but warn the user (except for BASH, which is always set by the calling BASH).
42448      if test "xOBJDUMP" != xBASH; then
42449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42450$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42451      fi
42452      # Try to locate tool using the code snippet
42453      if test -n "$ac_tool_prefix"; then
42454  for ac_prog in gobjdump objdump
42455  do
42456    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42457set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42459$as_echo_n "checking for $ac_word... " >&6; }
42460if ${ac_cv_prog_OBJDUMP+:} false; then :
42461  $as_echo_n "(cached) " >&6
42462else
42463  if test -n "$OBJDUMP"; then
42464  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42465else
42466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42467for as_dir in $PATH
42468do
42469  IFS=$as_save_IFS
42470  test -z "$as_dir" && as_dir=.
42471    for ac_exec_ext in '' $ac_executable_extensions; do
42472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42473    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42475    break 2
42476  fi
42477done
42478  done
42479IFS=$as_save_IFS
42480
42481fi
42482fi
42483OBJDUMP=$ac_cv_prog_OBJDUMP
42484if test -n "$OBJDUMP"; then
42485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42486$as_echo "$OBJDUMP" >&6; }
42487else
42488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42489$as_echo "no" >&6; }
42490fi
42491
42492
42493    test -n "$OBJDUMP" && break
42494  done
42495fi
42496if test -z "$OBJDUMP"; then
42497  ac_ct_OBJDUMP=$OBJDUMP
42498  for ac_prog in gobjdump objdump
42499do
42500  # Extract the first word of "$ac_prog", so it can be a program name with args.
42501set dummy $ac_prog; ac_word=$2
42502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42503$as_echo_n "checking for $ac_word... " >&6; }
42504if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42505  $as_echo_n "(cached) " >&6
42506else
42507  if test -n "$ac_ct_OBJDUMP"; then
42508  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42509else
42510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42511for as_dir in $PATH
42512do
42513  IFS=$as_save_IFS
42514  test -z "$as_dir" && as_dir=.
42515    for ac_exec_ext in '' $ac_executable_extensions; do
42516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42517    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42519    break 2
42520  fi
42521done
42522  done
42523IFS=$as_save_IFS
42524
42525fi
42526fi
42527ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42528if test -n "$ac_ct_OBJDUMP"; then
42529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42530$as_echo "$ac_ct_OBJDUMP" >&6; }
42531else
42532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42533$as_echo "no" >&6; }
42534fi
42535
42536
42537  test -n "$ac_ct_OBJDUMP" && break
42538done
42539
42540  if test "x$ac_ct_OBJDUMP" = x; then
42541    OBJDUMP=""
42542  else
42543    case $cross_compiling:$ac_tool_warned in
42544yes:)
42545{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42546$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42547ac_tool_warned=yes ;;
42548esac
42549    OBJDUMP=$ac_ct_OBJDUMP
42550  fi
42551fi
42552
42553    else
42554      # If it succeeded, then it was overridden by the user. We will use it
42555      # for the tool.
42556
42557      # First remove it from the list of overridden variables, so we can test
42558      # for unknown variables in the end.
42559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42560
42561      # Check if we try to supply an empty value
42562      if test "x$OBJDUMP" = x; then
42563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42564$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42566$as_echo_n "checking for OBJDUMP... " >&6; }
42567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42568$as_echo "disabled" >&6; }
42569      else
42570        # Check if the provided tool contains a complete path.
42571        tool_specified="$OBJDUMP"
42572        tool_basename="${tool_specified##*/}"
42573        if test "x$tool_basename" = "x$tool_specified"; then
42574          # A command without a complete path is provided, search $PATH.
42575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42576$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42577          # Extract the first word of "$tool_basename", so it can be a program name with args.
42578set dummy $tool_basename; ac_word=$2
42579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42580$as_echo_n "checking for $ac_word... " >&6; }
42581if ${ac_cv_path_OBJDUMP+:} false; then :
42582  $as_echo_n "(cached) " >&6
42583else
42584  case $OBJDUMP in
42585  [\\/]* | ?:[\\/]*)
42586  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42587  ;;
42588  *)
42589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42590for as_dir in $PATH
42591do
42592  IFS=$as_save_IFS
42593  test -z "$as_dir" && as_dir=.
42594    for ac_exec_ext in '' $ac_executable_extensions; do
42595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42596    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42598    break 2
42599  fi
42600done
42601  done
42602IFS=$as_save_IFS
42603
42604  ;;
42605esac
42606fi
42607OBJDUMP=$ac_cv_path_OBJDUMP
42608if test -n "$OBJDUMP"; then
42609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42610$as_echo "$OBJDUMP" >&6; }
42611else
42612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42613$as_echo "no" >&6; }
42614fi
42615
42616
42617          if test "x$OBJDUMP" = x; then
42618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42619          fi
42620        else
42621          # Otherwise we believe it is a complete path. Use it as it is.
42622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42623$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42625$as_echo_n "checking for OBJDUMP... " >&6; }
42626          if test ! -x "$tool_specified"; then
42627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42628$as_echo "not found" >&6; }
42629            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42630          fi
42631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42632$as_echo "$tool_specified" >&6; }
42633        fi
42634      fi
42635    fi
42636
42637  fi
42638
42639
42640  if test "x$OBJDUMP" != x; then
42641    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42642    # bails if argument is missing.
42643
42644  # Only process if variable expands to non-empty
42645
42646  if test "x$OBJDUMP" != x; then
42647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42648
42649  # First separate the path from the arguments. This will split at the first
42650  # space.
42651  complete="$OBJDUMP"
42652  path="${complete%% *}"
42653  tmp="$complete EOL"
42654  arguments="${tmp#* }"
42655
42656  # Input might be given as Windows format, start by converting to
42657  # unix format.
42658  new_path=`$CYGPATH -u "$path"`
42659
42660  # Now try to locate executable using which
42661  new_path=`$WHICH "$new_path" 2> /dev/null`
42662  # bat and cmd files are not always considered executable in cygwin causing which
42663  # to not find them
42664  if test "x$new_path" = x \
42665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42667    new_path=`$CYGPATH -u "$path"`
42668  fi
42669  if test "x$new_path" = x; then
42670    # Oops. Which didn't find the executable.
42671    # The splitting of arguments from the executable at a space might have been incorrect,
42672    # since paths with space are more likely in Windows. Give it another try with the whole
42673    # argument.
42674    path="$complete"
42675    arguments="EOL"
42676    new_path=`$CYGPATH -u "$path"`
42677    new_path=`$WHICH "$new_path" 2> /dev/null`
42678    # bat and cmd files are not always considered executable in cygwin causing which
42679    # to not find them
42680    if test "x$new_path" = x \
42681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42683      new_path=`$CYGPATH -u "$path"`
42684    fi
42685    if test "x$new_path" = x; then
42686      # It's still not found. Now this is an unrecoverable error.
42687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42688$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42689      has_space=`$ECHO "$complete" | $GREP " "`
42690      if test "x$has_space" != x; then
42691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42693      fi
42694      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42695    fi
42696  fi
42697
42698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42701  # "foo.exe" is OK but "foo" is an error.
42702  #
42703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42704  # It is also a way to make sure we got the proper file name for the real test later on.
42705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42706  if test "x$test_shortpath" = x; then
42707    # Short path failed, file does not exist as specified.
42708    # Try adding .exe or .cmd
42709    if test -f "${new_path}.exe"; then
42710      input_to_shortpath="${new_path}.exe"
42711    elif test -f "${new_path}.cmd"; then
42712      input_to_shortpath="${new_path}.cmd"
42713    else
42714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42715$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42718      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42719    fi
42720  else
42721    input_to_shortpath="$new_path"
42722  fi
42723
42724  # Call helper function which possibly converts this using DOS-style short mode.
42725  # If so, the updated path is stored in $new_path.
42726  new_path="$input_to_shortpath"
42727
42728  input_path="$input_to_shortpath"
42729  # Check if we need to convert this using DOS-style short mode. If the path
42730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42731  # take no chances and rewrite it.
42732  # Note: m4 eats our [], so we need to use [ and ] instead.
42733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42734  if test "x$has_forbidden_chars" != x; then
42735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42739      # Going to short mode and back again did indeed matter. Since short mode is
42740      # case insensitive, let's make it lowercase to improve readability.
42741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42742      # Now convert it back to Unix-style (cygpath)
42743      input_path=`$CYGPATH -u "$shortmode_path"`
42744      new_path="$input_path"
42745    fi
42746  fi
42747
42748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42749  if test "x$test_cygdrive_prefix" = x; then
42750    # As a simple fix, exclude /usr/bin since it's not a real path.
42751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42753      # a path prefixed by /cygdrive for fixpath to work.
42754      new_path="$CYGWIN_ROOT_PATH$input_path"
42755    fi
42756  fi
42757
42758  # remove trailing .exe if any
42759  new_path="${new_path/%.exe/}"
42760
42761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42762
42763  # First separate the path from the arguments. This will split at the first
42764  # space.
42765  complete="$OBJDUMP"
42766  path="${complete%% *}"
42767  tmp="$complete EOL"
42768  arguments="${tmp#* }"
42769
42770  # Input might be given as Windows format, start by converting to
42771  # unix format.
42772  new_path="$path"
42773
42774  windows_path="$new_path"
42775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42776    unix_path=`$CYGPATH -u "$windows_path"`
42777    new_path="$unix_path"
42778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42780    new_path="$unix_path"
42781  fi
42782
42783
42784  # Now try to locate executable using which
42785  new_path=`$WHICH "$new_path" 2> /dev/null`
42786
42787  if test "x$new_path" = x; then
42788    # Oops. Which didn't find the executable.
42789    # The splitting of arguments from the executable at a space might have been incorrect,
42790    # since paths with space are more likely in Windows. Give it another try with the whole
42791    # argument.
42792    path="$complete"
42793    arguments="EOL"
42794    new_path="$path"
42795
42796  windows_path="$new_path"
42797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42798    unix_path=`$CYGPATH -u "$windows_path"`
42799    new_path="$unix_path"
42800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42802    new_path="$unix_path"
42803  fi
42804
42805
42806    new_path=`$WHICH "$new_path" 2> /dev/null`
42807    # bat and cmd files are not always considered executable in MSYS causing which
42808    # to not find them
42809    if test "x$new_path" = x \
42810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42812      new_path="$path"
42813
42814  windows_path="$new_path"
42815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42816    unix_path=`$CYGPATH -u "$windows_path"`
42817    new_path="$unix_path"
42818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42820    new_path="$unix_path"
42821  fi
42822
42823    fi
42824
42825    if test "x$new_path" = x; then
42826      # It's still not found. Now this is an unrecoverable error.
42827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42828$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42829      has_space=`$ECHO "$complete" | $GREP " "`
42830      if test "x$has_space" != x; then
42831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42833      fi
42834      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42835    fi
42836  fi
42837
42838  # Now new_path has a complete unix path to the binary
42839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42840    # Keep paths in /bin as-is, but remove trailing .exe if any
42841    new_path="${new_path/%.exe/}"
42842    # Do not save /bin paths to all_fixpath_prefixes!
42843  else
42844    # Not in mixed or Windows style, start by that.
42845    new_path=`cmd //c echo $new_path`
42846
42847  input_path="$new_path"
42848  # Check if we need to convert this using DOS-style short mode. If the path
42849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42850  # take no chances and rewrite it.
42851  # Note: m4 eats our [], so we need to use [ and ] instead.
42852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42853  if test "x$has_forbidden_chars" != x; then
42854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42856  fi
42857
42858    # Output is in $new_path
42859
42860  windows_path="$new_path"
42861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42862    unix_path=`$CYGPATH -u "$windows_path"`
42863    new_path="$unix_path"
42864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42866    new_path="$unix_path"
42867  fi
42868
42869    # remove trailing .exe if any
42870    new_path="${new_path/%.exe/}"
42871
42872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42874  fi
42875
42876    else
42877      # We're on a unix platform. Hooray! :)
42878      # First separate the path from the arguments. This will split at the first
42879      # space.
42880      complete="$OBJDUMP"
42881      path="${complete%% *}"
42882      tmp="$complete EOL"
42883      arguments="${tmp#* }"
42884
42885      # Cannot rely on the command "which" here since it doesn't always work.
42886      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42887      if test -z "$is_absolute_path"; then
42888        # Path to executable is not absolute. Find it.
42889        IFS_save="$IFS"
42890        IFS=:
42891        for p in $PATH; do
42892          if test -f "$p/$path" && test -x "$p/$path"; then
42893            new_path="$p/$path"
42894            break
42895          fi
42896        done
42897        IFS="$IFS_save"
42898      else
42899        # This is an absolute path, we can use it without further modifications.
42900        new_path="$path"
42901      fi
42902
42903      if test "x$new_path" = x; then
42904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42905$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42906        has_space=`$ECHO "$complete" | $GREP " "`
42907        if test "x$has_space" != x; then
42908          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42909$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42910        fi
42911        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42912      fi
42913    fi
42914
42915    # Now join together the path and the arguments once again
42916    if test "x$arguments" != xEOL; then
42917      new_complete="$new_path ${arguments% *}"
42918    else
42919      new_complete="$new_path"
42920    fi
42921
42922    if test "x$complete" != "x$new_complete"; then
42923      OBJDUMP="$new_complete"
42924      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42925$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42926    fi
42927  fi
42928
42929  fi
42930
42931
42932  # Restore old path.
42933  PATH="$OLD_PATH"
42934
42935  # Restore the flags to the user specified values.
42936  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42937  CFLAGS="$ORG_CFLAGS"
42938  CXXFLAGS="$ORG_CXXFLAGS"
42939
42940
42941# Finally do some processing after the detection phase
42942
42943  if test "x$COMPILE_TYPE" = "xcross"; then
42944    # Now we need to find a C/C++ compiler that can build executables for the
42945    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42946    # used once. Also, we need to do this without adding a tools dir to the
42947    # path, otherwise we might pick up cross-compilers which don't use standard
42948    # naming.
42949
42950    OLDPATH="$PATH"
42951
42952
42953# Check whether --with-build-devkit was given.
42954if test "${with_build_devkit+set}" = set; then :
42955  withval=$with_build_devkit;
42956fi
42957
42958    if test "x$with_build_devkit" = "xyes"; then
42959      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42960    elif test -n "$with_build_devkit"; then
42961      if test ! -d "$with_build_devkit"; then
42962        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42963      else
42964
42965  # Only process if variable expands to non-empty
42966
42967  if test "x$with_build_devkit" != x; then
42968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42969
42970  # Input might be given as Windows format, start by converting to
42971  # unix format.
42972  path="$with_build_devkit"
42973  new_path=`$CYGPATH -u "$path"`
42974
42975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42978  # "foo.exe" is OK but "foo" is an error.
42979  #
42980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42981  # It is also a way to make sure we got the proper file name for the real test later on.
42982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42983  if test "x$test_shortpath" = x; then
42984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42985$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42986    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42987  fi
42988
42989  # Call helper function which possibly converts this using DOS-style short mode.
42990  # If so, the updated path is stored in $new_path.
42991
42992  input_path="$new_path"
42993  # Check if we need to convert this using DOS-style short mode. If the path
42994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42995  # take no chances and rewrite it.
42996  # Note: m4 eats our [], so we need to use [ and ] instead.
42997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42998  if test "x$has_forbidden_chars" != x; then
42999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43003      # Going to short mode and back again did indeed matter. Since short mode is
43004      # case insensitive, let's make it lowercase to improve readability.
43005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43006      # Now convert it back to Unix-style (cygpath)
43007      input_path=`$CYGPATH -u "$shortmode_path"`
43008      new_path="$input_path"
43009    fi
43010  fi
43011
43012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43013  if test "x$test_cygdrive_prefix" = x; then
43014    # As a simple fix, exclude /usr/bin since it's not a real path.
43015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43017      # a path prefixed by /cygdrive for fixpath to work.
43018      new_path="$CYGWIN_ROOT_PATH$input_path"
43019    fi
43020  fi
43021
43022
43023  if test "x$path" != "x$new_path"; then
43024    with_build_devkit="$new_path"
43025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43026$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43027  fi
43028
43029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43030
43031  path="$with_build_devkit"
43032  has_colon=`$ECHO $path | $GREP ^.:`
43033  new_path="$path"
43034  if test "x$has_colon" = x; then
43035    # Not in mixed or Windows style, start by that.
43036    new_path=`cmd //c echo $path`
43037  fi
43038
43039
43040  input_path="$new_path"
43041  # Check if we need to convert this using DOS-style short mode. If the path
43042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43043  # take no chances and rewrite it.
43044  # Note: m4 eats our [], so we need to use [ and ] instead.
43045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43046  if test "x$has_forbidden_chars" != x; then
43047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43049  fi
43050
43051
43052  windows_path="$new_path"
43053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43054    unix_path=`$CYGPATH -u "$windows_path"`
43055    new_path="$unix_path"
43056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43058    new_path="$unix_path"
43059  fi
43060
43061  if test "x$path" != "x$new_path"; then
43062    with_build_devkit="$new_path"
43063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43064$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43065  fi
43066
43067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43069
43070    else
43071      # We're on a unix platform. Hooray! :)
43072      path="$with_build_devkit"
43073      has_space=`$ECHO "$path" | $GREP " "`
43074      if test "x$has_space" != x; then
43075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43076$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43078      fi
43079
43080      # Use eval to expand a potential ~
43081      eval path="$path"
43082      if test ! -f "$path" && test ! -d "$path"; then
43083        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43084      fi
43085
43086      if test -d "$path"; then
43087        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43088      else
43089        dir="`$DIRNAME "$path"`"
43090        base="`$BASENAME "$path"`"
43091        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43092      fi
43093    fi
43094  fi
43095
43096        BUILD_DEVKIT_ROOT="$with_build_devkit"
43097        # Check for a meta data info file in the root of the devkit
43098        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43099          # Process devkit.info so that existing devkit variables are not
43100          # modified by this
43101          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43102              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43103              -e "s/\$host/\$build/g" \
43104              $BUILD_DEVKIT_ROOT/devkit.info \
43105              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43106          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43107          # This potentially sets the following:
43108          # A descriptive name of the devkit
43109
43110  if test "x$BUILD_DEVKIT_NAME" = x; then
43111    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43112  fi
43113
43114          # Corresponds to --with-extra-path
43115
43116  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43117    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43118  fi
43119
43120          # Corresponds to --with-toolchain-path
43121
43122  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43123    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43124  fi
43125
43126          # Corresponds to --with-sysroot
43127
43128  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43129    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43130  fi
43131
43132          # Skip the Window specific parts
43133        fi
43134
43135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43136$as_echo_n "checking for build platform devkit... " >&6; }
43137        if test "x$BUILD_DEVKIT_NAME" != x; then
43138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43139$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43140        else
43141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43142$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43143        fi
43144
43145        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43146
43147  if test "x$BUILD_SYSROOT" != "x"; then
43148    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43149      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43150        # Solaris Studio does not have a concept of sysroot. Instead we must
43151        # make sure the default include and lib dirs are appended to each
43152        # compile and link command line. Must also add -I-xbuiltin to enable
43153        # inlining of system functions and intrinsics.
43154        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43155        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43156            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43157            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43158      fi
43159    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43160      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43161      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43162    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43163      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43164      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43165    fi
43166    # Propagate the sysroot args to hotspot
43167    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43168    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43169    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43170    # The global CFLAGS and LDFLAGS variables need these for configure to function
43171    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43172    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43173    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43174    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43175  fi
43176
43177  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43178    # We also need -iframework<path>/System/Library/Frameworks
43179    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43180    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43181    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43182    # set this here so it doesn't have to be peppered throughout the forest
43183    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43184    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43185  fi
43186
43187
43188
43189
43190
43191         # Fallback default of just /bin if DEVKIT_PATH is not defined
43192        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43193          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43194        fi
43195        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43196      fi
43197    fi
43198
43199    # FIXME: we should list the discovered compilers as an exclude pattern!
43200    # If we do that, we can do this detection before POST_DETECTION, and still
43201    # find the build compilers in the tools dir, if needed.
43202
43203
43204
43205  # Publish this variable in the help.
43206
43207
43208  if [ -z "${BUILD_CC+x}" ]; then
43209    # The variable is not set by user, try to locate tool using the code snippet
43210    for ac_prog in cl cc gcc
43211do
43212  # Extract the first word of "$ac_prog", so it can be a program name with args.
43213set dummy $ac_prog; ac_word=$2
43214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43215$as_echo_n "checking for $ac_word... " >&6; }
43216if ${ac_cv_path_BUILD_CC+:} false; then :
43217  $as_echo_n "(cached) " >&6
43218else
43219  case $BUILD_CC in
43220  [\\/]* | ?:[\\/]*)
43221  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43222  ;;
43223  *)
43224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43225for as_dir in $PATH
43226do
43227  IFS=$as_save_IFS
43228  test -z "$as_dir" && as_dir=.
43229    for ac_exec_ext in '' $ac_executable_extensions; do
43230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43231    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43233    break 2
43234  fi
43235done
43236  done
43237IFS=$as_save_IFS
43238
43239  ;;
43240esac
43241fi
43242BUILD_CC=$ac_cv_path_BUILD_CC
43243if test -n "$BUILD_CC"; then
43244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43245$as_echo "$BUILD_CC" >&6; }
43246else
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43248$as_echo "no" >&6; }
43249fi
43250
43251
43252  test -n "$BUILD_CC" && break
43253done
43254
43255  else
43256    # The variable is set, but is it from the command line or the environment?
43257
43258    # Try to remove the string !BUILD_CC! from our list.
43259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43261      # If it failed, the variable was not from the command line. Ignore it,
43262      # but warn the user (except for BASH, which is always set by the calling BASH).
43263      if test "xBUILD_CC" != xBASH; then
43264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43265$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43266      fi
43267      # Try to locate tool using the code snippet
43268      for ac_prog in cl cc gcc
43269do
43270  # Extract the first word of "$ac_prog", so it can be a program name with args.
43271set dummy $ac_prog; ac_word=$2
43272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43273$as_echo_n "checking for $ac_word... " >&6; }
43274if ${ac_cv_path_BUILD_CC+:} false; then :
43275  $as_echo_n "(cached) " >&6
43276else
43277  case $BUILD_CC in
43278  [\\/]* | ?:[\\/]*)
43279  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43280  ;;
43281  *)
43282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43283for as_dir in $PATH
43284do
43285  IFS=$as_save_IFS
43286  test -z "$as_dir" && as_dir=.
43287    for ac_exec_ext in '' $ac_executable_extensions; do
43288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43289    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43291    break 2
43292  fi
43293done
43294  done
43295IFS=$as_save_IFS
43296
43297  ;;
43298esac
43299fi
43300BUILD_CC=$ac_cv_path_BUILD_CC
43301if test -n "$BUILD_CC"; then
43302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43303$as_echo "$BUILD_CC" >&6; }
43304else
43305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43306$as_echo "no" >&6; }
43307fi
43308
43309
43310  test -n "$BUILD_CC" && break
43311done
43312
43313    else
43314      # If it succeeded, then it was overridden by the user. We will use it
43315      # for the tool.
43316
43317      # First remove it from the list of overridden variables, so we can test
43318      # for unknown variables in the end.
43319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43320
43321      # Check if we try to supply an empty value
43322      if test "x$BUILD_CC" = x; then
43323        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43324$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43326$as_echo_n "checking for BUILD_CC... " >&6; }
43327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43328$as_echo "disabled" >&6; }
43329      else
43330        # Check if the provided tool contains a complete path.
43331        tool_specified="$BUILD_CC"
43332        tool_basename="${tool_specified##*/}"
43333        if test "x$tool_basename" = "x$tool_specified"; then
43334          # A command without a complete path is provided, search $PATH.
43335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43336$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43337          # Extract the first word of "$tool_basename", so it can be a program name with args.
43338set dummy $tool_basename; ac_word=$2
43339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43340$as_echo_n "checking for $ac_word... " >&6; }
43341if ${ac_cv_path_BUILD_CC+:} false; then :
43342  $as_echo_n "(cached) " >&6
43343else
43344  case $BUILD_CC in
43345  [\\/]* | ?:[\\/]*)
43346  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43347  ;;
43348  *)
43349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43350for as_dir in $PATH
43351do
43352  IFS=$as_save_IFS
43353  test -z "$as_dir" && as_dir=.
43354    for ac_exec_ext in '' $ac_executable_extensions; do
43355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43356    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43358    break 2
43359  fi
43360done
43361  done
43362IFS=$as_save_IFS
43363
43364  ;;
43365esac
43366fi
43367BUILD_CC=$ac_cv_path_BUILD_CC
43368if test -n "$BUILD_CC"; then
43369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43370$as_echo "$BUILD_CC" >&6; }
43371else
43372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43373$as_echo "no" >&6; }
43374fi
43375
43376
43377          if test "x$BUILD_CC" = x; then
43378            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43379          fi
43380        else
43381          # Otherwise we believe it is a complete path. Use it as it is.
43382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43383$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43384          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43385$as_echo_n "checking for BUILD_CC... " >&6; }
43386          if test ! -x "$tool_specified"; then
43387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43388$as_echo "not found" >&6; }
43389            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43390          fi
43391          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43392$as_echo "$tool_specified" >&6; }
43393        fi
43394      fi
43395    fi
43396
43397  fi
43398
43399
43400
43401  if test "x$BUILD_CC" = x; then
43402    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43403  fi
43404
43405
43406
43407  # Only process if variable expands to non-empty
43408
43409  if test "x$BUILD_CC" != x; then
43410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43411
43412  # First separate the path from the arguments. This will split at the first
43413  # space.
43414  complete="$BUILD_CC"
43415  path="${complete%% *}"
43416  tmp="$complete EOL"
43417  arguments="${tmp#* }"
43418
43419  # Input might be given as Windows format, start by converting to
43420  # unix format.
43421  new_path=`$CYGPATH -u "$path"`
43422
43423  # Now try to locate executable using which
43424  new_path=`$WHICH "$new_path" 2> /dev/null`
43425  # bat and cmd files are not always considered executable in cygwin causing which
43426  # to not find them
43427  if test "x$new_path" = x \
43428      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43429      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43430    new_path=`$CYGPATH -u "$path"`
43431  fi
43432  if test "x$new_path" = x; then
43433    # Oops. Which didn't find the executable.
43434    # The splitting of arguments from the executable at a space might have been incorrect,
43435    # since paths with space are more likely in Windows. Give it another try with the whole
43436    # argument.
43437    path="$complete"
43438    arguments="EOL"
43439    new_path=`$CYGPATH -u "$path"`
43440    new_path=`$WHICH "$new_path" 2> /dev/null`
43441    # bat and cmd files are not always considered executable in cygwin causing which
43442    # to not find them
43443    if test "x$new_path" = x \
43444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43446      new_path=`$CYGPATH -u "$path"`
43447    fi
43448    if test "x$new_path" = x; then
43449      # It's still not found. Now this is an unrecoverable error.
43450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43451$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43452      has_space=`$ECHO "$complete" | $GREP " "`
43453      if test "x$has_space" != x; then
43454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43456      fi
43457      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43458    fi
43459  fi
43460
43461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43464  # "foo.exe" is OK but "foo" is an error.
43465  #
43466  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43467  # It is also a way to make sure we got the proper file name for the real test later on.
43468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43469  if test "x$test_shortpath" = x; then
43470    # Short path failed, file does not exist as specified.
43471    # Try adding .exe or .cmd
43472    if test -f "${new_path}.exe"; then
43473      input_to_shortpath="${new_path}.exe"
43474    elif test -f "${new_path}.cmd"; then
43475      input_to_shortpath="${new_path}.cmd"
43476    else
43477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43478$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43479      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43480$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43481      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43482    fi
43483  else
43484    input_to_shortpath="$new_path"
43485  fi
43486
43487  # Call helper function which possibly converts this using DOS-style short mode.
43488  # If so, the updated path is stored in $new_path.
43489  new_path="$input_to_shortpath"
43490
43491  input_path="$input_to_shortpath"
43492  # Check if we need to convert this using DOS-style short mode. If the path
43493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43494  # take no chances and rewrite it.
43495  # Note: m4 eats our [], so we need to use [ and ] instead.
43496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43497  if test "x$has_forbidden_chars" != x; then
43498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43502      # Going to short mode and back again did indeed matter. Since short mode is
43503      # case insensitive, let's make it lowercase to improve readability.
43504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43505      # Now convert it back to Unix-style (cygpath)
43506      input_path=`$CYGPATH -u "$shortmode_path"`
43507      new_path="$input_path"
43508    fi
43509  fi
43510
43511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43512  if test "x$test_cygdrive_prefix" = x; then
43513    # As a simple fix, exclude /usr/bin since it's not a real path.
43514    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43516      # a path prefixed by /cygdrive for fixpath to work.
43517      new_path="$CYGWIN_ROOT_PATH$input_path"
43518    fi
43519  fi
43520
43521  # remove trailing .exe if any
43522  new_path="${new_path/%.exe/}"
43523
43524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43525
43526  # First separate the path from the arguments. This will split at the first
43527  # space.
43528  complete="$BUILD_CC"
43529  path="${complete%% *}"
43530  tmp="$complete EOL"
43531  arguments="${tmp#* }"
43532
43533  # Input might be given as Windows format, start by converting to
43534  # unix format.
43535  new_path="$path"
43536
43537  windows_path="$new_path"
43538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43539    unix_path=`$CYGPATH -u "$windows_path"`
43540    new_path="$unix_path"
43541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43543    new_path="$unix_path"
43544  fi
43545
43546
43547  # Now try to locate executable using which
43548  new_path=`$WHICH "$new_path" 2> /dev/null`
43549
43550  if test "x$new_path" = x; then
43551    # Oops. Which didn't find the executable.
43552    # The splitting of arguments from the executable at a space might have been incorrect,
43553    # since paths with space are more likely in Windows. Give it another try with the whole
43554    # argument.
43555    path="$complete"
43556    arguments="EOL"
43557    new_path="$path"
43558
43559  windows_path="$new_path"
43560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43561    unix_path=`$CYGPATH -u "$windows_path"`
43562    new_path="$unix_path"
43563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43565    new_path="$unix_path"
43566  fi
43567
43568
43569    new_path=`$WHICH "$new_path" 2> /dev/null`
43570    # bat and cmd files are not always considered executable in MSYS causing which
43571    # to not find them
43572    if test "x$new_path" = x \
43573        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43574        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43575      new_path="$path"
43576
43577  windows_path="$new_path"
43578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43579    unix_path=`$CYGPATH -u "$windows_path"`
43580    new_path="$unix_path"
43581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43583    new_path="$unix_path"
43584  fi
43585
43586    fi
43587
43588    if test "x$new_path" = x; then
43589      # It's still not found. Now this is an unrecoverable error.
43590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43591$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43592      has_space=`$ECHO "$complete" | $GREP " "`
43593      if test "x$has_space" != x; then
43594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43596      fi
43597      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43598    fi
43599  fi
43600
43601  # Now new_path has a complete unix path to the binary
43602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43603    # Keep paths in /bin as-is, but remove trailing .exe if any
43604    new_path="${new_path/%.exe/}"
43605    # Do not save /bin paths to all_fixpath_prefixes!
43606  else
43607    # Not in mixed or Windows style, start by that.
43608    new_path=`cmd //c echo $new_path`
43609
43610  input_path="$new_path"
43611  # Check if we need to convert this using DOS-style short mode. If the path
43612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43613  # take no chances and rewrite it.
43614  # Note: m4 eats our [], so we need to use [ and ] instead.
43615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43616  if test "x$has_forbidden_chars" != x; then
43617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43619  fi
43620
43621    # Output is in $new_path
43622
43623  windows_path="$new_path"
43624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43625    unix_path=`$CYGPATH -u "$windows_path"`
43626    new_path="$unix_path"
43627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43629    new_path="$unix_path"
43630  fi
43631
43632    # remove trailing .exe if any
43633    new_path="${new_path/%.exe/}"
43634
43635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43637  fi
43638
43639    else
43640      # We're on a unix platform. Hooray! :)
43641      # First separate the path from the arguments. This will split at the first
43642      # space.
43643      complete="$BUILD_CC"
43644      path="${complete%% *}"
43645      tmp="$complete EOL"
43646      arguments="${tmp#* }"
43647
43648      # Cannot rely on the command "which" here since it doesn't always work.
43649      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43650      if test -z "$is_absolute_path"; then
43651        # Path to executable is not absolute. Find it.
43652        IFS_save="$IFS"
43653        IFS=:
43654        for p in $PATH; do
43655          if test -f "$p/$path" && test -x "$p/$path"; then
43656            new_path="$p/$path"
43657            break
43658          fi
43659        done
43660        IFS="$IFS_save"
43661      else
43662        # This is an absolute path, we can use it without further modifications.
43663        new_path="$path"
43664      fi
43665
43666      if test "x$new_path" = x; then
43667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43668$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43669        has_space=`$ECHO "$complete" | $GREP " "`
43670        if test "x$has_space" != x; then
43671          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43673        fi
43674        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43675      fi
43676    fi
43677
43678    # Now join together the path and the arguments once again
43679    if test "x$arguments" != xEOL; then
43680      new_complete="$new_path ${arguments% *}"
43681    else
43682      new_complete="$new_path"
43683    fi
43684
43685    if test "x$complete" != "x$new_complete"; then
43686      BUILD_CC="$new_complete"
43687      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43688$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43689    fi
43690  fi
43691
43692
43693
43694
43695  # Publish this variable in the help.
43696
43697
43698  if [ -z "${BUILD_CXX+x}" ]; then
43699    # The variable is not set by user, try to locate tool using the code snippet
43700    for ac_prog in cl CC g++
43701do
43702  # Extract the first word of "$ac_prog", so it can be a program name with args.
43703set dummy $ac_prog; ac_word=$2
43704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43705$as_echo_n "checking for $ac_word... " >&6; }
43706if ${ac_cv_path_BUILD_CXX+:} false; then :
43707  $as_echo_n "(cached) " >&6
43708else
43709  case $BUILD_CXX in
43710  [\\/]* | ?:[\\/]*)
43711  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43712  ;;
43713  *)
43714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43715for as_dir in $PATH
43716do
43717  IFS=$as_save_IFS
43718  test -z "$as_dir" && as_dir=.
43719    for ac_exec_ext in '' $ac_executable_extensions; do
43720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43721    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43723    break 2
43724  fi
43725done
43726  done
43727IFS=$as_save_IFS
43728
43729  ;;
43730esac
43731fi
43732BUILD_CXX=$ac_cv_path_BUILD_CXX
43733if test -n "$BUILD_CXX"; then
43734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43735$as_echo "$BUILD_CXX" >&6; }
43736else
43737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43738$as_echo "no" >&6; }
43739fi
43740
43741
43742  test -n "$BUILD_CXX" && break
43743done
43744
43745  else
43746    # The variable is set, but is it from the command line or the environment?
43747
43748    # Try to remove the string !BUILD_CXX! from our list.
43749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43751      # If it failed, the variable was not from the command line. Ignore it,
43752      # but warn the user (except for BASH, which is always set by the calling BASH).
43753      if test "xBUILD_CXX" != xBASH; then
43754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43755$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43756      fi
43757      # Try to locate tool using the code snippet
43758      for ac_prog in cl CC g++
43759do
43760  # Extract the first word of "$ac_prog", so it can be a program name with args.
43761set dummy $ac_prog; ac_word=$2
43762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43763$as_echo_n "checking for $ac_word... " >&6; }
43764if ${ac_cv_path_BUILD_CXX+:} false; then :
43765  $as_echo_n "(cached) " >&6
43766else
43767  case $BUILD_CXX in
43768  [\\/]* | ?:[\\/]*)
43769  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43770  ;;
43771  *)
43772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43773for as_dir in $PATH
43774do
43775  IFS=$as_save_IFS
43776  test -z "$as_dir" && as_dir=.
43777    for ac_exec_ext in '' $ac_executable_extensions; do
43778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43779    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43781    break 2
43782  fi
43783done
43784  done
43785IFS=$as_save_IFS
43786
43787  ;;
43788esac
43789fi
43790BUILD_CXX=$ac_cv_path_BUILD_CXX
43791if test -n "$BUILD_CXX"; then
43792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43793$as_echo "$BUILD_CXX" >&6; }
43794else
43795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43796$as_echo "no" >&6; }
43797fi
43798
43799
43800  test -n "$BUILD_CXX" && break
43801done
43802
43803    else
43804      # If it succeeded, then it was overridden by the user. We will use it
43805      # for the tool.
43806
43807      # First remove it from the list of overridden variables, so we can test
43808      # for unknown variables in the end.
43809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43810
43811      # Check if we try to supply an empty value
43812      if test "x$BUILD_CXX" = x; then
43813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43814$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43816$as_echo_n "checking for BUILD_CXX... " >&6; }
43817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43818$as_echo "disabled" >&6; }
43819      else
43820        # Check if the provided tool contains a complete path.
43821        tool_specified="$BUILD_CXX"
43822        tool_basename="${tool_specified##*/}"
43823        if test "x$tool_basename" = "x$tool_specified"; then
43824          # A command without a complete path is provided, search $PATH.
43825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43826$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43827          # Extract the first word of "$tool_basename", so it can be a program name with args.
43828set dummy $tool_basename; ac_word=$2
43829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43830$as_echo_n "checking for $ac_word... " >&6; }
43831if ${ac_cv_path_BUILD_CXX+:} false; then :
43832  $as_echo_n "(cached) " >&6
43833else
43834  case $BUILD_CXX in
43835  [\\/]* | ?:[\\/]*)
43836  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43837  ;;
43838  *)
43839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43840for as_dir in $PATH
43841do
43842  IFS=$as_save_IFS
43843  test -z "$as_dir" && as_dir=.
43844    for ac_exec_ext in '' $ac_executable_extensions; do
43845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43846    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43848    break 2
43849  fi
43850done
43851  done
43852IFS=$as_save_IFS
43853
43854  ;;
43855esac
43856fi
43857BUILD_CXX=$ac_cv_path_BUILD_CXX
43858if test -n "$BUILD_CXX"; then
43859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43860$as_echo "$BUILD_CXX" >&6; }
43861else
43862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43863$as_echo "no" >&6; }
43864fi
43865
43866
43867          if test "x$BUILD_CXX" = x; then
43868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43869          fi
43870        else
43871          # Otherwise we believe it is a complete path. Use it as it is.
43872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43873$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43875$as_echo_n "checking for BUILD_CXX... " >&6; }
43876          if test ! -x "$tool_specified"; then
43877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43878$as_echo "not found" >&6; }
43879            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43880          fi
43881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43882$as_echo "$tool_specified" >&6; }
43883        fi
43884      fi
43885    fi
43886
43887  fi
43888
43889
43890
43891  if test "x$BUILD_CXX" = x; then
43892    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43893  fi
43894
43895
43896
43897  # Only process if variable expands to non-empty
43898
43899  if test "x$BUILD_CXX" != x; then
43900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43901
43902  # First separate the path from the arguments. This will split at the first
43903  # space.
43904  complete="$BUILD_CXX"
43905  path="${complete%% *}"
43906  tmp="$complete EOL"
43907  arguments="${tmp#* }"
43908
43909  # Input might be given as Windows format, start by converting to
43910  # unix format.
43911  new_path=`$CYGPATH -u "$path"`
43912
43913  # Now try to locate executable using which
43914  new_path=`$WHICH "$new_path" 2> /dev/null`
43915  # bat and cmd files are not always considered executable in cygwin causing which
43916  # to not find them
43917  if test "x$new_path" = x \
43918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43920    new_path=`$CYGPATH -u "$path"`
43921  fi
43922  if test "x$new_path" = x; then
43923    # Oops. Which didn't find the executable.
43924    # The splitting of arguments from the executable at a space might have been incorrect,
43925    # since paths with space are more likely in Windows. Give it another try with the whole
43926    # argument.
43927    path="$complete"
43928    arguments="EOL"
43929    new_path=`$CYGPATH -u "$path"`
43930    new_path=`$WHICH "$new_path" 2> /dev/null`
43931    # bat and cmd files are not always considered executable in cygwin causing which
43932    # to not find them
43933    if test "x$new_path" = x \
43934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43936      new_path=`$CYGPATH -u "$path"`
43937    fi
43938    if test "x$new_path" = x; then
43939      # It's still not found. Now this is an unrecoverable error.
43940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43941$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43942      has_space=`$ECHO "$complete" | $GREP " "`
43943      if test "x$has_space" != x; then
43944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43946      fi
43947      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43948    fi
43949  fi
43950
43951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43954  # "foo.exe" is OK but "foo" is an error.
43955  #
43956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43957  # It is also a way to make sure we got the proper file name for the real test later on.
43958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43959  if test "x$test_shortpath" = x; then
43960    # Short path failed, file does not exist as specified.
43961    # Try adding .exe or .cmd
43962    if test -f "${new_path}.exe"; then
43963      input_to_shortpath="${new_path}.exe"
43964    elif test -f "${new_path}.cmd"; then
43965      input_to_shortpath="${new_path}.cmd"
43966    else
43967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43968$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43971      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43972    fi
43973  else
43974    input_to_shortpath="$new_path"
43975  fi
43976
43977  # Call helper function which possibly converts this using DOS-style short mode.
43978  # If so, the updated path is stored in $new_path.
43979  new_path="$input_to_shortpath"
43980
43981  input_path="$input_to_shortpath"
43982  # Check if we need to convert this using DOS-style short mode. If the path
43983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43984  # take no chances and rewrite it.
43985  # Note: m4 eats our [], so we need to use [ and ] instead.
43986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43987  if test "x$has_forbidden_chars" != x; then
43988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43992      # Going to short mode and back again did indeed matter. Since short mode is
43993      # case insensitive, let's make it lowercase to improve readability.
43994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43995      # Now convert it back to Unix-style (cygpath)
43996      input_path=`$CYGPATH -u "$shortmode_path"`
43997      new_path="$input_path"
43998    fi
43999  fi
44000
44001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44002  if test "x$test_cygdrive_prefix" = x; then
44003    # As a simple fix, exclude /usr/bin since it's not a real path.
44004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44006      # a path prefixed by /cygdrive for fixpath to work.
44007      new_path="$CYGWIN_ROOT_PATH$input_path"
44008    fi
44009  fi
44010
44011  # remove trailing .exe if any
44012  new_path="${new_path/%.exe/}"
44013
44014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44015
44016  # First separate the path from the arguments. This will split at the first
44017  # space.
44018  complete="$BUILD_CXX"
44019  path="${complete%% *}"
44020  tmp="$complete EOL"
44021  arguments="${tmp#* }"
44022
44023  # Input might be given as Windows format, start by converting to
44024  # unix format.
44025  new_path="$path"
44026
44027  windows_path="$new_path"
44028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44029    unix_path=`$CYGPATH -u "$windows_path"`
44030    new_path="$unix_path"
44031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44033    new_path="$unix_path"
44034  fi
44035
44036
44037  # Now try to locate executable using which
44038  new_path=`$WHICH "$new_path" 2> /dev/null`
44039
44040  if test "x$new_path" = x; then
44041    # Oops. Which didn't find the executable.
44042    # The splitting of arguments from the executable at a space might have been incorrect,
44043    # since paths with space are more likely in Windows. Give it another try with the whole
44044    # argument.
44045    path="$complete"
44046    arguments="EOL"
44047    new_path="$path"
44048
44049  windows_path="$new_path"
44050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44051    unix_path=`$CYGPATH -u "$windows_path"`
44052    new_path="$unix_path"
44053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44055    new_path="$unix_path"
44056  fi
44057
44058
44059    new_path=`$WHICH "$new_path" 2> /dev/null`
44060    # bat and cmd files are not always considered executable in MSYS causing which
44061    # to not find them
44062    if test "x$new_path" = x \
44063        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44064        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44065      new_path="$path"
44066
44067  windows_path="$new_path"
44068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44069    unix_path=`$CYGPATH -u "$windows_path"`
44070    new_path="$unix_path"
44071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44073    new_path="$unix_path"
44074  fi
44075
44076    fi
44077
44078    if test "x$new_path" = x; then
44079      # It's still not found. Now this is an unrecoverable error.
44080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44081$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44082      has_space=`$ECHO "$complete" | $GREP " "`
44083      if test "x$has_space" != x; then
44084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44086      fi
44087      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44088    fi
44089  fi
44090
44091  # Now new_path has a complete unix path to the binary
44092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44093    # Keep paths in /bin as-is, but remove trailing .exe if any
44094    new_path="${new_path/%.exe/}"
44095    # Do not save /bin paths to all_fixpath_prefixes!
44096  else
44097    # Not in mixed or Windows style, start by that.
44098    new_path=`cmd //c echo $new_path`
44099
44100  input_path="$new_path"
44101  # Check if we need to convert this using DOS-style short mode. If the path
44102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44103  # take no chances and rewrite it.
44104  # Note: m4 eats our [], so we need to use [ and ] instead.
44105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44106  if test "x$has_forbidden_chars" != x; then
44107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44109  fi
44110
44111    # Output is in $new_path
44112
44113  windows_path="$new_path"
44114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44115    unix_path=`$CYGPATH -u "$windows_path"`
44116    new_path="$unix_path"
44117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44119    new_path="$unix_path"
44120  fi
44121
44122    # remove trailing .exe if any
44123    new_path="${new_path/%.exe/}"
44124
44125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44127  fi
44128
44129    else
44130      # We're on a unix platform. Hooray! :)
44131      # First separate the path from the arguments. This will split at the first
44132      # space.
44133      complete="$BUILD_CXX"
44134      path="${complete%% *}"
44135      tmp="$complete EOL"
44136      arguments="${tmp#* }"
44137
44138      # Cannot rely on the command "which" here since it doesn't always work.
44139      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44140      if test -z "$is_absolute_path"; then
44141        # Path to executable is not absolute. Find it.
44142        IFS_save="$IFS"
44143        IFS=:
44144        for p in $PATH; do
44145          if test -f "$p/$path" && test -x "$p/$path"; then
44146            new_path="$p/$path"
44147            break
44148          fi
44149        done
44150        IFS="$IFS_save"
44151      else
44152        # This is an absolute path, we can use it without further modifications.
44153        new_path="$path"
44154      fi
44155
44156      if test "x$new_path" = x; then
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44158$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44159        has_space=`$ECHO "$complete" | $GREP " "`
44160        if test "x$has_space" != x; then
44161          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44162$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44163        fi
44164        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44165      fi
44166    fi
44167
44168    # Now join together the path and the arguments once again
44169    if test "x$arguments" != xEOL; then
44170      new_complete="$new_path ${arguments% *}"
44171    else
44172      new_complete="$new_path"
44173    fi
44174
44175    if test "x$complete" != "x$new_complete"; then
44176      BUILD_CXX="$new_complete"
44177      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44178$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44179    fi
44180  fi
44181
44182
44183
44184  # Publish this variable in the help.
44185
44186
44187  if [ -z "${BUILD_NM+x}" ]; then
44188    # The variable is not set by user, try to locate tool using the code snippet
44189    for ac_prog in nm gcc-nm
44190do
44191  # Extract the first word of "$ac_prog", so it can be a program name with args.
44192set dummy $ac_prog; ac_word=$2
44193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44194$as_echo_n "checking for $ac_word... " >&6; }
44195if ${ac_cv_path_BUILD_NM+:} false; then :
44196  $as_echo_n "(cached) " >&6
44197else
44198  case $BUILD_NM in
44199  [\\/]* | ?:[\\/]*)
44200  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44201  ;;
44202  *)
44203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44204for as_dir in $PATH
44205do
44206  IFS=$as_save_IFS
44207  test -z "$as_dir" && as_dir=.
44208    for ac_exec_ext in '' $ac_executable_extensions; do
44209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44210    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44212    break 2
44213  fi
44214done
44215  done
44216IFS=$as_save_IFS
44217
44218  ;;
44219esac
44220fi
44221BUILD_NM=$ac_cv_path_BUILD_NM
44222if test -n "$BUILD_NM"; then
44223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44224$as_echo "$BUILD_NM" >&6; }
44225else
44226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44227$as_echo "no" >&6; }
44228fi
44229
44230
44231  test -n "$BUILD_NM" && break
44232done
44233
44234  else
44235    # The variable is set, but is it from the command line or the environment?
44236
44237    # Try to remove the string !BUILD_NM! from our list.
44238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44240      # If it failed, the variable was not from the command line. Ignore it,
44241      # but warn the user (except for BASH, which is always set by the calling BASH).
44242      if test "xBUILD_NM" != xBASH; then
44243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44244$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44245      fi
44246      # Try to locate tool using the code snippet
44247      for ac_prog in nm gcc-nm
44248do
44249  # Extract the first word of "$ac_prog", so it can be a program name with args.
44250set dummy $ac_prog; ac_word=$2
44251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44252$as_echo_n "checking for $ac_word... " >&6; }
44253if ${ac_cv_path_BUILD_NM+:} false; then :
44254  $as_echo_n "(cached) " >&6
44255else
44256  case $BUILD_NM in
44257  [\\/]* | ?:[\\/]*)
44258  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44259  ;;
44260  *)
44261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44262for as_dir in $PATH
44263do
44264  IFS=$as_save_IFS
44265  test -z "$as_dir" && as_dir=.
44266    for ac_exec_ext in '' $ac_executable_extensions; do
44267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44268    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44270    break 2
44271  fi
44272done
44273  done
44274IFS=$as_save_IFS
44275
44276  ;;
44277esac
44278fi
44279BUILD_NM=$ac_cv_path_BUILD_NM
44280if test -n "$BUILD_NM"; then
44281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44282$as_echo "$BUILD_NM" >&6; }
44283else
44284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44285$as_echo "no" >&6; }
44286fi
44287
44288
44289  test -n "$BUILD_NM" && break
44290done
44291
44292    else
44293      # If it succeeded, then it was overridden by the user. We will use it
44294      # for the tool.
44295
44296      # First remove it from the list of overridden variables, so we can test
44297      # for unknown variables in the end.
44298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44299
44300      # Check if we try to supply an empty value
44301      if test "x$BUILD_NM" = x; then
44302        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44303$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44305$as_echo_n "checking for BUILD_NM... " >&6; }
44306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44307$as_echo "disabled" >&6; }
44308      else
44309        # Check if the provided tool contains a complete path.
44310        tool_specified="$BUILD_NM"
44311        tool_basename="${tool_specified##*/}"
44312        if test "x$tool_basename" = "x$tool_specified"; then
44313          # A command without a complete path is provided, search $PATH.
44314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44315$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44316          # Extract the first word of "$tool_basename", so it can be a program name with args.
44317set dummy $tool_basename; ac_word=$2
44318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44319$as_echo_n "checking for $ac_word... " >&6; }
44320if ${ac_cv_path_BUILD_NM+:} false; then :
44321  $as_echo_n "(cached) " >&6
44322else
44323  case $BUILD_NM in
44324  [\\/]* | ?:[\\/]*)
44325  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44326  ;;
44327  *)
44328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44329for as_dir in $PATH
44330do
44331  IFS=$as_save_IFS
44332  test -z "$as_dir" && as_dir=.
44333    for ac_exec_ext in '' $ac_executable_extensions; do
44334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44335    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44337    break 2
44338  fi
44339done
44340  done
44341IFS=$as_save_IFS
44342
44343  ;;
44344esac
44345fi
44346BUILD_NM=$ac_cv_path_BUILD_NM
44347if test -n "$BUILD_NM"; then
44348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44349$as_echo "$BUILD_NM" >&6; }
44350else
44351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44352$as_echo "no" >&6; }
44353fi
44354
44355
44356          if test "x$BUILD_NM" = x; then
44357            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44358          fi
44359        else
44360          # Otherwise we believe it is a complete path. Use it as it is.
44361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44362$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44363          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44364$as_echo_n "checking for BUILD_NM... " >&6; }
44365          if test ! -x "$tool_specified"; then
44366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44367$as_echo "not found" >&6; }
44368            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44369          fi
44370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44371$as_echo "$tool_specified" >&6; }
44372        fi
44373      fi
44374    fi
44375
44376  fi
44377
44378
44379
44380  # Only process if variable expands to non-empty
44381
44382  if test "x$BUILD_NM" != x; then
44383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44384
44385  # First separate the path from the arguments. This will split at the first
44386  # space.
44387  complete="$BUILD_NM"
44388  path="${complete%% *}"
44389  tmp="$complete EOL"
44390  arguments="${tmp#* }"
44391
44392  # Input might be given as Windows format, start by converting to
44393  # unix format.
44394  new_path=`$CYGPATH -u "$path"`
44395
44396  # Now try to locate executable using which
44397  new_path=`$WHICH "$new_path" 2> /dev/null`
44398  # bat and cmd files are not always considered executable in cygwin causing which
44399  # to not find them
44400  if test "x$new_path" = x \
44401      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44402      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44403    new_path=`$CYGPATH -u "$path"`
44404  fi
44405  if test "x$new_path" = x; then
44406    # Oops. Which didn't find the executable.
44407    # The splitting of arguments from the executable at a space might have been incorrect,
44408    # since paths with space are more likely in Windows. Give it another try with the whole
44409    # argument.
44410    path="$complete"
44411    arguments="EOL"
44412    new_path=`$CYGPATH -u "$path"`
44413    new_path=`$WHICH "$new_path" 2> /dev/null`
44414    # bat and cmd files are not always considered executable in cygwin causing which
44415    # to not find them
44416    if test "x$new_path" = x \
44417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44419      new_path=`$CYGPATH -u "$path"`
44420    fi
44421    if test "x$new_path" = x; then
44422      # It's still not found. Now this is an unrecoverable error.
44423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44424$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44425      has_space=`$ECHO "$complete" | $GREP " "`
44426      if test "x$has_space" != x; then
44427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44429      fi
44430      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44431    fi
44432  fi
44433
44434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44437  # "foo.exe" is OK but "foo" is an error.
44438  #
44439  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44440  # It is also a way to make sure we got the proper file name for the real test later on.
44441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44442  if test "x$test_shortpath" = x; then
44443    # Short path failed, file does not exist as specified.
44444    # Try adding .exe or .cmd
44445    if test -f "${new_path}.exe"; then
44446      input_to_shortpath="${new_path}.exe"
44447    elif test -f "${new_path}.cmd"; then
44448      input_to_shortpath="${new_path}.cmd"
44449    else
44450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44451$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44452      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44453$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44454      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44455    fi
44456  else
44457    input_to_shortpath="$new_path"
44458  fi
44459
44460  # Call helper function which possibly converts this using DOS-style short mode.
44461  # If so, the updated path is stored in $new_path.
44462  new_path="$input_to_shortpath"
44463
44464  input_path="$input_to_shortpath"
44465  # Check if we need to convert this using DOS-style short mode. If the path
44466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44467  # take no chances and rewrite it.
44468  # Note: m4 eats our [], so we need to use [ and ] instead.
44469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44470  if test "x$has_forbidden_chars" != x; then
44471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44475      # Going to short mode and back again did indeed matter. Since short mode is
44476      # case insensitive, let's make it lowercase to improve readability.
44477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44478      # Now convert it back to Unix-style (cygpath)
44479      input_path=`$CYGPATH -u "$shortmode_path"`
44480      new_path="$input_path"
44481    fi
44482  fi
44483
44484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44485  if test "x$test_cygdrive_prefix" = x; then
44486    # As a simple fix, exclude /usr/bin since it's not a real path.
44487    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44489      # a path prefixed by /cygdrive for fixpath to work.
44490      new_path="$CYGWIN_ROOT_PATH$input_path"
44491    fi
44492  fi
44493
44494  # remove trailing .exe if any
44495  new_path="${new_path/%.exe/}"
44496
44497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44498
44499  # First separate the path from the arguments. This will split at the first
44500  # space.
44501  complete="$BUILD_NM"
44502  path="${complete%% *}"
44503  tmp="$complete EOL"
44504  arguments="${tmp#* }"
44505
44506  # Input might be given as Windows format, start by converting to
44507  # unix format.
44508  new_path="$path"
44509
44510  windows_path="$new_path"
44511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44512    unix_path=`$CYGPATH -u "$windows_path"`
44513    new_path="$unix_path"
44514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44516    new_path="$unix_path"
44517  fi
44518
44519
44520  # Now try to locate executable using which
44521  new_path=`$WHICH "$new_path" 2> /dev/null`
44522
44523  if test "x$new_path" = x; then
44524    # Oops. Which didn't find the executable.
44525    # The splitting of arguments from the executable at a space might have been incorrect,
44526    # since paths with space are more likely in Windows. Give it another try with the whole
44527    # argument.
44528    path="$complete"
44529    arguments="EOL"
44530    new_path="$path"
44531
44532  windows_path="$new_path"
44533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44534    unix_path=`$CYGPATH -u "$windows_path"`
44535    new_path="$unix_path"
44536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44538    new_path="$unix_path"
44539  fi
44540
44541
44542    new_path=`$WHICH "$new_path" 2> /dev/null`
44543    # bat and cmd files are not always considered executable in MSYS causing which
44544    # to not find them
44545    if test "x$new_path" = x \
44546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44548      new_path="$path"
44549
44550  windows_path="$new_path"
44551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44552    unix_path=`$CYGPATH -u "$windows_path"`
44553    new_path="$unix_path"
44554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44556    new_path="$unix_path"
44557  fi
44558
44559    fi
44560
44561    if test "x$new_path" = x; then
44562      # It's still not found. Now this is an unrecoverable error.
44563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44564$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44565      has_space=`$ECHO "$complete" | $GREP " "`
44566      if test "x$has_space" != x; then
44567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44569      fi
44570      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44571    fi
44572  fi
44573
44574  # Now new_path has a complete unix path to the binary
44575  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44576    # Keep paths in /bin as-is, but remove trailing .exe if any
44577    new_path="${new_path/%.exe/}"
44578    # Do not save /bin paths to all_fixpath_prefixes!
44579  else
44580    # Not in mixed or Windows style, start by that.
44581    new_path=`cmd //c echo $new_path`
44582
44583  input_path="$new_path"
44584  # Check if we need to convert this using DOS-style short mode. If the path
44585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44586  # take no chances and rewrite it.
44587  # Note: m4 eats our [], so we need to use [ and ] instead.
44588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44589  if test "x$has_forbidden_chars" != x; then
44590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44592  fi
44593
44594    # Output is in $new_path
44595
44596  windows_path="$new_path"
44597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44598    unix_path=`$CYGPATH -u "$windows_path"`
44599    new_path="$unix_path"
44600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44602    new_path="$unix_path"
44603  fi
44604
44605    # remove trailing .exe if any
44606    new_path="${new_path/%.exe/}"
44607
44608    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44609    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44610  fi
44611
44612    else
44613      # We're on a unix platform. Hooray! :)
44614      # First separate the path from the arguments. This will split at the first
44615      # space.
44616      complete="$BUILD_NM"
44617      path="${complete%% *}"
44618      tmp="$complete EOL"
44619      arguments="${tmp#* }"
44620
44621      # Cannot rely on the command "which" here since it doesn't always work.
44622      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44623      if test -z "$is_absolute_path"; then
44624        # Path to executable is not absolute. Find it.
44625        IFS_save="$IFS"
44626        IFS=:
44627        for p in $PATH; do
44628          if test -f "$p/$path" && test -x "$p/$path"; then
44629            new_path="$p/$path"
44630            break
44631          fi
44632        done
44633        IFS="$IFS_save"
44634      else
44635        # This is an absolute path, we can use it without further modifications.
44636        new_path="$path"
44637      fi
44638
44639      if test "x$new_path" = x; then
44640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44641$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44642        has_space=`$ECHO "$complete" | $GREP " "`
44643        if test "x$has_space" != x; then
44644          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44645$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44646        fi
44647        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44648      fi
44649    fi
44650
44651    # Now join together the path and the arguments once again
44652    if test "x$arguments" != xEOL; then
44653      new_complete="$new_path ${arguments% *}"
44654    else
44655      new_complete="$new_path"
44656    fi
44657
44658    if test "x$complete" != "x$new_complete"; then
44659      BUILD_NM="$new_complete"
44660      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44661$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44662    fi
44663  fi
44664
44665
44666
44667  # Publish this variable in the help.
44668
44669
44670  if [ -z "${BUILD_AR+x}" ]; then
44671    # The variable is not set by user, try to locate tool using the code snippet
44672    for ac_prog in ar gcc-ar
44673do
44674  # Extract the first word of "$ac_prog", so it can be a program name with args.
44675set dummy $ac_prog; ac_word=$2
44676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44677$as_echo_n "checking for $ac_word... " >&6; }
44678if ${ac_cv_path_BUILD_AR+:} false; then :
44679  $as_echo_n "(cached) " >&6
44680else
44681  case $BUILD_AR in
44682  [\\/]* | ?:[\\/]*)
44683  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44684  ;;
44685  *)
44686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44687for as_dir in $PATH
44688do
44689  IFS=$as_save_IFS
44690  test -z "$as_dir" && as_dir=.
44691    for ac_exec_ext in '' $ac_executable_extensions; do
44692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44693    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44695    break 2
44696  fi
44697done
44698  done
44699IFS=$as_save_IFS
44700
44701  ;;
44702esac
44703fi
44704BUILD_AR=$ac_cv_path_BUILD_AR
44705if test -n "$BUILD_AR"; then
44706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44707$as_echo "$BUILD_AR" >&6; }
44708else
44709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44710$as_echo "no" >&6; }
44711fi
44712
44713
44714  test -n "$BUILD_AR" && break
44715done
44716
44717  else
44718    # The variable is set, but is it from the command line or the environment?
44719
44720    # Try to remove the string !BUILD_AR! from our list.
44721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44723      # If it failed, the variable was not from the command line. Ignore it,
44724      # but warn the user (except for BASH, which is always set by the calling BASH).
44725      if test "xBUILD_AR" != xBASH; then
44726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44727$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44728      fi
44729      # Try to locate tool using the code snippet
44730      for ac_prog in ar gcc-ar
44731do
44732  # Extract the first word of "$ac_prog", so it can be a program name with args.
44733set dummy $ac_prog; ac_word=$2
44734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44735$as_echo_n "checking for $ac_word... " >&6; }
44736if ${ac_cv_path_BUILD_AR+:} false; then :
44737  $as_echo_n "(cached) " >&6
44738else
44739  case $BUILD_AR in
44740  [\\/]* | ?:[\\/]*)
44741  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44742  ;;
44743  *)
44744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44745for as_dir in $PATH
44746do
44747  IFS=$as_save_IFS
44748  test -z "$as_dir" && as_dir=.
44749    for ac_exec_ext in '' $ac_executable_extensions; do
44750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44751    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44753    break 2
44754  fi
44755done
44756  done
44757IFS=$as_save_IFS
44758
44759  ;;
44760esac
44761fi
44762BUILD_AR=$ac_cv_path_BUILD_AR
44763if test -n "$BUILD_AR"; then
44764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44765$as_echo "$BUILD_AR" >&6; }
44766else
44767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44768$as_echo "no" >&6; }
44769fi
44770
44771
44772  test -n "$BUILD_AR" && break
44773done
44774
44775    else
44776      # If it succeeded, then it was overridden by the user. We will use it
44777      # for the tool.
44778
44779      # First remove it from the list of overridden variables, so we can test
44780      # for unknown variables in the end.
44781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44782
44783      # Check if we try to supply an empty value
44784      if test "x$BUILD_AR" = x; then
44785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44786$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44788$as_echo_n "checking for BUILD_AR... " >&6; }
44789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44790$as_echo "disabled" >&6; }
44791      else
44792        # Check if the provided tool contains a complete path.
44793        tool_specified="$BUILD_AR"
44794        tool_basename="${tool_specified##*/}"
44795        if test "x$tool_basename" = "x$tool_specified"; then
44796          # A command without a complete path is provided, search $PATH.
44797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44798$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44799          # Extract the first word of "$tool_basename", so it can be a program name with args.
44800set dummy $tool_basename; ac_word=$2
44801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44802$as_echo_n "checking for $ac_word... " >&6; }
44803if ${ac_cv_path_BUILD_AR+:} false; then :
44804  $as_echo_n "(cached) " >&6
44805else
44806  case $BUILD_AR in
44807  [\\/]* | ?:[\\/]*)
44808  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44809  ;;
44810  *)
44811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44812for as_dir in $PATH
44813do
44814  IFS=$as_save_IFS
44815  test -z "$as_dir" && as_dir=.
44816    for ac_exec_ext in '' $ac_executable_extensions; do
44817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44818    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44820    break 2
44821  fi
44822done
44823  done
44824IFS=$as_save_IFS
44825
44826  ;;
44827esac
44828fi
44829BUILD_AR=$ac_cv_path_BUILD_AR
44830if test -n "$BUILD_AR"; then
44831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44832$as_echo "$BUILD_AR" >&6; }
44833else
44834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44835$as_echo "no" >&6; }
44836fi
44837
44838
44839          if test "x$BUILD_AR" = x; then
44840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44841          fi
44842        else
44843          # Otherwise we believe it is a complete path. Use it as it is.
44844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44845$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44847$as_echo_n "checking for BUILD_AR... " >&6; }
44848          if test ! -x "$tool_specified"; then
44849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44850$as_echo "not found" >&6; }
44851            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44852          fi
44853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44854$as_echo "$tool_specified" >&6; }
44855        fi
44856      fi
44857    fi
44858
44859  fi
44860
44861
44862
44863  # Only process if variable expands to non-empty
44864
44865  if test "x$BUILD_AR" != x; then
44866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44867
44868  # First separate the path from the arguments. This will split at the first
44869  # space.
44870  complete="$BUILD_AR"
44871  path="${complete%% *}"
44872  tmp="$complete EOL"
44873  arguments="${tmp#* }"
44874
44875  # Input might be given as Windows format, start by converting to
44876  # unix format.
44877  new_path=`$CYGPATH -u "$path"`
44878
44879  # Now try to locate executable using which
44880  new_path=`$WHICH "$new_path" 2> /dev/null`
44881  # bat and cmd files are not always considered executable in cygwin causing which
44882  # to not find them
44883  if test "x$new_path" = x \
44884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44886    new_path=`$CYGPATH -u "$path"`
44887  fi
44888  if test "x$new_path" = x; then
44889    # Oops. Which didn't find the executable.
44890    # The splitting of arguments from the executable at a space might have been incorrect,
44891    # since paths with space are more likely in Windows. Give it another try with the whole
44892    # argument.
44893    path="$complete"
44894    arguments="EOL"
44895    new_path=`$CYGPATH -u "$path"`
44896    new_path=`$WHICH "$new_path" 2> /dev/null`
44897    # bat and cmd files are not always considered executable in cygwin causing which
44898    # to not find them
44899    if test "x$new_path" = x \
44900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44902      new_path=`$CYGPATH -u "$path"`
44903    fi
44904    if test "x$new_path" = x; then
44905      # It's still not found. Now this is an unrecoverable error.
44906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44907$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44908      has_space=`$ECHO "$complete" | $GREP " "`
44909      if test "x$has_space" != x; then
44910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44912      fi
44913      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44914    fi
44915  fi
44916
44917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44920  # "foo.exe" is OK but "foo" is an error.
44921  #
44922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44923  # It is also a way to make sure we got the proper file name for the real test later on.
44924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44925  if test "x$test_shortpath" = x; then
44926    # Short path failed, file does not exist as specified.
44927    # Try adding .exe or .cmd
44928    if test -f "${new_path}.exe"; then
44929      input_to_shortpath="${new_path}.exe"
44930    elif test -f "${new_path}.cmd"; then
44931      input_to_shortpath="${new_path}.cmd"
44932    else
44933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44934$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44937      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44938    fi
44939  else
44940    input_to_shortpath="$new_path"
44941  fi
44942
44943  # Call helper function which possibly converts this using DOS-style short mode.
44944  # If so, the updated path is stored in $new_path.
44945  new_path="$input_to_shortpath"
44946
44947  input_path="$input_to_shortpath"
44948  # Check if we need to convert this using DOS-style short mode. If the path
44949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44950  # take no chances and rewrite it.
44951  # Note: m4 eats our [], so we need to use [ and ] instead.
44952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44953  if test "x$has_forbidden_chars" != x; then
44954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44958      # Going to short mode and back again did indeed matter. Since short mode is
44959      # case insensitive, let's make it lowercase to improve readability.
44960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44961      # Now convert it back to Unix-style (cygpath)
44962      input_path=`$CYGPATH -u "$shortmode_path"`
44963      new_path="$input_path"
44964    fi
44965  fi
44966
44967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44968  if test "x$test_cygdrive_prefix" = x; then
44969    # As a simple fix, exclude /usr/bin since it's not a real path.
44970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44972      # a path prefixed by /cygdrive for fixpath to work.
44973      new_path="$CYGWIN_ROOT_PATH$input_path"
44974    fi
44975  fi
44976
44977  # remove trailing .exe if any
44978  new_path="${new_path/%.exe/}"
44979
44980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44981
44982  # First separate the path from the arguments. This will split at the first
44983  # space.
44984  complete="$BUILD_AR"
44985  path="${complete%% *}"
44986  tmp="$complete EOL"
44987  arguments="${tmp#* }"
44988
44989  # Input might be given as Windows format, start by converting to
44990  # unix format.
44991  new_path="$path"
44992
44993  windows_path="$new_path"
44994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44995    unix_path=`$CYGPATH -u "$windows_path"`
44996    new_path="$unix_path"
44997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44999    new_path="$unix_path"
45000  fi
45001
45002
45003  # Now try to locate executable using which
45004  new_path=`$WHICH "$new_path" 2> /dev/null`
45005
45006  if test "x$new_path" = x; then
45007    # Oops. Which didn't find the executable.
45008    # The splitting of arguments from the executable at a space might have been incorrect,
45009    # since paths with space are more likely in Windows. Give it another try with the whole
45010    # argument.
45011    path="$complete"
45012    arguments="EOL"
45013    new_path="$path"
45014
45015  windows_path="$new_path"
45016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45017    unix_path=`$CYGPATH -u "$windows_path"`
45018    new_path="$unix_path"
45019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45021    new_path="$unix_path"
45022  fi
45023
45024
45025    new_path=`$WHICH "$new_path" 2> /dev/null`
45026    # bat and cmd files are not always considered executable in MSYS causing which
45027    # to not find them
45028    if test "x$new_path" = x \
45029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45031      new_path="$path"
45032
45033  windows_path="$new_path"
45034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45035    unix_path=`$CYGPATH -u "$windows_path"`
45036    new_path="$unix_path"
45037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45039    new_path="$unix_path"
45040  fi
45041
45042    fi
45043
45044    if test "x$new_path" = x; then
45045      # It's still not found. Now this is an unrecoverable error.
45046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45047$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45048      has_space=`$ECHO "$complete" | $GREP " "`
45049      if test "x$has_space" != x; then
45050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45052      fi
45053      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45054    fi
45055  fi
45056
45057  # Now new_path has a complete unix path to the binary
45058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45059    # Keep paths in /bin as-is, but remove trailing .exe if any
45060    new_path="${new_path/%.exe/}"
45061    # Do not save /bin paths to all_fixpath_prefixes!
45062  else
45063    # Not in mixed or Windows style, start by that.
45064    new_path=`cmd //c echo $new_path`
45065
45066  input_path="$new_path"
45067  # Check if we need to convert this using DOS-style short mode. If the path
45068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45069  # take no chances and rewrite it.
45070  # Note: m4 eats our [], so we need to use [ and ] instead.
45071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45072  if test "x$has_forbidden_chars" != x; then
45073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45075  fi
45076
45077    # Output is in $new_path
45078
45079  windows_path="$new_path"
45080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45081    unix_path=`$CYGPATH -u "$windows_path"`
45082    new_path="$unix_path"
45083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45085    new_path="$unix_path"
45086  fi
45087
45088    # remove trailing .exe if any
45089    new_path="${new_path/%.exe/}"
45090
45091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45093  fi
45094
45095    else
45096      # We're on a unix platform. Hooray! :)
45097      # First separate the path from the arguments. This will split at the first
45098      # space.
45099      complete="$BUILD_AR"
45100      path="${complete%% *}"
45101      tmp="$complete EOL"
45102      arguments="${tmp#* }"
45103
45104      # Cannot rely on the command "which" here since it doesn't always work.
45105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45106      if test -z "$is_absolute_path"; then
45107        # Path to executable is not absolute. Find it.
45108        IFS_save="$IFS"
45109        IFS=:
45110        for p in $PATH; do
45111          if test -f "$p/$path" && test -x "$p/$path"; then
45112            new_path="$p/$path"
45113            break
45114          fi
45115        done
45116        IFS="$IFS_save"
45117      else
45118        # This is an absolute path, we can use it without further modifications.
45119        new_path="$path"
45120      fi
45121
45122      if test "x$new_path" = x; then
45123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45124$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45125        has_space=`$ECHO "$complete" | $GREP " "`
45126        if test "x$has_space" != x; then
45127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45129        fi
45130        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45131      fi
45132    fi
45133
45134    # Now join together the path and the arguments once again
45135    if test "x$arguments" != xEOL; then
45136      new_complete="$new_path ${arguments% *}"
45137    else
45138      new_complete="$new_path"
45139    fi
45140
45141    if test "x$complete" != "x$new_complete"; then
45142      BUILD_AR="$new_complete"
45143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45144$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45145    fi
45146  fi
45147
45148
45149
45150  # Publish this variable in the help.
45151
45152
45153  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45154    # The variable is not set by user, try to locate tool using the code snippet
45155    for ac_prog in objcopy
45156do
45157  # Extract the first word of "$ac_prog", so it can be a program name with args.
45158set dummy $ac_prog; ac_word=$2
45159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45160$as_echo_n "checking for $ac_word... " >&6; }
45161if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45162  $as_echo_n "(cached) " >&6
45163else
45164  case $BUILD_OBJCOPY in
45165  [\\/]* | ?:[\\/]*)
45166  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45167  ;;
45168  *)
45169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45170for as_dir in $PATH
45171do
45172  IFS=$as_save_IFS
45173  test -z "$as_dir" && as_dir=.
45174    for ac_exec_ext in '' $ac_executable_extensions; do
45175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45176    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45178    break 2
45179  fi
45180done
45181  done
45182IFS=$as_save_IFS
45183
45184  ;;
45185esac
45186fi
45187BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45188if test -n "$BUILD_OBJCOPY"; then
45189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45190$as_echo "$BUILD_OBJCOPY" >&6; }
45191else
45192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45193$as_echo "no" >&6; }
45194fi
45195
45196
45197  test -n "$BUILD_OBJCOPY" && break
45198done
45199
45200  else
45201    # The variable is set, but is it from the command line or the environment?
45202
45203    # Try to remove the string !BUILD_OBJCOPY! from our list.
45204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45206      # If it failed, the variable was not from the command line. Ignore it,
45207      # but warn the user (except for BASH, which is always set by the calling BASH).
45208      if test "xBUILD_OBJCOPY" != xBASH; then
45209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45210$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45211      fi
45212      # Try to locate tool using the code snippet
45213      for ac_prog in objcopy
45214do
45215  # Extract the first word of "$ac_prog", so it can be a program name with args.
45216set dummy $ac_prog; ac_word=$2
45217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45218$as_echo_n "checking for $ac_word... " >&6; }
45219if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45220  $as_echo_n "(cached) " >&6
45221else
45222  case $BUILD_OBJCOPY in
45223  [\\/]* | ?:[\\/]*)
45224  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45225  ;;
45226  *)
45227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45228for as_dir in $PATH
45229do
45230  IFS=$as_save_IFS
45231  test -z "$as_dir" && as_dir=.
45232    for ac_exec_ext in '' $ac_executable_extensions; do
45233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45234    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45236    break 2
45237  fi
45238done
45239  done
45240IFS=$as_save_IFS
45241
45242  ;;
45243esac
45244fi
45245BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45246if test -n "$BUILD_OBJCOPY"; then
45247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45248$as_echo "$BUILD_OBJCOPY" >&6; }
45249else
45250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45251$as_echo "no" >&6; }
45252fi
45253
45254
45255  test -n "$BUILD_OBJCOPY" && break
45256done
45257
45258    else
45259      # If it succeeded, then it was overridden by the user. We will use it
45260      # for the tool.
45261
45262      # First remove it from the list of overridden variables, so we can test
45263      # for unknown variables in the end.
45264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45265
45266      # Check if we try to supply an empty value
45267      if test "x$BUILD_OBJCOPY" = x; then
45268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45269$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45271$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45273$as_echo "disabled" >&6; }
45274      else
45275        # Check if the provided tool contains a complete path.
45276        tool_specified="$BUILD_OBJCOPY"
45277        tool_basename="${tool_specified##*/}"
45278        if test "x$tool_basename" = "x$tool_specified"; then
45279          # A command without a complete path is provided, search $PATH.
45280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45281$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45282          # Extract the first word of "$tool_basename", so it can be a program name with args.
45283set dummy $tool_basename; ac_word=$2
45284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45285$as_echo_n "checking for $ac_word... " >&6; }
45286if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45287  $as_echo_n "(cached) " >&6
45288else
45289  case $BUILD_OBJCOPY in
45290  [\\/]* | ?:[\\/]*)
45291  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45292  ;;
45293  *)
45294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45295for as_dir in $PATH
45296do
45297  IFS=$as_save_IFS
45298  test -z "$as_dir" && as_dir=.
45299    for ac_exec_ext in '' $ac_executable_extensions; do
45300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45301    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45303    break 2
45304  fi
45305done
45306  done
45307IFS=$as_save_IFS
45308
45309  ;;
45310esac
45311fi
45312BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45313if test -n "$BUILD_OBJCOPY"; then
45314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45315$as_echo "$BUILD_OBJCOPY" >&6; }
45316else
45317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45318$as_echo "no" >&6; }
45319fi
45320
45321
45322          if test "x$BUILD_OBJCOPY" = x; then
45323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45324          fi
45325        else
45326          # Otherwise we believe it is a complete path. Use it as it is.
45327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45328$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45330$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45331          if test ! -x "$tool_specified"; then
45332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45333$as_echo "not found" >&6; }
45334            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45335          fi
45336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45337$as_echo "$tool_specified" >&6; }
45338        fi
45339      fi
45340    fi
45341
45342  fi
45343
45344
45345
45346  # Only process if variable expands to non-empty
45347
45348  if test "x$BUILD_OBJCOPY" != x; then
45349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45350
45351  # First separate the path from the arguments. This will split at the first
45352  # space.
45353  complete="$BUILD_OBJCOPY"
45354  path="${complete%% *}"
45355  tmp="$complete EOL"
45356  arguments="${tmp#* }"
45357
45358  # Input might be given as Windows format, start by converting to
45359  # unix format.
45360  new_path=`$CYGPATH -u "$path"`
45361
45362  # Now try to locate executable using which
45363  new_path=`$WHICH "$new_path" 2> /dev/null`
45364  # bat and cmd files are not always considered executable in cygwin causing which
45365  # to not find them
45366  if test "x$new_path" = x \
45367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45369    new_path=`$CYGPATH -u "$path"`
45370  fi
45371  if test "x$new_path" = x; then
45372    # Oops. Which didn't find the executable.
45373    # The splitting of arguments from the executable at a space might have been incorrect,
45374    # since paths with space are more likely in Windows. Give it another try with the whole
45375    # argument.
45376    path="$complete"
45377    arguments="EOL"
45378    new_path=`$CYGPATH -u "$path"`
45379    new_path=`$WHICH "$new_path" 2> /dev/null`
45380    # bat and cmd files are not always considered executable in cygwin causing which
45381    # to not find them
45382    if test "x$new_path" = x \
45383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45385      new_path=`$CYGPATH -u "$path"`
45386    fi
45387    if test "x$new_path" = x; then
45388      # It's still not found. Now this is an unrecoverable error.
45389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45390$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45391      has_space=`$ECHO "$complete" | $GREP " "`
45392      if test "x$has_space" != x; then
45393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45395      fi
45396      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45397    fi
45398  fi
45399
45400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45403  # "foo.exe" is OK but "foo" is an error.
45404  #
45405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45406  # It is also a way to make sure we got the proper file name for the real test later on.
45407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45408  if test "x$test_shortpath" = x; then
45409    # Short path failed, file does not exist as specified.
45410    # Try adding .exe or .cmd
45411    if test -f "${new_path}.exe"; then
45412      input_to_shortpath="${new_path}.exe"
45413    elif test -f "${new_path}.cmd"; then
45414      input_to_shortpath="${new_path}.cmd"
45415    else
45416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45417$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45420      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45421    fi
45422  else
45423    input_to_shortpath="$new_path"
45424  fi
45425
45426  # Call helper function which possibly converts this using DOS-style short mode.
45427  # If so, the updated path is stored in $new_path.
45428  new_path="$input_to_shortpath"
45429
45430  input_path="$input_to_shortpath"
45431  # Check if we need to convert this using DOS-style short mode. If the path
45432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45433  # take no chances and rewrite it.
45434  # Note: m4 eats our [], so we need to use [ and ] instead.
45435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45436  if test "x$has_forbidden_chars" != x; then
45437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45441      # Going to short mode and back again did indeed matter. Since short mode is
45442      # case insensitive, let's make it lowercase to improve readability.
45443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45444      # Now convert it back to Unix-style (cygpath)
45445      input_path=`$CYGPATH -u "$shortmode_path"`
45446      new_path="$input_path"
45447    fi
45448  fi
45449
45450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45451  if test "x$test_cygdrive_prefix" = x; then
45452    # As a simple fix, exclude /usr/bin since it's not a real path.
45453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45455      # a path prefixed by /cygdrive for fixpath to work.
45456      new_path="$CYGWIN_ROOT_PATH$input_path"
45457    fi
45458  fi
45459
45460  # remove trailing .exe if any
45461  new_path="${new_path/%.exe/}"
45462
45463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45464
45465  # First separate the path from the arguments. This will split at the first
45466  # space.
45467  complete="$BUILD_OBJCOPY"
45468  path="${complete%% *}"
45469  tmp="$complete EOL"
45470  arguments="${tmp#* }"
45471
45472  # Input might be given as Windows format, start by converting to
45473  # unix format.
45474  new_path="$path"
45475
45476  windows_path="$new_path"
45477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45478    unix_path=`$CYGPATH -u "$windows_path"`
45479    new_path="$unix_path"
45480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45482    new_path="$unix_path"
45483  fi
45484
45485
45486  # Now try to locate executable using which
45487  new_path=`$WHICH "$new_path" 2> /dev/null`
45488
45489  if test "x$new_path" = x; then
45490    # Oops. Which didn't find the executable.
45491    # The splitting of arguments from the executable at a space might have been incorrect,
45492    # since paths with space are more likely in Windows. Give it another try with the whole
45493    # argument.
45494    path="$complete"
45495    arguments="EOL"
45496    new_path="$path"
45497
45498  windows_path="$new_path"
45499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45500    unix_path=`$CYGPATH -u "$windows_path"`
45501    new_path="$unix_path"
45502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45504    new_path="$unix_path"
45505  fi
45506
45507
45508    new_path=`$WHICH "$new_path" 2> /dev/null`
45509    # bat and cmd files are not always considered executable in MSYS causing which
45510    # to not find them
45511    if test "x$new_path" = x \
45512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45514      new_path="$path"
45515
45516  windows_path="$new_path"
45517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45518    unix_path=`$CYGPATH -u "$windows_path"`
45519    new_path="$unix_path"
45520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45522    new_path="$unix_path"
45523  fi
45524
45525    fi
45526
45527    if test "x$new_path" = x; then
45528      # It's still not found. Now this is an unrecoverable error.
45529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45530$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45531      has_space=`$ECHO "$complete" | $GREP " "`
45532      if test "x$has_space" != x; then
45533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45535      fi
45536      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45537    fi
45538  fi
45539
45540  # Now new_path has a complete unix path to the binary
45541  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45542    # Keep paths in /bin as-is, but remove trailing .exe if any
45543    new_path="${new_path/%.exe/}"
45544    # Do not save /bin paths to all_fixpath_prefixes!
45545  else
45546    # Not in mixed or Windows style, start by that.
45547    new_path=`cmd //c echo $new_path`
45548
45549  input_path="$new_path"
45550  # Check if we need to convert this using DOS-style short mode. If the path
45551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45552  # take no chances and rewrite it.
45553  # Note: m4 eats our [], so we need to use [ and ] instead.
45554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45555  if test "x$has_forbidden_chars" != x; then
45556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45558  fi
45559
45560    # Output is in $new_path
45561
45562  windows_path="$new_path"
45563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45564    unix_path=`$CYGPATH -u "$windows_path"`
45565    new_path="$unix_path"
45566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45568    new_path="$unix_path"
45569  fi
45570
45571    # remove trailing .exe if any
45572    new_path="${new_path/%.exe/}"
45573
45574    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45575    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45576  fi
45577
45578    else
45579      # We're on a unix platform. Hooray! :)
45580      # First separate the path from the arguments. This will split at the first
45581      # space.
45582      complete="$BUILD_OBJCOPY"
45583      path="${complete%% *}"
45584      tmp="$complete EOL"
45585      arguments="${tmp#* }"
45586
45587      # Cannot rely on the command "which" here since it doesn't always work.
45588      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45589      if test -z "$is_absolute_path"; then
45590        # Path to executable is not absolute. Find it.
45591        IFS_save="$IFS"
45592        IFS=:
45593        for p in $PATH; do
45594          if test -f "$p/$path" && test -x "$p/$path"; then
45595            new_path="$p/$path"
45596            break
45597          fi
45598        done
45599        IFS="$IFS_save"
45600      else
45601        # This is an absolute path, we can use it without further modifications.
45602        new_path="$path"
45603      fi
45604
45605      if test "x$new_path" = x; then
45606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45607$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45608        has_space=`$ECHO "$complete" | $GREP " "`
45609        if test "x$has_space" != x; then
45610          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45611$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45612        fi
45613        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45614      fi
45615    fi
45616
45617    # Now join together the path and the arguments once again
45618    if test "x$arguments" != xEOL; then
45619      new_complete="$new_path ${arguments% *}"
45620    else
45621      new_complete="$new_path"
45622    fi
45623
45624    if test "x$complete" != "x$new_complete"; then
45625      BUILD_OBJCOPY="$new_complete"
45626      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45627$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45628    fi
45629  fi
45630
45631
45632
45633  # Publish this variable in the help.
45634
45635
45636  if [ -z "${BUILD_STRIP+x}" ]; then
45637    # The variable is not set by user, try to locate tool using the code snippet
45638    for ac_prog in strip
45639do
45640  # Extract the first word of "$ac_prog", so it can be a program name with args.
45641set dummy $ac_prog; ac_word=$2
45642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45643$as_echo_n "checking for $ac_word... " >&6; }
45644if ${ac_cv_path_BUILD_STRIP+:} false; then :
45645  $as_echo_n "(cached) " >&6
45646else
45647  case $BUILD_STRIP in
45648  [\\/]* | ?:[\\/]*)
45649  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45650  ;;
45651  *)
45652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45653for as_dir in $PATH
45654do
45655  IFS=$as_save_IFS
45656  test -z "$as_dir" && as_dir=.
45657    for ac_exec_ext in '' $ac_executable_extensions; do
45658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45659    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45661    break 2
45662  fi
45663done
45664  done
45665IFS=$as_save_IFS
45666
45667  ;;
45668esac
45669fi
45670BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45671if test -n "$BUILD_STRIP"; then
45672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45673$as_echo "$BUILD_STRIP" >&6; }
45674else
45675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45676$as_echo "no" >&6; }
45677fi
45678
45679
45680  test -n "$BUILD_STRIP" && break
45681done
45682
45683  else
45684    # The variable is set, but is it from the command line or the environment?
45685
45686    # Try to remove the string !BUILD_STRIP! from our list.
45687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
45688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45689      # If it failed, the variable was not from the command line. Ignore it,
45690      # but warn the user (except for BASH, which is always set by the calling BASH).
45691      if test "xBUILD_STRIP" != xBASH; then
45692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
45693$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
45694      fi
45695      # Try to locate tool using the code snippet
45696      for ac_prog in strip
45697do
45698  # Extract the first word of "$ac_prog", so it can be a program name with args.
45699set dummy $ac_prog; ac_word=$2
45700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45701$as_echo_n "checking for $ac_word... " >&6; }
45702if ${ac_cv_path_BUILD_STRIP+:} false; then :
45703  $as_echo_n "(cached) " >&6
45704else
45705  case $BUILD_STRIP in
45706  [\\/]* | ?:[\\/]*)
45707  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45708  ;;
45709  *)
45710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45711for as_dir in $PATH
45712do
45713  IFS=$as_save_IFS
45714  test -z "$as_dir" && as_dir=.
45715    for ac_exec_ext in '' $ac_executable_extensions; do
45716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45717    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45719    break 2
45720  fi
45721done
45722  done
45723IFS=$as_save_IFS
45724
45725  ;;
45726esac
45727fi
45728BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45729if test -n "$BUILD_STRIP"; then
45730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45731$as_echo "$BUILD_STRIP" >&6; }
45732else
45733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45734$as_echo "no" >&6; }
45735fi
45736
45737
45738  test -n "$BUILD_STRIP" && break
45739done
45740
45741    else
45742      # If it succeeded, then it was overridden by the user. We will use it
45743      # for the tool.
45744
45745      # First remove it from the list of overridden variables, so we can test
45746      # for unknown variables in the end.
45747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45748
45749      # Check if we try to supply an empty value
45750      if test "x$BUILD_STRIP" = x; then
45751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
45752$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
45753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
45754$as_echo_n "checking for BUILD_STRIP... " >&6; }
45755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45756$as_echo "disabled" >&6; }
45757      else
45758        # Check if the provided tool contains a complete path.
45759        tool_specified="$BUILD_STRIP"
45760        tool_basename="${tool_specified##*/}"
45761        if test "x$tool_basename" = "x$tool_specified"; then
45762          # A command without a complete path is provided, search $PATH.
45763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
45764$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
45765          # Extract the first word of "$tool_basename", so it can be a program name with args.
45766set dummy $tool_basename; ac_word=$2
45767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45768$as_echo_n "checking for $ac_word... " >&6; }
45769if ${ac_cv_path_BUILD_STRIP+:} false; then :
45770  $as_echo_n "(cached) " >&6
45771else
45772  case $BUILD_STRIP in
45773  [\\/]* | ?:[\\/]*)
45774  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45775  ;;
45776  *)
45777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45778for as_dir in $PATH
45779do
45780  IFS=$as_save_IFS
45781  test -z "$as_dir" && as_dir=.
45782    for ac_exec_ext in '' $ac_executable_extensions; do
45783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45784    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45786    break 2
45787  fi
45788done
45789  done
45790IFS=$as_save_IFS
45791
45792  ;;
45793esac
45794fi
45795BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45796if test -n "$BUILD_STRIP"; then
45797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45798$as_echo "$BUILD_STRIP" >&6; }
45799else
45800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45801$as_echo "no" >&6; }
45802fi
45803
45804
45805          if test "x$BUILD_STRIP" = x; then
45806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45807          fi
45808        else
45809          # Otherwise we believe it is a complete path. Use it as it is.
45810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
45811$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
45812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
45813$as_echo_n "checking for BUILD_STRIP... " >&6; }
45814          if test ! -x "$tool_specified"; then
45815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45816$as_echo "not found" >&6; }
45817            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
45818          fi
45819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45820$as_echo "$tool_specified" >&6; }
45821        fi
45822      fi
45823    fi
45824
45825  fi
45826
45827
45828
45829  # Only process if variable expands to non-empty
45830
45831  if test "x$BUILD_STRIP" != x; then
45832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45833
45834  # First separate the path from the arguments. This will split at the first
45835  # space.
45836  complete="$BUILD_STRIP"
45837  path="${complete%% *}"
45838  tmp="$complete EOL"
45839  arguments="${tmp#* }"
45840
45841  # Input might be given as Windows format, start by converting to
45842  # unix format.
45843  new_path=`$CYGPATH -u "$path"`
45844
45845  # Now try to locate executable using which
45846  new_path=`$WHICH "$new_path" 2> /dev/null`
45847  # bat and cmd files are not always considered executable in cygwin causing which
45848  # to not find them
45849  if test "x$new_path" = x \
45850      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45851      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45852    new_path=`$CYGPATH -u "$path"`
45853  fi
45854  if test "x$new_path" = x; then
45855    # Oops. Which didn't find the executable.
45856    # The splitting of arguments from the executable at a space might have been incorrect,
45857    # since paths with space are more likely in Windows. Give it another try with the whole
45858    # argument.
45859    path="$complete"
45860    arguments="EOL"
45861    new_path=`$CYGPATH -u "$path"`
45862    new_path=`$WHICH "$new_path" 2> /dev/null`
45863    # bat and cmd files are not always considered executable in cygwin causing which
45864    # to not find them
45865    if test "x$new_path" = x \
45866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45868      new_path=`$CYGPATH -u "$path"`
45869    fi
45870    if test "x$new_path" = x; then
45871      # It's still not found. Now this is an unrecoverable error.
45872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
45873$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
45874      has_space=`$ECHO "$complete" | $GREP " "`
45875      if test "x$has_space" != x; then
45876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45878      fi
45879      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45880    fi
45881  fi
45882
45883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45886  # "foo.exe" is OK but "foo" is an error.
45887  #
45888  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45889  # It is also a way to make sure we got the proper file name for the real test later on.
45890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45891  if test "x$test_shortpath" = x; then
45892    # Short path failed, file does not exist as specified.
45893    # Try adding .exe or .cmd
45894    if test -f "${new_path}.exe"; then
45895      input_to_shortpath="${new_path}.exe"
45896    elif test -f "${new_path}.cmd"; then
45897      input_to_shortpath="${new_path}.cmd"
45898    else
45899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
45900$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
45901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45903      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
45904    fi
45905  else
45906    input_to_shortpath="$new_path"
45907  fi
45908
45909  # Call helper function which possibly converts this using DOS-style short mode.
45910  # If so, the updated path is stored in $new_path.
45911  new_path="$input_to_shortpath"
45912
45913  input_path="$input_to_shortpath"
45914  # Check if we need to convert this using DOS-style short mode. If the path
45915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45916  # take no chances and rewrite it.
45917  # Note: m4 eats our [], so we need to use [ and ] instead.
45918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45919  if test "x$has_forbidden_chars" != x; then
45920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45924      # Going to short mode and back again did indeed matter. Since short mode is
45925      # case insensitive, let's make it lowercase to improve readability.
45926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45927      # Now convert it back to Unix-style (cygpath)
45928      input_path=`$CYGPATH -u "$shortmode_path"`
45929      new_path="$input_path"
45930    fi
45931  fi
45932
45933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45934  if test "x$test_cygdrive_prefix" = x; then
45935    # As a simple fix, exclude /usr/bin since it's not a real path.
45936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45938      # a path prefixed by /cygdrive for fixpath to work.
45939      new_path="$CYGWIN_ROOT_PATH$input_path"
45940    fi
45941  fi
45942
45943  # remove trailing .exe if any
45944  new_path="${new_path/%.exe/}"
45945
45946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45947
45948  # First separate the path from the arguments. This will split at the first
45949  # space.
45950  complete="$BUILD_STRIP"
45951  path="${complete%% *}"
45952  tmp="$complete EOL"
45953  arguments="${tmp#* }"
45954
45955  # Input might be given as Windows format, start by converting to
45956  # unix format.
45957  new_path="$path"
45958
45959  windows_path="$new_path"
45960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45961    unix_path=`$CYGPATH -u "$windows_path"`
45962    new_path="$unix_path"
45963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45965    new_path="$unix_path"
45966  fi
45967
45968
45969  # Now try to locate executable using which
45970  new_path=`$WHICH "$new_path" 2> /dev/null`
45971
45972  if test "x$new_path" = x; then
45973    # Oops. Which didn't find the executable.
45974    # The splitting of arguments from the executable at a space might have been incorrect,
45975    # since paths with space are more likely in Windows. Give it another try with the whole
45976    # argument.
45977    path="$complete"
45978    arguments="EOL"
45979    new_path="$path"
45980
45981  windows_path="$new_path"
45982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45983    unix_path=`$CYGPATH -u "$windows_path"`
45984    new_path="$unix_path"
45985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45987    new_path="$unix_path"
45988  fi
45989
45990
45991    new_path=`$WHICH "$new_path" 2> /dev/null`
45992    # bat and cmd files are not always considered executable in MSYS causing which
45993    # to not find them
45994    if test "x$new_path" = x \
45995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45997      new_path="$path"
45998
45999  windows_path="$new_path"
46000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46001    unix_path=`$CYGPATH -u "$windows_path"`
46002    new_path="$unix_path"
46003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46005    new_path="$unix_path"
46006  fi
46007
46008    fi
46009
46010    if test "x$new_path" = x; then
46011      # It's still not found. Now this is an unrecoverable error.
46012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46013$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46014      has_space=`$ECHO "$complete" | $GREP " "`
46015      if test "x$has_space" != x; then
46016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46018      fi
46019      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46020    fi
46021  fi
46022
46023  # Now new_path has a complete unix path to the binary
46024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46025    # Keep paths in /bin as-is, but remove trailing .exe if any
46026    new_path="${new_path/%.exe/}"
46027    # Do not save /bin paths to all_fixpath_prefixes!
46028  else
46029    # Not in mixed or Windows style, start by that.
46030    new_path=`cmd //c echo $new_path`
46031
46032  input_path="$new_path"
46033  # Check if we need to convert this using DOS-style short mode. If the path
46034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46035  # take no chances and rewrite it.
46036  # Note: m4 eats our [], so we need to use [ and ] instead.
46037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46038  if test "x$has_forbidden_chars" != x; then
46039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46041  fi
46042
46043    # Output is in $new_path
46044
46045  windows_path="$new_path"
46046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46047    unix_path=`$CYGPATH -u "$windows_path"`
46048    new_path="$unix_path"
46049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46051    new_path="$unix_path"
46052  fi
46053
46054    # remove trailing .exe if any
46055    new_path="${new_path/%.exe/}"
46056
46057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46059  fi
46060
46061    else
46062      # We're on a unix platform. Hooray! :)
46063      # First separate the path from the arguments. This will split at the first
46064      # space.
46065      complete="$BUILD_STRIP"
46066      path="${complete%% *}"
46067      tmp="$complete EOL"
46068      arguments="${tmp#* }"
46069
46070      # Cannot rely on the command "which" here since it doesn't always work.
46071      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46072      if test -z "$is_absolute_path"; then
46073        # Path to executable is not absolute. Find it.
46074        IFS_save="$IFS"
46075        IFS=:
46076        for p in $PATH; do
46077          if test -f "$p/$path" && test -x "$p/$path"; then
46078            new_path="$p/$path"
46079            break
46080          fi
46081        done
46082        IFS="$IFS_save"
46083      else
46084        # This is an absolute path, we can use it without further modifications.
46085        new_path="$path"
46086      fi
46087
46088      if test "x$new_path" = x; then
46089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46090$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46091        has_space=`$ECHO "$complete" | $GREP " "`
46092        if test "x$has_space" != x; then
46093          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46095        fi
46096        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46097      fi
46098    fi
46099
46100    # Now join together the path and the arguments once again
46101    if test "x$arguments" != xEOL; then
46102      new_complete="$new_path ${arguments% *}"
46103    else
46104      new_complete="$new_path"
46105    fi
46106
46107    if test "x$complete" != "x$new_complete"; then
46108      BUILD_STRIP="$new_complete"
46109      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46110$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46111    fi
46112  fi
46113
46114    # Assume the C compiler is the assembler
46115    BUILD_AS="$BUILD_CC -c"
46116    # Just like for the target compiler, use the compiler as linker
46117    BUILD_LD="$BUILD_CC"
46118    BUILD_LDCXX="$BUILD_CXX"
46119
46120    PATH="$OLDPATH"
46121  else
46122    # If we are not cross compiling, use the normal target compilers for
46123    # building the build platform executables.
46124    BUILD_CC="$CC"
46125    BUILD_CXX="$CXX"
46126    BUILD_LD="$LD"
46127    BUILD_LDCXX="$LDCXX"
46128    BUILD_NM="$NM"
46129    BUILD_AS="$AS"
46130    BUILD_OBJCOPY="$OBJCOPY"
46131    BUILD_STRIP="$STRIP"
46132    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46133    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46134    BUILD_AR="$AR"
46135  fi
46136
46137
46138
46139
46140
46141
46142
46143
46144
46145
46146
46147
46148  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46149    # For hotspot, we need these in Windows mixed path,
46150    # so rewrite them all. Need added .exe suffix.
46151    HOTSPOT_CXX="$CXX.exe"
46152    HOTSPOT_LD="$LD.exe"
46153    HOTSPOT_MT="$MT.exe"
46154    HOTSPOT_RC="$RC.exe"
46155
46156  unix_path="$HOTSPOT_CXX"
46157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46158    windows_path=`$CYGPATH -m "$unix_path"`
46159    HOTSPOT_CXX="$windows_path"
46160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46161    windows_path=`cmd //c echo $unix_path`
46162    HOTSPOT_CXX="$windows_path"
46163  fi
46164
46165
46166  unix_path="$HOTSPOT_LD"
46167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46168    windows_path=`$CYGPATH -m "$unix_path"`
46169    HOTSPOT_LD="$windows_path"
46170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46171    windows_path=`cmd //c echo $unix_path`
46172    HOTSPOT_LD="$windows_path"
46173  fi
46174
46175
46176  unix_path="$HOTSPOT_MT"
46177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46178    windows_path=`$CYGPATH -m "$unix_path"`
46179    HOTSPOT_MT="$windows_path"
46180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46181    windows_path=`cmd //c echo $unix_path`
46182    HOTSPOT_MT="$windows_path"
46183  fi
46184
46185
46186  unix_path="$HOTSPOT_RC"
46187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46188    windows_path=`$CYGPATH -m "$unix_path"`
46189    HOTSPOT_RC="$windows_path"
46190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46191    windows_path=`cmd //c echo $unix_path`
46192    HOTSPOT_RC="$windows_path"
46193  fi
46194
46195
46196
46197  else
46198    HOTSPOT_CXX="$CXX"
46199    HOTSPOT_LD="$LD"
46200  fi
46201
46202
46203
46204  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46205    USE_CLANG=true
46206  fi
46207
46208
46209
46210
46211
46212  # The package path is used only on macosx?
46213  # FIXME: clean this up, and/or move it elsewhere.
46214  PACKAGE_PATH=/opt/local
46215
46216
46217  # Check for extra potential brokenness.
46218  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46219    # On Windows, double-check that we got the right compiler.
46220    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46221    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46222    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46223      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46224        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
46225      fi
46226    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46227      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46228        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46229      fi
46230    fi
46231  fi
46232
46233  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46234    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46235    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46236    # This is later checked when setting flags.
46237
46238    # "-Og" suppported for GCC 4.8 and later
46239    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257
46258
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
46287    # Execute function body
46288
46289
46290
46291
46292
46293
46294
46295
46296
46297
46298
46299
46300
46301
46302
46303
46304
46305
46306
46307
46308
46309
46310
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331
46332
46333
46334
46335
46336    # Execute function body
46337
46338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46339$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46340  supports=yes
46341
46342  saved_cflags="$CFLAGS"
46343  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46344  ac_ext=c
46345ac_cpp='$CPP $CPPFLAGS'
46346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46348ac_compiler_gnu=$ac_cv_c_compiler_gnu
46349
46350  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46351/* end confdefs.h.  */
46352int i;
46353_ACEOF
46354if ac_fn_c_try_compile "$LINENO"; then :
46355
46356else
46357  supports=no
46358fi
46359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46360  ac_ext=cpp
46361ac_cpp='$CXXCPP $CPPFLAGS'
46362ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46363ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46364ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46365
46366  CFLAGS="$saved_cflags"
46367
46368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46369$as_echo "$supports" >&6; }
46370  if test "x$supports" = "xyes" ; then
46371    :
46372    C_COMP_SUPPORTS="yes"
46373  else
46374    :
46375    C_COMP_SUPPORTS="no"
46376  fi
46377
46378
46379
46380
46381
46382
46383
46384
46385
46386
46387
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399
46400
46401
46402
46403
46404
46405
46406
46407
46408
46409
46410
46411
46412
46413
46414
46415
46416
46417
46418
46419
46420
46421
46422
46423
46424
46425
46426
46427
46428
46429
46430
46431
46432
46433
46434
46435
46436    # Execute function body
46437
46438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46439$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46440  supports=yes
46441
46442  saved_cxxflags="$CXXFLAGS"
46443  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46444  ac_ext=cpp
46445ac_cpp='$CXXCPP $CPPFLAGS'
46446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46449
46450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46451/* end confdefs.h.  */
46452int i;
46453_ACEOF
46454if ac_fn_cxx_try_compile "$LINENO"; then :
46455
46456else
46457  supports=no
46458fi
46459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46460  ac_ext=cpp
46461ac_cpp='$CXXCPP $CPPFLAGS'
46462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46465
46466  CXXFLAGS="$saved_cxxflags"
46467
46468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46469$as_echo "$supports" >&6; }
46470  if test "x$supports" = "xyes" ; then
46471    :
46472    CXX_COMP_SUPPORTS="yes"
46473  else
46474    :
46475    CXX_COMP_SUPPORTS="no"
46476  fi
46477
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46491$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46492  supports=no
46493  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46494
46495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46496$as_echo "$supports" >&6; }
46497  if test "x$supports" = "xyes" ; then
46498    :
46499    HAS_CFLAG_OPTIMIZE_DEBUG=true
46500  else
46501    :
46502    HAS_CFLAG_OPTIMIZE_DEBUG=false
46503  fi
46504
46505
46506
46507
46508
46509
46510
46511    # "-z relro" supported in GNU binutils 2.17 and later
46512    LINKER_RELRO_FLAG="-Wl,-z,relro"
46513
46514
46515
46516
46517
46518
46519
46520
46521
46522
46523
46524
46525
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560    # Execute function body
46561
46562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46563$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46564  supports=yes
46565
46566  saved_ldflags="$LDFLAGS"
46567  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46568  ac_ext=c
46569ac_cpp='$CPP $CPPFLAGS'
46570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46572ac_compiler_gnu=$ac_cv_c_compiler_gnu
46573
46574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46575/* end confdefs.h.  */
46576
46577int
46578main ()
46579{
46580
46581  ;
46582  return 0;
46583}
46584_ACEOF
46585if ac_fn_c_try_link "$LINENO"; then :
46586
46587else
46588  supports=no
46589fi
46590rm -f core conftest.err conftest.$ac_objext \
46591    conftest$ac_exeext conftest.$ac_ext
46592  ac_ext=cpp
46593ac_cpp='$CXXCPP $CPPFLAGS'
46594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46597
46598  LDFLAGS="$saved_ldflags"
46599
46600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46601$as_echo "$supports" >&6; }
46602  if test "x$supports" = "xyes" ; then
46603    :
46604    HAS_LINKER_RELRO=true
46605  else
46606    :
46607    HAS_LINKER_RELRO=false
46608  fi
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622    # "-z now" supported in GNU binutils 2.11 and later
46623    LINKER_NOW_FLAG="-Wl,-z,now"
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664
46665
46666
46667
46668
46669
46670
46671    # Execute function body
46672
46673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46674$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46675  supports=yes
46676
46677  saved_ldflags="$LDFLAGS"
46678  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
46679  ac_ext=c
46680ac_cpp='$CPP $CPPFLAGS'
46681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46683ac_compiler_gnu=$ac_cv_c_compiler_gnu
46684
46685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46686/* end confdefs.h.  */
46687
46688int
46689main ()
46690{
46691
46692  ;
46693  return 0;
46694}
46695_ACEOF
46696if ac_fn_c_try_link "$LINENO"; then :
46697
46698else
46699  supports=no
46700fi
46701rm -f core conftest.err conftest.$ac_objext \
46702    conftest$ac_exeext conftest.$ac_ext
46703  ac_ext=cpp
46704ac_cpp='$CXXCPP $CPPFLAGS'
46705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46708
46709  LDFLAGS="$saved_ldflags"
46710
46711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46712$as_echo "$supports" >&6; }
46713  if test "x$supports" = "xyes" ; then
46714    :
46715    HAS_LINKER_NOW=true
46716  else
46717    :
46718    HAS_LINKER_NOW=false
46719  fi
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732  fi
46733
46734  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
46735  # in executable.'
46736  USING_BROKEN_SUSE_LD=no
46737  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
46738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
46739$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
46740    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
46741    $ECHO "int main() { }" > main.c
46742    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
46743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46744$as_echo "no" >&6; }
46745      USING_BROKEN_SUSE_LD=no
46746    else
46747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46748$as_echo "yes" >&6; }
46749      USING_BROKEN_SUSE_LD=yes
46750    fi
46751    rm -rf version-script.map main.c a.out
46752  fi
46753
46754
46755
46756# Setup the JTReg Regression Test Harness.
46757
46758
46759# Check whether --with-jtreg was given.
46760if test "${with_jtreg+set}" = set; then :
46761  withval=$with_jtreg;
46762else
46763  with_jtreg=no
46764fi
46765
46766
46767  if test "x$with_jtreg" = xno; then
46768    # jtreg disabled
46769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
46770$as_echo_n "checking for jtreg... " >&6; }
46771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46772$as_echo "no" >&6; }
46773  else
46774    if test "x$with_jtreg" != xyes; then
46775      # with path specified.
46776      JT_HOME="$with_jtreg"
46777    fi
46778
46779    if test "x$JT_HOME" != x; then
46780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
46781$as_echo_n "checking for jtreg... " >&6; }
46782
46783      # use JT_HOME enviroment var.
46784
46785  # Only process if variable expands to non-empty
46786
46787  if test "x$JT_HOME" != x; then
46788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46789
46790  # Input might be given as Windows format, start by converting to
46791  # unix format.
46792  path="$JT_HOME"
46793  new_path=`$CYGPATH -u "$path"`
46794
46795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46798  # "foo.exe" is OK but "foo" is an error.
46799  #
46800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46801  # It is also a way to make sure we got the proper file name for the real test later on.
46802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46803  if test "x$test_shortpath" = x; then
46804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
46805$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
46806    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
46807  fi
46808
46809  # Call helper function which possibly converts this using DOS-style short mode.
46810  # If so, the updated path is stored in $new_path.
46811
46812  input_path="$new_path"
46813  # Check if we need to convert this using DOS-style short mode. If the path
46814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46815  # take no chances and rewrite it.
46816  # Note: m4 eats our [], so we need to use [ and ] instead.
46817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46818  if test "x$has_forbidden_chars" != x; then
46819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46823      # Going to short mode and back again did indeed matter. Since short mode is
46824      # case insensitive, let's make it lowercase to improve readability.
46825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46826      # Now convert it back to Unix-style (cygpath)
46827      input_path=`$CYGPATH -u "$shortmode_path"`
46828      new_path="$input_path"
46829    fi
46830  fi
46831
46832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46833  if test "x$test_cygdrive_prefix" = x; then
46834    # As a simple fix, exclude /usr/bin since it's not a real path.
46835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46837      # a path prefixed by /cygdrive for fixpath to work.
46838      new_path="$CYGWIN_ROOT_PATH$input_path"
46839    fi
46840  fi
46841
46842
46843  if test "x$path" != "x$new_path"; then
46844    JT_HOME="$new_path"
46845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
46846$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
46847  fi
46848
46849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46850
46851  path="$JT_HOME"
46852  has_colon=`$ECHO $path | $GREP ^.:`
46853  new_path="$path"
46854  if test "x$has_colon" = x; then
46855    # Not in mixed or Windows style, start by that.
46856    new_path=`cmd //c echo $path`
46857  fi
46858
46859
46860  input_path="$new_path"
46861  # Check if we need to convert this using DOS-style short mode. If the path
46862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46863  # take no chances and rewrite it.
46864  # Note: m4 eats our [], so we need to use [ and ] instead.
46865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46866  if test "x$has_forbidden_chars" != x; then
46867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46869  fi
46870
46871
46872  windows_path="$new_path"
46873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46874    unix_path=`$CYGPATH -u "$windows_path"`
46875    new_path="$unix_path"
46876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46878    new_path="$unix_path"
46879  fi
46880
46881  if test "x$path" != "x$new_path"; then
46882    JT_HOME="$new_path"
46883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
46884$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
46885  fi
46886
46887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46889
46890    else
46891      # We're on a unix platform. Hooray! :)
46892      path="$JT_HOME"
46893      has_space=`$ECHO "$path" | $GREP " "`
46894      if test "x$has_space" != x; then
46895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
46896$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
46897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46898      fi
46899
46900      # Use eval to expand a potential ~
46901      eval path="$path"
46902      if test ! -f "$path" && test ! -d "$path"; then
46903        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
46904      fi
46905
46906      if test -d "$path"; then
46907        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
46908      else
46909        dir="`$DIRNAME "$path"`"
46910        base="`$BASENAME "$path"`"
46911        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
46912      fi
46913    fi
46914  fi
46915
46916
46917      # jtreg win32 script works for everybody
46918      JTREGEXE="$JT_HOME/bin/jtreg"
46919
46920      if test ! -f "$JTREGEXE"; then
46921        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
46922      fi
46923
46924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46925$as_echo "$JTREGEXE" >&6; }
46926    else
46927      # try to find jtreg on path
46928
46929
46930
46931  # Publish this variable in the help.
46932
46933
46934  if [ -z "${JTREGEXE+x}" ]; then
46935    # The variable is not set by user, try to locate tool using the code snippet
46936    for ac_prog in jtreg
46937do
46938  # Extract the first word of "$ac_prog", so it can be a program name with args.
46939set dummy $ac_prog; ac_word=$2
46940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46941$as_echo_n "checking for $ac_word... " >&6; }
46942if ${ac_cv_path_JTREGEXE+:} false; then :
46943  $as_echo_n "(cached) " >&6
46944else
46945  case $JTREGEXE in
46946  [\\/]* | ?:[\\/]*)
46947  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46948  ;;
46949  *)
46950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46951for as_dir in $PATH
46952do
46953  IFS=$as_save_IFS
46954  test -z "$as_dir" && as_dir=.
46955    for ac_exec_ext in '' $ac_executable_extensions; do
46956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46957    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46959    break 2
46960  fi
46961done
46962  done
46963IFS=$as_save_IFS
46964
46965  ;;
46966esac
46967fi
46968JTREGEXE=$ac_cv_path_JTREGEXE
46969if test -n "$JTREGEXE"; then
46970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46971$as_echo "$JTREGEXE" >&6; }
46972else
46973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46974$as_echo "no" >&6; }
46975fi
46976
46977
46978  test -n "$JTREGEXE" && break
46979done
46980
46981  else
46982    # The variable is set, but is it from the command line or the environment?
46983
46984    # Try to remove the string !JTREGEXE! from our list.
46985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
46986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46987      # If it failed, the variable was not from the command line. Ignore it,
46988      # but warn the user (except for BASH, which is always set by the calling BASH).
46989      if test "xJTREGEXE" != xBASH; then
46990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
46991$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
46992      fi
46993      # Try to locate tool using the code snippet
46994      for ac_prog in jtreg
46995do
46996  # Extract the first word of "$ac_prog", so it can be a program name with args.
46997set dummy $ac_prog; ac_word=$2
46998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46999$as_echo_n "checking for $ac_word... " >&6; }
47000if ${ac_cv_path_JTREGEXE+:} false; then :
47001  $as_echo_n "(cached) " >&6
47002else
47003  case $JTREGEXE in
47004  [\\/]* | ?:[\\/]*)
47005  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47006  ;;
47007  *)
47008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47009for as_dir in $PATH
47010do
47011  IFS=$as_save_IFS
47012  test -z "$as_dir" && as_dir=.
47013    for ac_exec_ext in '' $ac_executable_extensions; do
47014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47015    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47017    break 2
47018  fi
47019done
47020  done
47021IFS=$as_save_IFS
47022
47023  ;;
47024esac
47025fi
47026JTREGEXE=$ac_cv_path_JTREGEXE
47027if test -n "$JTREGEXE"; then
47028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47029$as_echo "$JTREGEXE" >&6; }
47030else
47031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47032$as_echo "no" >&6; }
47033fi
47034
47035
47036  test -n "$JTREGEXE" && break
47037done
47038
47039    else
47040      # If it succeeded, then it was overridden by the user. We will use it
47041      # for the tool.
47042
47043      # First remove it from the list of overridden variables, so we can test
47044      # for unknown variables in the end.
47045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47046
47047      # Check if we try to supply an empty value
47048      if test "x$JTREGEXE" = x; then
47049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47050$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47052$as_echo_n "checking for JTREGEXE... " >&6; }
47053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47054$as_echo "disabled" >&6; }
47055      else
47056        # Check if the provided tool contains a complete path.
47057        tool_specified="$JTREGEXE"
47058        tool_basename="${tool_specified##*/}"
47059        if test "x$tool_basename" = "x$tool_specified"; then
47060          # A command without a complete path is provided, search $PATH.
47061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47062$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47063          # Extract the first word of "$tool_basename", so it can be a program name with args.
47064set dummy $tool_basename; ac_word=$2
47065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47066$as_echo_n "checking for $ac_word... " >&6; }
47067if ${ac_cv_path_JTREGEXE+:} false; then :
47068  $as_echo_n "(cached) " >&6
47069else
47070  case $JTREGEXE in
47071  [\\/]* | ?:[\\/]*)
47072  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47073  ;;
47074  *)
47075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47076for as_dir in $PATH
47077do
47078  IFS=$as_save_IFS
47079  test -z "$as_dir" && as_dir=.
47080    for ac_exec_ext in '' $ac_executable_extensions; do
47081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47082    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47084    break 2
47085  fi
47086done
47087  done
47088IFS=$as_save_IFS
47089
47090  ;;
47091esac
47092fi
47093JTREGEXE=$ac_cv_path_JTREGEXE
47094if test -n "$JTREGEXE"; then
47095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47096$as_echo "$JTREGEXE" >&6; }
47097else
47098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47099$as_echo "no" >&6; }
47100fi
47101
47102
47103          if test "x$JTREGEXE" = x; then
47104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47105          fi
47106        else
47107          # Otherwise we believe it is a complete path. Use it as it is.
47108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47109$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47111$as_echo_n "checking for JTREGEXE... " >&6; }
47112          if test ! -x "$tool_specified"; then
47113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47114$as_echo "not found" >&6; }
47115            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47116          fi
47117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47118$as_echo "$tool_specified" >&6; }
47119        fi
47120      fi
47121    fi
47122
47123  fi
47124
47125
47126
47127  if test "x$JTREGEXE" = x; then
47128    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47129  fi
47130
47131
47132      JT_HOME="`$DIRNAME $JTREGEXE`"
47133    fi
47134  fi
47135
47136
47137
47138
47139
47140
47141  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47142  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47143  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47144  #                              commands produced by the link step (currently AIX only)
47145  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47146    COMPILER_TARGET_BITS_FLAG="-q"
47147    COMPILER_COMMAND_FILE_FLAG="-f"
47148    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47149  else
47150    COMPILER_TARGET_BITS_FLAG="-m"
47151    COMPILER_COMMAND_FILE_FLAG="@"
47152    COMPILER_BINDCMD_FILE_FLAG=""
47153
47154    # The solstudio linker does not support @-files.
47155    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47156      COMPILER_COMMAND_FILE_FLAG=
47157    fi
47158
47159    # Check if @file is supported by gcc
47160    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47162$as_echo_n "checking if @file is supported by gcc... " >&6; }
47163      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47164      $ECHO "" "--version" > command.file
47165      if $CXX @command.file 2>&5 >&5; then
47166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47167$as_echo "yes" >&6; }
47168        COMPILER_COMMAND_FILE_FLAG="@"
47169      else
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47171$as_echo "no" >&6; }
47172        COMPILER_COMMAND_FILE_FLAG=
47173      fi
47174      rm -rf command.file
47175    fi
47176  fi
47177
47178
47179
47180
47181  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47182  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47183    ARFLAGS="-r"
47184  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47185    ARFLAGS="-X64"
47186  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47187    # lib.exe is used as AR to create static libraries.
47188    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47189  else
47190    ARFLAGS=""
47191  fi
47192
47193
47194  ## Setup strip.
47195  # FIXME: should this really be per platform, or should it be per toolchain type?
47196  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47197  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47198  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47199    STRIPFLAGS="-g"
47200  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47201    STRIPFLAGS="-x"
47202  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47203    STRIPFLAGS="-S"
47204  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47205    STRIPFLAGS="-X32_64"
47206  fi
47207
47208
47209
47210  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47211    CC_OUT_OPTION=-Fo
47212    EXE_OUT_OPTION=-out:
47213    LD_OUT_OPTION=-out:
47214    AR_OUT_OPTION=-out:
47215  else
47216    # The option used to specify the target .o,.a or .so file.
47217    # When compiling, how to specify the to be created object file.
47218    CC_OUT_OPTION='-o$(SPACE)'
47219    # When linking, how to specify the to be created executable.
47220    EXE_OUT_OPTION='-o$(SPACE)'
47221    # When linking, how to specify the to be created dynamically linkable library.
47222    LD_OUT_OPTION='-o$(SPACE)'
47223    # When archiving, how to specify the to be create static archive for object files.
47224    AR_OUT_OPTION='rcs$(SPACE)'
47225  fi
47226
47227
47228
47229
47230
47231  # On Windows, we need to set RC flags.
47232  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47233    RC_FLAGS="-nologo -l0x409"
47234    if test "x$DEBUG_LEVEL" = xrelease; then
47235      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47236    fi
47237
47238    # The version variables used to create RC_FLAGS may be overridden
47239    # in a custom configure script, or possibly the command line.
47240    # Let those variables be expanded at make time in spec.gmk.
47241    # The \$ are escaped to the shell, and the $(...) variables
47242    # are evaluated by make.
47243    RC_FLAGS="$RC_FLAGS \
47244        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47245        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47246        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47247        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47248        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47249        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47250        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47251  fi
47252
47253
47254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47255    # silence copyright notice and other headers.
47256    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47257  fi
47258
47259
47260# Now we can test some aspects on the target using configure macros.
47261
47262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47263$as_echo_n "checking for ANSI C header files... " >&6; }
47264if ${ac_cv_header_stdc+:} false; then :
47265  $as_echo_n "(cached) " >&6
47266else
47267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47268/* end confdefs.h.  */
47269#include <stdlib.h>
47270#include <stdarg.h>
47271#include <string.h>
47272#include <float.h>
47273
47274int
47275main ()
47276{
47277
47278  ;
47279  return 0;
47280}
47281_ACEOF
47282if ac_fn_cxx_try_compile "$LINENO"; then :
47283  ac_cv_header_stdc=yes
47284else
47285  ac_cv_header_stdc=no
47286fi
47287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47288
47289if test $ac_cv_header_stdc = yes; then
47290  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47292/* end confdefs.h.  */
47293#include <string.h>
47294
47295_ACEOF
47296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47297  $EGREP "memchr" >/dev/null 2>&1; then :
47298
47299else
47300  ac_cv_header_stdc=no
47301fi
47302rm -f conftest*
47303
47304fi
47305
47306if test $ac_cv_header_stdc = yes; then
47307  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47309/* end confdefs.h.  */
47310#include <stdlib.h>
47311
47312_ACEOF
47313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47314  $EGREP "free" >/dev/null 2>&1; then :
47315
47316else
47317  ac_cv_header_stdc=no
47318fi
47319rm -f conftest*
47320
47321fi
47322
47323if test $ac_cv_header_stdc = yes; then
47324  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47325  if test "$cross_compiling" = yes; then :
47326  :
47327else
47328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47329/* end confdefs.h.  */
47330#include <ctype.h>
47331#include <stdlib.h>
47332#if ((' ' & 0x0FF) == 0x020)
47333# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47334# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47335#else
47336# define ISLOWER(c) \
47337		   (('a' <= (c) && (c) <= 'i') \
47338		     || ('j' <= (c) && (c) <= 'r') \
47339		     || ('s' <= (c) && (c) <= 'z'))
47340# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47341#endif
47342
47343#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47344int
47345main ()
47346{
47347  int i;
47348  for (i = 0; i < 256; i++)
47349    if (XOR (islower (i), ISLOWER (i))
47350	|| toupper (i) != TOUPPER (i))
47351      return 2;
47352  return 0;
47353}
47354_ACEOF
47355if ac_fn_cxx_try_run "$LINENO"; then :
47356
47357else
47358  ac_cv_header_stdc=no
47359fi
47360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47361  conftest.$ac_objext conftest.beam conftest.$ac_ext
47362fi
47363
47364fi
47365fi
47366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47367$as_echo "$ac_cv_header_stdc" >&6; }
47368if test $ac_cv_header_stdc = yes; then
47369
47370$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47371
47372fi
47373
47374# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47375for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47376		  inttypes.h stdint.h unistd.h
47377do :
47378  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47379ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47380"
47381if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47382  cat >>confdefs.h <<_ACEOF
47383#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47384_ACEOF
47385
47386fi
47387
47388done
47389
47390
47391
47392  ###############################################################################
47393  #
47394  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47395  # (The JVM can use 32 or 64 bit Java pointers but that decision
47396  # is made at runtime.)
47397  #
47398
47399  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47400    # Always specify -m flag on Solaris
47401    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47402
47403  # When we add flags to the "official" CFLAGS etc, we need to
47404  # keep track of these additions in ADDED_CFLAGS etc. These
47405  # will later be checked to make sure only controlled additions
47406  # have been made to CFLAGS etc.
47407  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47408  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47409  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47410
47411  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47412  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47413  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47414
47415  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47416  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47417  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47418
47419  elif test "x$COMPILE_TYPE" = xreduced; then
47420    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47421      # Specify -m if running reduced on unix platforms
47422
47423  # When we add flags to the "official" CFLAGS etc, we need to
47424  # keep track of these additions in ADDED_CFLAGS etc. These
47425  # will later be checked to make sure only controlled additions
47426  # have been made to CFLAGS etc.
47427  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47428  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47429  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47430
47431  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47432  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47433  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47434
47435  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47436  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47437  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47438
47439    fi
47440  fi
47441
47442  # Make compilation sanity check
47443  for ac_header in stdio.h
47444do :
47445  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47446if test "x$ac_cv_header_stdio_h" = xyes; then :
47447  cat >>confdefs.h <<_ACEOF
47448#define HAVE_STDIO_H 1
47449_ACEOF
47450
47451else
47452
47453    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47454$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47455    if test "x$COMPILE_TYPE" = xreduced; then
47456
47457  # Print a helpful message on how to acquire the necessary build dependency.
47458  # reduced is the help tag: freetype, cups, alsa etc
47459  MISSING_DEPENDENCY=reduced
47460
47461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47462    cygwin_help $MISSING_DEPENDENCY
47463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47464    msys_help $MISSING_DEPENDENCY
47465  else
47466    PKGHANDLER_COMMAND=
47467
47468    case $PKGHANDLER in
47469      apt-get)
47470        apt_help     $MISSING_DEPENDENCY ;;
47471      yum)
47472        yum_help     $MISSING_DEPENDENCY ;;
47473      port)
47474        port_help    $MISSING_DEPENDENCY ;;
47475      pkgutil)
47476        pkgutil_help $MISSING_DEPENDENCY ;;
47477      pkgadd)
47478        pkgadd_help  $MISSING_DEPENDENCY ;;
47479    esac
47480
47481    if test "x$PKGHANDLER_COMMAND" != x; then
47482      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47483    fi
47484  fi
47485
47486      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47487$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47488    elif test "x$COMPILE_TYPE" = xcross; then
47489      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47490$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47491    fi
47492    as_fn_error $? "Cannot continue." "$LINENO" 5
47493
47494fi
47495
47496done
47497
47498
47499  # The cast to long int works around a bug in the HP C Compiler
47500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47502# This bug is HP SR number 8606223364.
47503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47504$as_echo_n "checking size of int *... " >&6; }
47505if ${ac_cv_sizeof_int_p+:} false; then :
47506  $as_echo_n "(cached) " >&6
47507else
47508  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47509
47510else
47511  if test "$ac_cv_type_int_p" = yes; then
47512     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47514as_fn_error 77 "cannot compute sizeof (int *)
47515See \`config.log' for more details" "$LINENO" 5; }
47516   else
47517     ac_cv_sizeof_int_p=0
47518   fi
47519fi
47520
47521fi
47522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47523$as_echo "$ac_cv_sizeof_int_p" >&6; }
47524
47525
47526
47527cat >>confdefs.h <<_ACEOF
47528#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47529_ACEOF
47530
47531
47532
47533  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47534  if test "x$ac_cv_sizeof_int_p" = x; then
47535    # The test failed, lets stick to the assumed value.
47536    { $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
47537$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47538  else
47539    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47540
47541    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47542      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47543      # Let's try to implicitely set the compilers target architecture and retry the test
47544      { $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
47545$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;}
47546      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47547$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47548
47549  # When we add flags to the "official" CFLAGS etc, we need to
47550  # keep track of these additions in ADDED_CFLAGS etc. These
47551  # will later be checked to make sure only controlled additions
47552  # have been made to CFLAGS etc.
47553  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47554  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47555  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47556
47557  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47558  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47559  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47560
47561  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47562  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47563  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47564
47565
47566      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47567      unset ac_cv_sizeof_int_p
47568      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47569      cat >>confdefs.h <<_ACEOF
47570#undef SIZEOF_INT_P
47571_ACEOF
47572
47573      # The cast to long int works around a bug in the HP C Compiler
47574# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47575# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47576# This bug is HP SR number 8606223364.
47577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47578$as_echo_n "checking size of int *... " >&6; }
47579if ${ac_cv_sizeof_int_p+:} false; then :
47580  $as_echo_n "(cached) " >&6
47581else
47582  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47583
47584else
47585  if test "$ac_cv_type_int_p" = yes; then
47586     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47588as_fn_error 77 "cannot compute sizeof (int *)
47589See \`config.log' for more details" "$LINENO" 5; }
47590   else
47591     ac_cv_sizeof_int_p=0
47592   fi
47593fi
47594
47595fi
47596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47597$as_echo "$ac_cv_sizeof_int_p" >&6; }
47598
47599
47600
47601cat >>confdefs.h <<_ACEOF
47602#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47603_ACEOF
47604
47605
47606
47607      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47608
47609      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47610        { $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
47611$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;}
47612        if test "x$COMPILE_TYPE" = xreduced; then
47613
47614  # Print a helpful message on how to acquire the necessary build dependency.
47615  # reduced is the help tag: freetype, cups, alsa etc
47616  MISSING_DEPENDENCY=reduced
47617
47618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47619    cygwin_help $MISSING_DEPENDENCY
47620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47621    msys_help $MISSING_DEPENDENCY
47622  else
47623    PKGHANDLER_COMMAND=
47624
47625    case $PKGHANDLER in
47626      apt-get)
47627        apt_help     $MISSING_DEPENDENCY ;;
47628      yum)
47629        yum_help     $MISSING_DEPENDENCY ;;
47630      port)
47631        port_help    $MISSING_DEPENDENCY ;;
47632      pkgutil)
47633        pkgutil_help $MISSING_DEPENDENCY ;;
47634      pkgadd)
47635        pkgadd_help  $MISSING_DEPENDENCY ;;
47636    esac
47637
47638    if test "x$PKGHANDLER_COMMAND" != x; then
47639      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47640    fi
47641  fi
47642
47643          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47644$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47645        elif test "x$COMPILE_TYPE" = xcross; then
47646          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47647$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47648        fi
47649        as_fn_error $? "Cannot continue." "$LINENO" 5
47650      fi
47651    fi
47652  fi
47653
47654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
47655$as_echo_n "checking for target address size... " >&6; }
47656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
47657$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
47658
47659
47660  ###############################################################################
47661  #
47662  # Is the target little of big endian?
47663  #
47664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
47665$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
47666if ${ac_cv_c_bigendian+:} false; then :
47667  $as_echo_n "(cached) " >&6
47668else
47669  ac_cv_c_bigendian=unknown
47670    # See if we're dealing with a universal compiler.
47671    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47672/* end confdefs.h.  */
47673#ifndef __APPLE_CC__
47674	       not a universal capable compiler
47675	     #endif
47676	     typedef int dummy;
47677
47678_ACEOF
47679if ac_fn_cxx_try_compile "$LINENO"; then :
47680
47681	# Check for potential -arch flags.  It is not universal unless
47682	# there are at least two -arch flags with different values.
47683	ac_arch=
47684	ac_prev=
47685	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
47686	 if test -n "$ac_prev"; then
47687	   case $ac_word in
47688	     i?86 | x86_64 | ppc | ppc64)
47689	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
47690		 ac_arch=$ac_word
47691	       else
47692		 ac_cv_c_bigendian=universal
47693		 break
47694	       fi
47695	       ;;
47696	   esac
47697	   ac_prev=
47698	 elif test "x$ac_word" = "x-arch"; then
47699	   ac_prev=arch
47700	 fi
47701       done
47702fi
47703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47704    if test $ac_cv_c_bigendian = unknown; then
47705      # See if sys/param.h defines the BYTE_ORDER macro.
47706      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47707/* end confdefs.h.  */
47708#include <sys/types.h>
47709	     #include <sys/param.h>
47710
47711int
47712main ()
47713{
47714#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
47715		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
47716		     && LITTLE_ENDIAN)
47717	      bogus endian macros
47718	     #endif
47719
47720  ;
47721  return 0;
47722}
47723_ACEOF
47724if ac_fn_cxx_try_compile "$LINENO"; then :
47725  # It does; now see whether it defined to BIG_ENDIAN or not.
47726	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47727/* end confdefs.h.  */
47728#include <sys/types.h>
47729		#include <sys/param.h>
47730
47731int
47732main ()
47733{
47734#if BYTE_ORDER != BIG_ENDIAN
47735		 not big endian
47736		#endif
47737
47738  ;
47739  return 0;
47740}
47741_ACEOF
47742if ac_fn_cxx_try_compile "$LINENO"; then :
47743  ac_cv_c_bigendian=yes
47744else
47745  ac_cv_c_bigendian=no
47746fi
47747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47748fi
47749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47750    fi
47751    if test $ac_cv_c_bigendian = unknown; then
47752      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
47753      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47754/* end confdefs.h.  */
47755#include <limits.h>
47756
47757int
47758main ()
47759{
47760#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
47761	      bogus endian macros
47762	     #endif
47763
47764  ;
47765  return 0;
47766}
47767_ACEOF
47768if ac_fn_cxx_try_compile "$LINENO"; then :
47769  # It does; now see whether it defined to _BIG_ENDIAN or not.
47770	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47771/* end confdefs.h.  */
47772#include <limits.h>
47773
47774int
47775main ()
47776{
47777#ifndef _BIG_ENDIAN
47778		 not big endian
47779		#endif
47780
47781  ;
47782  return 0;
47783}
47784_ACEOF
47785if ac_fn_cxx_try_compile "$LINENO"; then :
47786  ac_cv_c_bigendian=yes
47787else
47788  ac_cv_c_bigendian=no
47789fi
47790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47791fi
47792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47793    fi
47794    if test $ac_cv_c_bigendian = unknown; then
47795      # Compile a test program.
47796      if test "$cross_compiling" = yes; then :
47797  # Try to guess by grepping values from an object file.
47798	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47799/* end confdefs.h.  */
47800short int ascii_mm[] =
47801		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
47802		short int ascii_ii[] =
47803		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
47804		int use_ascii (int i) {
47805		  return ascii_mm[i] + ascii_ii[i];
47806		}
47807		short int ebcdic_ii[] =
47808		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
47809		short int ebcdic_mm[] =
47810		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
47811		int use_ebcdic (int i) {
47812		  return ebcdic_mm[i] + ebcdic_ii[i];
47813		}
47814		extern int foo;
47815
47816int
47817main ()
47818{
47819return use_ascii (foo) == use_ebcdic (foo);
47820  ;
47821  return 0;
47822}
47823_ACEOF
47824if ac_fn_cxx_try_compile "$LINENO"; then :
47825  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
47826	      ac_cv_c_bigendian=yes
47827	    fi
47828	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
47829	      if test "$ac_cv_c_bigendian" = unknown; then
47830		ac_cv_c_bigendian=no
47831	      else
47832		# finding both strings is unlikely to happen, but who knows?
47833		ac_cv_c_bigendian=unknown
47834	      fi
47835	    fi
47836fi
47837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47838else
47839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47840/* end confdefs.h.  */
47841$ac_includes_default
47842int
47843main ()
47844{
47845
47846	     /* Are we little or big endian?  From Harbison&Steele.  */
47847	     union
47848	     {
47849	       long int l;
47850	       char c[sizeof (long int)];
47851	     } u;
47852	     u.l = 1;
47853	     return u.c[sizeof (long int) - 1] == 1;
47854
47855  ;
47856  return 0;
47857}
47858_ACEOF
47859if ac_fn_cxx_try_run "$LINENO"; then :
47860  ac_cv_c_bigendian=no
47861else
47862  ac_cv_c_bigendian=yes
47863fi
47864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47865  conftest.$ac_objext conftest.beam conftest.$ac_ext
47866fi
47867
47868    fi
47869fi
47870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
47871$as_echo "$ac_cv_c_bigendian" >&6; }
47872 case $ac_cv_c_bigendian in #(
47873   yes)
47874     ENDIAN="big";; #(
47875   no)
47876     ENDIAN="little" ;; #(
47877   universal)
47878     ENDIAN="universal_endianness"
47879     ;; #(
47880   *)
47881     ENDIAN="unknown" ;;
47882 esac
47883
47884
47885  if test "x$ENDIAN" = xuniversal_endianness; then
47886    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
47887  fi
47888  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
47889    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
47890  fi
47891
47892
47893# Configure flags for the tools
47894
47895  ###############################################################################
47896  #
47897  # How to compile shared libraries.
47898  #
47899
47900  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47901    PICFLAG="-fPIC"
47902    C_FLAG_REORDER=''
47903    CXX_FLAG_REORDER=''
47904
47905    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47906      # Linking is different on MacOSX
47907      if test "x$STATIC_BUILD" = xtrue; then
47908        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
47909      else
47910        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
47911      fi
47912      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
47913      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47914      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
47915      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
47916    else
47917      # Default works for linux, might work on other platforms as well.
47918      SHARED_LIBRARY_FLAGS='-shared'
47919      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
47920      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
47921      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
47922      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
47923    fi
47924  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47925    C_FLAG_REORDER=''
47926    CXX_FLAG_REORDER=''
47927
47928    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47929      # Linking is different on MacOSX
47930      PICFLAG=''
47931      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
47932      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
47933      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47934      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
47935      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
47936    else
47937      # Default works for linux, might work on other platforms as well.
47938      PICFLAG='-fPIC'
47939      SHARED_LIBRARY_FLAGS='-shared'
47940      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
47941      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
47942      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
47943      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
47944    fi
47945  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47946    PICFLAG="-KPIC"
47947    C_FLAG_REORDER='-xF'
47948    CXX_FLAG_REORDER='-xF'
47949    SHARED_LIBRARY_FLAGS="-G"
47950    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
47951    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
47952    SET_SHARED_LIBRARY_NAME='-h $1'
47953    SET_SHARED_LIBRARY_MAPFILE='-M$1'
47954  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47955    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
47956    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
47957    # will have to patch this single instruction with a call to some out-of-order code which
47958    # does the load from the TOC. This is of course slow. But in that case we also would have
47959    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
47960    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
47961    # can be patched directly by the linker and does not require a jump to out-of-order code.
47962    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
47963    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
47964    # loads for accessing a global variable). But there are rumors that this may be seen as a
47965    # 'performance feature' because of improved code locality of the symbols used in a
47966    # compilation unit.
47967    PICFLAG="-qpic"
47968    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
47969    C_FLAG_REORDER=''
47970    CXX_FLAG_REORDER=''
47971    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
47972    SET_EXECUTABLE_ORIGIN=""
47973    SET_SHARED_LIBRARY_ORIGIN=''
47974    SET_SHARED_LIBRARY_NAME=''
47975    SET_SHARED_LIBRARY_MAPFILE=''
47976  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47977    PICFLAG=""
47978    C_FLAG_REORDER=''
47979    CXX_FLAG_REORDER=''
47980    SHARED_LIBRARY_FLAGS="-dll"
47981    SET_EXECUTABLE_ORIGIN=''
47982    SET_SHARED_LIBRARY_ORIGIN=''
47983    SET_SHARED_LIBRARY_NAME=''
47984    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
47985  fi
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47996    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
47997    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
47998    CFLAGS_JDKLIB_EXTRA='-xstrconst'
47999  fi
48000  # The (cross) compiler is now configured, we can now test capabilities
48001  # of the target platform.
48002
48003
48004
48005  ###############################################################################
48006  #
48007  # Setup the opt flags for different compilers
48008  # and different operating systems.
48009  #
48010
48011  # FIXME: this was indirectly the old default, but just inherited.
48012  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48013  #   C_FLAG_DEPS="-MMD -MF"
48014  # fi
48015
48016  # Generate make dependency files
48017  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48018    C_FLAG_DEPS="-MMD -MF"
48019  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48020    C_FLAG_DEPS="-MMD -MF"
48021  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48022    C_FLAG_DEPS="-xMMD -xMF"
48023  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48024    C_FLAG_DEPS="-qmakedep=gcc -MF"
48025  fi
48026  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48027
48028
48029
48030  # Debug symbols
48031  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48032    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48033      # reduce from default "-g2" option to save space
48034      CFLAGS_DEBUG_SYMBOLS="-g1"
48035      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48036    else
48037      CFLAGS_DEBUG_SYMBOLS="-g"
48038      CXXFLAGS_DEBUG_SYMBOLS="-g"
48039    fi
48040  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48041    CFLAGS_DEBUG_SYMBOLS="-g"
48042    CXXFLAGS_DEBUG_SYMBOLS="-g"
48043  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48044    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48045    # -g0 enables debug symbols without disabling inlining.
48046    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48047  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48048    CFLAGS_DEBUG_SYMBOLS="-g"
48049    CXXFLAGS_DEBUG_SYMBOLS="-g"
48050  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48051    CFLAGS_DEBUG_SYMBOLS="-Zi"
48052    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48053  fi
48054
48055
48056
48057  # bounds, memory and behavior checking options
48058  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48059    case $DEBUG_LEVEL in
48060    release )
48061      # no adjustment
48062      ;;
48063    fastdebug )
48064      # no adjustment
48065      ;;
48066    slowdebug )
48067      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
48068      # get's added conditionally on whether we produce debug symbols or not.
48069      # This is most likely not really correct.
48070
48071      # Add runtime stack smashing and undefined behavior checks.
48072      # Not all versions of gcc support -fstack-protector
48073      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116    # Execute function body
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165    # Execute function body
48166
48167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48168$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48169  supports=yes
48170
48171  saved_cflags="$CFLAGS"
48172  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48173  ac_ext=c
48174ac_cpp='$CPP $CPPFLAGS'
48175ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48176ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48177ac_compiler_gnu=$ac_cv_c_compiler_gnu
48178
48179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48180/* end confdefs.h.  */
48181int i;
48182_ACEOF
48183if ac_fn_c_try_compile "$LINENO"; then :
48184
48185else
48186  supports=no
48187fi
48188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48189  ac_ext=cpp
48190ac_cpp='$CXXCPP $CPPFLAGS'
48191ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48192ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48193ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48194
48195  CFLAGS="$saved_cflags"
48196
48197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48198$as_echo "$supports" >&6; }
48199  if test "x$supports" = "xyes" ; then
48200    :
48201    C_COMP_SUPPORTS="yes"
48202  else
48203    :
48204    C_COMP_SUPPORTS="no"
48205  fi
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265    # Execute function body
48266
48267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48268$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48269  supports=yes
48270
48271  saved_cxxflags="$CXXFLAGS"
48272  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48273  ac_ext=cpp
48274ac_cpp='$CXXCPP $CPPFLAGS'
48275ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48276ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48277ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48278
48279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48280/* end confdefs.h.  */
48281int i;
48282_ACEOF
48283if ac_fn_cxx_try_compile "$LINENO"; then :
48284
48285else
48286  supports=no
48287fi
48288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48289  ac_ext=cpp
48290ac_cpp='$CXXCPP $CPPFLAGS'
48291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48294
48295  CXXFLAGS="$saved_cxxflags"
48296
48297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48298$as_echo "$supports" >&6; }
48299  if test "x$supports" = "xyes" ; then
48300    :
48301    CXX_COMP_SUPPORTS="yes"
48302  else
48303    :
48304    CXX_COMP_SUPPORTS="no"
48305  fi
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48320$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48321  supports=no
48322  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48323
48324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48325$as_echo "$supports" >&6; }
48326  if test "x$supports" = "xyes" ; then
48327    :
48328
48329  else
48330    :
48331    STACK_PROTECTOR_CFLAG=""
48332  fi
48333
48334
48335
48336
48337
48338
48339
48340      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48341      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48342      ;;
48343    esac
48344  fi
48345
48346  # Optimization levels
48347  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48348    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48349
48350    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48351      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48352      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48353      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48354      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48355      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48356      C_O_FLAG_NONE="-xregs=no%frameptr"
48357      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48358      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48359      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48360      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48361      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48362      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48363        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48364        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48365      fi
48366    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48367      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48368      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48369      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48370      C_O_FLAG_DEBUG=""
48371      C_O_FLAG_NONE=""
48372      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48373      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48374      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48375      CXX_O_FLAG_DEBUG=""
48376      CXX_O_FLAG_NONE=""
48377    fi
48378  else
48379    # The remaining toolchains share opt flags between CC and CXX;
48380    # setup for C and duplicate afterwards.
48381    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48382      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48383        # On MacOSX we optimize for size, something
48384        # we should do for all platforms?
48385        C_O_FLAG_HIGHEST="-Os"
48386        C_O_FLAG_HI="-Os"
48387        C_O_FLAG_NORM="-Os"
48388      else
48389        C_O_FLAG_HIGHEST="-O3"
48390        C_O_FLAG_HI="-O3"
48391        C_O_FLAG_NORM="-O2"
48392      fi
48393      C_O_FLAG_DEBUG="-O0"
48394      C_O_FLAG_NONE="-O0"
48395    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48396      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48397        # On MacOSX we optimize for size, something
48398        # we should do for all platforms?
48399        C_O_FLAG_HIGHEST="-Os"
48400        C_O_FLAG_HI="-Os"
48401        C_O_FLAG_NORM="-Os"
48402      else
48403        C_O_FLAG_HIGHEST="-O3"
48404        C_O_FLAG_HI="-O3"
48405        C_O_FLAG_NORM="-O2"
48406      fi
48407      C_O_FLAG_DEBUG="-O0"
48408      C_O_FLAG_NONE="-O0"
48409    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48410      C_O_FLAG_HIGHEST="-O3"
48411      C_O_FLAG_HI="-O3 -qstrict"
48412      C_O_FLAG_NORM="-O2"
48413      C_O_FLAG_DEBUG="-qnoopt"
48414      C_O_FLAG_NONE="-qnoopt"
48415    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48416      C_O_FLAG_HIGHEST="-O2"
48417      C_O_FLAG_HI="-O1"
48418      C_O_FLAG_NORM="-O1"
48419      C_O_FLAG_DEBUG="-Od"
48420      C_O_FLAG_NONE="-Od"
48421    fi
48422    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48423    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48424    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48425    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48426    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48427  fi
48428
48429  # Adjust optimization flags according to debug level.
48430  case $DEBUG_LEVEL in
48431    release )
48432      # no adjustment
48433      ;;
48434    fastdebug )
48435      # Not quite so much optimization
48436      C_O_FLAG_HI="$C_O_FLAG_NORM"
48437      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48438      ;;
48439    slowdebug )
48440      # Disable optimization
48441      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48442      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48443      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48444      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48445      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48446      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48447      ;;
48448  esac
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462  # Special extras...
48463  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48464    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48465      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48466      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48467    fi
48468    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48469    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48470  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48471    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48472    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48473  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48474    CXXSTD_CXXFLAG="-std=gnu++98"
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517    # Execute function body
48518
48519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48520$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48521  supports=yes
48522
48523  saved_cxxflags="$CXXFLAGS"
48524  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48525  ac_ext=cpp
48526ac_cpp='$CXXCPP $CPPFLAGS'
48527ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48528ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48529ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48530
48531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48532/* end confdefs.h.  */
48533int i;
48534_ACEOF
48535if ac_fn_cxx_try_compile "$LINENO"; then :
48536
48537else
48538  supports=no
48539fi
48540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48541  ac_ext=cpp
48542ac_cpp='$CXXCPP $CPPFLAGS'
48543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48546
48547  CXXFLAGS="$saved_cxxflags"
48548
48549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48550$as_echo "$supports" >&6; }
48551  if test "x$supports" = "xyes" ; then
48552    :
48553
48554  else
48555    :
48556    CXXSTD_CXXFLAG=""
48557  fi
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
48571
48572  fi
48573
48574  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
48575  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
48576  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
48577
48578  ###############################################################################
48579  #
48580  # Now setup the CFLAGS and LDFLAGS for the JDK build.
48581  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
48582  #
48583
48584  # Setup compiler/platform specific flags into
48585  #    CFLAGS_JDK    - C Compiler flags
48586  #    CXXFLAGS_JDK  - C++ Compiler flags
48587  #    COMMON_CCXXFLAGS_JDK - common to C and C++
48588  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48589    if test "x$OPENJDK_TARGET_CPU" = xx86; then
48590      # Force compatibility with i586 on 32 bit intel platforms.
48591      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
48592    fi
48593    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
48594        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
48595    case $OPENJDK_TARGET_CPU_ARCH in
48596      arm )
48597        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48598        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48599        ;;
48600      ppc )
48601        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
48602        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48603        ;;
48604      * )
48605        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
48606        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
48607        ;;
48608    esac
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651    # Execute function body
48652
48653  # Need to assign to a variable since m4 is blocked from modifying parts in [].
48654  REFERENCE_VERSION=6
48655
48656  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
48657    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
48658  fi
48659
48660  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
48661    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
48662  fi
48663
48664  # Version comparison method inspired by http://stackoverflow.com/a/24067243
48665  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
48666
48667  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
48668    :
48669
48670  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
48671  # runs afoul of the more aggressive versions of these optimisations.
48672  # Notably, value range propagation now assumes that the this pointer of C++
48673  # member functions is non-null.
48674  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704
48705
48706
48707
48708
48709
48710
48711
48712
48713
48714
48715
48716
48717    # Execute function body
48718
48719
48720
48721
48722
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766    # Execute function body
48767
48768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
48769$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
48770  supports=yes
48771
48772  saved_cflags="$CFLAGS"
48773  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
48774  ac_ext=c
48775ac_cpp='$CPP $CPPFLAGS'
48776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48778ac_compiler_gnu=$ac_cv_c_compiler_gnu
48779
48780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48781/* end confdefs.h.  */
48782int i;
48783_ACEOF
48784if ac_fn_c_try_compile "$LINENO"; then :
48785
48786else
48787  supports=no
48788fi
48789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48790  ac_ext=cpp
48791ac_cpp='$CXXCPP $CPPFLAGS'
48792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48795
48796  CFLAGS="$saved_cflags"
48797
48798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48799$as_echo "$supports" >&6; }
48800  if test "x$supports" = "xyes" ; then
48801    :
48802    C_COMP_SUPPORTS="yes"
48803  else
48804    :
48805    C_COMP_SUPPORTS="no"
48806  fi
48807
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866    # Execute function body
48867
48868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
48869$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
48870  supports=yes
48871
48872  saved_cxxflags="$CXXFLAGS"
48873  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
48874  ac_ext=cpp
48875ac_cpp='$CXXCPP $CPPFLAGS'
48876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48879
48880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48881/* end confdefs.h.  */
48882int i;
48883_ACEOF
48884if ac_fn_cxx_try_compile "$LINENO"; then :
48885
48886else
48887  supports=no
48888fi
48889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48890  ac_ext=cpp
48891ac_cpp='$CXXCPP $CPPFLAGS'
48892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48895
48896  CXXFLAGS="$saved_cxxflags"
48897
48898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48899$as_echo "$supports" >&6; }
48900  if test "x$supports" = "xyes" ; then
48901    :
48902    CXX_COMP_SUPPORTS="yes"
48903  else
48904    :
48905    CXX_COMP_SUPPORTS="no"
48906  fi
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
48921$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
48922  supports=no
48923  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48924
48925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48926$as_echo "$supports" >&6; }
48927  if test "x$supports" = "xyes" ; then
48928    :
48929
48930  else
48931    :
48932    NO_NULL_POINTER_CHECK_CFLAG=""
48933  fi
48934
48935
48936
48937
48938
48939
48940
48941  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984    # Execute function body
48985
48986
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011
49012
49013
49014
49015
49016
49017
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029
49030
49031
49032
49033    # Execute function body
49034
49035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49036$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49037  supports=yes
49038
49039  saved_cflags="$CFLAGS"
49040  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49041  ac_ext=c
49042ac_cpp='$CPP $CPPFLAGS'
49043ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49044ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49045ac_compiler_gnu=$ac_cv_c_compiler_gnu
49046
49047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49048/* end confdefs.h.  */
49049int i;
49050_ACEOF
49051if ac_fn_c_try_compile "$LINENO"; then :
49052
49053else
49054  supports=no
49055fi
49056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49057  ac_ext=cpp
49058ac_cpp='$CXXCPP $CPPFLAGS'
49059ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49060ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49061ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49062
49063  CFLAGS="$saved_cflags"
49064
49065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49066$as_echo "$supports" >&6; }
49067  if test "x$supports" = "xyes" ; then
49068    :
49069    C_COMP_SUPPORTS="yes"
49070  else
49071    :
49072    C_COMP_SUPPORTS="no"
49073  fi
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112
49113
49114
49115
49116
49117
49118
49119
49120
49121
49122
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133    # Execute function body
49134
49135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49136$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49137  supports=yes
49138
49139  saved_cxxflags="$CXXFLAGS"
49140  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49141  ac_ext=cpp
49142ac_cpp='$CXXCPP $CPPFLAGS'
49143ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49144ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49145ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49146
49147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49148/* end confdefs.h.  */
49149int i;
49150_ACEOF
49151if ac_fn_cxx_try_compile "$LINENO"; then :
49152
49153else
49154  supports=no
49155fi
49156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49157  ac_ext=cpp
49158ac_cpp='$CXXCPP $CPPFLAGS'
49159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49162
49163  CXXFLAGS="$saved_cxxflags"
49164
49165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49166$as_echo "$supports" >&6; }
49167  if test "x$supports" = "xyes" ; then
49168    :
49169    CXX_COMP_SUPPORTS="yes"
49170  else
49171    :
49172    CXX_COMP_SUPPORTS="no"
49173  fi
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49188$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49189  supports=no
49190  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49191
49192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49193$as_echo "$supports" >&6; }
49194  if test "x$supports" = "xyes" ; then
49195    :
49196
49197  else
49198    :
49199    NO_LIFETIME_DSE_CFLAG=""
49200  fi
49201
49202
49203
49204
49205
49206
49207  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49208
49209
49210
49211  else
49212    :
49213
49214  fi
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49228    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49229      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49230        # Force compatibility with i586 on 32 bit intel platforms.
49231        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49232      fi
49233      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49234          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49235      case $OPENJDK_TARGET_CPU_ARCH in
49236        ppc )
49237          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49238          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49239          ;;
49240        * )
49241          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49242          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49243          ;;
49244      esac
49245    fi
49246  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49247    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49248    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49249      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49250    fi
49251
49252    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49253    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49254  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49255    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49256    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49257  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49258    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49259        -MD -Zc:wchar_t- -W3 -wd4800 \
49260        -DWIN32_LEAN_AND_MEAN \
49261        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49262        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49263        -DWIN32 -DIAL"
49264    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49265      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49266    else
49267      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49268    fi
49269    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49270    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49271    # studio.
49272    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49273      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49274      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49275    fi
49276  fi
49277
49278  ###############################################################################
49279
49280  # Adjust flags according to debug level.
49281  case $DEBUG_LEVEL in
49282    fastdebug | slowdebug )
49283      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49284      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49285      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49286      ;;
49287    release )
49288      ;;
49289    * )
49290      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49291      ;;
49292  esac
49293
49294  # Set some common defines. These works for all compilers, but assume
49295  # -D is universally accepted.
49296
49297  # Setup endianness
49298  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49299    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49300    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49301    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49302    #   Note: -Dmacro         is the same as    #define macro 1
49303    #         -Dmacro=        is the same as    #define macro
49304    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49305      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49306    else
49307      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49308    fi
49309  else
49310    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49311    # are defined in the system?
49312    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49313      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49314    else
49315      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49316    fi
49317  fi
49318
49319  # Setup target OS define. Use OS target name but in upper case.
49320  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49321  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49322
49323  # Setup target CPU
49324  OPENJDK_TARGET_CCXXFLAGS_JDK="$OPENJDK_TARGET_CCXXFLAGS_JDK \
49325      $ADD_LP64 \
49326      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49327  OPENJDK_BUILD_CCXXFLAGS_JDK="$OPENJDK_BUILD_CCXXFLAGS_JDK \
49328      $OPENJDK_BUILD_ADD_LP64 \
49329      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
49330
49331  # Setup debug/release defines
49332  if test "x$DEBUG_LEVEL" = xrelease; then
49333    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49334    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49335      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49336    fi
49337  else
49338    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49339  fi
49340
49341  # Set some additional per-OS defines.
49342  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49343    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49344  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49345    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49346  fi
49347
49348  # Additional macosx handling
49349  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49350    # Setting these parameters makes it an error to link to macosx APIs that are
49351    # newer than the given OS version and makes the linked binaries compatible
49352    # even if built on a newer version of the OS.
49353    # The expected format is X.Y.Z
49354    MACOSX_VERSION_MIN=10.7.0
49355
49356
49357    # The macro takes the version with no dots, ex: 1070
49358    # Let the flags variables get resolved in make for easier override on make
49359    # command line.
49360    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49361    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49362  fi
49363
49364  # Setup some hard coded includes
49365  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49366      -I${JDK_TOPDIR}/src/java.base/share/native/include \
49367      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49368      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49369      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49370      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49371
49372  # The shared libraries are compiled using the picflag.
49373  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49374      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49375  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49376      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49377
49378  # Executable flags
49379  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49380      $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
49381  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
49382      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
49383
49384  # The corresponding flags for building for the build platform. This is still an
49385  # approximation, we only need something that runs on this machine when cross
49386  # compiling the product.
49387  OPENJDK_BUILD_CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
49388      $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49389  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK \
49390      $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49391  OPENJDK_BUILD_CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
49392  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CCXXFLAGS_JDK"
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403  # Flags for compiling test libraries
49404  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49405  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49406
49407  # Flags for compiling test executables
49408  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
49409  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
49410
49411
49412
49413
49414
49415
49416  # Setup LDFLAGS et al.
49417  #
49418
49419  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49420    LDFLAGS_MICROSOFT="-nologo -opt:ref"
49421    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
49422    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49423      LDFLAGS_SAFESH="-safeseh"
49424      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
49425    fi
49426  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49427    # If this is a --hash-style=gnu system, use --hash-style=both, why?
49428    # We have previously set HAS_GNU_HASH if this is the case
49429    if test -n "$HAS_GNU_HASH"; then
49430      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
49431      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
49432    fi
49433    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49434      # And since we now know that the linker is gnu, then add -z defs, to forbid
49435      # undefined symbols in object files.
49436      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
49437      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
49438      case $DEBUG_LEVEL in
49439        release )
49440          # tell linker to optimize libraries.
49441          # Should this be supplied to the OSS linker as well?
49442          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
49443          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
49444          ;;
49445        slowdebug )
49446          if test "x$HAS_LINKER_NOW" = "xtrue"; then
49447            # do relocations at load
49448            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
49449            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
49450          fi
49451          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
49452            # mark relocations read only
49453            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
49454            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
49455          fi
49456          ;;
49457        fastdebug )
49458          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
49459            # mark relocations read only
49460            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
49461            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
49462          fi
49463          ;;
49464        * )
49465          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49466          ;;
49467        esac
49468    fi
49469  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49470    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
49471    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
49472    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
49473    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
49474  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49475    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
49476    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
49477  fi
49478
49479  # Customize LDFLAGS for executables
49480
49481  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
49482
49483  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49484    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
49485      LDFLAGS_STACK_SIZE=1048576
49486    else
49487      LDFLAGS_STACK_SIZE=327680
49488    fi
49489    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
49490  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49491    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
49492  fi
49493
49494  OPENJDK_BUILD_LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE}"
49495  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
49496
49497  # Customize LDFLAGS for libs
49498  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
49499
49500  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
49501  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49502    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
49503        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
49504    JDKLIB_LIBS=""
49505  else
49506    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
49507        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
49508
49509    # On some platforms (mac) the linker warns about non existing -L dirs.
49510    # Add server first if available. Linking aginst client does not always produce the same results.
49511    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
49512    # Default to server for other variants.
49513    if test "x$JVM_VARIANT_SERVER" = xtrue; then
49514      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
49515    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
49516      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
49517    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
49518      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
49519    else
49520      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
49521    fi
49522
49523    JDKLIB_LIBS="-ljava -ljvm"
49524    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49525      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
49526    fi
49527
49528    # When building a buildjdk, it's always only the server variant
49529    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
49530        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
49531  fi
49532
49533  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_JDKLIB}"
49534  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
49546  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
49547
49548
49549
49550
49551
49552  # Some Zero and Shark settings.
49553  # ZERO_ARCHFLAG tells the compiler which mode to build for
49554  case "${OPENJDK_TARGET_CPU}" in
49555    s390)
49556      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
49557      ;;
49558    *)
49559      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49560  esac
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603    # Execute function body
49604
49605
49606
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652    # Execute function body
49653
49654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
49655$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
49656  supports=yes
49657
49658  saved_cflags="$CFLAGS"
49659  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
49660  ac_ext=c
49661ac_cpp='$CPP $CPPFLAGS'
49662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49664ac_compiler_gnu=$ac_cv_c_compiler_gnu
49665
49666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49667/* end confdefs.h.  */
49668int i;
49669_ACEOF
49670if ac_fn_c_try_compile "$LINENO"; then :
49671
49672else
49673  supports=no
49674fi
49675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49676  ac_ext=cpp
49677ac_cpp='$CXXCPP $CPPFLAGS'
49678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49681
49682  CFLAGS="$saved_cflags"
49683
49684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49685$as_echo "$supports" >&6; }
49686  if test "x$supports" = "xyes" ; then
49687    :
49688    C_COMP_SUPPORTS="yes"
49689  else
49690    :
49691    C_COMP_SUPPORTS="no"
49692  fi
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752    # Execute function body
49753
49754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
49755$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
49756  supports=yes
49757
49758  saved_cxxflags="$CXXFLAGS"
49759  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
49760  ac_ext=cpp
49761ac_cpp='$CXXCPP $CPPFLAGS'
49762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49765
49766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49767/* end confdefs.h.  */
49768int i;
49769_ACEOF
49770if ac_fn_cxx_try_compile "$LINENO"; then :
49771
49772else
49773  supports=no
49774fi
49775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49776  ac_ext=cpp
49777ac_cpp='$CXXCPP $CPPFLAGS'
49778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49781
49782  CXXFLAGS="$saved_cxxflags"
49783
49784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49785$as_echo "$supports" >&6; }
49786  if test "x$supports" = "xyes" ; then
49787    :
49788    CXX_COMP_SUPPORTS="yes"
49789  else
49790    :
49791    CXX_COMP_SUPPORTS="no"
49792  fi
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
49807$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
49808  supports=no
49809  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49810
49811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49812$as_echo "$supports" >&6; }
49813  if test "x$supports" = "xyes" ; then
49814    :
49815
49816  else
49817    :
49818    ZERO_ARCHFLAG=""
49819  fi
49820
49821
49822
49823
49824
49825
49826
49827
49828  # Check that the compiler supports -mX (or -qX on AIX) flags
49829  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877    # Execute function body
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926    # Execute function body
49927
49928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
49929$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
49930  supports=yes
49931
49932  saved_cflags="$CFLAGS"
49933  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49934  ac_ext=c
49935ac_cpp='$CPP $CPPFLAGS'
49936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49938ac_compiler_gnu=$ac_cv_c_compiler_gnu
49939
49940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49941/* end confdefs.h.  */
49942int i;
49943_ACEOF
49944if ac_fn_c_try_compile "$LINENO"; then :
49945
49946else
49947  supports=no
49948fi
49949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49950  ac_ext=cpp
49951ac_cpp='$CXXCPP $CPPFLAGS'
49952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49955
49956  CFLAGS="$saved_cflags"
49957
49958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49959$as_echo "$supports" >&6; }
49960  if test "x$supports" = "xyes" ; then
49961    :
49962    C_COMP_SUPPORTS="yes"
49963  else
49964    :
49965    C_COMP_SUPPORTS="no"
49966  fi
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026    # Execute function body
50027
50028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
50029$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
50030  supports=yes
50031
50032  saved_cxxflags="$CXXFLAGS"
50033  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50034  ac_ext=cpp
50035ac_cpp='$CXXCPP $CPPFLAGS'
50036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50039
50040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50041/* end confdefs.h.  */
50042int i;
50043_ACEOF
50044if ac_fn_cxx_try_compile "$LINENO"; then :
50045
50046else
50047  supports=no
50048fi
50049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50050  ac_ext=cpp
50051ac_cpp='$CXXCPP $CPPFLAGS'
50052ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50053ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50054ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50055
50056  CXXFLAGS="$saved_cxxflags"
50057
50058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50059$as_echo "$supports" >&6; }
50060  if test "x$supports" = "xyes" ; then
50061    :
50062    CXX_COMP_SUPPORTS="yes"
50063  else
50064    :
50065    CXX_COMP_SUPPORTS="no"
50066  fi
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
50081$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
50082  supports=no
50083  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50084
50085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50086$as_echo "$supports" >&6; }
50087  if test "x$supports" = "xyes" ; then
50088    :
50089    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
50090  else
50091    :
50092    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
50093  fi
50094
50095
50096
50097
50098
50099
50100
50101
50102  # Check whether --enable-warnings-as-errors was given.
50103if test "${enable_warnings_as_errors+set}" = set; then :
50104  enableval=$enable_warnings_as_errors;
50105fi
50106
50107
50108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
50109$as_echo_n "checking if native warnings are errors... " >&6; }
50110  if test "x$enable_warnings_as_errors" = "xyes"; then
50111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
50112$as_echo "yes (explicitely set)" >&6; }
50113    WARNINGS_AS_ERRORS=true
50114  elif test "x$enable_warnings_as_errors" = "xno"; then
50115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50116$as_echo "no" >&6; }
50117    WARNINGS_AS_ERRORS=false
50118  elif test "x$enable_warnings_as_errors" = "x"; then
50119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
50120$as_echo "yes (default)" >&6; }
50121    WARNINGS_AS_ERRORS=true
50122  else
50123    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
50124  fi
50125
50126  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
50127    # Set legacy hotspot variable
50128    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
50129  else
50130    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
50131  fi
50132
50133
50134
50135
50136  case "${TOOLCHAIN_TYPE}" in
50137    microsoft)
50138      DISABLE_WARNING_PREFIX="-wd"
50139      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
50140      ;;
50141    solstudio)
50142      DISABLE_WARNING_PREFIX="-erroff="
50143      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
50144      ;;
50145    gcc)
50146      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194    # Execute function body
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243    # Execute function body
50244
50245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50246$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50247  supports=yes
50248
50249  saved_cflags="$CFLAGS"
50250  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
50251  ac_ext=c
50252ac_cpp='$CPP $CPPFLAGS'
50253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50255ac_compiler_gnu=$ac_cv_c_compiler_gnu
50256
50257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50258/* end confdefs.h.  */
50259int i;
50260_ACEOF
50261if ac_fn_c_try_compile "$LINENO"; then :
50262
50263else
50264  supports=no
50265fi
50266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50267  ac_ext=cpp
50268ac_cpp='$CXXCPP $CPPFLAGS'
50269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50272
50273  CFLAGS="$saved_cflags"
50274
50275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50276$as_echo "$supports" >&6; }
50277  if test "x$supports" = "xyes" ; then
50278    :
50279    C_COMP_SUPPORTS="yes"
50280  else
50281    :
50282    C_COMP_SUPPORTS="no"
50283  fi
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343    # Execute function body
50344
50345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50346$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50347  supports=yes
50348
50349  saved_cxxflags="$CXXFLAGS"
50350  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
50351  ac_ext=cpp
50352ac_cpp='$CXXCPP $CPPFLAGS'
50353ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50354ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50355ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50356
50357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50358/* end confdefs.h.  */
50359int i;
50360_ACEOF
50361if ac_fn_cxx_try_compile "$LINENO"; then :
50362
50363else
50364  supports=no
50365fi
50366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50367  ac_ext=cpp
50368ac_cpp='$CXXCPP $CPPFLAGS'
50369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50372
50373  CXXFLAGS="$saved_cxxflags"
50374
50375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50376$as_echo "$supports" >&6; }
50377  if test "x$supports" = "xyes" ; then
50378    :
50379    CXX_COMP_SUPPORTS="yes"
50380  else
50381    :
50382    CXX_COMP_SUPPORTS="no"
50383  fi
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50398$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50399  supports=no
50400  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50401
50402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50403$as_echo "$supports" >&6; }
50404  if test "x$supports" = "xyes" ; then
50405    :
50406    GCC_CAN_DISABLE_WARNINGS=true
50407  else
50408    :
50409    GCC_CAN_DISABLE_WARNINGS=false
50410
50411  fi
50412
50413
50414
50415
50416
50417
50418      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
50419        DISABLE_WARNING_PREFIX="-Wno-"
50420      else
50421        DISABLE_WARNING_PREFIX=
50422      fi
50423      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
50424      # Repeate the check for the BUILD_CC
50425      CC_OLD="$CC"
50426      CC="$BUILD_CC"
50427
50428
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474    # Execute function body
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523    # Execute function body
50524
50525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50526$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50527  supports=yes
50528
50529  saved_cflags="$CFLAGS"
50530  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
50531  ac_ext=c
50532ac_cpp='$CPP $CPPFLAGS'
50533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50535ac_compiler_gnu=$ac_cv_c_compiler_gnu
50536
50537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50538/* end confdefs.h.  */
50539int i;
50540_ACEOF
50541if ac_fn_c_try_compile "$LINENO"; then :
50542
50543else
50544  supports=no
50545fi
50546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50547  ac_ext=cpp
50548ac_cpp='$CXXCPP $CPPFLAGS'
50549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50552
50553  CFLAGS="$saved_cflags"
50554
50555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50556$as_echo "$supports" >&6; }
50557  if test "x$supports" = "xyes" ; then
50558    :
50559    C_COMP_SUPPORTS="yes"
50560  else
50561    :
50562    C_COMP_SUPPORTS="no"
50563  fi
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623    # Execute function body
50624
50625  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50626$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50627  supports=yes
50628
50629  saved_cxxflags="$CXXFLAGS"
50630  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
50631  ac_ext=cpp
50632ac_cpp='$CXXCPP $CPPFLAGS'
50633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50636
50637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50638/* end confdefs.h.  */
50639int i;
50640_ACEOF
50641if ac_fn_cxx_try_compile "$LINENO"; then :
50642
50643else
50644  supports=no
50645fi
50646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50647  ac_ext=cpp
50648ac_cpp='$CXXCPP $CPPFLAGS'
50649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50652
50653  CXXFLAGS="$saved_cxxflags"
50654
50655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50656$as_echo "$supports" >&6; }
50657  if test "x$supports" = "xyes" ; then
50658    :
50659    CXX_COMP_SUPPORTS="yes"
50660  else
50661    :
50662    CXX_COMP_SUPPORTS="no"
50663  fi
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
50678$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
50679  supports=no
50680  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50681
50682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50683$as_echo "$supports" >&6; }
50684  if test "x$supports" = "xyes" ; then
50685    :
50686    BUILD_CC_CAN_DISABLE_WARNINGS=true
50687  else
50688    :
50689    BUILD_CC_CAN_DISABLE_WARNINGS=false
50690
50691  fi
50692
50693
50694
50695
50696
50697
50698      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
50699        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
50700      else
50701        BUILD_CC_DISABLE_WARNING_PREFIX=
50702      fi
50703      CC="$CC_OLD"
50704      ;;
50705    clang)
50706      DISABLE_WARNING_PREFIX="-Wno-"
50707      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
50708      ;;
50709    xlc)
50710      DISABLE_WARNING_PREFIX="-qsuppress="
50711      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
50712      ;;
50713  esac
50714
50715
50716
50717
50718
50719# Setup debug symbols (need objcopy from the toolchain for that)
50720
50721  #
50722  # NATIVE_DEBUG_SYMBOLS
50723  # This must be done after the toolchain is setup, since we're looking at objcopy.
50724  #
50725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
50726$as_echo_n "checking what type of native debug symbols to use... " >&6; }
50727
50728# Check whether --with-native-debug-symbols was given.
50729if test "${with_native_debug_symbols+set}" = set; then :
50730  withval=$with_native_debug_symbols;
50731        if test "x$OPENJDK_TARGET_OS" = xaix; then
50732          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
50733            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
50734          fi
50735        fi
50736
50737else
50738
50739        if test "x$OPENJDK_TARGET_OS" = xaix; then
50740          # AIX doesn't support 'zipped' so use 'internal' as default
50741          with_native_debug_symbols="internal"
50742        else
50743          if test "x$STATIC_BUILD" = xtrue; then
50744            with_native_debug_symbols="none"
50745          else
50746            with_native_debug_symbols="zipped"
50747          fi
50748        fi
50749
50750fi
50751
50752  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
50753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
50754$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
50755
50756  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
50757
50758    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
50759      if test "x$OBJCOPY" = x; then
50760        # enabling of enable-debug-symbols and can't find objcopy
50761        # this is an error
50762        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
50763      fi
50764    fi
50765
50766    COMPILE_WITH_DEBUG_SYMBOLS=true
50767    COPY_DEBUG_SYMBOLS=true
50768    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
50769
50770    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
50771    DEBUG_BINARIES=false
50772    STRIP_POLICY=min_strip
50773
50774  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
50775    COMPILE_WITH_DEBUG_SYMBOLS=false
50776    COPY_DEBUG_SYMBOLS=false
50777    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
50778
50779    DEBUG_BINARIES=false
50780    STRIP_POLICY=no_strip
50781  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
50782    COMPILE_WITH_DEBUG_SYMBOLS=true
50783    COPY_DEBUG_SYMBOLS=false
50784    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
50785
50786    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
50787    DEBUG_BINARIES=true
50788    STRIP_POLICY=no_strip
50789    STRIP=""
50790
50791  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
50792
50793    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
50794      if test "x$OBJCOPY" = x; then
50795        # enabling of enable-debug-symbols and can't find objcopy
50796        # this is an error
50797        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
50798      fi
50799    fi
50800
50801    COMPILE_WITH_DEBUG_SYMBOLS=true
50802    COPY_DEBUG_SYMBOLS=true
50803    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
50804
50805    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
50806    DEBUG_BINARIES=false
50807    STRIP_POLICY=min_strip
50808  else
50809    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
50810  fi
50811
50812  # --enable-debug-symbols is deprecated.
50813  # Please use --with-native-debug-symbols=[internal,external,zipped] .
50814
50815  # Check whether --enable-debug-symbols was given.
50816if test "${enable_debug_symbols+set}" = set; then :
50817  enableval=$enable_debug_symbols;
50818fi
50819
50820  if test "x$enable_debug_symbols" != x; then
50821    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
50822$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
50823
50824    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
50825      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
50826$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
50827    fi
50828
50829  fi
50830
50831
50832  # --enable-zip-debug-info is deprecated.
50833  # Please use --with-native-debug-symbols=zipped .
50834
50835  # Check whether --enable-zip-debug-info was given.
50836if test "${enable_zip_debug_info+set}" = set; then :
50837  enableval=$enable_zip_debug_info;
50838fi
50839
50840  if test "x$enable_zip_debug_info" != x; then
50841    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
50842$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
50843
50844    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
50845      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
50846$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
50847    fi
50848
50849  fi
50850
50851
50852
50853
50854
50855
50856  # Legacy values
50857
50858
50859
50860
50861  # Check whether --enable-native-coverage was given.
50862if test "${enable_native_coverage+set}" = set; then :
50863  enableval=$enable_native_coverage;
50864fi
50865
50866  GCOV_ENABLED="false"
50867  if test "x$enable_native_coverage" = "xyes"; then
50868    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
50869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
50870$as_echo_n "checking if native coverage is enabled... " >&6; }
50871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50872$as_echo "yes" >&6; }
50873      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
50874      GCOV_LDFLAGS="-fprofile-arcs"
50875      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
50876      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
50877      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
50878      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
50879      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
50880      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
50881      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
50882      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
50883      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
50884      GCOV_ENABLED="true"
50885    else
50886      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
50887    fi
50888  elif test "x$enable_native_coverage" = "xno"; then
50889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
50890$as_echo_n "checking if native coverage is enabled... " >&6; }
50891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50892$as_echo "no" >&6; }
50893  elif test "x$enable_native_coverage" != "x"; then
50894    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
50895  fi
50896
50897
50898
50899
50900###############################################################################
50901#
50902# Check dependencies for external and internal libraries.
50903#
50904###############################################################################
50905
50906# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
50907
50908  # When using cygwin or msys, we need a wrapper binary that renames
50909  # /cygdrive/c/ arguments into c:/ arguments and peeks into
50910  # @files and rewrites these too! This wrapper binary is
50911  # called fixpath.
50912  FIXPATH=
50913  if test "x$OPENJDK_BUILD_OS" = xwindows; then
50914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
50915$as_echo_n "checking if fixpath can be created... " >&6; }
50916    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
50917    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
50918    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
50919    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
50920      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
50921      FIXPATH="$FIXPATH_BIN -c"
50922    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
50923      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
50924      # @ was chosen as separator to minimize risk of other tools messing around with it
50925      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
50926          | tr ' ' '\n' | grep '^/./' | sort | uniq`
50927      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
50928      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
50929    fi
50930    FIXPATH_SRC_W="$FIXPATH_SRC"
50931    FIXPATH_BIN_W="$FIXPATH_BIN"
50932
50933  unix_path="$FIXPATH_SRC_W"
50934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50935    windows_path=`$CYGPATH -m "$unix_path"`
50936    FIXPATH_SRC_W="$windows_path"
50937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50938    windows_path=`cmd //c echo $unix_path`
50939    FIXPATH_SRC_W="$windows_path"
50940  fi
50941
50942
50943  unix_path="$FIXPATH_BIN_W"
50944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50945    windows_path=`$CYGPATH -m "$unix_path"`
50946    FIXPATH_BIN_W="$windows_path"
50947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50948    windows_path=`cmd //c echo $unix_path`
50949    FIXPATH_BIN_W="$windows_path"
50950  fi
50951
50952    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
50953    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
50954    cd $FIXPATH_DIR
50955    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
50956    cd $CURDIR
50957
50958    if test ! -x $FIXPATH_BIN; then
50959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50960$as_echo "no" >&6; }
50961      cat $FIXPATH_DIR/fixpath1.log
50962      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
50963    fi
50964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50965$as_echo "yes" >&6; }
50966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
50967$as_echo_n "checking if fixpath.exe works... " >&6; }
50968    cd $FIXPATH_DIR
50969    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
50970        > $FIXPATH_DIR/fixpath2.log 2>&1
50971    cd $CURDIR
50972    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
50973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50974$as_echo "no" >&6; }
50975      cat $FIXPATH_DIR/fixpath2.log
50976      as_fn_error $? "fixpath did not work!" "$LINENO" 5
50977    fi
50978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50979$as_echo "yes" >&6; }
50980
50981    FIXPATH_DETACH_FLAG="--detach"
50982  fi
50983
50984
50985
50986
50987
50988
50989  # Check if X11 is needed
50990  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
50991    # No X11 support on windows or macosx
50992    NEEDS_LIB_X11=false
50993  else
50994    if test "x$SUPPORT_HEADFUL" = xno; then
50995      # No X11 support if building headless-only
50996      NEEDS_LIB_X11=false
50997    else
50998      # All other instances need X11
50999      NEEDS_LIB_X11=true
51000    fi
51001  fi
51002
51003  # Check if cups is needed
51004  if test "x$OPENJDK_TARGET_OS" = xwindows; then
51005    # Windows have a separate print system
51006    NEEDS_LIB_CUPS=false
51007  else
51008    NEEDS_LIB_CUPS=true
51009  fi
51010
51011  # Check if freetype is needed
51012  if test "x$OPENJDK" = "xtrue"; then
51013    NEEDS_LIB_FREETYPE=true
51014  else
51015    NEEDS_LIB_FREETYPE=false
51016  fi
51017
51018  # Check if alsa is needed
51019  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51020    NEEDS_LIB_ALSA=true
51021  else
51022    NEEDS_LIB_ALSA=false
51023  fi
51024
51025  # Check if ffi is needed
51026  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
51027    NEEDS_LIB_FFI=true
51028  else
51029    NEEDS_LIB_FFI=false
51030  fi
51031
51032
51033  # statically link libstdc++ before C++ ABI is stablized on Linux unless
51034  # dynamic build is configured on command line.
51035
51036# Check whether --with-stdc++lib was given.
51037if test "${with_stdc__lib+set}" = set; then :
51038  withval=$with_stdc__lib;
51039        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
51040                && test "x$with_stdc__lib" != xdefault; then
51041          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
51042        fi
51043
51044else
51045  with_stdc__lib=default
51046
51047fi
51048
51049
51050  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51051    # Test if -lstdc++ works.
51052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
51053$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
51054    ac_ext=cpp
51055ac_cpp='$CXXCPP $CPPFLAGS'
51056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51059
51060    OLD_CXXFLAGS="$CXXFLAGS"
51061    CXXFLAGS="$CXXFLAGS -lstdc++"
51062    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51063/* end confdefs.h.  */
51064
51065int
51066main ()
51067{
51068return 0;
51069  ;
51070  return 0;
51071}
51072_ACEOF
51073if ac_fn_cxx_try_link "$LINENO"; then :
51074  has_dynamic_libstdcxx=yes
51075else
51076  has_dynamic_libstdcxx=no
51077fi
51078rm -f core conftest.err conftest.$ac_objext \
51079    conftest$ac_exeext conftest.$ac_ext
51080    CXXFLAGS="$OLD_CXXFLAGS"
51081    ac_ext=cpp
51082ac_cpp='$CXXCPP $CPPFLAGS'
51083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51086
51087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
51088$as_echo "$has_dynamic_libstdcxx" >&6; }
51089
51090    # Test if stdc++ can be linked statically.
51091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
51092$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
51093    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
51094    ac_ext=cpp
51095ac_cpp='$CXXCPP $CPPFLAGS'
51096ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51097ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51098ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51099
51100    OLD_LIBS="$LIBS"
51101    OLD_CXX="$CXX"
51102    LIBS="$STATIC_STDCXX_FLAGS"
51103    CXX="$CC"
51104    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51105/* end confdefs.h.  */
51106
51107int
51108main ()
51109{
51110return 0;
51111  ;
51112  return 0;
51113}
51114_ACEOF
51115if ac_fn_cxx_try_link "$LINENO"; then :
51116  has_static_libstdcxx=yes
51117else
51118  has_static_libstdcxx=no
51119fi
51120rm -f core conftest.err conftest.$ac_objext \
51121    conftest$ac_exeext conftest.$ac_ext
51122    LIBS="$OLD_LIBS"
51123    CXX="$OLD_CXX"
51124    ac_ext=cpp
51125ac_cpp='$CXXCPP $CPPFLAGS'
51126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51129
51130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
51131$as_echo "$has_static_libstdcxx" >&6; }
51132
51133    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
51134      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
51135    fi
51136
51137    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
51138      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
51139    fi
51140
51141    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
51142      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
51143    fi
51144
51145    # If dynamic was requested, it's available since it would fail above otherwise.
51146    # If dynamic wasn't requested, go with static unless it isn't available.
51147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
51148$as_echo_n "checking how to link with libstdc++... " >&6; }
51149    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
51150      LIBCXX="$LIBCXX -lstdc++"
51151      LDCXX="$CXX"
51152      STATIC_CXX_SETTING="STATIC_CXX=false"
51153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
51154$as_echo "dynamic" >&6; }
51155    else
51156      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
51157      LDCXX="$CC"
51158      STATIC_CXX_SETTING="STATIC_CXX=true"
51159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
51160$as_echo "static" >&6; }
51161    fi
51162  fi
51163
51164
51165  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
51166  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
51167    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
51168  fi
51169
51170  # TODO better (platform agnostic) test
51171  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
51172    LIBCXX="-lstdc++"
51173  fi
51174
51175
51176  # Setup Windows runtime dlls
51177  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51178
51179
51180# Check whether --with-msvcr-dll was given.
51181if test "${with_msvcr_dll+set}" = set; then :
51182  withval=$with_msvcr_dll;
51183fi
51184
51185
51186  if test "x$with_msvcr_dll" != x; then
51187    # If given explicitely by user, do not probe. If not present, fail directly.
51188
51189  DLL_NAME="$MSVCR_NAME"
51190  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
51191  METHOD="--with-msvcr-dll"
51192  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51193    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51194$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51195
51196    # Need to check if the found msvcr is correct architecture
51197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51198$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51199    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51201      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51202      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51203      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51204        CORRECT_MSVCR_ARCH="PE32 executable"
51205      else
51206        CORRECT_MSVCR_ARCH="PE32+ executable"
51207      fi
51208    else
51209      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51210        CORRECT_MSVCR_ARCH=386
51211      else
51212        CORRECT_MSVCR_ARCH=x86-64
51213      fi
51214    fi
51215    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51217$as_echo "ok" >&6; }
51218      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51219
51220  # Only process if variable expands to non-empty
51221
51222  if test "x$MSVC_DLL" != x; then
51223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51224
51225  # Input might be given as Windows format, start by converting to
51226  # unix format.
51227  path="$MSVC_DLL"
51228  new_path=`$CYGPATH -u "$path"`
51229
51230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51233  # "foo.exe" is OK but "foo" is an error.
51234  #
51235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51236  # It is also a way to make sure we got the proper file name for the real test later on.
51237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51238  if test "x$test_shortpath" = x; then
51239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51240$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51241    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51242  fi
51243
51244  # Call helper function which possibly converts this using DOS-style short mode.
51245  # If so, the updated path is stored in $new_path.
51246
51247  input_path="$new_path"
51248  # Check if we need to convert this using DOS-style short mode. If the path
51249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51250  # take no chances and rewrite it.
51251  # Note: m4 eats our [], so we need to use [ and ] instead.
51252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51253  if test "x$has_forbidden_chars" != x; then
51254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51258      # Going to short mode and back again did indeed matter. Since short mode is
51259      # case insensitive, let's make it lowercase to improve readability.
51260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51261      # Now convert it back to Unix-style (cygpath)
51262      input_path=`$CYGPATH -u "$shortmode_path"`
51263      new_path="$input_path"
51264    fi
51265  fi
51266
51267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51268  if test "x$test_cygdrive_prefix" = x; then
51269    # As a simple fix, exclude /usr/bin since it's not a real path.
51270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51272      # a path prefixed by /cygdrive for fixpath to work.
51273      new_path="$CYGWIN_ROOT_PATH$input_path"
51274    fi
51275  fi
51276
51277
51278  if test "x$path" != "x$new_path"; then
51279    MSVC_DLL="$new_path"
51280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51281$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51282  fi
51283
51284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51285
51286  path="$MSVC_DLL"
51287  has_colon=`$ECHO $path | $GREP ^.:`
51288  new_path="$path"
51289  if test "x$has_colon" = x; then
51290    # Not in mixed or Windows style, start by that.
51291    new_path=`cmd //c echo $path`
51292  fi
51293
51294
51295  input_path="$new_path"
51296  # Check if we need to convert this using DOS-style short mode. If the path
51297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51298  # take no chances and rewrite it.
51299  # Note: m4 eats our [], so we need to use [ and ] instead.
51300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51301  if test "x$has_forbidden_chars" != x; then
51302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51304  fi
51305
51306
51307  windows_path="$new_path"
51308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51309    unix_path=`$CYGPATH -u "$windows_path"`
51310    new_path="$unix_path"
51311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51313    new_path="$unix_path"
51314  fi
51315
51316  if test "x$path" != "x$new_path"; then
51317    MSVC_DLL="$new_path"
51318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51319$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51320  fi
51321
51322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51324
51325    else
51326      # We're on a unix platform. Hooray! :)
51327      path="$MSVC_DLL"
51328      has_space=`$ECHO "$path" | $GREP " "`
51329      if test "x$has_space" != x; then
51330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51331$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51333      fi
51334
51335      # Use eval to expand a potential ~
51336      eval path="$path"
51337      if test ! -f "$path" && test ! -d "$path"; then
51338        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51339      fi
51340
51341      if test -d "$path"; then
51342        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51343      else
51344        dir="`$DIRNAME "$path"`"
51345        base="`$BASENAME "$path"`"
51346        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51347      fi
51348    fi
51349  fi
51350
51351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51352$as_echo_n "checking for $DLL_NAME... " >&6; }
51353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51354$as_echo "$MSVC_DLL" >&6; }
51355    else
51356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51357$as_echo "incorrect, ignoring" >&6; }
51358      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51359$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51360    fi
51361  fi
51362
51363    if test "x$MSVC_DLL" = x; then
51364      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
51365    fi
51366    MSVCR_DLL="$MSVC_DLL"
51367  elif test "x$DEVKIT_MSVCR_DLL" != x; then
51368
51369  DLL_NAME="$MSVCR_NAME"
51370  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
51371  METHOD="devkit"
51372  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51373    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51374$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51375
51376    # Need to check if the found msvcr is correct architecture
51377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51378$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51379    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51381      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51382      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51383      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51384        CORRECT_MSVCR_ARCH="PE32 executable"
51385      else
51386        CORRECT_MSVCR_ARCH="PE32+ executable"
51387      fi
51388    else
51389      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51390        CORRECT_MSVCR_ARCH=386
51391      else
51392        CORRECT_MSVCR_ARCH=x86-64
51393      fi
51394    fi
51395    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51397$as_echo "ok" >&6; }
51398      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51399
51400  # Only process if variable expands to non-empty
51401
51402  if test "x$MSVC_DLL" != x; then
51403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51404
51405  # Input might be given as Windows format, start by converting to
51406  # unix format.
51407  path="$MSVC_DLL"
51408  new_path=`$CYGPATH -u "$path"`
51409
51410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51413  # "foo.exe" is OK but "foo" is an error.
51414  #
51415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51416  # It is also a way to make sure we got the proper file name for the real test later on.
51417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51418  if test "x$test_shortpath" = x; then
51419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51420$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51421    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51422  fi
51423
51424  # Call helper function which possibly converts this using DOS-style short mode.
51425  # If so, the updated path is stored in $new_path.
51426
51427  input_path="$new_path"
51428  # Check if we need to convert this using DOS-style short mode. If the path
51429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51430  # take no chances and rewrite it.
51431  # Note: m4 eats our [], so we need to use [ and ] instead.
51432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51433  if test "x$has_forbidden_chars" != x; then
51434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51438      # Going to short mode and back again did indeed matter. Since short mode is
51439      # case insensitive, let's make it lowercase to improve readability.
51440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51441      # Now convert it back to Unix-style (cygpath)
51442      input_path=`$CYGPATH -u "$shortmode_path"`
51443      new_path="$input_path"
51444    fi
51445  fi
51446
51447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51448  if test "x$test_cygdrive_prefix" = x; then
51449    # As a simple fix, exclude /usr/bin since it's not a real path.
51450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51452      # a path prefixed by /cygdrive for fixpath to work.
51453      new_path="$CYGWIN_ROOT_PATH$input_path"
51454    fi
51455  fi
51456
51457
51458  if test "x$path" != "x$new_path"; then
51459    MSVC_DLL="$new_path"
51460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51461$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51462  fi
51463
51464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51465
51466  path="$MSVC_DLL"
51467  has_colon=`$ECHO $path | $GREP ^.:`
51468  new_path="$path"
51469  if test "x$has_colon" = x; then
51470    # Not in mixed or Windows style, start by that.
51471    new_path=`cmd //c echo $path`
51472  fi
51473
51474
51475  input_path="$new_path"
51476  # Check if we need to convert this using DOS-style short mode. If the path
51477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51478  # take no chances and rewrite it.
51479  # Note: m4 eats our [], so we need to use [ and ] instead.
51480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51481  if test "x$has_forbidden_chars" != x; then
51482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51484  fi
51485
51486
51487  windows_path="$new_path"
51488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51489    unix_path=`$CYGPATH -u "$windows_path"`
51490    new_path="$unix_path"
51491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51493    new_path="$unix_path"
51494  fi
51495
51496  if test "x$path" != "x$new_path"; then
51497    MSVC_DLL="$new_path"
51498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51499$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51500  fi
51501
51502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51504
51505    else
51506      # We're on a unix platform. Hooray! :)
51507      path="$MSVC_DLL"
51508      has_space=`$ECHO "$path" | $GREP " "`
51509      if test "x$has_space" != x; then
51510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51511$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51513      fi
51514
51515      # Use eval to expand a potential ~
51516      eval path="$path"
51517      if test ! -f "$path" && test ! -d "$path"; then
51518        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51519      fi
51520
51521      if test -d "$path"; then
51522        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51523      else
51524        dir="`$DIRNAME "$path"`"
51525        base="`$BASENAME "$path"`"
51526        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51527      fi
51528    fi
51529  fi
51530
51531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51532$as_echo_n "checking for $DLL_NAME... " >&6; }
51533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51534$as_echo "$MSVC_DLL" >&6; }
51535    else
51536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51537$as_echo "incorrect, ignoring" >&6; }
51538      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51539$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51540    fi
51541  fi
51542
51543    if test "x$MSVC_DLL" = x; then
51544      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
51545    fi
51546    MSVCR_DLL="$MSVC_DLL"
51547  else
51548
51549  DLL_NAME="${MSVCR_NAME}"
51550  MSVC_DLL=
51551
51552  if test "x$MSVC_DLL" = x; then
51553    # Probe: Using well-known location from Visual Studio 10.0
51554    if test "x$VCINSTALLDIR" != x; then
51555      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51556
51557  windows_path="$CYGWIN_VC_INSTALL_DIR"
51558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51559    unix_path=`$CYGPATH -u "$windows_path"`
51560    CYGWIN_VC_INSTALL_DIR="$unix_path"
51561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51563    CYGWIN_VC_INSTALL_DIR="$unix_path"
51564  fi
51565
51566      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51567        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51568      else
51569        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51570      fi
51571      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51572
51573  DLL_NAME="$DLL_NAME"
51574  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51575  METHOD="well-known location in VCINSTALLDIR"
51576  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51578$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51579
51580    # Need to check if the found msvcr is correct architecture
51581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51582$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51583    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51585      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51586      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51587      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51588        CORRECT_MSVCR_ARCH="PE32 executable"
51589      else
51590        CORRECT_MSVCR_ARCH="PE32+ executable"
51591      fi
51592    else
51593      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51594        CORRECT_MSVCR_ARCH=386
51595      else
51596        CORRECT_MSVCR_ARCH=x86-64
51597      fi
51598    fi
51599    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51601$as_echo "ok" >&6; }
51602      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51603
51604  # Only process if variable expands to non-empty
51605
51606  if test "x$MSVC_DLL" != x; then
51607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51608
51609  # Input might be given as Windows format, start by converting to
51610  # unix format.
51611  path="$MSVC_DLL"
51612  new_path=`$CYGPATH -u "$path"`
51613
51614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51617  # "foo.exe" is OK but "foo" is an error.
51618  #
51619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51620  # It is also a way to make sure we got the proper file name for the real test later on.
51621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51622  if test "x$test_shortpath" = x; then
51623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51624$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51625    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51626  fi
51627
51628  # Call helper function which possibly converts this using DOS-style short mode.
51629  # If so, the updated path is stored in $new_path.
51630
51631  input_path="$new_path"
51632  # Check if we need to convert this using DOS-style short mode. If the path
51633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51634  # take no chances and rewrite it.
51635  # Note: m4 eats our [], so we need to use [ and ] instead.
51636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51637  if test "x$has_forbidden_chars" != x; then
51638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51642      # Going to short mode and back again did indeed matter. Since short mode is
51643      # case insensitive, let's make it lowercase to improve readability.
51644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51645      # Now convert it back to Unix-style (cygpath)
51646      input_path=`$CYGPATH -u "$shortmode_path"`
51647      new_path="$input_path"
51648    fi
51649  fi
51650
51651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51652  if test "x$test_cygdrive_prefix" = x; then
51653    # As a simple fix, exclude /usr/bin since it's not a real path.
51654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51656      # a path prefixed by /cygdrive for fixpath to work.
51657      new_path="$CYGWIN_ROOT_PATH$input_path"
51658    fi
51659  fi
51660
51661
51662  if test "x$path" != "x$new_path"; then
51663    MSVC_DLL="$new_path"
51664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51666  fi
51667
51668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51669
51670  path="$MSVC_DLL"
51671  has_colon=`$ECHO $path | $GREP ^.:`
51672  new_path="$path"
51673  if test "x$has_colon" = x; then
51674    # Not in mixed or Windows style, start by that.
51675    new_path=`cmd //c echo $path`
51676  fi
51677
51678
51679  input_path="$new_path"
51680  # Check if we need to convert this using DOS-style short mode. If the path
51681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51682  # take no chances and rewrite it.
51683  # Note: m4 eats our [], so we need to use [ and ] instead.
51684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51685  if test "x$has_forbidden_chars" != x; then
51686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51688  fi
51689
51690
51691  windows_path="$new_path"
51692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51693    unix_path=`$CYGPATH -u "$windows_path"`
51694    new_path="$unix_path"
51695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51697    new_path="$unix_path"
51698  fi
51699
51700  if test "x$path" != "x$new_path"; then
51701    MSVC_DLL="$new_path"
51702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51704  fi
51705
51706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51708
51709    else
51710      # We're on a unix platform. Hooray! :)
51711      path="$MSVC_DLL"
51712      has_space=`$ECHO "$path" | $GREP " "`
51713      if test "x$has_space" != x; then
51714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51715$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51717      fi
51718
51719      # Use eval to expand a potential ~
51720      eval path="$path"
51721      if test ! -f "$path" && test ! -d "$path"; then
51722        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51723      fi
51724
51725      if test -d "$path"; then
51726        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51727      else
51728        dir="`$DIRNAME "$path"`"
51729        base="`$BASENAME "$path"`"
51730        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51731      fi
51732    fi
51733  fi
51734
51735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51736$as_echo_n "checking for $DLL_NAME... " >&6; }
51737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51738$as_echo "$MSVC_DLL" >&6; }
51739    else
51740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51741$as_echo "incorrect, ignoring" >&6; }
51742      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51743$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51744    fi
51745  fi
51746
51747    fi
51748  fi
51749
51750  if test "x$MSVC_DLL" = x; then
51751    # Probe: Check in the Boot JDK directory.
51752    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51753
51754  DLL_NAME="$DLL_NAME"
51755  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51756  METHOD="well-known location in Boot JDK"
51757  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51759$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51760
51761    # Need to check if the found msvcr is correct architecture
51762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51763$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51764    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51766      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51767      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51769        CORRECT_MSVCR_ARCH="PE32 executable"
51770      else
51771        CORRECT_MSVCR_ARCH="PE32+ executable"
51772      fi
51773    else
51774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51775        CORRECT_MSVCR_ARCH=386
51776      else
51777        CORRECT_MSVCR_ARCH=x86-64
51778      fi
51779    fi
51780    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51782$as_echo "ok" >&6; }
51783      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51784
51785  # Only process if variable expands to non-empty
51786
51787  if test "x$MSVC_DLL" != x; then
51788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51789
51790  # Input might be given as Windows format, start by converting to
51791  # unix format.
51792  path="$MSVC_DLL"
51793  new_path=`$CYGPATH -u "$path"`
51794
51795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51798  # "foo.exe" is OK but "foo" is an error.
51799  #
51800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51801  # It is also a way to make sure we got the proper file name for the real test later on.
51802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51803  if test "x$test_shortpath" = x; then
51804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51806    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51807  fi
51808
51809  # Call helper function which possibly converts this using DOS-style short mode.
51810  # If so, the updated path is stored in $new_path.
51811
51812  input_path="$new_path"
51813  # Check if we need to convert this using DOS-style short mode. If the path
51814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51815  # take no chances and rewrite it.
51816  # Note: m4 eats our [], so we need to use [ and ] instead.
51817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51818  if test "x$has_forbidden_chars" != x; then
51819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51823      # Going to short mode and back again did indeed matter. Since short mode is
51824      # case insensitive, let's make it lowercase to improve readability.
51825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51826      # Now convert it back to Unix-style (cygpath)
51827      input_path=`$CYGPATH -u "$shortmode_path"`
51828      new_path="$input_path"
51829    fi
51830  fi
51831
51832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51833  if test "x$test_cygdrive_prefix" = x; then
51834    # As a simple fix, exclude /usr/bin since it's not a real path.
51835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51837      # a path prefixed by /cygdrive for fixpath to work.
51838      new_path="$CYGWIN_ROOT_PATH$input_path"
51839    fi
51840  fi
51841
51842
51843  if test "x$path" != "x$new_path"; then
51844    MSVC_DLL="$new_path"
51845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51847  fi
51848
51849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51850
51851  path="$MSVC_DLL"
51852  has_colon=`$ECHO $path | $GREP ^.:`
51853  new_path="$path"
51854  if test "x$has_colon" = x; then
51855    # Not in mixed or Windows style, start by that.
51856    new_path=`cmd //c echo $path`
51857  fi
51858
51859
51860  input_path="$new_path"
51861  # Check if we need to convert this using DOS-style short mode. If the path
51862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51863  # take no chances and rewrite it.
51864  # Note: m4 eats our [], so we need to use [ and ] instead.
51865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51866  if test "x$has_forbidden_chars" != x; then
51867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51869  fi
51870
51871
51872  windows_path="$new_path"
51873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51874    unix_path=`$CYGPATH -u "$windows_path"`
51875    new_path="$unix_path"
51876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51878    new_path="$unix_path"
51879  fi
51880
51881  if test "x$path" != "x$new_path"; then
51882    MSVC_DLL="$new_path"
51883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51885  fi
51886
51887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51889
51890    else
51891      # We're on a unix platform. Hooray! :)
51892      path="$MSVC_DLL"
51893      has_space=`$ECHO "$path" | $GREP " "`
51894      if test "x$has_space" != x; then
51895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51896$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51898      fi
51899
51900      # Use eval to expand a potential ~
51901      eval path="$path"
51902      if test ! -f "$path" && test ! -d "$path"; then
51903        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51904      fi
51905
51906      if test -d "$path"; then
51907        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51908      else
51909        dir="`$DIRNAME "$path"`"
51910        base="`$BASENAME "$path"`"
51911        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51912      fi
51913    fi
51914  fi
51915
51916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51917$as_echo_n "checking for $DLL_NAME... " >&6; }
51918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51919$as_echo "$MSVC_DLL" >&6; }
51920    else
51921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51922$as_echo "incorrect, ignoring" >&6; }
51923      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51924$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51925    fi
51926  fi
51927
51928  fi
51929
51930  if test "x$MSVC_DLL" = x; then
51931    # Probe: Look in the Windows system32 directory
51932    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51933
51934  windows_path="$CYGWIN_SYSTEMROOT"
51935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51936    unix_path=`$CYGPATH -u "$windows_path"`
51937    CYGWIN_SYSTEMROOT="$unix_path"
51938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51940    CYGWIN_SYSTEMROOT="$unix_path"
51941  fi
51942
51943    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51944
51945  DLL_NAME="$DLL_NAME"
51946  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51947  METHOD="well-known location in SYSTEMROOT"
51948  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51950$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51951
51952    # Need to check if the found msvcr is correct architecture
51953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51954$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51955    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51957      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51958      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51959      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51960        CORRECT_MSVCR_ARCH="PE32 executable"
51961      else
51962        CORRECT_MSVCR_ARCH="PE32+ executable"
51963      fi
51964    else
51965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51966        CORRECT_MSVCR_ARCH=386
51967      else
51968        CORRECT_MSVCR_ARCH=x86-64
51969      fi
51970    fi
51971    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51973$as_echo "ok" >&6; }
51974      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51975
51976  # Only process if variable expands to non-empty
51977
51978  if test "x$MSVC_DLL" != x; then
51979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51980
51981  # Input might be given as Windows format, start by converting to
51982  # unix format.
51983  path="$MSVC_DLL"
51984  new_path=`$CYGPATH -u "$path"`
51985
51986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51989  # "foo.exe" is OK but "foo" is an error.
51990  #
51991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51992  # It is also a way to make sure we got the proper file name for the real test later on.
51993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51994  if test "x$test_shortpath" = x; then
51995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51997    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51998  fi
51999
52000  # Call helper function which possibly converts this using DOS-style short mode.
52001  # If so, the updated path is stored in $new_path.
52002
52003  input_path="$new_path"
52004  # Check if we need to convert this using DOS-style short mode. If the path
52005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52006  # take no chances and rewrite it.
52007  # Note: m4 eats our [], so we need to use [ and ] instead.
52008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52009  if test "x$has_forbidden_chars" != x; then
52010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52014      # Going to short mode and back again did indeed matter. Since short mode is
52015      # case insensitive, let's make it lowercase to improve readability.
52016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52017      # Now convert it back to Unix-style (cygpath)
52018      input_path=`$CYGPATH -u "$shortmode_path"`
52019      new_path="$input_path"
52020    fi
52021  fi
52022
52023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52024  if test "x$test_cygdrive_prefix" = x; then
52025    # As a simple fix, exclude /usr/bin since it's not a real path.
52026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52028      # a path prefixed by /cygdrive for fixpath to work.
52029      new_path="$CYGWIN_ROOT_PATH$input_path"
52030    fi
52031  fi
52032
52033
52034  if test "x$path" != "x$new_path"; then
52035    MSVC_DLL="$new_path"
52036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52038  fi
52039
52040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52041
52042  path="$MSVC_DLL"
52043  has_colon=`$ECHO $path | $GREP ^.:`
52044  new_path="$path"
52045  if test "x$has_colon" = x; then
52046    # Not in mixed or Windows style, start by that.
52047    new_path=`cmd //c echo $path`
52048  fi
52049
52050
52051  input_path="$new_path"
52052  # Check if we need to convert this using DOS-style short mode. If the path
52053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52054  # take no chances and rewrite it.
52055  # Note: m4 eats our [], so we need to use [ and ] instead.
52056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52057  if test "x$has_forbidden_chars" != x; then
52058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52060  fi
52061
52062
52063  windows_path="$new_path"
52064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52065    unix_path=`$CYGPATH -u "$windows_path"`
52066    new_path="$unix_path"
52067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52069    new_path="$unix_path"
52070  fi
52071
52072  if test "x$path" != "x$new_path"; then
52073    MSVC_DLL="$new_path"
52074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52076  fi
52077
52078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52080
52081    else
52082      # We're on a unix platform. Hooray! :)
52083      path="$MSVC_DLL"
52084      has_space=`$ECHO "$path" | $GREP " "`
52085      if test "x$has_space" != x; then
52086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52087$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52089      fi
52090
52091      # Use eval to expand a potential ~
52092      eval path="$path"
52093      if test ! -f "$path" && test ! -d "$path"; then
52094        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52095      fi
52096
52097      if test -d "$path"; then
52098        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52099      else
52100        dir="`$DIRNAME "$path"`"
52101        base="`$BASENAME "$path"`"
52102        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52103      fi
52104    fi
52105  fi
52106
52107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52108$as_echo_n "checking for $DLL_NAME... " >&6; }
52109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52110$as_echo "$MSVC_DLL" >&6; }
52111    else
52112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52113$as_echo "incorrect, ignoring" >&6; }
52114      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52115$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52116    fi
52117  fi
52118
52119  fi
52120
52121  if test "x$MSVC_DLL" = x; then
52122    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52123    if test "x$VS100COMNTOOLS" != x; then
52124      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52125
52126  windows_path="$CYGWIN_VS_TOOLS_DIR"
52127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52128    unix_path=`$CYGPATH -u "$windows_path"`
52129    CYGWIN_VS_TOOLS_DIR="$unix_path"
52130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52132    CYGWIN_VS_TOOLS_DIR="$unix_path"
52133  fi
52134
52135      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52136        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52137	    | $GREP -i /x64/ | $HEAD --lines 1`
52138      else
52139        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52140	    | $GREP -i /x86/ | $HEAD --lines 1`
52141      fi
52142
52143  DLL_NAME="$DLL_NAME"
52144  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52145  METHOD="search of VS100COMNTOOLS"
52146  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52147    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52148$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52149
52150    # Need to check if the found msvcr is correct architecture
52151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52152$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52153    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52155      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52156      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52158        CORRECT_MSVCR_ARCH="PE32 executable"
52159      else
52160        CORRECT_MSVCR_ARCH="PE32+ executable"
52161      fi
52162    else
52163      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52164        CORRECT_MSVCR_ARCH=386
52165      else
52166        CORRECT_MSVCR_ARCH=x86-64
52167      fi
52168    fi
52169    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52171$as_echo "ok" >&6; }
52172      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52173
52174  # Only process if variable expands to non-empty
52175
52176  if test "x$MSVC_DLL" != x; then
52177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52178
52179  # Input might be given as Windows format, start by converting to
52180  # unix format.
52181  path="$MSVC_DLL"
52182  new_path=`$CYGPATH -u "$path"`
52183
52184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52187  # "foo.exe" is OK but "foo" is an error.
52188  #
52189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52190  # It is also a way to make sure we got the proper file name for the real test later on.
52191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52192  if test "x$test_shortpath" = x; then
52193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52195    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52196  fi
52197
52198  # Call helper function which possibly converts this using DOS-style short mode.
52199  # If so, the updated path is stored in $new_path.
52200
52201  input_path="$new_path"
52202  # Check if we need to convert this using DOS-style short mode. If the path
52203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52204  # take no chances and rewrite it.
52205  # Note: m4 eats our [], so we need to use [ and ] instead.
52206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52207  if test "x$has_forbidden_chars" != x; then
52208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52212      # Going to short mode and back again did indeed matter. Since short mode is
52213      # case insensitive, let's make it lowercase to improve readability.
52214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52215      # Now convert it back to Unix-style (cygpath)
52216      input_path=`$CYGPATH -u "$shortmode_path"`
52217      new_path="$input_path"
52218    fi
52219  fi
52220
52221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52222  if test "x$test_cygdrive_prefix" = x; then
52223    # As a simple fix, exclude /usr/bin since it's not a real path.
52224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52226      # a path prefixed by /cygdrive for fixpath to work.
52227      new_path="$CYGWIN_ROOT_PATH$input_path"
52228    fi
52229  fi
52230
52231
52232  if test "x$path" != "x$new_path"; then
52233    MSVC_DLL="$new_path"
52234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52236  fi
52237
52238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52239
52240  path="$MSVC_DLL"
52241  has_colon=`$ECHO $path | $GREP ^.:`
52242  new_path="$path"
52243  if test "x$has_colon" = x; then
52244    # Not in mixed or Windows style, start by that.
52245    new_path=`cmd //c echo $path`
52246  fi
52247
52248
52249  input_path="$new_path"
52250  # Check if we need to convert this using DOS-style short mode. If the path
52251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52252  # take no chances and rewrite it.
52253  # Note: m4 eats our [], so we need to use [ and ] instead.
52254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52255  if test "x$has_forbidden_chars" != x; then
52256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52258  fi
52259
52260
52261  windows_path="$new_path"
52262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52263    unix_path=`$CYGPATH -u "$windows_path"`
52264    new_path="$unix_path"
52265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52267    new_path="$unix_path"
52268  fi
52269
52270  if test "x$path" != "x$new_path"; then
52271    MSVC_DLL="$new_path"
52272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52274  fi
52275
52276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52278
52279    else
52280      # We're on a unix platform. Hooray! :)
52281      path="$MSVC_DLL"
52282      has_space=`$ECHO "$path" | $GREP " "`
52283      if test "x$has_space" != x; then
52284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52287      fi
52288
52289      # Use eval to expand a potential ~
52290      eval path="$path"
52291      if test ! -f "$path" && test ! -d "$path"; then
52292        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52293      fi
52294
52295      if test -d "$path"; then
52296        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52297      else
52298        dir="`$DIRNAME "$path"`"
52299        base="`$BASENAME "$path"`"
52300        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52301      fi
52302    fi
52303  fi
52304
52305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52306$as_echo_n "checking for $DLL_NAME... " >&6; }
52307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52308$as_echo "$MSVC_DLL" >&6; }
52309    else
52310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52311$as_echo "incorrect, ignoring" >&6; }
52312      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52313$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52314    fi
52315  fi
52316
52317    fi
52318  fi
52319
52320  if test "x$MSVC_DLL" = x; then
52321    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52322    # (This was the original behaviour; kept since it might turn something up)
52323    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52324      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52325        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52326	    | $GREP x64 | $HEAD --lines 1`
52327      else
52328        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52329	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52330        if test "x$POSSIBLE_MSVC_DLL" = x; then
52331          # We're grasping at straws now...
52332          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52333	      | $HEAD --lines 1`
52334        fi
52335      fi
52336
52337
52338  DLL_NAME="$DLL_NAME"
52339  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52340  METHOD="search of VCINSTALLDIR"
52341  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52342    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52343$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52344
52345    # Need to check if the found msvcr is correct architecture
52346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52347$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52348    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52350      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52351      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52352      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52353        CORRECT_MSVCR_ARCH="PE32 executable"
52354      else
52355        CORRECT_MSVCR_ARCH="PE32+ executable"
52356      fi
52357    else
52358      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52359        CORRECT_MSVCR_ARCH=386
52360      else
52361        CORRECT_MSVCR_ARCH=x86-64
52362      fi
52363    fi
52364    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52366$as_echo "ok" >&6; }
52367      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52368
52369  # Only process if variable expands to non-empty
52370
52371  if test "x$MSVC_DLL" != x; then
52372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52373
52374  # Input might be given as Windows format, start by converting to
52375  # unix format.
52376  path="$MSVC_DLL"
52377  new_path=`$CYGPATH -u "$path"`
52378
52379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52382  # "foo.exe" is OK but "foo" is an error.
52383  #
52384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52385  # It is also a way to make sure we got the proper file name for the real test later on.
52386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52387  if test "x$test_shortpath" = x; then
52388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52389$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52390    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52391  fi
52392
52393  # Call helper function which possibly converts this using DOS-style short mode.
52394  # If so, the updated path is stored in $new_path.
52395
52396  input_path="$new_path"
52397  # Check if we need to convert this using DOS-style short mode. If the path
52398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52399  # take no chances and rewrite it.
52400  # Note: m4 eats our [], so we need to use [ and ] instead.
52401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52402  if test "x$has_forbidden_chars" != x; then
52403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52407      # Going to short mode and back again did indeed matter. Since short mode is
52408      # case insensitive, let's make it lowercase to improve readability.
52409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52410      # Now convert it back to Unix-style (cygpath)
52411      input_path=`$CYGPATH -u "$shortmode_path"`
52412      new_path="$input_path"
52413    fi
52414  fi
52415
52416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52417  if test "x$test_cygdrive_prefix" = x; then
52418    # As a simple fix, exclude /usr/bin since it's not a real path.
52419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52421      # a path prefixed by /cygdrive for fixpath to work.
52422      new_path="$CYGWIN_ROOT_PATH$input_path"
52423    fi
52424  fi
52425
52426
52427  if test "x$path" != "x$new_path"; then
52428    MSVC_DLL="$new_path"
52429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52430$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52431  fi
52432
52433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52434
52435  path="$MSVC_DLL"
52436  has_colon=`$ECHO $path | $GREP ^.:`
52437  new_path="$path"
52438  if test "x$has_colon" = x; then
52439    # Not in mixed or Windows style, start by that.
52440    new_path=`cmd //c echo $path`
52441  fi
52442
52443
52444  input_path="$new_path"
52445  # Check if we need to convert this using DOS-style short mode. If the path
52446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52447  # take no chances and rewrite it.
52448  # Note: m4 eats our [], so we need to use [ and ] instead.
52449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52450  if test "x$has_forbidden_chars" != x; then
52451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52453  fi
52454
52455
52456  windows_path="$new_path"
52457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52458    unix_path=`$CYGPATH -u "$windows_path"`
52459    new_path="$unix_path"
52460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52462    new_path="$unix_path"
52463  fi
52464
52465  if test "x$path" != "x$new_path"; then
52466    MSVC_DLL="$new_path"
52467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52469  fi
52470
52471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52473
52474    else
52475      # We're on a unix platform. Hooray! :)
52476      path="$MSVC_DLL"
52477      has_space=`$ECHO "$path" | $GREP " "`
52478      if test "x$has_space" != x; then
52479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52480$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52482      fi
52483
52484      # Use eval to expand a potential ~
52485      eval path="$path"
52486      if test ! -f "$path" && test ! -d "$path"; then
52487        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52488      fi
52489
52490      if test -d "$path"; then
52491        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52492      else
52493        dir="`$DIRNAME "$path"`"
52494        base="`$BASENAME "$path"`"
52495        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52496      fi
52497    fi
52498  fi
52499
52500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52501$as_echo_n "checking for $DLL_NAME... " >&6; }
52502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52503$as_echo "$MSVC_DLL" >&6; }
52504    else
52505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52506$as_echo "incorrect, ignoring" >&6; }
52507      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52508$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52509    fi
52510  fi
52511
52512    fi
52513  fi
52514
52515  if test "x$MSVC_DLL" = x; then
52516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52517$as_echo_n "checking for $DLL_NAME... " >&6; }
52518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52519$as_echo "no" >&6; }
52520    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52521  fi
52522
52523    MSVCR_DLL="$MSVC_DLL"
52524  fi
52525
52526
52527
52528# Check whether --with-msvcp-dll was given.
52529if test "${with_msvcp_dll+set}" = set; then :
52530  withval=$with_msvcp_dll;
52531fi
52532
52533
52534  if test "x$MSVCP_NAME" != "x"; then
52535    if test "x$with_msvcp_dll" != x; then
52536      # If given explicitely by user, do not probe. If not present, fail directly.
52537
52538  DLL_NAME="$MSVCP_NAME"
52539  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
52540  METHOD="--with-msvcp-dll"
52541  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52542    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52543$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52544
52545    # Need to check if the found msvcr is correct architecture
52546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52547$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52548    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52550      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52551      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52552      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52553        CORRECT_MSVCR_ARCH="PE32 executable"
52554      else
52555        CORRECT_MSVCR_ARCH="PE32+ executable"
52556      fi
52557    else
52558      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52559        CORRECT_MSVCR_ARCH=386
52560      else
52561        CORRECT_MSVCR_ARCH=x86-64
52562      fi
52563    fi
52564    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52566$as_echo "ok" >&6; }
52567      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52568
52569  # Only process if variable expands to non-empty
52570
52571  if test "x$MSVC_DLL" != x; then
52572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52573
52574  # Input might be given as Windows format, start by converting to
52575  # unix format.
52576  path="$MSVC_DLL"
52577  new_path=`$CYGPATH -u "$path"`
52578
52579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52582  # "foo.exe" is OK but "foo" is an error.
52583  #
52584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52585  # It is also a way to make sure we got the proper file name for the real test later on.
52586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52587  if test "x$test_shortpath" = x; then
52588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52589$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52590    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52591  fi
52592
52593  # Call helper function which possibly converts this using DOS-style short mode.
52594  # If so, the updated path is stored in $new_path.
52595
52596  input_path="$new_path"
52597  # Check if we need to convert this using DOS-style short mode. If the path
52598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52599  # take no chances and rewrite it.
52600  # Note: m4 eats our [], so we need to use [ and ] instead.
52601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52602  if test "x$has_forbidden_chars" != x; then
52603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52607      # Going to short mode and back again did indeed matter. Since short mode is
52608      # case insensitive, let's make it lowercase to improve readability.
52609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52610      # Now convert it back to Unix-style (cygpath)
52611      input_path=`$CYGPATH -u "$shortmode_path"`
52612      new_path="$input_path"
52613    fi
52614  fi
52615
52616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52617  if test "x$test_cygdrive_prefix" = x; then
52618    # As a simple fix, exclude /usr/bin since it's not a real path.
52619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52621      # a path prefixed by /cygdrive for fixpath to work.
52622      new_path="$CYGWIN_ROOT_PATH$input_path"
52623    fi
52624  fi
52625
52626
52627  if test "x$path" != "x$new_path"; then
52628    MSVC_DLL="$new_path"
52629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52630$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52631  fi
52632
52633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52634
52635  path="$MSVC_DLL"
52636  has_colon=`$ECHO $path | $GREP ^.:`
52637  new_path="$path"
52638  if test "x$has_colon" = x; then
52639    # Not in mixed or Windows style, start by that.
52640    new_path=`cmd //c echo $path`
52641  fi
52642
52643
52644  input_path="$new_path"
52645  # Check if we need to convert this using DOS-style short mode. If the path
52646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52647  # take no chances and rewrite it.
52648  # Note: m4 eats our [], so we need to use [ and ] instead.
52649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52650  if test "x$has_forbidden_chars" != x; then
52651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52653  fi
52654
52655
52656  windows_path="$new_path"
52657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52658    unix_path=`$CYGPATH -u "$windows_path"`
52659    new_path="$unix_path"
52660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52662    new_path="$unix_path"
52663  fi
52664
52665  if test "x$path" != "x$new_path"; then
52666    MSVC_DLL="$new_path"
52667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52668$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52669  fi
52670
52671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52673
52674    else
52675      # We're on a unix platform. Hooray! :)
52676      path="$MSVC_DLL"
52677      has_space=`$ECHO "$path" | $GREP " "`
52678      if test "x$has_space" != x; then
52679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52680$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52682      fi
52683
52684      # Use eval to expand a potential ~
52685      eval path="$path"
52686      if test ! -f "$path" && test ! -d "$path"; then
52687        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52688      fi
52689
52690      if test -d "$path"; then
52691        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52692      else
52693        dir="`$DIRNAME "$path"`"
52694        base="`$BASENAME "$path"`"
52695        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52696      fi
52697    fi
52698  fi
52699
52700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52701$as_echo_n "checking for $DLL_NAME... " >&6; }
52702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52703$as_echo "$MSVC_DLL" >&6; }
52704    else
52705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52706$as_echo "incorrect, ignoring" >&6; }
52707      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52708$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52709    fi
52710  fi
52711
52712      if test "x$MSVC_DLL" = x; then
52713        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
52714      fi
52715      MSVCP_DLL="$MSVC_DLL"
52716    elif test "x$DEVKIT_MSVCP_DLL" != x; then
52717
52718  DLL_NAME="$MSVCP_NAME"
52719  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
52720  METHOD="devkit"
52721  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52722    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52723$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52724
52725    # Need to check if the found msvcr is correct architecture
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52727$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52728    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52730      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52731      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52732      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52733        CORRECT_MSVCR_ARCH="PE32 executable"
52734      else
52735        CORRECT_MSVCR_ARCH="PE32+ executable"
52736      fi
52737    else
52738      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52739        CORRECT_MSVCR_ARCH=386
52740      else
52741        CORRECT_MSVCR_ARCH=x86-64
52742      fi
52743    fi
52744    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52746$as_echo "ok" >&6; }
52747      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52748
52749  # Only process if variable expands to non-empty
52750
52751  if test "x$MSVC_DLL" != x; then
52752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52753
52754  # Input might be given as Windows format, start by converting to
52755  # unix format.
52756  path="$MSVC_DLL"
52757  new_path=`$CYGPATH -u "$path"`
52758
52759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52762  # "foo.exe" is OK but "foo" is an error.
52763  #
52764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52765  # It is also a way to make sure we got the proper file name for the real test later on.
52766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52767  if test "x$test_shortpath" = x; then
52768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52769$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52770    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52771  fi
52772
52773  # Call helper function which possibly converts this using DOS-style short mode.
52774  # If so, the updated path is stored in $new_path.
52775
52776  input_path="$new_path"
52777  # Check if we need to convert this using DOS-style short mode. If the path
52778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52779  # take no chances and rewrite it.
52780  # Note: m4 eats our [], so we need to use [ and ] instead.
52781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52782  if test "x$has_forbidden_chars" != x; then
52783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52787      # Going to short mode and back again did indeed matter. Since short mode is
52788      # case insensitive, let's make it lowercase to improve readability.
52789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52790      # Now convert it back to Unix-style (cygpath)
52791      input_path=`$CYGPATH -u "$shortmode_path"`
52792      new_path="$input_path"
52793    fi
52794  fi
52795
52796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52797  if test "x$test_cygdrive_prefix" = x; then
52798    # As a simple fix, exclude /usr/bin since it's not a real path.
52799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52801      # a path prefixed by /cygdrive for fixpath to work.
52802      new_path="$CYGWIN_ROOT_PATH$input_path"
52803    fi
52804  fi
52805
52806
52807  if test "x$path" != "x$new_path"; then
52808    MSVC_DLL="$new_path"
52809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52810$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52811  fi
52812
52813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52814
52815  path="$MSVC_DLL"
52816  has_colon=`$ECHO $path | $GREP ^.:`
52817  new_path="$path"
52818  if test "x$has_colon" = x; then
52819    # Not in mixed or Windows style, start by that.
52820    new_path=`cmd //c echo $path`
52821  fi
52822
52823
52824  input_path="$new_path"
52825  # Check if we need to convert this using DOS-style short mode. If the path
52826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52827  # take no chances and rewrite it.
52828  # Note: m4 eats our [], so we need to use [ and ] instead.
52829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52830  if test "x$has_forbidden_chars" != x; then
52831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52833  fi
52834
52835
52836  windows_path="$new_path"
52837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52838    unix_path=`$CYGPATH -u "$windows_path"`
52839    new_path="$unix_path"
52840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52842    new_path="$unix_path"
52843  fi
52844
52845  if test "x$path" != "x$new_path"; then
52846    MSVC_DLL="$new_path"
52847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52848$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52849  fi
52850
52851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52853
52854    else
52855      # We're on a unix platform. Hooray! :)
52856      path="$MSVC_DLL"
52857      has_space=`$ECHO "$path" | $GREP " "`
52858      if test "x$has_space" != x; then
52859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52860$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52862      fi
52863
52864      # Use eval to expand a potential ~
52865      eval path="$path"
52866      if test ! -f "$path" && test ! -d "$path"; then
52867        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52868      fi
52869
52870      if test -d "$path"; then
52871        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52872      else
52873        dir="`$DIRNAME "$path"`"
52874        base="`$BASENAME "$path"`"
52875        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52876      fi
52877    fi
52878  fi
52879
52880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52881$as_echo_n "checking for $DLL_NAME... " >&6; }
52882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52883$as_echo "$MSVC_DLL" >&6; }
52884    else
52885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52886$as_echo "incorrect, ignoring" >&6; }
52887      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52888$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52889    fi
52890  fi
52891
52892      if test "x$MSVC_DLL" = x; then
52893        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
52894      fi
52895      MSVCP_DLL="$MSVC_DLL"
52896    else
52897
52898  DLL_NAME="${MSVCP_NAME}"
52899  MSVC_DLL=
52900
52901  if test "x$MSVC_DLL" = x; then
52902    # Probe: Using well-known location from Visual Studio 10.0
52903    if test "x$VCINSTALLDIR" != x; then
52904      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
52905
52906  windows_path="$CYGWIN_VC_INSTALL_DIR"
52907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52908    unix_path=`$CYGPATH -u "$windows_path"`
52909    CYGWIN_VC_INSTALL_DIR="$unix_path"
52910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52912    CYGWIN_VC_INSTALL_DIR="$unix_path"
52913  fi
52914
52915      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52916        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
52917      else
52918        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
52919      fi
52920      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
52921
52922  DLL_NAME="$DLL_NAME"
52923  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52924  METHOD="well-known location in VCINSTALLDIR"
52925  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52926    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52927$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52928
52929    # Need to check if the found msvcr is correct architecture
52930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52931$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52932    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52934      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52935      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52936      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52937        CORRECT_MSVCR_ARCH="PE32 executable"
52938      else
52939        CORRECT_MSVCR_ARCH="PE32+ executable"
52940      fi
52941    else
52942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52943        CORRECT_MSVCR_ARCH=386
52944      else
52945        CORRECT_MSVCR_ARCH=x86-64
52946      fi
52947    fi
52948    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52950$as_echo "ok" >&6; }
52951      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52952
52953  # Only process if variable expands to non-empty
52954
52955  if test "x$MSVC_DLL" != x; then
52956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52957
52958  # Input might be given as Windows format, start by converting to
52959  # unix format.
52960  path="$MSVC_DLL"
52961  new_path=`$CYGPATH -u "$path"`
52962
52963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52966  # "foo.exe" is OK but "foo" is an error.
52967  #
52968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52969  # It is also a way to make sure we got the proper file name for the real test later on.
52970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52971  if test "x$test_shortpath" = x; then
52972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52973$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52974    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52975  fi
52976
52977  # Call helper function which possibly converts this using DOS-style short mode.
52978  # If so, the updated path is stored in $new_path.
52979
52980  input_path="$new_path"
52981  # Check if we need to convert this using DOS-style short mode. If the path
52982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52983  # take no chances and rewrite it.
52984  # Note: m4 eats our [], so we need to use [ and ] instead.
52985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52986  if test "x$has_forbidden_chars" != x; then
52987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52991      # Going to short mode and back again did indeed matter. Since short mode is
52992      # case insensitive, let's make it lowercase to improve readability.
52993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52994      # Now convert it back to Unix-style (cygpath)
52995      input_path=`$CYGPATH -u "$shortmode_path"`
52996      new_path="$input_path"
52997    fi
52998  fi
52999
53000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53001  if test "x$test_cygdrive_prefix" = x; then
53002    # As a simple fix, exclude /usr/bin since it's not a real path.
53003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53005      # a path prefixed by /cygdrive for fixpath to work.
53006      new_path="$CYGWIN_ROOT_PATH$input_path"
53007    fi
53008  fi
53009
53010
53011  if test "x$path" != "x$new_path"; then
53012    MSVC_DLL="$new_path"
53013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53015  fi
53016
53017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53018
53019  path="$MSVC_DLL"
53020  has_colon=`$ECHO $path | $GREP ^.:`
53021  new_path="$path"
53022  if test "x$has_colon" = x; then
53023    # Not in mixed or Windows style, start by that.
53024    new_path=`cmd //c echo $path`
53025  fi
53026
53027
53028  input_path="$new_path"
53029  # Check if we need to convert this using DOS-style short mode. If the path
53030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53031  # take no chances and rewrite it.
53032  # Note: m4 eats our [], so we need to use [ and ] instead.
53033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53034  if test "x$has_forbidden_chars" != x; then
53035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53037  fi
53038
53039
53040  windows_path="$new_path"
53041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53042    unix_path=`$CYGPATH -u "$windows_path"`
53043    new_path="$unix_path"
53044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53046    new_path="$unix_path"
53047  fi
53048
53049  if test "x$path" != "x$new_path"; then
53050    MSVC_DLL="$new_path"
53051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53052$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53053  fi
53054
53055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53057
53058    else
53059      # We're on a unix platform. Hooray! :)
53060      path="$MSVC_DLL"
53061      has_space=`$ECHO "$path" | $GREP " "`
53062      if test "x$has_space" != x; then
53063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53064$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53066      fi
53067
53068      # Use eval to expand a potential ~
53069      eval path="$path"
53070      if test ! -f "$path" && test ! -d "$path"; then
53071        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53072      fi
53073
53074      if test -d "$path"; then
53075        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53076      else
53077        dir="`$DIRNAME "$path"`"
53078        base="`$BASENAME "$path"`"
53079        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53080      fi
53081    fi
53082  fi
53083
53084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53085$as_echo_n "checking for $DLL_NAME... " >&6; }
53086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53087$as_echo "$MSVC_DLL" >&6; }
53088    else
53089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53090$as_echo "incorrect, ignoring" >&6; }
53091      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53092$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53093    fi
53094  fi
53095
53096    fi
53097  fi
53098
53099  if test "x$MSVC_DLL" = x; then
53100    # Probe: Check in the Boot JDK directory.
53101    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53102
53103  DLL_NAME="$DLL_NAME"
53104  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53105  METHOD="well-known location in Boot JDK"
53106  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53108$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53109
53110    # Need to check if the found msvcr is correct architecture
53111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53112$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53113    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53115      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53116      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53118        CORRECT_MSVCR_ARCH="PE32 executable"
53119      else
53120        CORRECT_MSVCR_ARCH="PE32+ executable"
53121      fi
53122    else
53123      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53124        CORRECT_MSVCR_ARCH=386
53125      else
53126        CORRECT_MSVCR_ARCH=x86-64
53127      fi
53128    fi
53129    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53131$as_echo "ok" >&6; }
53132      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53133
53134  # Only process if variable expands to non-empty
53135
53136  if test "x$MSVC_DLL" != x; then
53137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53138
53139  # Input might be given as Windows format, start by converting to
53140  # unix format.
53141  path="$MSVC_DLL"
53142  new_path=`$CYGPATH -u "$path"`
53143
53144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53147  # "foo.exe" is OK but "foo" is an error.
53148  #
53149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53150  # It is also a way to make sure we got the proper file name for the real test later on.
53151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53152  if test "x$test_shortpath" = x; then
53153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53154$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53155    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53156  fi
53157
53158  # Call helper function which possibly converts this using DOS-style short mode.
53159  # If so, the updated path is stored in $new_path.
53160
53161  input_path="$new_path"
53162  # Check if we need to convert this using DOS-style short mode. If the path
53163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53164  # take no chances and rewrite it.
53165  # Note: m4 eats our [], so we need to use [ and ] instead.
53166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53167  if test "x$has_forbidden_chars" != x; then
53168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53172      # Going to short mode and back again did indeed matter. Since short mode is
53173      # case insensitive, let's make it lowercase to improve readability.
53174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53175      # Now convert it back to Unix-style (cygpath)
53176      input_path=`$CYGPATH -u "$shortmode_path"`
53177      new_path="$input_path"
53178    fi
53179  fi
53180
53181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53182  if test "x$test_cygdrive_prefix" = x; then
53183    # As a simple fix, exclude /usr/bin since it's not a real path.
53184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53186      # a path prefixed by /cygdrive for fixpath to work.
53187      new_path="$CYGWIN_ROOT_PATH$input_path"
53188    fi
53189  fi
53190
53191
53192  if test "x$path" != "x$new_path"; then
53193    MSVC_DLL="$new_path"
53194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53196  fi
53197
53198    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53199
53200  path="$MSVC_DLL"
53201  has_colon=`$ECHO $path | $GREP ^.:`
53202  new_path="$path"
53203  if test "x$has_colon" = x; then
53204    # Not in mixed or Windows style, start by that.
53205    new_path=`cmd //c echo $path`
53206  fi
53207
53208
53209  input_path="$new_path"
53210  # Check if we need to convert this using DOS-style short mode. If the path
53211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53212  # take no chances and rewrite it.
53213  # Note: m4 eats our [], so we need to use [ and ] instead.
53214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53215  if test "x$has_forbidden_chars" != x; then
53216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53218  fi
53219
53220
53221  windows_path="$new_path"
53222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53223    unix_path=`$CYGPATH -u "$windows_path"`
53224    new_path="$unix_path"
53225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53227    new_path="$unix_path"
53228  fi
53229
53230  if test "x$path" != "x$new_path"; then
53231    MSVC_DLL="$new_path"
53232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53233$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53234  fi
53235
53236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53238
53239    else
53240      # We're on a unix platform. Hooray! :)
53241      path="$MSVC_DLL"
53242      has_space=`$ECHO "$path" | $GREP " "`
53243      if test "x$has_space" != x; then
53244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53245$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53246        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53247      fi
53248
53249      # Use eval to expand a potential ~
53250      eval path="$path"
53251      if test ! -f "$path" && test ! -d "$path"; then
53252        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53253      fi
53254
53255      if test -d "$path"; then
53256        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53257      else
53258        dir="`$DIRNAME "$path"`"
53259        base="`$BASENAME "$path"`"
53260        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53261      fi
53262    fi
53263  fi
53264
53265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53266$as_echo_n "checking for $DLL_NAME... " >&6; }
53267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53268$as_echo "$MSVC_DLL" >&6; }
53269    else
53270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53271$as_echo "incorrect, ignoring" >&6; }
53272      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53273$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53274    fi
53275  fi
53276
53277  fi
53278
53279  if test "x$MSVC_DLL" = x; then
53280    # Probe: Look in the Windows system32 directory
53281    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53282
53283  windows_path="$CYGWIN_SYSTEMROOT"
53284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53285    unix_path=`$CYGPATH -u "$windows_path"`
53286    CYGWIN_SYSTEMROOT="$unix_path"
53287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53289    CYGWIN_SYSTEMROOT="$unix_path"
53290  fi
53291
53292    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53293
53294  DLL_NAME="$DLL_NAME"
53295  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53296  METHOD="well-known location in SYSTEMROOT"
53297  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53298    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53299$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53300
53301    # Need to check if the found msvcr is correct architecture
53302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53303$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53304    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53306      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53307      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53308      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53309        CORRECT_MSVCR_ARCH="PE32 executable"
53310      else
53311        CORRECT_MSVCR_ARCH="PE32+ executable"
53312      fi
53313    else
53314      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53315        CORRECT_MSVCR_ARCH=386
53316      else
53317        CORRECT_MSVCR_ARCH=x86-64
53318      fi
53319    fi
53320    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53322$as_echo "ok" >&6; }
53323      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53324
53325  # Only process if variable expands to non-empty
53326
53327  if test "x$MSVC_DLL" != x; then
53328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53329
53330  # Input might be given as Windows format, start by converting to
53331  # unix format.
53332  path="$MSVC_DLL"
53333  new_path=`$CYGPATH -u "$path"`
53334
53335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53338  # "foo.exe" is OK but "foo" is an error.
53339  #
53340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53341  # It is also a way to make sure we got the proper file name for the real test later on.
53342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53343  if test "x$test_shortpath" = x; then
53344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53345$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53346    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53347  fi
53348
53349  # Call helper function which possibly converts this using DOS-style short mode.
53350  # If so, the updated path is stored in $new_path.
53351
53352  input_path="$new_path"
53353  # Check if we need to convert this using DOS-style short mode. If the path
53354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53355  # take no chances and rewrite it.
53356  # Note: m4 eats our [], so we need to use [ and ] instead.
53357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53358  if test "x$has_forbidden_chars" != x; then
53359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53363      # Going to short mode and back again did indeed matter. Since short mode is
53364      # case insensitive, let's make it lowercase to improve readability.
53365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53366      # Now convert it back to Unix-style (cygpath)
53367      input_path=`$CYGPATH -u "$shortmode_path"`
53368      new_path="$input_path"
53369    fi
53370  fi
53371
53372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53373  if test "x$test_cygdrive_prefix" = x; then
53374    # As a simple fix, exclude /usr/bin since it's not a real path.
53375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53377      # a path prefixed by /cygdrive for fixpath to work.
53378      new_path="$CYGWIN_ROOT_PATH$input_path"
53379    fi
53380  fi
53381
53382
53383  if test "x$path" != "x$new_path"; then
53384    MSVC_DLL="$new_path"
53385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53387  fi
53388
53389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53390
53391  path="$MSVC_DLL"
53392  has_colon=`$ECHO $path | $GREP ^.:`
53393  new_path="$path"
53394  if test "x$has_colon" = x; then
53395    # Not in mixed or Windows style, start by that.
53396    new_path=`cmd //c echo $path`
53397  fi
53398
53399
53400  input_path="$new_path"
53401  # Check if we need to convert this using DOS-style short mode. If the path
53402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53403  # take no chances and rewrite it.
53404  # Note: m4 eats our [], so we need to use [ and ] instead.
53405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53406  if test "x$has_forbidden_chars" != x; then
53407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53409  fi
53410
53411
53412  windows_path="$new_path"
53413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53414    unix_path=`$CYGPATH -u "$windows_path"`
53415    new_path="$unix_path"
53416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53418    new_path="$unix_path"
53419  fi
53420
53421  if test "x$path" != "x$new_path"; then
53422    MSVC_DLL="$new_path"
53423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53424$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53425  fi
53426
53427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53429
53430    else
53431      # We're on a unix platform. Hooray! :)
53432      path="$MSVC_DLL"
53433      has_space=`$ECHO "$path" | $GREP " "`
53434      if test "x$has_space" != x; then
53435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53436$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53438      fi
53439
53440      # Use eval to expand a potential ~
53441      eval path="$path"
53442      if test ! -f "$path" && test ! -d "$path"; then
53443        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53444      fi
53445
53446      if test -d "$path"; then
53447        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53448      else
53449        dir="`$DIRNAME "$path"`"
53450        base="`$BASENAME "$path"`"
53451        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53452      fi
53453    fi
53454  fi
53455
53456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53457$as_echo_n "checking for $DLL_NAME... " >&6; }
53458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53459$as_echo "$MSVC_DLL" >&6; }
53460    else
53461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53462$as_echo "incorrect, ignoring" >&6; }
53463      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53464$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53465    fi
53466  fi
53467
53468  fi
53469
53470  if test "x$MSVC_DLL" = x; then
53471    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53472    if test "x$VS100COMNTOOLS" != x; then
53473      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53474
53475  windows_path="$CYGWIN_VS_TOOLS_DIR"
53476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53477    unix_path=`$CYGPATH -u "$windows_path"`
53478    CYGWIN_VS_TOOLS_DIR="$unix_path"
53479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53481    CYGWIN_VS_TOOLS_DIR="$unix_path"
53482  fi
53483
53484      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53485        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53486	    | $GREP -i /x64/ | $HEAD --lines 1`
53487      else
53488        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53489	    | $GREP -i /x86/ | $HEAD --lines 1`
53490      fi
53491
53492  DLL_NAME="$DLL_NAME"
53493  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53494  METHOD="search of VS100COMNTOOLS"
53495  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53497$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53498
53499    # Need to check if the found msvcr is correct architecture
53500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53501$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53502    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53504      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53505      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53506      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53507        CORRECT_MSVCR_ARCH="PE32 executable"
53508      else
53509        CORRECT_MSVCR_ARCH="PE32+ executable"
53510      fi
53511    else
53512      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53513        CORRECT_MSVCR_ARCH=386
53514      else
53515        CORRECT_MSVCR_ARCH=x86-64
53516      fi
53517    fi
53518    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53520$as_echo "ok" >&6; }
53521      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53522
53523  # Only process if variable expands to non-empty
53524
53525  if test "x$MSVC_DLL" != x; then
53526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53527
53528  # Input might be given as Windows format, start by converting to
53529  # unix format.
53530  path="$MSVC_DLL"
53531  new_path=`$CYGPATH -u "$path"`
53532
53533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53536  # "foo.exe" is OK but "foo" is an error.
53537  #
53538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53539  # It is also a way to make sure we got the proper file name for the real test later on.
53540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53541  if test "x$test_shortpath" = x; then
53542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53543$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53544    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53545  fi
53546
53547  # Call helper function which possibly converts this using DOS-style short mode.
53548  # If so, the updated path is stored in $new_path.
53549
53550  input_path="$new_path"
53551  # Check if we need to convert this using DOS-style short mode. If the path
53552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53553  # take no chances and rewrite it.
53554  # Note: m4 eats our [], so we need to use [ and ] instead.
53555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53556  if test "x$has_forbidden_chars" != x; then
53557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53561      # Going to short mode and back again did indeed matter. Since short mode is
53562      # case insensitive, let's make it lowercase to improve readability.
53563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53564      # Now convert it back to Unix-style (cygpath)
53565      input_path=`$CYGPATH -u "$shortmode_path"`
53566      new_path="$input_path"
53567    fi
53568  fi
53569
53570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53571  if test "x$test_cygdrive_prefix" = x; then
53572    # As a simple fix, exclude /usr/bin since it's not a real path.
53573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53575      # a path prefixed by /cygdrive for fixpath to work.
53576      new_path="$CYGWIN_ROOT_PATH$input_path"
53577    fi
53578  fi
53579
53580
53581  if test "x$path" != "x$new_path"; then
53582    MSVC_DLL="$new_path"
53583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53584$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53585  fi
53586
53587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53588
53589  path="$MSVC_DLL"
53590  has_colon=`$ECHO $path | $GREP ^.:`
53591  new_path="$path"
53592  if test "x$has_colon" = x; then
53593    # Not in mixed or Windows style, start by that.
53594    new_path=`cmd //c echo $path`
53595  fi
53596
53597
53598  input_path="$new_path"
53599  # Check if we need to convert this using DOS-style short mode. If the path
53600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53601  # take no chances and rewrite it.
53602  # Note: m4 eats our [], so we need to use [ and ] instead.
53603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53604  if test "x$has_forbidden_chars" != x; then
53605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53607  fi
53608
53609
53610  windows_path="$new_path"
53611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53612    unix_path=`$CYGPATH -u "$windows_path"`
53613    new_path="$unix_path"
53614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53616    new_path="$unix_path"
53617  fi
53618
53619  if test "x$path" != "x$new_path"; then
53620    MSVC_DLL="$new_path"
53621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53622$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53623  fi
53624
53625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53627
53628    else
53629      # We're on a unix platform. Hooray! :)
53630      path="$MSVC_DLL"
53631      has_space=`$ECHO "$path" | $GREP " "`
53632      if test "x$has_space" != x; then
53633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53634$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53636      fi
53637
53638      # Use eval to expand a potential ~
53639      eval path="$path"
53640      if test ! -f "$path" && test ! -d "$path"; then
53641        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53642      fi
53643
53644      if test -d "$path"; then
53645        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53646      else
53647        dir="`$DIRNAME "$path"`"
53648        base="`$BASENAME "$path"`"
53649        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53650      fi
53651    fi
53652  fi
53653
53654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53655$as_echo_n "checking for $DLL_NAME... " >&6; }
53656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53657$as_echo "$MSVC_DLL" >&6; }
53658    else
53659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53660$as_echo "incorrect, ignoring" >&6; }
53661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53662$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53663    fi
53664  fi
53665
53666    fi
53667  fi
53668
53669  if test "x$MSVC_DLL" = x; then
53670    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
53671    # (This was the original behaviour; kept since it might turn something up)
53672    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
53673      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53674        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
53675	    | $GREP x64 | $HEAD --lines 1`
53676      else
53677        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
53678	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
53679        if test "x$POSSIBLE_MSVC_DLL" = x; then
53680          # We're grasping at straws now...
53681          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
53682	      | $HEAD --lines 1`
53683        fi
53684      fi
53685
53686
53687  DLL_NAME="$DLL_NAME"
53688  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53689  METHOD="search of VCINSTALLDIR"
53690  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53691    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53692$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53693
53694    # Need to check if the found msvcr is correct architecture
53695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53696$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53697    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53699      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53700      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53701      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53702        CORRECT_MSVCR_ARCH="PE32 executable"
53703      else
53704        CORRECT_MSVCR_ARCH="PE32+ executable"
53705      fi
53706    else
53707      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53708        CORRECT_MSVCR_ARCH=386
53709      else
53710        CORRECT_MSVCR_ARCH=x86-64
53711      fi
53712    fi
53713    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53715$as_echo "ok" >&6; }
53716      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53717
53718  # Only process if variable expands to non-empty
53719
53720  if test "x$MSVC_DLL" != x; then
53721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53722
53723  # Input might be given as Windows format, start by converting to
53724  # unix format.
53725  path="$MSVC_DLL"
53726  new_path=`$CYGPATH -u "$path"`
53727
53728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53731  # "foo.exe" is OK but "foo" is an error.
53732  #
53733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53734  # It is also a way to make sure we got the proper file name for the real test later on.
53735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53736  if test "x$test_shortpath" = x; then
53737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53738$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53739    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53740  fi
53741
53742  # Call helper function which possibly converts this using DOS-style short mode.
53743  # If so, the updated path is stored in $new_path.
53744
53745  input_path="$new_path"
53746  # Check if we need to convert this using DOS-style short mode. If the path
53747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53748  # take no chances and rewrite it.
53749  # Note: m4 eats our [], so we need to use [ and ] instead.
53750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53751  if test "x$has_forbidden_chars" != x; then
53752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53756      # Going to short mode and back again did indeed matter. Since short mode is
53757      # case insensitive, let's make it lowercase to improve readability.
53758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53759      # Now convert it back to Unix-style (cygpath)
53760      input_path=`$CYGPATH -u "$shortmode_path"`
53761      new_path="$input_path"
53762    fi
53763  fi
53764
53765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53766  if test "x$test_cygdrive_prefix" = x; then
53767    # As a simple fix, exclude /usr/bin since it's not a real path.
53768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53770      # a path prefixed by /cygdrive for fixpath to work.
53771      new_path="$CYGWIN_ROOT_PATH$input_path"
53772    fi
53773  fi
53774
53775
53776  if test "x$path" != "x$new_path"; then
53777    MSVC_DLL="$new_path"
53778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53779$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53780  fi
53781
53782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53783
53784  path="$MSVC_DLL"
53785  has_colon=`$ECHO $path | $GREP ^.:`
53786  new_path="$path"
53787  if test "x$has_colon" = x; then
53788    # Not in mixed or Windows style, start by that.
53789    new_path=`cmd //c echo $path`
53790  fi
53791
53792
53793  input_path="$new_path"
53794  # Check if we need to convert this using DOS-style short mode. If the path
53795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53796  # take no chances and rewrite it.
53797  # Note: m4 eats our [], so we need to use [ and ] instead.
53798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53799  if test "x$has_forbidden_chars" != x; then
53800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53802  fi
53803
53804
53805  windows_path="$new_path"
53806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53807    unix_path=`$CYGPATH -u "$windows_path"`
53808    new_path="$unix_path"
53809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53811    new_path="$unix_path"
53812  fi
53813
53814  if test "x$path" != "x$new_path"; then
53815    MSVC_DLL="$new_path"
53816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53818  fi
53819
53820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53822
53823    else
53824      # We're on a unix platform. Hooray! :)
53825      path="$MSVC_DLL"
53826      has_space=`$ECHO "$path" | $GREP " "`
53827      if test "x$has_space" != x; then
53828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53829$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53831      fi
53832
53833      # Use eval to expand a potential ~
53834      eval path="$path"
53835      if test ! -f "$path" && test ! -d "$path"; then
53836        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53837      fi
53838
53839      if test -d "$path"; then
53840        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53841      else
53842        dir="`$DIRNAME "$path"`"
53843        base="`$BASENAME "$path"`"
53844        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53845      fi
53846    fi
53847  fi
53848
53849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53850$as_echo_n "checking for $DLL_NAME... " >&6; }
53851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53852$as_echo "$MSVC_DLL" >&6; }
53853    else
53854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53855$as_echo "incorrect, ignoring" >&6; }
53856      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53857$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53858    fi
53859  fi
53860
53861    fi
53862  fi
53863
53864  if test "x$MSVC_DLL" = x; then
53865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53866$as_echo_n "checking for $DLL_NAME... " >&6; }
53867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53868$as_echo "no" >&6; }
53869    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
53870  fi
53871
53872      MSVCP_DLL="$MSVC_DLL"
53873    fi
53874
53875  fi
53876
53877  fi
53878
53879
53880  if test "x$NEEDS_LIB_X11" = xfalse; then
53881    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
53882      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
53883$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
53884    fi
53885    X_CFLAGS=
53886    X_LIBS=
53887  else
53888
53889    if test "x${with_x}" = xno; then
53890      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
53891    fi
53892
53893    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
53894      # The user has specified a X11 base directory. Use it for includes and
53895      # libraries, unless explicitely overridden.
53896      if test "x$x_includes" = xNONE; then
53897        x_includes="${with_x}/include"
53898      fi
53899      if test "x$x_libraries" = xNONE; then
53900        x_libraries="${with_x}/lib"
53901      fi
53902    else
53903      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
53904      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
53905      # --x-libraries for the sysroot, if that seems to be correct.
53906      if test "x$SYSROOT" != "x"; then
53907        if test "x$x_includes" = xNONE; then
53908          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
53909            x_includes="$SYSROOT/usr/X11R6/include"
53910          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
53911            x_includes="$SYSROOT/usr/include"
53912          fi
53913        fi
53914        if test "x$x_libraries" = xNONE; then
53915          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
53916            x_libraries="$SYSROOT/usr/X11R6/lib"
53917          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53918            x_libraries="$SYSROOT/usr/lib64"
53919          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
53920            x_libraries="$SYSROOT/usr/lib"
53921          fi
53922        fi
53923      fi
53924    fi
53925
53926    # Now let autoconf do it's magic
53927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
53928$as_echo_n "checking for X... " >&6; }
53929
53930
53931# Check whether --with-x was given.
53932if test "${with_x+set}" = set; then :
53933  withval=$with_x;
53934fi
53935
53936# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
53937if test "x$with_x" = xno; then
53938  # The user explicitly disabled X.
53939  have_x=disabled
53940else
53941  case $x_includes,$x_libraries in #(
53942    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
53943    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
53944  $as_echo_n "(cached) " >&6
53945else
53946  # One or both of the vars are not set, and there is no cached value.
53947ac_x_includes=no ac_x_libraries=no
53948rm -f -r conftest.dir
53949if mkdir conftest.dir; then
53950  cd conftest.dir
53951  cat >Imakefile <<'_ACEOF'
53952incroot:
53953	@echo incroot='${INCROOT}'
53954usrlibdir:
53955	@echo usrlibdir='${USRLIBDIR}'
53956libdir:
53957	@echo libdir='${LIBDIR}'
53958_ACEOF
53959  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
53960    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
53961    for ac_var in incroot usrlibdir libdir; do
53962      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
53963    done
53964    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
53965    for ac_extension in a so sl dylib la dll; do
53966      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
53967	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
53968	ac_im_usrlibdir=$ac_im_libdir; break
53969      fi
53970    done
53971    # Screen out bogus values from the imake configuration.  They are
53972    # bogus both because they are the default anyway, and because
53973    # using them would break gcc on systems where it needs fixed includes.
53974    case $ac_im_incroot in
53975	/usr/include) ac_x_includes= ;;
53976	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
53977    esac
53978    case $ac_im_usrlibdir in
53979	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
53980	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
53981    esac
53982  fi
53983  cd ..
53984  rm -f -r conftest.dir
53985fi
53986
53987# Standard set of common directories for X headers.
53988# Check X11 before X11Rn because it is often a symlink to the current release.
53989ac_x_header_dirs='
53990/usr/X11/include
53991/usr/X11R7/include
53992/usr/X11R6/include
53993/usr/X11R5/include
53994/usr/X11R4/include
53995
53996/usr/include/X11
53997/usr/include/X11R7
53998/usr/include/X11R6
53999/usr/include/X11R5
54000/usr/include/X11R4
54001
54002/usr/local/X11/include
54003/usr/local/X11R7/include
54004/usr/local/X11R6/include
54005/usr/local/X11R5/include
54006/usr/local/X11R4/include
54007
54008/usr/local/include/X11
54009/usr/local/include/X11R7
54010/usr/local/include/X11R6
54011/usr/local/include/X11R5
54012/usr/local/include/X11R4
54013
54014/usr/X386/include
54015/usr/x386/include
54016/usr/XFree86/include/X11
54017
54018/usr/include
54019/usr/local/include
54020/usr/unsupported/include
54021/usr/athena/include
54022/usr/local/x11r5/include
54023/usr/lpp/Xamples/include
54024
54025/usr/openwin/include
54026/usr/openwin/share/include'
54027
54028if test "$ac_x_includes" = no; then
54029  # Guess where to find include files, by looking for Xlib.h.
54030  # First, try using that file with no special directory specified.
54031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54032/* end confdefs.h.  */
54033#include <X11/Xlib.h>
54034_ACEOF
54035if ac_fn_cxx_try_cpp "$LINENO"; then :
54036  # We can compile using X headers with no special include directory.
54037ac_x_includes=
54038else
54039  for ac_dir in $ac_x_header_dirs; do
54040  if test -r "$ac_dir/X11/Xlib.h"; then
54041    ac_x_includes=$ac_dir
54042    break
54043  fi
54044done
54045fi
54046rm -f conftest.err conftest.i conftest.$ac_ext
54047fi # $ac_x_includes = no
54048
54049if test "$ac_x_libraries" = no; then
54050  # Check for the libraries.
54051  # See if we find them without any special options.
54052  # Don't add to $LIBS permanently.
54053  ac_save_LIBS=$LIBS
54054  LIBS="-lX11 $LIBS"
54055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54056/* end confdefs.h.  */
54057#include <X11/Xlib.h>
54058int
54059main ()
54060{
54061XrmInitialize ()
54062  ;
54063  return 0;
54064}
54065_ACEOF
54066if ac_fn_cxx_try_link "$LINENO"; then :
54067  LIBS=$ac_save_LIBS
54068# We can link X programs with no special library path.
54069ac_x_libraries=
54070else
54071  LIBS=$ac_save_LIBS
54072for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
54073do
54074  # Don't even attempt the hair of trying to link an X program!
54075  for ac_extension in a so sl dylib la dll; do
54076    if test -r "$ac_dir/libX11.$ac_extension"; then
54077      ac_x_libraries=$ac_dir
54078      break 2
54079    fi
54080  done
54081done
54082fi
54083rm -f core conftest.err conftest.$ac_objext \
54084    conftest$ac_exeext conftest.$ac_ext
54085fi # $ac_x_libraries = no
54086
54087case $ac_x_includes,$ac_x_libraries in #(
54088  no,* | *,no | *\'*)
54089    # Didn't find X, or a directory has "'" in its name.
54090    ac_cv_have_x="have_x=no";; #(
54091  *)
54092    # Record where we found X for the cache.
54093    ac_cv_have_x="have_x=yes\
54094	ac_x_includes='$ac_x_includes'\
54095	ac_x_libraries='$ac_x_libraries'"
54096esac
54097fi
54098;; #(
54099    *) have_x=yes;;
54100  esac
54101  eval "$ac_cv_have_x"
54102fi # $with_x != no
54103
54104if test "$have_x" != yes; then
54105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
54106$as_echo "$have_x" >&6; }
54107  no_x=yes
54108else
54109  # If each of the values was on the command line, it overrides each guess.
54110  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
54111  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
54112  # Update the cache value to reflect the command line values.
54113  ac_cv_have_x="have_x=yes\
54114	ac_x_includes='$x_includes'\
54115	ac_x_libraries='$x_libraries'"
54116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
54117$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
54118fi
54119
54120    if test "$no_x" = yes; then
54121  # Not all programs may use this symbol, but it does not hurt to define it.
54122
54123$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
54124
54125  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
54126else
54127  if test -n "$x_includes"; then
54128    X_CFLAGS="$X_CFLAGS -I$x_includes"
54129  fi
54130
54131  # It would also be nice to do this for all -L options, not just this one.
54132  if test -n "$x_libraries"; then
54133    X_LIBS="$X_LIBS -L$x_libraries"
54134    # For Solaris; some versions of Sun CC require a space after -R and
54135    # others require no space.  Words are not sufficient . . . .
54136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
54137$as_echo_n "checking whether -R must be followed by a space... " >&6; }
54138    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
54139    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
54140    ac_cxx_werror_flag=yes
54141    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54142/* end confdefs.h.  */
54143
54144int
54145main ()
54146{
54147
54148  ;
54149  return 0;
54150}
54151_ACEOF
54152if ac_fn_cxx_try_link "$LINENO"; then :
54153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54154$as_echo "no" >&6; }
54155       X_LIBS="$X_LIBS -R$x_libraries"
54156else
54157  LIBS="$ac_xsave_LIBS -R $x_libraries"
54158       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54159/* end confdefs.h.  */
54160
54161int
54162main ()
54163{
54164
54165  ;
54166  return 0;
54167}
54168_ACEOF
54169if ac_fn_cxx_try_link "$LINENO"; then :
54170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54171$as_echo "yes" >&6; }
54172	  X_LIBS="$X_LIBS -R $x_libraries"
54173else
54174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
54175$as_echo "neither works" >&6; }
54176fi
54177rm -f core conftest.err conftest.$ac_objext \
54178    conftest$ac_exeext conftest.$ac_ext
54179fi
54180rm -f core conftest.err conftest.$ac_objext \
54181    conftest$ac_exeext conftest.$ac_ext
54182    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
54183    LIBS=$ac_xsave_LIBS
54184  fi
54185
54186  # Check for system-dependent libraries X programs must link with.
54187  # Do this before checking for the system-independent R6 libraries
54188  # (-lICE), since we may need -lsocket or whatever for X linking.
54189
54190  if test "$ISC" = yes; then
54191    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
54192  else
54193    # Martyn Johnson says this is needed for Ultrix, if the X
54194    # libraries were built with DECnet support.  And Karl Berry says
54195    # the Alpha needs dnet_stub (dnet does not exist).
54196    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
54197    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54198/* end confdefs.h.  */
54199
54200/* Override any GCC internal prototype to avoid an error.
54201   Use char because int might match the return type of a GCC
54202   builtin and then its argument prototype would still apply.  */
54203#ifdef __cplusplus
54204extern "C"
54205#endif
54206char XOpenDisplay ();
54207int
54208main ()
54209{
54210return XOpenDisplay ();
54211  ;
54212  return 0;
54213}
54214_ACEOF
54215if ac_fn_cxx_try_link "$LINENO"; then :
54216
54217else
54218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
54219$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
54220if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
54221  $as_echo_n "(cached) " >&6
54222else
54223  ac_check_lib_save_LIBS=$LIBS
54224LIBS="-ldnet  $LIBS"
54225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54226/* end confdefs.h.  */
54227
54228/* Override any GCC internal prototype to avoid an error.
54229   Use char because int might match the return type of a GCC
54230   builtin and then its argument prototype would still apply.  */
54231#ifdef __cplusplus
54232extern "C"
54233#endif
54234char dnet_ntoa ();
54235int
54236main ()
54237{
54238return dnet_ntoa ();
54239  ;
54240  return 0;
54241}
54242_ACEOF
54243if ac_fn_cxx_try_link "$LINENO"; then :
54244  ac_cv_lib_dnet_dnet_ntoa=yes
54245else
54246  ac_cv_lib_dnet_dnet_ntoa=no
54247fi
54248rm -f core conftest.err conftest.$ac_objext \
54249    conftest$ac_exeext conftest.$ac_ext
54250LIBS=$ac_check_lib_save_LIBS
54251fi
54252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
54253$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
54254if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
54255  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
54256fi
54257
54258    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
54259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
54260$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
54261if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
54262  $as_echo_n "(cached) " >&6
54263else
54264  ac_check_lib_save_LIBS=$LIBS
54265LIBS="-ldnet_stub  $LIBS"
54266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54267/* end confdefs.h.  */
54268
54269/* Override any GCC internal prototype to avoid an error.
54270   Use char because int might match the return type of a GCC
54271   builtin and then its argument prototype would still apply.  */
54272#ifdef __cplusplus
54273extern "C"
54274#endif
54275char dnet_ntoa ();
54276int
54277main ()
54278{
54279return dnet_ntoa ();
54280  ;
54281  return 0;
54282}
54283_ACEOF
54284if ac_fn_cxx_try_link "$LINENO"; then :
54285  ac_cv_lib_dnet_stub_dnet_ntoa=yes
54286else
54287  ac_cv_lib_dnet_stub_dnet_ntoa=no
54288fi
54289rm -f core conftest.err conftest.$ac_objext \
54290    conftest$ac_exeext conftest.$ac_ext
54291LIBS=$ac_check_lib_save_LIBS
54292fi
54293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
54294$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
54295if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
54296  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
54297fi
54298
54299    fi
54300fi
54301rm -f core conftest.err conftest.$ac_objext \
54302    conftest$ac_exeext conftest.$ac_ext
54303    LIBS="$ac_xsave_LIBS"
54304
54305    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
54306    # to get the SysV transport functions.
54307    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
54308    # needs -lnsl.
54309    # The nsl library prevents programs from opening the X display
54310    # on Irix 5.2, according to T.E. Dickey.
54311    # The functions gethostbyname, getservbyname, and inet_addr are
54312    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
54313    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
54314if test "x$ac_cv_func_gethostbyname" = xyes; then :
54315
54316fi
54317
54318    if test $ac_cv_func_gethostbyname = no; then
54319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
54320$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
54321if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
54322  $as_echo_n "(cached) " >&6
54323else
54324  ac_check_lib_save_LIBS=$LIBS
54325LIBS="-lnsl  $LIBS"
54326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54327/* end confdefs.h.  */
54328
54329/* Override any GCC internal prototype to avoid an error.
54330   Use char because int might match the return type of a GCC
54331   builtin and then its argument prototype would still apply.  */
54332#ifdef __cplusplus
54333extern "C"
54334#endif
54335char gethostbyname ();
54336int
54337main ()
54338{
54339return gethostbyname ();
54340  ;
54341  return 0;
54342}
54343_ACEOF
54344if ac_fn_cxx_try_link "$LINENO"; then :
54345  ac_cv_lib_nsl_gethostbyname=yes
54346else
54347  ac_cv_lib_nsl_gethostbyname=no
54348fi
54349rm -f core conftest.err conftest.$ac_objext \
54350    conftest$ac_exeext conftest.$ac_ext
54351LIBS=$ac_check_lib_save_LIBS
54352fi
54353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
54354$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
54355if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
54356  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
54357fi
54358
54359      if test $ac_cv_lib_nsl_gethostbyname = no; then
54360	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
54361$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
54362if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
54363  $as_echo_n "(cached) " >&6
54364else
54365  ac_check_lib_save_LIBS=$LIBS
54366LIBS="-lbsd  $LIBS"
54367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54368/* end confdefs.h.  */
54369
54370/* Override any GCC internal prototype to avoid an error.
54371   Use char because int might match the return type of a GCC
54372   builtin and then its argument prototype would still apply.  */
54373#ifdef __cplusplus
54374extern "C"
54375#endif
54376char gethostbyname ();
54377int
54378main ()
54379{
54380return gethostbyname ();
54381  ;
54382  return 0;
54383}
54384_ACEOF
54385if ac_fn_cxx_try_link "$LINENO"; then :
54386  ac_cv_lib_bsd_gethostbyname=yes
54387else
54388  ac_cv_lib_bsd_gethostbyname=no
54389fi
54390rm -f core conftest.err conftest.$ac_objext \
54391    conftest$ac_exeext conftest.$ac_ext
54392LIBS=$ac_check_lib_save_LIBS
54393fi
54394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
54395$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
54396if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
54397  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
54398fi
54399
54400      fi
54401    fi
54402
54403    # lieder@skyler.mavd.honeywell.com says without -lsocket,
54404    # socket/setsockopt and other routines are undefined under SCO ODT
54405    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
54406    # on later versions), says Simon Leinen: it contains gethostby*
54407    # variants that don't use the name server (or something).  -lsocket
54408    # must be given before -lnsl if both are needed.  We assume that
54409    # if connect needs -lnsl, so does gethostbyname.
54410    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
54411if test "x$ac_cv_func_connect" = xyes; then :
54412
54413fi
54414
54415    if test $ac_cv_func_connect = no; then
54416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
54417$as_echo_n "checking for connect in -lsocket... " >&6; }
54418if ${ac_cv_lib_socket_connect+:} false; then :
54419  $as_echo_n "(cached) " >&6
54420else
54421  ac_check_lib_save_LIBS=$LIBS
54422LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
54423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54424/* end confdefs.h.  */
54425
54426/* Override any GCC internal prototype to avoid an error.
54427   Use char because int might match the return type of a GCC
54428   builtin and then its argument prototype would still apply.  */
54429#ifdef __cplusplus
54430extern "C"
54431#endif
54432char connect ();
54433int
54434main ()
54435{
54436return connect ();
54437  ;
54438  return 0;
54439}
54440_ACEOF
54441if ac_fn_cxx_try_link "$LINENO"; then :
54442  ac_cv_lib_socket_connect=yes
54443else
54444  ac_cv_lib_socket_connect=no
54445fi
54446rm -f core conftest.err conftest.$ac_objext \
54447    conftest$ac_exeext conftest.$ac_ext
54448LIBS=$ac_check_lib_save_LIBS
54449fi
54450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
54451$as_echo "$ac_cv_lib_socket_connect" >&6; }
54452if test "x$ac_cv_lib_socket_connect" = xyes; then :
54453  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
54454fi
54455
54456    fi
54457
54458    # Guillermo Gomez says -lposix is necessary on A/UX.
54459    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
54460if test "x$ac_cv_func_remove" = xyes; then :
54461
54462fi
54463
54464    if test $ac_cv_func_remove = no; then
54465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
54466$as_echo_n "checking for remove in -lposix... " >&6; }
54467if ${ac_cv_lib_posix_remove+:} false; then :
54468  $as_echo_n "(cached) " >&6
54469else
54470  ac_check_lib_save_LIBS=$LIBS
54471LIBS="-lposix  $LIBS"
54472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54473/* end confdefs.h.  */
54474
54475/* Override any GCC internal prototype to avoid an error.
54476   Use char because int might match the return type of a GCC
54477   builtin and then its argument prototype would still apply.  */
54478#ifdef __cplusplus
54479extern "C"
54480#endif
54481char remove ();
54482int
54483main ()
54484{
54485return remove ();
54486  ;
54487  return 0;
54488}
54489_ACEOF
54490if ac_fn_cxx_try_link "$LINENO"; then :
54491  ac_cv_lib_posix_remove=yes
54492else
54493  ac_cv_lib_posix_remove=no
54494fi
54495rm -f core conftest.err conftest.$ac_objext \
54496    conftest$ac_exeext conftest.$ac_ext
54497LIBS=$ac_check_lib_save_LIBS
54498fi
54499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
54500$as_echo "$ac_cv_lib_posix_remove" >&6; }
54501if test "x$ac_cv_lib_posix_remove" = xyes; then :
54502  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
54503fi
54504
54505    fi
54506
54507    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
54508    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
54509if test "x$ac_cv_func_shmat" = xyes; then :
54510
54511fi
54512
54513    if test $ac_cv_func_shmat = no; then
54514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
54515$as_echo_n "checking for shmat in -lipc... " >&6; }
54516if ${ac_cv_lib_ipc_shmat+:} false; then :
54517  $as_echo_n "(cached) " >&6
54518else
54519  ac_check_lib_save_LIBS=$LIBS
54520LIBS="-lipc  $LIBS"
54521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54522/* end confdefs.h.  */
54523
54524/* Override any GCC internal prototype to avoid an error.
54525   Use char because int might match the return type of a GCC
54526   builtin and then its argument prototype would still apply.  */
54527#ifdef __cplusplus
54528extern "C"
54529#endif
54530char shmat ();
54531int
54532main ()
54533{
54534return shmat ();
54535  ;
54536  return 0;
54537}
54538_ACEOF
54539if ac_fn_cxx_try_link "$LINENO"; then :
54540  ac_cv_lib_ipc_shmat=yes
54541else
54542  ac_cv_lib_ipc_shmat=no
54543fi
54544rm -f core conftest.err conftest.$ac_objext \
54545    conftest$ac_exeext conftest.$ac_ext
54546LIBS=$ac_check_lib_save_LIBS
54547fi
54548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
54549$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
54550if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
54551  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
54552fi
54553
54554    fi
54555  fi
54556
54557  # Check for libraries that X11R6 Xt/Xaw programs need.
54558  ac_save_LDFLAGS=$LDFLAGS
54559  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
54560  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
54561  # check for ICE first), but we must link in the order -lSM -lICE or
54562  # we get undefined symbols.  So assume we have SM if we have ICE.
54563  # These have to be linked with before -lX11, unlike the other
54564  # libraries we check for below, so use a different variable.
54565  # John Interrante, Karl Berry
54566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
54567$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
54568if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
54569  $as_echo_n "(cached) " >&6
54570else
54571  ac_check_lib_save_LIBS=$LIBS
54572LIBS="-lICE $X_EXTRA_LIBS $LIBS"
54573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54574/* end confdefs.h.  */
54575
54576/* Override any GCC internal prototype to avoid an error.
54577   Use char because int might match the return type of a GCC
54578   builtin and then its argument prototype would still apply.  */
54579#ifdef __cplusplus
54580extern "C"
54581#endif
54582char IceConnectionNumber ();
54583int
54584main ()
54585{
54586return IceConnectionNumber ();
54587  ;
54588  return 0;
54589}
54590_ACEOF
54591if ac_fn_cxx_try_link "$LINENO"; then :
54592  ac_cv_lib_ICE_IceConnectionNumber=yes
54593else
54594  ac_cv_lib_ICE_IceConnectionNumber=no
54595fi
54596rm -f core conftest.err conftest.$ac_objext \
54597    conftest$ac_exeext conftest.$ac_ext
54598LIBS=$ac_check_lib_save_LIBS
54599fi
54600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
54601$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
54602if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
54603  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
54604fi
54605
54606  LDFLAGS=$ac_save_LDFLAGS
54607
54608fi
54609
54610
54611    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
54612    # this doesn't make sense so we remove it.
54613    if test "x$COMPILE_TYPE" = xcross; then
54614      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
54615    fi
54616
54617    if test "x$no_x" = xyes; then
54618
54619  # Print a helpful message on how to acquire the necessary build dependency.
54620  # x11 is the help tag: freetype, cups, alsa etc
54621  MISSING_DEPENDENCY=x11
54622
54623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54624    cygwin_help $MISSING_DEPENDENCY
54625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54626    msys_help $MISSING_DEPENDENCY
54627  else
54628    PKGHANDLER_COMMAND=
54629
54630    case $PKGHANDLER in
54631      apt-get)
54632        apt_help     $MISSING_DEPENDENCY ;;
54633      yum)
54634        yum_help     $MISSING_DEPENDENCY ;;
54635      port)
54636        port_help    $MISSING_DEPENDENCY ;;
54637      pkgutil)
54638        pkgutil_help $MISSING_DEPENDENCY ;;
54639      pkgadd)
54640        pkgadd_help  $MISSING_DEPENDENCY ;;
54641    esac
54642
54643    if test "x$PKGHANDLER_COMMAND" != x; then
54644      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54645    fi
54646  fi
54647
54648      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
54649    fi
54650
54651    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
54652      OPENWIN_HOME="/usr/openwin"
54653      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
54654      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
54655          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
54656          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
54657          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
54658    fi
54659
54660    ac_ext=c
54661ac_cpp='$CPP $CPPFLAGS'
54662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54664ac_compiler_gnu=$ac_cv_c_compiler_gnu
54665
54666    OLD_CFLAGS="$CFLAGS"
54667    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
54668
54669    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
54670    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
54671do :
54672  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
54673ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
54674          # include <X11/Xlib.h>
54675          # include <X11/Xutil.h>
54676
54677
54678"
54679if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54680  cat >>confdefs.h <<_ACEOF
54681#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
54682_ACEOF
54683 X11_HEADERS_OK=yes
54684else
54685  X11_HEADERS_OK=no; break
54686fi
54687
54688done
54689
54690
54691    if test "x$X11_HEADERS_OK" = xno; then
54692
54693  # Print a helpful message on how to acquire the necessary build dependency.
54694  # x11 is the help tag: freetype, cups, alsa etc
54695  MISSING_DEPENDENCY=x11
54696
54697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54698    cygwin_help $MISSING_DEPENDENCY
54699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54700    msys_help $MISSING_DEPENDENCY
54701  else
54702    PKGHANDLER_COMMAND=
54703
54704    case $PKGHANDLER in
54705      apt-get)
54706        apt_help     $MISSING_DEPENDENCY ;;
54707      yum)
54708        yum_help     $MISSING_DEPENDENCY ;;
54709      port)
54710        port_help    $MISSING_DEPENDENCY ;;
54711      pkgutil)
54712        pkgutil_help $MISSING_DEPENDENCY ;;
54713      pkgadd)
54714        pkgadd_help  $MISSING_DEPENDENCY ;;
54715    esac
54716
54717    if test "x$PKGHANDLER_COMMAND" != x; then
54718      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54719    fi
54720  fi
54721
54722      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
54723    fi
54724
54725    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
54726    # defined in libawt_xawt.
54727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
54728$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
54729    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54730/* end confdefs.h.  */
54731#include <X11/extensions/Xrender.h>
54732int
54733main ()
54734{
54735XLinearGradient x;
54736  ;
54737  return 0;
54738}
54739_ACEOF
54740if ac_fn_c_try_compile "$LINENO"; then :
54741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54742$as_echo "yes" >&6; }
54743else
54744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54745$as_echo "no" >&6; }
54746         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
54747fi
54748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54749
54750    CFLAGS="$OLD_CFLAGS"
54751    ac_ext=cpp
54752ac_cpp='$CXXCPP $CPPFLAGS'
54753ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54754ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54755ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54756
54757  fi # NEEDS_LIB_X11
54758
54759
54760
54761
54762
54763
54764# Check whether --with-cups was given.
54765if test "${with_cups+set}" = set; then :
54766  withval=$with_cups;
54767fi
54768
54769
54770# Check whether --with-cups-include was given.
54771if test "${with_cups_include+set}" = set; then :
54772  withval=$with_cups_include;
54773fi
54774
54775
54776  if test "x$NEEDS_LIB_CUPS" = xfalse; then
54777    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
54778        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
54779      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
54780$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
54781    fi
54782    CUPS_CFLAGS=
54783  else
54784    CUPS_FOUND=no
54785
54786    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
54787      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
54788    fi
54789
54790    if test "x${with_cups}" != x; then
54791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
54792$as_echo_n "checking for cups headers... " >&6; }
54793      if test -s "${with_cups}/include/cups/cups.h"; then
54794        CUPS_CFLAGS="-I${with_cups}/include"
54795        CUPS_FOUND=yes
54796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
54797$as_echo "$CUPS_FOUND" >&6; }
54798      else
54799        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
54800      fi
54801    fi
54802    if test "x${with_cups_include}" != x; then
54803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
54804$as_echo_n "checking for cups headers... " >&6; }
54805      if test -s "${with_cups_include}/cups/cups.h"; then
54806        CUPS_CFLAGS="-I${with_cups_include}"
54807        CUPS_FOUND=yes
54808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
54809$as_echo "$CUPS_FOUND" >&6; }
54810      else
54811        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
54812      fi
54813    fi
54814    if test "x$CUPS_FOUND" = xno; then
54815      # Are the cups headers installed in the default /usr/include location?
54816      for ac_header in cups/cups.h cups/ppd.h
54817do :
54818  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
54819ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
54820if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
54821  cat >>confdefs.h <<_ACEOF
54822#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
54823_ACEOF
54824
54825          CUPS_FOUND=yes
54826          CUPS_CFLAGS=
54827          DEFAULT_CUPS=yes
54828
54829fi
54830
54831done
54832
54833    fi
54834    if test "x$CUPS_FOUND" = xno; then
54835      # Getting nervous now? Lets poke around for standard Solaris third-party
54836      # package installation locations.
54837      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
54838$as_echo_n "checking for cups headers... " >&6; }
54839      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
54840        # An SFW package seems to be installed!
54841        CUPS_FOUND=yes
54842        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
54843      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
54844        # A CSW package seems to be installed!
54845        CUPS_FOUND=yes
54846        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
54847      fi
54848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
54849$as_echo "$CUPS_FOUND" >&6; }
54850    fi
54851    if test "x$CUPS_FOUND" = xno; then
54852
54853  # Print a helpful message on how to acquire the necessary build dependency.
54854  # cups is the help tag: freetype, cups, alsa etc
54855  MISSING_DEPENDENCY=cups
54856
54857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54858    cygwin_help $MISSING_DEPENDENCY
54859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54860    msys_help $MISSING_DEPENDENCY
54861  else
54862    PKGHANDLER_COMMAND=
54863
54864    case $PKGHANDLER in
54865      apt-get)
54866        apt_help     $MISSING_DEPENDENCY ;;
54867      yum)
54868        yum_help     $MISSING_DEPENDENCY ;;
54869      port)
54870        port_help    $MISSING_DEPENDENCY ;;
54871      pkgutil)
54872        pkgutil_help $MISSING_DEPENDENCY ;;
54873      pkgadd)
54874        pkgadd_help  $MISSING_DEPENDENCY ;;
54875    esac
54876
54877    if test "x$PKGHANDLER_COMMAND" != x; then
54878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54879    fi
54880  fi
54881
54882      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
54883    fi
54884  fi
54885
54886
54887
54888
54889
54890# Check whether --with-freetype was given.
54891if test "${with_freetype+set}" = set; then :
54892  withval=$with_freetype;
54893fi
54894
54895
54896# Check whether --with-freetype-include was given.
54897if test "${with_freetype_include+set}" = set; then :
54898  withval=$with_freetype_include;
54899fi
54900
54901
54902# Check whether --with-freetype-lib was given.
54903if test "${with_freetype_lib+set}" = set; then :
54904  withval=$with_freetype_lib;
54905fi
54906
54907
54908# Check whether --with-freetype-src was given.
54909if test "${with_freetype_src+set}" = set; then :
54910  withval=$with_freetype_src;
54911fi
54912
54913  # Check whether --enable-freetype-bundling was given.
54914if test "${enable_freetype_bundling+set}" = set; then :
54915  enableval=$enable_freetype_bundling;
54916fi
54917
54918
54919  # Need to specify explicitly since it needs to be overridden on some versions of macosx
54920  FREETYPE_BASE_NAME=freetype
54921  FREETYPE_CFLAGS=
54922  FREETYPE_LIBS=
54923  FREETYPE_BUNDLE_LIB_PATH=
54924
54925  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
54926    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
54927        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
54928        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
54929        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
54930      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
54931$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
54932    fi
54933    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
54934      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
54935$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
54936    fi
54937  else
54938    # freetype is needed to build; go get it!
54939
54940    BUNDLE_FREETYPE="$enable_freetype_bundling"
54941
54942    if  test "x$with_freetype_src" != x; then
54943      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54944        # Try to build freetype if --with-freetype-src was given on Windows
54945
54946  FREETYPE_SRC_PATH="$with_freetype_src"
54947  BUILD_FREETYPE=yes
54948
54949  # Check if the freetype sources are acessible..
54950  if ! test -d $FREETYPE_SRC_PATH; then
54951    { $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
54952$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54953    BUILD_FREETYPE=no
54954  fi
54955  # ..and contain a vc2010 project file
54956  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54957  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54958    { $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
54959$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54960    BUILD_FREETYPE=no
54961  fi
54962  # Now check if configure found a version of 'msbuild.exe'
54963  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54964    { $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
54965$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;}
54966    BUILD_FREETYPE=no
54967  fi
54968
54969  # Ready to go..
54970  if test "x$BUILD_FREETYPE" = xyes; then
54971    # msbuild requires trailing slashes for output directories
54972    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54973    freetype_lib_path_unix="$freetype_lib_path"
54974    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54975
54976  unix_path="$vcxproj_path"
54977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54978    windows_path=`$CYGPATH -m "$unix_path"`
54979    vcxproj_path="$windows_path"
54980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54981    windows_path=`cmd //c echo $unix_path`
54982    vcxproj_path="$windows_path"
54983  fi
54984
54985
54986  unix_path="$freetype_lib_path"
54987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54988    windows_path=`$CYGPATH -m "$unix_path"`
54989    freetype_lib_path="$windows_path"
54990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54991    windows_path=`cmd //c echo $unix_path`
54992    freetype_lib_path="$windows_path"
54993  fi
54994
54995
54996  unix_path="$freetype_obj_path"
54997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54998    windows_path=`$CYGPATH -m "$unix_path"`
54999    freetype_obj_path="$windows_path"
55000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001    windows_path=`cmd //c echo $unix_path`
55002    freetype_obj_path="$windows_path"
55003  fi
55004
55005    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55006      freetype_platform=x64
55007    else
55008      freetype_platform=win32
55009    fi
55010
55011    # The original freetype project file is for VS 2010 (i.e. 'v100'),
55012    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
55013    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
55014    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
55015    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
55016$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
55017
55018    # First we try to build the freetype.dll
55019    $ECHO -e "@echo off\n"\
55020        "$MSBUILD $vcxproj_path "\
55021        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55022        "/p:Configuration=\"Release Multithreaded\" "\
55023        "/p:Platform=$freetype_platform "\
55024        "/p:ConfigurationType=DynamicLibrary "\
55025        "/p:TargetName=freetype "\
55026        "/p:OutDir=\"$freetype_lib_path\" "\
55027        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
55028    cmd /c freetype.bat
55029
55030    if test -s "$freetype_lib_path_unix/freetype.dll"; then
55031      # If that succeeds we also build freetype.lib
55032      $ECHO -e "@echo off\n"\
55033          "$MSBUILD $vcxproj_path "\
55034          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55035          "/p:Configuration=\"Release Multithreaded\" "\
55036          "/p:Platform=$freetype_platform "\
55037          "/p:ConfigurationType=StaticLibrary "\
55038          "/p:TargetName=freetype "\
55039          "/p:OutDir=\"$freetype_lib_path\" "\
55040          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
55041      cmd /c freetype.bat
55042
55043      if test -s "$freetype_lib_path_unix/freetype.lib"; then
55044        # Once we build both, lib and dll, set freetype lib and include path appropriately
55045        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
55046        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
55047        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
55048$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
55049      else
55050        BUILD_FREETYPE=no
55051      fi
55052    else
55053      BUILD_FREETYPE=no
55054    fi
55055  fi
55056
55057        if test "x$BUILD_FREETYPE" = xyes; then
55058          # Okay, we built it. Check that it works.
55059
55060  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55061  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55062  METHOD="--with-freetype-src"
55063
55064  # Let's start with an optimistic view of the world :-)
55065  FOUND_FREETYPE=yes
55066
55067  # First look for the canonical freetype main include file ft2build.h.
55068  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55069    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55070    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55071    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55072      # Fail.
55073      FOUND_FREETYPE=no
55074    fi
55075  fi
55076
55077  if test "x$FOUND_FREETYPE" = xyes; then
55078    # Include file found, let's continue the sanity check.
55079    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55080$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55081
55082    # Reset to default value
55083    FREETYPE_BASE_NAME=freetype
55084    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55085    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55086      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55087          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55088        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55089        # for the .6 version explicitly.
55090        FREETYPE_BASE_NAME=freetype.6
55091        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55092        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55093$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55094      else
55095        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55097        FOUND_FREETYPE=no
55098      fi
55099    else
55100      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55101        # On Windows, we will need both .lib and .dll file.
55102        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55103          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55104$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55105          FOUND_FREETYPE=no
55106        fi
55107      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55108          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55109        # Found lib in isa dir, use that instead.
55110        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55111        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55112$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55113      fi
55114    fi
55115  fi
55116
55117  if test "x$FOUND_FREETYPE" = xyes; then
55118
55119  # Only process if variable expands to non-empty
55120
55121  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55123
55124  # Input might be given as Windows format, start by converting to
55125  # unix format.
55126  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55127  new_path=`$CYGPATH -u "$path"`
55128
55129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55132  # "foo.exe" is OK but "foo" is an error.
55133  #
55134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55135  # It is also a way to make sure we got the proper file name for the real test later on.
55136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55137  if test "x$test_shortpath" = x; then
55138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55140    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55141  fi
55142
55143  # Call helper function which possibly converts this using DOS-style short mode.
55144  # If so, the updated path is stored in $new_path.
55145
55146  input_path="$new_path"
55147  # Check if we need to convert this using DOS-style short mode. If the path
55148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55149  # take no chances and rewrite it.
55150  # Note: m4 eats our [], so we need to use [ and ] instead.
55151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55152  if test "x$has_forbidden_chars" != x; then
55153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55157      # Going to short mode and back again did indeed matter. Since short mode is
55158      # case insensitive, let's make it lowercase to improve readability.
55159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55160      # Now convert it back to Unix-style (cygpath)
55161      input_path=`$CYGPATH -u "$shortmode_path"`
55162      new_path="$input_path"
55163    fi
55164  fi
55165
55166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55167  if test "x$test_cygdrive_prefix" = x; then
55168    # As a simple fix, exclude /usr/bin since it's not a real path.
55169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55171      # a path prefixed by /cygdrive for fixpath to work.
55172      new_path="$CYGWIN_ROOT_PATH$input_path"
55173    fi
55174  fi
55175
55176
55177  if test "x$path" != "x$new_path"; then
55178    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55181  fi
55182
55183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55184
55185  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55186  has_colon=`$ECHO $path | $GREP ^.:`
55187  new_path="$path"
55188  if test "x$has_colon" = x; then
55189    # Not in mixed or Windows style, start by that.
55190    new_path=`cmd //c echo $path`
55191  fi
55192
55193
55194  input_path="$new_path"
55195  # Check if we need to convert this using DOS-style short mode. If the path
55196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55197  # take no chances and rewrite it.
55198  # Note: m4 eats our [], so we need to use [ and ] instead.
55199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55200  if test "x$has_forbidden_chars" != x; then
55201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55203  fi
55204
55205
55206  windows_path="$new_path"
55207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55208    unix_path=`$CYGPATH -u "$windows_path"`
55209    new_path="$unix_path"
55210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55212    new_path="$unix_path"
55213  fi
55214
55215  if test "x$path" != "x$new_path"; then
55216    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55219  fi
55220
55221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55223
55224    else
55225      # We're on a unix platform. Hooray! :)
55226      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55227      has_space=`$ECHO "$path" | $GREP " "`
55228      if test "x$has_space" != x; then
55229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55232      fi
55233
55234      # Use eval to expand a potential ~
55235      eval path="$path"
55236      if test ! -f "$path" && test ! -d "$path"; then
55237        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55238      fi
55239
55240      if test -d "$path"; then
55241        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55242      else
55243        dir="`$DIRNAME "$path"`"
55244        base="`$BASENAME "$path"`"
55245        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55246      fi
55247    fi
55248  fi
55249
55250
55251  # Only process if variable expands to non-empty
55252
55253  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55255
55256  # Input might be given as Windows format, start by converting to
55257  # unix format.
55258  path="$POTENTIAL_FREETYPE_LIB_PATH"
55259  new_path=`$CYGPATH -u "$path"`
55260
55261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55264  # "foo.exe" is OK but "foo" is an error.
55265  #
55266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55267  # It is also a way to make sure we got the proper file name for the real test later on.
55268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55269  if test "x$test_shortpath" = x; then
55270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55272    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55273  fi
55274
55275  # Call helper function which possibly converts this using DOS-style short mode.
55276  # If so, the updated path is stored in $new_path.
55277
55278  input_path="$new_path"
55279  # Check if we need to convert this using DOS-style short mode. If the path
55280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55281  # take no chances and rewrite it.
55282  # Note: m4 eats our [], so we need to use [ and ] instead.
55283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55284  if test "x$has_forbidden_chars" != x; then
55285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55289      # Going to short mode and back again did indeed matter. Since short mode is
55290      # case insensitive, let's make it lowercase to improve readability.
55291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55292      # Now convert it back to Unix-style (cygpath)
55293      input_path=`$CYGPATH -u "$shortmode_path"`
55294      new_path="$input_path"
55295    fi
55296  fi
55297
55298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55299  if test "x$test_cygdrive_prefix" = x; then
55300    # As a simple fix, exclude /usr/bin since it's not a real path.
55301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55303      # a path prefixed by /cygdrive for fixpath to work.
55304      new_path="$CYGWIN_ROOT_PATH$input_path"
55305    fi
55306  fi
55307
55308
55309  if test "x$path" != "x$new_path"; then
55310    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55313  fi
55314
55315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55316
55317  path="$POTENTIAL_FREETYPE_LIB_PATH"
55318  has_colon=`$ECHO $path | $GREP ^.:`
55319  new_path="$path"
55320  if test "x$has_colon" = x; then
55321    # Not in mixed or Windows style, start by that.
55322    new_path=`cmd //c echo $path`
55323  fi
55324
55325
55326  input_path="$new_path"
55327  # Check if we need to convert this using DOS-style short mode. If the path
55328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55329  # take no chances and rewrite it.
55330  # Note: m4 eats our [], so we need to use [ and ] instead.
55331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55332  if test "x$has_forbidden_chars" != x; then
55333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55335  fi
55336
55337
55338  windows_path="$new_path"
55339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55340    unix_path=`$CYGPATH -u "$windows_path"`
55341    new_path="$unix_path"
55342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55344    new_path="$unix_path"
55345  fi
55346
55347  if test "x$path" != "x$new_path"; then
55348    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55351  fi
55352
55353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55355
55356    else
55357      # We're on a unix platform. Hooray! :)
55358      path="$POTENTIAL_FREETYPE_LIB_PATH"
55359      has_space=`$ECHO "$path" | $GREP " "`
55360      if test "x$has_space" != x; then
55361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55364      fi
55365
55366      # Use eval to expand a potential ~
55367      eval path="$path"
55368      if test ! -f "$path" && test ! -d "$path"; then
55369        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55370      fi
55371
55372      if test -d "$path"; then
55373        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55374      else
55375        dir="`$DIRNAME "$path"`"
55376        base="`$BASENAME "$path"`"
55377        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55378      fi
55379    fi
55380  fi
55381
55382
55383    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55385$as_echo_n "checking for freetype includes... " >&6; }
55386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55387$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55388    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55390$as_echo_n "checking for freetype libraries... " >&6; }
55391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55392$as_echo "$FREETYPE_LIB_PATH" >&6; }
55393  fi
55394
55395          if test "x$FOUND_FREETYPE" != xyes; then
55396            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
55397          fi
55398        else
55399          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
55400$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
55401          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
55402        fi
55403      else
55404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
55405$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
55406      fi
55407    fi
55408
55409    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
55410      # User has specified settings
55411
55412      if test "x$BUNDLE_FREETYPE" = x; then
55413        # If not specified, default is to bundle freetype
55414        BUNDLE_FREETYPE=yes
55415      fi
55416
55417      if test "x$with_freetype" != x; then
55418        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
55419        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
55420      fi
55421
55422      # Allow --with-freetype-lib and --with-freetype-include to override
55423      if test "x$with_freetype_include" != x; then
55424        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
55425      fi
55426      if test "x$with_freetype_lib" != x; then
55427        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
55428      fi
55429
55430      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55431        # Okay, we got it. Check that it works.
55432
55433  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55434  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55435  METHOD="--with-freetype"
55436
55437  # Let's start with an optimistic view of the world :-)
55438  FOUND_FREETYPE=yes
55439
55440  # First look for the canonical freetype main include file ft2build.h.
55441  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55442    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55443    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55444    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55445      # Fail.
55446      FOUND_FREETYPE=no
55447    fi
55448  fi
55449
55450  if test "x$FOUND_FREETYPE" = xyes; then
55451    # Include file found, let's continue the sanity check.
55452    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55453$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55454
55455    # Reset to default value
55456    FREETYPE_BASE_NAME=freetype
55457    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55458    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55459      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55460          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55461        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55462        # for the .6 version explicitly.
55463        FREETYPE_BASE_NAME=freetype.6
55464        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55465        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55466$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55467      else
55468        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55470        FOUND_FREETYPE=no
55471      fi
55472    else
55473      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55474        # On Windows, we will need both .lib and .dll file.
55475        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55476          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55478          FOUND_FREETYPE=no
55479        fi
55480      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55481          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55482        # Found lib in isa dir, use that instead.
55483        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55484        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55485$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55486      fi
55487    fi
55488  fi
55489
55490  if test "x$FOUND_FREETYPE" = xyes; then
55491
55492  # Only process if variable expands to non-empty
55493
55494  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55496
55497  # Input might be given as Windows format, start by converting to
55498  # unix format.
55499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55500  new_path=`$CYGPATH -u "$path"`
55501
55502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55505  # "foo.exe" is OK but "foo" is an error.
55506  #
55507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55508  # It is also a way to make sure we got the proper file name for the real test later on.
55509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55510  if test "x$test_shortpath" = x; then
55511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55513    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55514  fi
55515
55516  # Call helper function which possibly converts this using DOS-style short mode.
55517  # If so, the updated path is stored in $new_path.
55518
55519  input_path="$new_path"
55520  # Check if we need to convert this using DOS-style short mode. If the path
55521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55522  # take no chances and rewrite it.
55523  # Note: m4 eats our [], so we need to use [ and ] instead.
55524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55525  if test "x$has_forbidden_chars" != x; then
55526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55530      # Going to short mode and back again did indeed matter. Since short mode is
55531      # case insensitive, let's make it lowercase to improve readability.
55532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55533      # Now convert it back to Unix-style (cygpath)
55534      input_path=`$CYGPATH -u "$shortmode_path"`
55535      new_path="$input_path"
55536    fi
55537  fi
55538
55539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55540  if test "x$test_cygdrive_prefix" = x; then
55541    # As a simple fix, exclude /usr/bin since it's not a real path.
55542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55544      # a path prefixed by /cygdrive for fixpath to work.
55545      new_path="$CYGWIN_ROOT_PATH$input_path"
55546    fi
55547  fi
55548
55549
55550  if test "x$path" != "x$new_path"; then
55551    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55554  fi
55555
55556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55557
55558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55559  has_colon=`$ECHO $path | $GREP ^.:`
55560  new_path="$path"
55561  if test "x$has_colon" = x; then
55562    # Not in mixed or Windows style, start by that.
55563    new_path=`cmd //c echo $path`
55564  fi
55565
55566
55567  input_path="$new_path"
55568  # Check if we need to convert this using DOS-style short mode. If the path
55569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55570  # take no chances and rewrite it.
55571  # Note: m4 eats our [], so we need to use [ and ] instead.
55572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55573  if test "x$has_forbidden_chars" != x; then
55574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55576  fi
55577
55578
55579  windows_path="$new_path"
55580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55581    unix_path=`$CYGPATH -u "$windows_path"`
55582    new_path="$unix_path"
55583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55585    new_path="$unix_path"
55586  fi
55587
55588  if test "x$path" != "x$new_path"; then
55589    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55592  fi
55593
55594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55596
55597    else
55598      # We're on a unix platform. Hooray! :)
55599      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55600      has_space=`$ECHO "$path" | $GREP " "`
55601      if test "x$has_space" != x; then
55602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55605      fi
55606
55607      # Use eval to expand a potential ~
55608      eval path="$path"
55609      if test ! -f "$path" && test ! -d "$path"; then
55610        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55611      fi
55612
55613      if test -d "$path"; then
55614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55615      else
55616        dir="`$DIRNAME "$path"`"
55617        base="`$BASENAME "$path"`"
55618        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55619      fi
55620    fi
55621  fi
55622
55623
55624  # Only process if variable expands to non-empty
55625
55626  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55628
55629  # Input might be given as Windows format, start by converting to
55630  # unix format.
55631  path="$POTENTIAL_FREETYPE_LIB_PATH"
55632  new_path=`$CYGPATH -u "$path"`
55633
55634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55637  # "foo.exe" is OK but "foo" is an error.
55638  #
55639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55640  # It is also a way to make sure we got the proper file name for the real test later on.
55641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55642  if test "x$test_shortpath" = x; then
55643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55645    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55646  fi
55647
55648  # Call helper function which possibly converts this using DOS-style short mode.
55649  # If so, the updated path is stored in $new_path.
55650
55651  input_path="$new_path"
55652  # Check if we need to convert this using DOS-style short mode. If the path
55653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55654  # take no chances and rewrite it.
55655  # Note: m4 eats our [], so we need to use [ and ] instead.
55656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55657  if test "x$has_forbidden_chars" != x; then
55658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55662      # Going to short mode and back again did indeed matter. Since short mode is
55663      # case insensitive, let's make it lowercase to improve readability.
55664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55665      # Now convert it back to Unix-style (cygpath)
55666      input_path=`$CYGPATH -u "$shortmode_path"`
55667      new_path="$input_path"
55668    fi
55669  fi
55670
55671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55672  if test "x$test_cygdrive_prefix" = x; then
55673    # As a simple fix, exclude /usr/bin since it's not a real path.
55674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55676      # a path prefixed by /cygdrive for fixpath to work.
55677      new_path="$CYGWIN_ROOT_PATH$input_path"
55678    fi
55679  fi
55680
55681
55682  if test "x$path" != "x$new_path"; then
55683    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55686  fi
55687
55688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55689
55690  path="$POTENTIAL_FREETYPE_LIB_PATH"
55691  has_colon=`$ECHO $path | $GREP ^.:`
55692  new_path="$path"
55693  if test "x$has_colon" = x; then
55694    # Not in mixed or Windows style, start by that.
55695    new_path=`cmd //c echo $path`
55696  fi
55697
55698
55699  input_path="$new_path"
55700  # Check if we need to convert this using DOS-style short mode. If the path
55701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55702  # take no chances and rewrite it.
55703  # Note: m4 eats our [], so we need to use [ and ] instead.
55704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55705  if test "x$has_forbidden_chars" != x; then
55706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55708  fi
55709
55710
55711  windows_path="$new_path"
55712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55713    unix_path=`$CYGPATH -u "$windows_path"`
55714    new_path="$unix_path"
55715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55717    new_path="$unix_path"
55718  fi
55719
55720  if test "x$path" != "x$new_path"; then
55721    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55724  fi
55725
55726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55728
55729    else
55730      # We're on a unix platform. Hooray! :)
55731      path="$POTENTIAL_FREETYPE_LIB_PATH"
55732      has_space=`$ECHO "$path" | $GREP " "`
55733      if test "x$has_space" != x; then
55734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55737      fi
55738
55739      # Use eval to expand a potential ~
55740      eval path="$path"
55741      if test ! -f "$path" && test ! -d "$path"; then
55742        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55743      fi
55744
55745      if test -d "$path"; then
55746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55747      else
55748        dir="`$DIRNAME "$path"`"
55749        base="`$BASENAME "$path"`"
55750        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55751      fi
55752    fi
55753  fi
55754
55755
55756    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55758$as_echo_n "checking for freetype includes... " >&6; }
55759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55760$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55761    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55763$as_echo_n "checking for freetype libraries... " >&6; }
55764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55765$as_echo "$FREETYPE_LIB_PATH" >&6; }
55766  fi
55767
55768        if test "x$FOUND_FREETYPE" != xyes; then
55769          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
55770        fi
55771      else
55772        # User specified only one of lib or include. This is an error.
55773        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
55774          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
55775$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
55776          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
55777        else
55778          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
55779$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
55780          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
55781        fi
55782      fi
55783    else
55784      # User did not specify settings, but we need freetype. Try to locate it.
55785
55786      if test "x$BUNDLE_FREETYPE" = x; then
55787        # If not specified, default is to bundle freetype only on windows
55788        if test "x$OPENJDK_TARGET_OS" = xwindows; then
55789          BUNDLE_FREETYPE=yes
55790        else
55791          BUNDLE_FREETYPE=no
55792        fi
55793      fi
55794
55795      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
55796      if test "x$SYSROOT" = x; then
55797        if test "x$FOUND_FREETYPE" != xyes; then
55798          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
55799          if test "x$PKG_CONFIG" != x; then
55800
55801pkg_failed=no
55802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
55803$as_echo_n "checking for FREETYPE... " >&6; }
55804
55805if test -n "$FREETYPE_CFLAGS"; then
55806    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
55807 elif test -n "$PKG_CONFIG"; then
55808    if test -n "$PKG_CONFIG" && \
55809    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
55810  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
55811  ac_status=$?
55812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55813  test $ac_status = 0; }; then
55814  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
55815else
55816  pkg_failed=yes
55817fi
55818 else
55819    pkg_failed=untried
55820fi
55821if test -n "$FREETYPE_LIBS"; then
55822    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
55823 elif test -n "$PKG_CONFIG"; then
55824    if test -n "$PKG_CONFIG" && \
55825    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
55826  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
55827  ac_status=$?
55828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55829  test $ac_status = 0; }; then
55830  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
55831else
55832  pkg_failed=yes
55833fi
55834 else
55835    pkg_failed=untried
55836fi
55837
55838
55839
55840if test $pkg_failed = yes; then
55841
55842if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55843        _pkg_short_errors_supported=yes
55844else
55845        _pkg_short_errors_supported=no
55846fi
55847        if test $_pkg_short_errors_supported = yes; then
55848	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
55849        else
55850	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
55851        fi
55852	# Put the nasty error message in config.log where it belongs
55853	echo "$FREETYPE_PKG_ERRORS" >&5
55854
55855	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55856$as_echo "no" >&6; }
55857                FOUND_FREETYPE=no
55858elif test $pkg_failed = untried; then
55859	FOUND_FREETYPE=no
55860else
55861	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
55862	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
55863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55864$as_echo "yes" >&6; }
55865	FOUND_FREETYPE=yes
55866fi
55867            if test "x$FOUND_FREETYPE" = xyes; then
55868              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
55869              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
55870              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
55871              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
55872                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
55873              fi
55874              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
55875              if test "x$BUNDLE_FREETYPE" = xyes; then
55876                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
55877$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
55878                FOUND_FREETYPE=no
55879              else
55880                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
55881$as_echo_n "checking for freetype... " >&6; }
55882                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
55883$as_echo "yes (using pkg-config)" >&6; }
55884              fi
55885            fi
55886          fi
55887        fi
55888      fi
55889
55890      if test "x$FOUND_FREETYPE" != xyes; then
55891        # Check in well-known locations
55892        if test "x$OPENJDK_TARGET_OS" = xwindows; then
55893          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
55894
55895  windows_path="$FREETYPE_BASE_DIR"
55896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55897    unix_path=`$CYGPATH -u "$windows_path"`
55898    FREETYPE_BASE_DIR="$unix_path"
55899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55901    FREETYPE_BASE_DIR="$unix_path"
55902  fi
55903
55904
55905  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55906  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55907  METHOD="well-known location"
55908
55909  # Let's start with an optimistic view of the world :-)
55910  FOUND_FREETYPE=yes
55911
55912  # First look for the canonical freetype main include file ft2build.h.
55913  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55914    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55915    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55916    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55917      # Fail.
55918      FOUND_FREETYPE=no
55919    fi
55920  fi
55921
55922  if test "x$FOUND_FREETYPE" = xyes; then
55923    # Include file found, let's continue the sanity check.
55924    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55925$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55926
55927    # Reset to default value
55928    FREETYPE_BASE_NAME=freetype
55929    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55930    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55931      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55932          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55933        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55934        # for the .6 version explicitly.
55935        FREETYPE_BASE_NAME=freetype.6
55936        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55937        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55938$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55939      else
55940        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55941$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55942        FOUND_FREETYPE=no
55943      fi
55944    else
55945      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55946        # On Windows, we will need both .lib and .dll file.
55947        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55948          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55949$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55950          FOUND_FREETYPE=no
55951        fi
55952      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55953          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55954        # Found lib in isa dir, use that instead.
55955        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55956        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55957$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55958      fi
55959    fi
55960  fi
55961
55962  if test "x$FOUND_FREETYPE" = xyes; then
55963
55964  # Only process if variable expands to non-empty
55965
55966  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55968
55969  # Input might be given as Windows format, start by converting to
55970  # unix format.
55971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55972  new_path=`$CYGPATH -u "$path"`
55973
55974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55977  # "foo.exe" is OK but "foo" is an error.
55978  #
55979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55980  # It is also a way to make sure we got the proper file name for the real test later on.
55981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55982  if test "x$test_shortpath" = x; then
55983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55985    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55986  fi
55987
55988  # Call helper function which possibly converts this using DOS-style short mode.
55989  # If so, the updated path is stored in $new_path.
55990
55991  input_path="$new_path"
55992  # Check if we need to convert this using DOS-style short mode. If the path
55993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55994  # take no chances and rewrite it.
55995  # Note: m4 eats our [], so we need to use [ and ] instead.
55996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55997  if test "x$has_forbidden_chars" != x; then
55998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56002      # Going to short mode and back again did indeed matter. Since short mode is
56003      # case insensitive, let's make it lowercase to improve readability.
56004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56005      # Now convert it back to Unix-style (cygpath)
56006      input_path=`$CYGPATH -u "$shortmode_path"`
56007      new_path="$input_path"
56008    fi
56009  fi
56010
56011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56012  if test "x$test_cygdrive_prefix" = x; then
56013    # As a simple fix, exclude /usr/bin since it's not a real path.
56014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56016      # a path prefixed by /cygdrive for fixpath to work.
56017      new_path="$CYGWIN_ROOT_PATH$input_path"
56018    fi
56019  fi
56020
56021
56022  if test "x$path" != "x$new_path"; then
56023    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56025$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56026  fi
56027
56028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56029
56030  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56031  has_colon=`$ECHO $path | $GREP ^.:`
56032  new_path="$path"
56033  if test "x$has_colon" = x; then
56034    # Not in mixed or Windows style, start by that.
56035    new_path=`cmd //c echo $path`
56036  fi
56037
56038
56039  input_path="$new_path"
56040  # Check if we need to convert this using DOS-style short mode. If the path
56041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56042  # take no chances and rewrite it.
56043  # Note: m4 eats our [], so we need to use [ and ] instead.
56044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56045  if test "x$has_forbidden_chars" != x; then
56046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56048  fi
56049
56050
56051  windows_path="$new_path"
56052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56053    unix_path=`$CYGPATH -u "$windows_path"`
56054    new_path="$unix_path"
56055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56057    new_path="$unix_path"
56058  fi
56059
56060  if test "x$path" != "x$new_path"; then
56061    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56064  fi
56065
56066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56068
56069    else
56070      # We're on a unix platform. Hooray! :)
56071      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56072      has_space=`$ECHO "$path" | $GREP " "`
56073      if test "x$has_space" != x; then
56074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56075$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56077      fi
56078
56079      # Use eval to expand a potential ~
56080      eval path="$path"
56081      if test ! -f "$path" && test ! -d "$path"; then
56082        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56083      fi
56084
56085      if test -d "$path"; then
56086        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56087      else
56088        dir="`$DIRNAME "$path"`"
56089        base="`$BASENAME "$path"`"
56090        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56091      fi
56092    fi
56093  fi
56094
56095
56096  # Only process if variable expands to non-empty
56097
56098  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56100
56101  # Input might be given as Windows format, start by converting to
56102  # unix format.
56103  path="$POTENTIAL_FREETYPE_LIB_PATH"
56104  new_path=`$CYGPATH -u "$path"`
56105
56106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56109  # "foo.exe" is OK but "foo" is an error.
56110  #
56111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56112  # It is also a way to make sure we got the proper file name for the real test later on.
56113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56114  if test "x$test_shortpath" = x; then
56115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56117    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56118  fi
56119
56120  # Call helper function which possibly converts this using DOS-style short mode.
56121  # If so, the updated path is stored in $new_path.
56122
56123  input_path="$new_path"
56124  # Check if we need to convert this using DOS-style short mode. If the path
56125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56126  # take no chances and rewrite it.
56127  # Note: m4 eats our [], so we need to use [ and ] instead.
56128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56129  if test "x$has_forbidden_chars" != x; then
56130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56134      # Going to short mode and back again did indeed matter. Since short mode is
56135      # case insensitive, let's make it lowercase to improve readability.
56136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56137      # Now convert it back to Unix-style (cygpath)
56138      input_path=`$CYGPATH -u "$shortmode_path"`
56139      new_path="$input_path"
56140    fi
56141  fi
56142
56143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56144  if test "x$test_cygdrive_prefix" = x; then
56145    # As a simple fix, exclude /usr/bin since it's not a real path.
56146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56148      # a path prefixed by /cygdrive for fixpath to work.
56149      new_path="$CYGWIN_ROOT_PATH$input_path"
56150    fi
56151  fi
56152
56153
56154  if test "x$path" != "x$new_path"; then
56155    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56157$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56158  fi
56159
56160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56161
56162  path="$POTENTIAL_FREETYPE_LIB_PATH"
56163  has_colon=`$ECHO $path | $GREP ^.:`
56164  new_path="$path"
56165  if test "x$has_colon" = x; then
56166    # Not in mixed or Windows style, start by that.
56167    new_path=`cmd //c echo $path`
56168  fi
56169
56170
56171  input_path="$new_path"
56172  # Check if we need to convert this using DOS-style short mode. If the path
56173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56174  # take no chances and rewrite it.
56175  # Note: m4 eats our [], so we need to use [ and ] instead.
56176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56177  if test "x$has_forbidden_chars" != x; then
56178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56180  fi
56181
56182
56183  windows_path="$new_path"
56184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56185    unix_path=`$CYGPATH -u "$windows_path"`
56186    new_path="$unix_path"
56187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56189    new_path="$unix_path"
56190  fi
56191
56192  if test "x$path" != "x$new_path"; then
56193    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56195$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56196  fi
56197
56198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56200
56201    else
56202      # We're on a unix platform. Hooray! :)
56203      path="$POTENTIAL_FREETYPE_LIB_PATH"
56204      has_space=`$ECHO "$path" | $GREP " "`
56205      if test "x$has_space" != x; then
56206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56207$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56209      fi
56210
56211      # Use eval to expand a potential ~
56212      eval path="$path"
56213      if test ! -f "$path" && test ! -d "$path"; then
56214        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56215      fi
56216
56217      if test -d "$path"; then
56218        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56219      else
56220        dir="`$DIRNAME "$path"`"
56221        base="`$BASENAME "$path"`"
56222        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56223      fi
56224    fi
56225  fi
56226
56227
56228    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56230$as_echo_n "checking for freetype includes... " >&6; }
56231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56232$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56233    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56235$as_echo_n "checking for freetype libraries... " >&6; }
56236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56237$as_echo "$FREETYPE_LIB_PATH" >&6; }
56238  fi
56239
56240          if test "x$FOUND_FREETYPE" != xyes; then
56241            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
56242
56243  windows_path="$FREETYPE_BASE_DIR"
56244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56245    unix_path=`$CYGPATH -u "$windows_path"`
56246    FREETYPE_BASE_DIR="$unix_path"
56247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56249    FREETYPE_BASE_DIR="$unix_path"
56250  fi
56251
56252
56253  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56254  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56255  METHOD="well-known location"
56256
56257  # Let's start with an optimistic view of the world :-)
56258  FOUND_FREETYPE=yes
56259
56260  # First look for the canonical freetype main include file ft2build.h.
56261  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56262    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56263    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56264    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56265      # Fail.
56266      FOUND_FREETYPE=no
56267    fi
56268  fi
56269
56270  if test "x$FOUND_FREETYPE" = xyes; then
56271    # Include file found, let's continue the sanity check.
56272    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56273$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56274
56275    # Reset to default value
56276    FREETYPE_BASE_NAME=freetype
56277    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56278    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56279      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56280          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56281        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56282        # for the .6 version explicitly.
56283        FREETYPE_BASE_NAME=freetype.6
56284        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56285        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56286$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56287      else
56288        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56289$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56290        FOUND_FREETYPE=no
56291      fi
56292    else
56293      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56294        # On Windows, we will need both .lib and .dll file.
56295        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56296          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56297$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56298          FOUND_FREETYPE=no
56299        fi
56300      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56301          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56302        # Found lib in isa dir, use that instead.
56303        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56304        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56305$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56306      fi
56307    fi
56308  fi
56309
56310  if test "x$FOUND_FREETYPE" = xyes; then
56311
56312  # Only process if variable expands to non-empty
56313
56314  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56316
56317  # Input might be given as Windows format, start by converting to
56318  # unix format.
56319  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56320  new_path=`$CYGPATH -u "$path"`
56321
56322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56325  # "foo.exe" is OK but "foo" is an error.
56326  #
56327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56328  # It is also a way to make sure we got the proper file name for the real test later on.
56329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56330  if test "x$test_shortpath" = x; then
56331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56333    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56334  fi
56335
56336  # Call helper function which possibly converts this using DOS-style short mode.
56337  # If so, the updated path is stored in $new_path.
56338
56339  input_path="$new_path"
56340  # Check if we need to convert this using DOS-style short mode. If the path
56341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56342  # take no chances and rewrite it.
56343  # Note: m4 eats our [], so we need to use [ and ] instead.
56344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56345  if test "x$has_forbidden_chars" != x; then
56346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56350      # Going to short mode and back again did indeed matter. Since short mode is
56351      # case insensitive, let's make it lowercase to improve readability.
56352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56353      # Now convert it back to Unix-style (cygpath)
56354      input_path=`$CYGPATH -u "$shortmode_path"`
56355      new_path="$input_path"
56356    fi
56357  fi
56358
56359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56360  if test "x$test_cygdrive_prefix" = x; then
56361    # As a simple fix, exclude /usr/bin since it's not a real path.
56362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56364      # a path prefixed by /cygdrive for fixpath to work.
56365      new_path="$CYGWIN_ROOT_PATH$input_path"
56366    fi
56367  fi
56368
56369
56370  if test "x$path" != "x$new_path"; then
56371    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56373$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56374  fi
56375
56376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56377
56378  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56379  has_colon=`$ECHO $path | $GREP ^.:`
56380  new_path="$path"
56381  if test "x$has_colon" = x; then
56382    # Not in mixed or Windows style, start by that.
56383    new_path=`cmd //c echo $path`
56384  fi
56385
56386
56387  input_path="$new_path"
56388  # Check if we need to convert this using DOS-style short mode. If the path
56389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56390  # take no chances and rewrite it.
56391  # Note: m4 eats our [], so we need to use [ and ] instead.
56392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56393  if test "x$has_forbidden_chars" != x; then
56394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56396  fi
56397
56398
56399  windows_path="$new_path"
56400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56401    unix_path=`$CYGPATH -u "$windows_path"`
56402    new_path="$unix_path"
56403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56405    new_path="$unix_path"
56406  fi
56407
56408  if test "x$path" != "x$new_path"; then
56409    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56412  fi
56413
56414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56416
56417    else
56418      # We're on a unix platform. Hooray! :)
56419      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56420      has_space=`$ECHO "$path" | $GREP " "`
56421      if test "x$has_space" != x; then
56422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56425      fi
56426
56427      # Use eval to expand a potential ~
56428      eval path="$path"
56429      if test ! -f "$path" && test ! -d "$path"; then
56430        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56431      fi
56432
56433      if test -d "$path"; then
56434        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56435      else
56436        dir="`$DIRNAME "$path"`"
56437        base="`$BASENAME "$path"`"
56438        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56439      fi
56440    fi
56441  fi
56442
56443
56444  # Only process if variable expands to non-empty
56445
56446  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56448
56449  # Input might be given as Windows format, start by converting to
56450  # unix format.
56451  path="$POTENTIAL_FREETYPE_LIB_PATH"
56452  new_path=`$CYGPATH -u "$path"`
56453
56454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56457  # "foo.exe" is OK but "foo" is an error.
56458  #
56459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56460  # It is also a way to make sure we got the proper file name for the real test later on.
56461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56462  if test "x$test_shortpath" = x; then
56463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56465    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56466  fi
56467
56468  # Call helper function which possibly converts this using DOS-style short mode.
56469  # If so, the updated path is stored in $new_path.
56470
56471  input_path="$new_path"
56472  # Check if we need to convert this using DOS-style short mode. If the path
56473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56474  # take no chances and rewrite it.
56475  # Note: m4 eats our [], so we need to use [ and ] instead.
56476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56477  if test "x$has_forbidden_chars" != x; then
56478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56482      # Going to short mode and back again did indeed matter. Since short mode is
56483      # case insensitive, let's make it lowercase to improve readability.
56484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56485      # Now convert it back to Unix-style (cygpath)
56486      input_path=`$CYGPATH -u "$shortmode_path"`
56487      new_path="$input_path"
56488    fi
56489  fi
56490
56491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56492  if test "x$test_cygdrive_prefix" = x; then
56493    # As a simple fix, exclude /usr/bin since it's not a real path.
56494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56496      # a path prefixed by /cygdrive for fixpath to work.
56497      new_path="$CYGWIN_ROOT_PATH$input_path"
56498    fi
56499  fi
56500
56501
56502  if test "x$path" != "x$new_path"; then
56503    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56506  fi
56507
56508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56509
56510  path="$POTENTIAL_FREETYPE_LIB_PATH"
56511  has_colon=`$ECHO $path | $GREP ^.:`
56512  new_path="$path"
56513  if test "x$has_colon" = x; then
56514    # Not in mixed or Windows style, start by that.
56515    new_path=`cmd //c echo $path`
56516  fi
56517
56518
56519  input_path="$new_path"
56520  # Check if we need to convert this using DOS-style short mode. If the path
56521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56522  # take no chances and rewrite it.
56523  # Note: m4 eats our [], so we need to use [ and ] instead.
56524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56525  if test "x$has_forbidden_chars" != x; then
56526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56528  fi
56529
56530
56531  windows_path="$new_path"
56532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56533    unix_path=`$CYGPATH -u "$windows_path"`
56534    new_path="$unix_path"
56535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56537    new_path="$unix_path"
56538  fi
56539
56540  if test "x$path" != "x$new_path"; then
56541    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56544  fi
56545
56546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56548
56549    else
56550      # We're on a unix platform. Hooray! :)
56551      path="$POTENTIAL_FREETYPE_LIB_PATH"
56552      has_space=`$ECHO "$path" | $GREP " "`
56553      if test "x$has_space" != x; then
56554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56557      fi
56558
56559      # Use eval to expand a potential ~
56560      eval path="$path"
56561      if test ! -f "$path" && test ! -d "$path"; then
56562        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56563      fi
56564
56565      if test -d "$path"; then
56566        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56567      else
56568        dir="`$DIRNAME "$path"`"
56569        base="`$BASENAME "$path"`"
56570        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56571      fi
56572    fi
56573  fi
56574
56575
56576    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56578$as_echo_n "checking for freetype includes... " >&6; }
56579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56580$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56581    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56583$as_echo_n "checking for freetype libraries... " >&6; }
56584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56585$as_echo "$FREETYPE_LIB_PATH" >&6; }
56586  fi
56587
56588          fi
56589          if test "x$FOUND_FREETYPE" != xyes; then
56590            FREETYPE_BASE_DIR="$HOME/freetype"
56591
56592  windows_path="$FREETYPE_BASE_DIR"
56593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56594    unix_path=`$CYGPATH -u "$windows_path"`
56595    FREETYPE_BASE_DIR="$unix_path"
56596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56598    FREETYPE_BASE_DIR="$unix_path"
56599  fi
56600
56601            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56602
56603  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56604  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
56605  METHOD="well-known location"
56606
56607  # Let's start with an optimistic view of the world :-)
56608  FOUND_FREETYPE=yes
56609
56610  # First look for the canonical freetype main include file ft2build.h.
56611  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56612    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56613    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56614    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56615      # Fail.
56616      FOUND_FREETYPE=no
56617    fi
56618  fi
56619
56620  if test "x$FOUND_FREETYPE" = xyes; then
56621    # Include file found, let's continue the sanity check.
56622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56623$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56624
56625    # Reset to default value
56626    FREETYPE_BASE_NAME=freetype
56627    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56628    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56629      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56631        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56632        # for the .6 version explicitly.
56633        FREETYPE_BASE_NAME=freetype.6
56634        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56635        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56636$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56637      else
56638        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56640        FOUND_FREETYPE=no
56641      fi
56642    else
56643      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56644        # On Windows, we will need both .lib and .dll file.
56645        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56646          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56647$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56648          FOUND_FREETYPE=no
56649        fi
56650      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56652        # Found lib in isa dir, use that instead.
56653        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56654        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56655$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56656      fi
56657    fi
56658  fi
56659
56660  if test "x$FOUND_FREETYPE" = xyes; then
56661
56662  # Only process if variable expands to non-empty
56663
56664  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56666
56667  # Input might be given as Windows format, start by converting to
56668  # unix format.
56669  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56670  new_path=`$CYGPATH -u "$path"`
56671
56672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56675  # "foo.exe" is OK but "foo" is an error.
56676  #
56677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56678  # It is also a way to make sure we got the proper file name for the real test later on.
56679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56680  if test "x$test_shortpath" = x; then
56681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56683    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56684  fi
56685
56686  # Call helper function which possibly converts this using DOS-style short mode.
56687  # If so, the updated path is stored in $new_path.
56688
56689  input_path="$new_path"
56690  # Check if we need to convert this using DOS-style short mode. If the path
56691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56692  # take no chances and rewrite it.
56693  # Note: m4 eats our [], so we need to use [ and ] instead.
56694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56695  if test "x$has_forbidden_chars" != x; then
56696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56700      # Going to short mode and back again did indeed matter. Since short mode is
56701      # case insensitive, let's make it lowercase to improve readability.
56702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56703      # Now convert it back to Unix-style (cygpath)
56704      input_path=`$CYGPATH -u "$shortmode_path"`
56705      new_path="$input_path"
56706    fi
56707  fi
56708
56709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56710  if test "x$test_cygdrive_prefix" = x; then
56711    # As a simple fix, exclude /usr/bin since it's not a real path.
56712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56714      # a path prefixed by /cygdrive for fixpath to work.
56715      new_path="$CYGWIN_ROOT_PATH$input_path"
56716    fi
56717  fi
56718
56719
56720  if test "x$path" != "x$new_path"; then
56721    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56723$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56724  fi
56725
56726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56727
56728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56729  has_colon=`$ECHO $path | $GREP ^.:`
56730  new_path="$path"
56731  if test "x$has_colon" = x; then
56732    # Not in mixed or Windows style, start by that.
56733    new_path=`cmd //c echo $path`
56734  fi
56735
56736
56737  input_path="$new_path"
56738  # Check if we need to convert this using DOS-style short mode. If the path
56739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56740  # take no chances and rewrite it.
56741  # Note: m4 eats our [], so we need to use [ and ] instead.
56742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56743  if test "x$has_forbidden_chars" != x; then
56744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56746  fi
56747
56748
56749  windows_path="$new_path"
56750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56751    unix_path=`$CYGPATH -u "$windows_path"`
56752    new_path="$unix_path"
56753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56755    new_path="$unix_path"
56756  fi
56757
56758  if test "x$path" != "x$new_path"; then
56759    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56762  fi
56763
56764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56766
56767    else
56768      # We're on a unix platform. Hooray! :)
56769      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56770      has_space=`$ECHO "$path" | $GREP " "`
56771      if test "x$has_space" != x; then
56772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56775      fi
56776
56777      # Use eval to expand a potential ~
56778      eval path="$path"
56779      if test ! -f "$path" && test ! -d "$path"; then
56780        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56781      fi
56782
56783      if test -d "$path"; then
56784        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56785      else
56786        dir="`$DIRNAME "$path"`"
56787        base="`$BASENAME "$path"`"
56788        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56789      fi
56790    fi
56791  fi
56792
56793
56794  # Only process if variable expands to non-empty
56795
56796  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56798
56799  # Input might be given as Windows format, start by converting to
56800  # unix format.
56801  path="$POTENTIAL_FREETYPE_LIB_PATH"
56802  new_path=`$CYGPATH -u "$path"`
56803
56804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56807  # "foo.exe" is OK but "foo" is an error.
56808  #
56809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56810  # It is also a way to make sure we got the proper file name for the real test later on.
56811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56812  if test "x$test_shortpath" = x; then
56813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56815    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56816  fi
56817
56818  # Call helper function which possibly converts this using DOS-style short mode.
56819  # If so, the updated path is stored in $new_path.
56820
56821  input_path="$new_path"
56822  # Check if we need to convert this using DOS-style short mode. If the path
56823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56824  # take no chances and rewrite it.
56825  # Note: m4 eats our [], so we need to use [ and ] instead.
56826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56827  if test "x$has_forbidden_chars" != x; then
56828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56832      # Going to short mode and back again did indeed matter. Since short mode is
56833      # case insensitive, let's make it lowercase to improve readability.
56834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56835      # Now convert it back to Unix-style (cygpath)
56836      input_path=`$CYGPATH -u "$shortmode_path"`
56837      new_path="$input_path"
56838    fi
56839  fi
56840
56841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56842  if test "x$test_cygdrive_prefix" = x; then
56843    # As a simple fix, exclude /usr/bin since it's not a real path.
56844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56846      # a path prefixed by /cygdrive for fixpath to work.
56847      new_path="$CYGWIN_ROOT_PATH$input_path"
56848    fi
56849  fi
56850
56851
56852  if test "x$path" != "x$new_path"; then
56853    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56855$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56856  fi
56857
56858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56859
56860  path="$POTENTIAL_FREETYPE_LIB_PATH"
56861  has_colon=`$ECHO $path | $GREP ^.:`
56862  new_path="$path"
56863  if test "x$has_colon" = x; then
56864    # Not in mixed or Windows style, start by that.
56865    new_path=`cmd //c echo $path`
56866  fi
56867
56868
56869  input_path="$new_path"
56870  # Check if we need to convert this using DOS-style short mode. If the path
56871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56872  # take no chances and rewrite it.
56873  # Note: m4 eats our [], so we need to use [ and ] instead.
56874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56875  if test "x$has_forbidden_chars" != x; then
56876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56878  fi
56879
56880
56881  windows_path="$new_path"
56882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56883    unix_path=`$CYGPATH -u "$windows_path"`
56884    new_path="$unix_path"
56885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56887    new_path="$unix_path"
56888  fi
56889
56890  if test "x$path" != "x$new_path"; then
56891    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56894  fi
56895
56896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56898
56899    else
56900      # We're on a unix platform. Hooray! :)
56901      path="$POTENTIAL_FREETYPE_LIB_PATH"
56902      has_space=`$ECHO "$path" | $GREP " "`
56903      if test "x$has_space" != x; then
56904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56907      fi
56908
56909      # Use eval to expand a potential ~
56910      eval path="$path"
56911      if test ! -f "$path" && test ! -d "$path"; then
56912        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56913      fi
56914
56915      if test -d "$path"; then
56916        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56917      else
56918        dir="`$DIRNAME "$path"`"
56919        base="`$BASENAME "$path"`"
56920        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56921      fi
56922    fi
56923  fi
56924
56925
56926    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56928$as_echo_n "checking for freetype includes... " >&6; }
56929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56930$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56931    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56933$as_echo_n "checking for freetype libraries... " >&6; }
56934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56935$as_echo "$FREETYPE_LIB_PATH" >&6; }
56936  fi
56937
56938            else
56939
56940  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56941  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56942  METHOD="well-known location"
56943
56944  # Let's start with an optimistic view of the world :-)
56945  FOUND_FREETYPE=yes
56946
56947  # First look for the canonical freetype main include file ft2build.h.
56948  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56949    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56950    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56951    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56952      # Fail.
56953      FOUND_FREETYPE=no
56954    fi
56955  fi
56956
56957  if test "x$FOUND_FREETYPE" = xyes; then
56958    # Include file found, let's continue the sanity check.
56959    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56960$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56961
56962    # Reset to default value
56963    FREETYPE_BASE_NAME=freetype
56964    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56965    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56966      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56967          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56968        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56969        # for the .6 version explicitly.
56970        FREETYPE_BASE_NAME=freetype.6
56971        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56972        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56973$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56974      else
56975        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56976$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56977        FOUND_FREETYPE=no
56978      fi
56979    else
56980      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56981        # On Windows, we will need both .lib and .dll file.
56982        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56983          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56984$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56985          FOUND_FREETYPE=no
56986        fi
56987      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56988          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56989        # Found lib in isa dir, use that instead.
56990        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56991        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56992$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56993      fi
56994    fi
56995  fi
56996
56997  if test "x$FOUND_FREETYPE" = xyes; then
56998
56999  # Only process if variable expands to non-empty
57000
57001  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57003
57004  # Input might be given as Windows format, start by converting to
57005  # unix format.
57006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57007  new_path=`$CYGPATH -u "$path"`
57008
57009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57012  # "foo.exe" is OK but "foo" is an error.
57013  #
57014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57015  # It is also a way to make sure we got the proper file name for the real test later on.
57016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57017  if test "x$test_shortpath" = x; then
57018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57021  fi
57022
57023  # Call helper function which possibly converts this using DOS-style short mode.
57024  # If so, the updated path is stored in $new_path.
57025
57026  input_path="$new_path"
57027  # Check if we need to convert this using DOS-style short mode. If the path
57028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57029  # take no chances and rewrite it.
57030  # Note: m4 eats our [], so we need to use [ and ] instead.
57031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57032  if test "x$has_forbidden_chars" != x; then
57033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57037      # Going to short mode and back again did indeed matter. Since short mode is
57038      # case insensitive, let's make it lowercase to improve readability.
57039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57040      # Now convert it back to Unix-style (cygpath)
57041      input_path=`$CYGPATH -u "$shortmode_path"`
57042      new_path="$input_path"
57043    fi
57044  fi
57045
57046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57047  if test "x$test_cygdrive_prefix" = x; then
57048    # As a simple fix, exclude /usr/bin since it's not a real path.
57049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57051      # a path prefixed by /cygdrive for fixpath to work.
57052      new_path="$CYGWIN_ROOT_PATH$input_path"
57053    fi
57054  fi
57055
57056
57057  if test "x$path" != "x$new_path"; then
57058    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57061  fi
57062
57063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57064
57065  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57066  has_colon=`$ECHO $path | $GREP ^.:`
57067  new_path="$path"
57068  if test "x$has_colon" = x; then
57069    # Not in mixed or Windows style, start by that.
57070    new_path=`cmd //c echo $path`
57071  fi
57072
57073
57074  input_path="$new_path"
57075  # Check if we need to convert this using DOS-style short mode. If the path
57076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57077  # take no chances and rewrite it.
57078  # Note: m4 eats our [], so we need to use [ and ] instead.
57079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57080  if test "x$has_forbidden_chars" != x; then
57081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57083  fi
57084
57085
57086  windows_path="$new_path"
57087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57088    unix_path=`$CYGPATH -u "$windows_path"`
57089    new_path="$unix_path"
57090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57092    new_path="$unix_path"
57093  fi
57094
57095  if test "x$path" != "x$new_path"; then
57096    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57099  fi
57100
57101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57103
57104    else
57105      # We're on a unix platform. Hooray! :)
57106      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57107      has_space=`$ECHO "$path" | $GREP " "`
57108      if test "x$has_space" != x; then
57109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57112      fi
57113
57114      # Use eval to expand a potential ~
57115      eval path="$path"
57116      if test ! -f "$path" && test ! -d "$path"; then
57117        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57118      fi
57119
57120      if test -d "$path"; then
57121        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57122      else
57123        dir="`$DIRNAME "$path"`"
57124        base="`$BASENAME "$path"`"
57125        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57126      fi
57127    fi
57128  fi
57129
57130
57131  # Only process if variable expands to non-empty
57132
57133  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57135
57136  # Input might be given as Windows format, start by converting to
57137  # unix format.
57138  path="$POTENTIAL_FREETYPE_LIB_PATH"
57139  new_path=`$CYGPATH -u "$path"`
57140
57141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57144  # "foo.exe" is OK but "foo" is an error.
57145  #
57146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57147  # It is also a way to make sure we got the proper file name for the real test later on.
57148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57149  if test "x$test_shortpath" = x; then
57150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57152    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57153  fi
57154
57155  # Call helper function which possibly converts this using DOS-style short mode.
57156  # If so, the updated path is stored in $new_path.
57157
57158  input_path="$new_path"
57159  # Check if we need to convert this using DOS-style short mode. If the path
57160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57161  # take no chances and rewrite it.
57162  # Note: m4 eats our [], so we need to use [ and ] instead.
57163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57164  if test "x$has_forbidden_chars" != x; then
57165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57169      # Going to short mode and back again did indeed matter. Since short mode is
57170      # case insensitive, let's make it lowercase to improve readability.
57171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57172      # Now convert it back to Unix-style (cygpath)
57173      input_path=`$CYGPATH -u "$shortmode_path"`
57174      new_path="$input_path"
57175    fi
57176  fi
57177
57178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57179  if test "x$test_cygdrive_prefix" = x; then
57180    # As a simple fix, exclude /usr/bin since it's not a real path.
57181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57183      # a path prefixed by /cygdrive for fixpath to work.
57184      new_path="$CYGWIN_ROOT_PATH$input_path"
57185    fi
57186  fi
57187
57188
57189  if test "x$path" != "x$new_path"; then
57190    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57193  fi
57194
57195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57196
57197  path="$POTENTIAL_FREETYPE_LIB_PATH"
57198  has_colon=`$ECHO $path | $GREP ^.:`
57199  new_path="$path"
57200  if test "x$has_colon" = x; then
57201    # Not in mixed or Windows style, start by that.
57202    new_path=`cmd //c echo $path`
57203  fi
57204
57205
57206  input_path="$new_path"
57207  # Check if we need to convert this using DOS-style short mode. If the path
57208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57209  # take no chances and rewrite it.
57210  # Note: m4 eats our [], so we need to use [ and ] instead.
57211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57212  if test "x$has_forbidden_chars" != x; then
57213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57215  fi
57216
57217
57218  windows_path="$new_path"
57219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57220    unix_path=`$CYGPATH -u "$windows_path"`
57221    new_path="$unix_path"
57222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57224    new_path="$unix_path"
57225  fi
57226
57227  if test "x$path" != "x$new_path"; then
57228    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57231  fi
57232
57233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57235
57236    else
57237      # We're on a unix platform. Hooray! :)
57238      path="$POTENTIAL_FREETYPE_LIB_PATH"
57239      has_space=`$ECHO "$path" | $GREP " "`
57240      if test "x$has_space" != x; then
57241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57244      fi
57245
57246      # Use eval to expand a potential ~
57247      eval path="$path"
57248      if test ! -f "$path" && test ! -d "$path"; then
57249        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57250      fi
57251
57252      if test -d "$path"; then
57253        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57254      else
57255        dir="`$DIRNAME "$path"`"
57256        base="`$BASENAME "$path"`"
57257        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57258      fi
57259    fi
57260  fi
57261
57262
57263    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57265$as_echo_n "checking for freetype includes... " >&6; }
57266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57267$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57268    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57270$as_echo_n "checking for freetype libraries... " >&6; }
57271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57272$as_echo "$FREETYPE_LIB_PATH" >&6; }
57273  fi
57274
57275            fi
57276            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
57277                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
57278              # Source is available, as a last resort try to build freetype in default location
57279
57280  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
57281  BUILD_FREETYPE=yes
57282
57283  # Check if the freetype sources are acessible..
57284  if ! test -d $FREETYPE_SRC_PATH; then
57285    { $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
57286$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57287    BUILD_FREETYPE=no
57288  fi
57289  # ..and contain a vc2010 project file
57290  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57291  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57292    { $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
57293$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57294    BUILD_FREETYPE=no
57295  fi
57296  # Now check if configure found a version of 'msbuild.exe'
57297  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57298    { $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
57299$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;}
57300    BUILD_FREETYPE=no
57301  fi
57302
57303  # Ready to go..
57304  if test "x$BUILD_FREETYPE" = xyes; then
57305    # msbuild requires trailing slashes for output directories
57306    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57307    freetype_lib_path_unix="$freetype_lib_path"
57308    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57309
57310  unix_path="$vcxproj_path"
57311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57312    windows_path=`$CYGPATH -m "$unix_path"`
57313    vcxproj_path="$windows_path"
57314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57315    windows_path=`cmd //c echo $unix_path`
57316    vcxproj_path="$windows_path"
57317  fi
57318
57319
57320  unix_path="$freetype_lib_path"
57321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57322    windows_path=`$CYGPATH -m "$unix_path"`
57323    freetype_lib_path="$windows_path"
57324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57325    windows_path=`cmd //c echo $unix_path`
57326    freetype_lib_path="$windows_path"
57327  fi
57328
57329
57330  unix_path="$freetype_obj_path"
57331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57332    windows_path=`$CYGPATH -m "$unix_path"`
57333    freetype_obj_path="$windows_path"
57334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57335    windows_path=`cmd //c echo $unix_path`
57336    freetype_obj_path="$windows_path"
57337  fi
57338
57339    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57340      freetype_platform=x64
57341    else
57342      freetype_platform=win32
57343    fi
57344
57345    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57346    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57347    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57348    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57349    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57350$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57351
57352    # First we try to build the freetype.dll
57353    $ECHO -e "@echo off\n"\
57354        "$MSBUILD $vcxproj_path "\
57355        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57356        "/p:Configuration=\"Release Multithreaded\" "\
57357        "/p:Platform=$freetype_platform "\
57358        "/p:ConfigurationType=DynamicLibrary "\
57359        "/p:TargetName=freetype "\
57360        "/p:OutDir=\"$freetype_lib_path\" "\
57361        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57362    cmd /c freetype.bat
57363
57364    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57365      # If that succeeds we also build freetype.lib
57366      $ECHO -e "@echo off\n"\
57367          "$MSBUILD $vcxproj_path "\
57368          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57369          "/p:Configuration=\"Release Multithreaded\" "\
57370          "/p:Platform=$freetype_platform "\
57371          "/p:ConfigurationType=StaticLibrary "\
57372          "/p:TargetName=freetype "\
57373          "/p:OutDir=\"$freetype_lib_path\" "\
57374          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57375      cmd /c freetype.bat
57376
57377      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57378        # Once we build both, lib and dll, set freetype lib and include path appropriately
57379        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57380        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57381        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57382$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57383      else
57384        BUILD_FREETYPE=no
57385      fi
57386    else
57387      BUILD_FREETYPE=no
57388    fi
57389  fi
57390
57391              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57392
57393  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57394  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
57395  METHOD="well-known location"
57396
57397  # Let's start with an optimistic view of the world :-)
57398  FOUND_FREETYPE=yes
57399
57400  # First look for the canonical freetype main include file ft2build.h.
57401  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57402    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57403    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57404    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57405      # Fail.
57406      FOUND_FREETYPE=no
57407    fi
57408  fi
57409
57410  if test "x$FOUND_FREETYPE" = xyes; then
57411    # Include file found, let's continue the sanity check.
57412    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57413$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57414
57415    # Reset to default value
57416    FREETYPE_BASE_NAME=freetype
57417    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57418    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57419      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57420          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57421        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57422        # for the .6 version explicitly.
57423        FREETYPE_BASE_NAME=freetype.6
57424        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57425        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57426$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57427      else
57428        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57429$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57430        FOUND_FREETYPE=no
57431      fi
57432    else
57433      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57434        # On Windows, we will need both .lib and .dll file.
57435        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57436          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57437$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57438          FOUND_FREETYPE=no
57439        fi
57440      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57441          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57442        # Found lib in isa dir, use that instead.
57443        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57444        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57445$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57446      fi
57447    fi
57448  fi
57449
57450  if test "x$FOUND_FREETYPE" = xyes; then
57451
57452  # Only process if variable expands to non-empty
57453
57454  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57456
57457  # Input might be given as Windows format, start by converting to
57458  # unix format.
57459  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57460  new_path=`$CYGPATH -u "$path"`
57461
57462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57465  # "foo.exe" is OK but "foo" is an error.
57466  #
57467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57468  # It is also a way to make sure we got the proper file name for the real test later on.
57469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57470  if test "x$test_shortpath" = x; then
57471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57473    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57474  fi
57475
57476  # Call helper function which possibly converts this using DOS-style short mode.
57477  # If so, the updated path is stored in $new_path.
57478
57479  input_path="$new_path"
57480  # Check if we need to convert this using DOS-style short mode. If the path
57481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57482  # take no chances and rewrite it.
57483  # Note: m4 eats our [], so we need to use [ and ] instead.
57484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57485  if test "x$has_forbidden_chars" != x; then
57486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57490      # Going to short mode and back again did indeed matter. Since short mode is
57491      # case insensitive, let's make it lowercase to improve readability.
57492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57493      # Now convert it back to Unix-style (cygpath)
57494      input_path=`$CYGPATH -u "$shortmode_path"`
57495      new_path="$input_path"
57496    fi
57497  fi
57498
57499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57500  if test "x$test_cygdrive_prefix" = x; then
57501    # As a simple fix, exclude /usr/bin since it's not a real path.
57502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57504      # a path prefixed by /cygdrive for fixpath to work.
57505      new_path="$CYGWIN_ROOT_PATH$input_path"
57506    fi
57507  fi
57508
57509
57510  if test "x$path" != "x$new_path"; then
57511    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57514  fi
57515
57516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57517
57518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57519  has_colon=`$ECHO $path | $GREP ^.:`
57520  new_path="$path"
57521  if test "x$has_colon" = x; then
57522    # Not in mixed or Windows style, start by that.
57523    new_path=`cmd //c echo $path`
57524  fi
57525
57526
57527  input_path="$new_path"
57528  # Check if we need to convert this using DOS-style short mode. If the path
57529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57530  # take no chances and rewrite it.
57531  # Note: m4 eats our [], so we need to use [ and ] instead.
57532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57533  if test "x$has_forbidden_chars" != x; then
57534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57536  fi
57537
57538
57539  windows_path="$new_path"
57540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57541    unix_path=`$CYGPATH -u "$windows_path"`
57542    new_path="$unix_path"
57543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57545    new_path="$unix_path"
57546  fi
57547
57548  if test "x$path" != "x$new_path"; then
57549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57552  fi
57553
57554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57556
57557    else
57558      # We're on a unix platform. Hooray! :)
57559      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57560      has_space=`$ECHO "$path" | $GREP " "`
57561      if test "x$has_space" != x; then
57562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57565      fi
57566
57567      # Use eval to expand a potential ~
57568      eval path="$path"
57569      if test ! -f "$path" && test ! -d "$path"; then
57570        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57571      fi
57572
57573      if test -d "$path"; then
57574        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57575      else
57576        dir="`$DIRNAME "$path"`"
57577        base="`$BASENAME "$path"`"
57578        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57579      fi
57580    fi
57581  fi
57582
57583
57584  # Only process if variable expands to non-empty
57585
57586  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57588
57589  # Input might be given as Windows format, start by converting to
57590  # unix format.
57591  path="$POTENTIAL_FREETYPE_LIB_PATH"
57592  new_path=`$CYGPATH -u "$path"`
57593
57594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57597  # "foo.exe" is OK but "foo" is an error.
57598  #
57599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57600  # It is also a way to make sure we got the proper file name for the real test later on.
57601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57602  if test "x$test_shortpath" = x; then
57603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57606  fi
57607
57608  # Call helper function which possibly converts this using DOS-style short mode.
57609  # If so, the updated path is stored in $new_path.
57610
57611  input_path="$new_path"
57612  # Check if we need to convert this using DOS-style short mode. If the path
57613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57614  # take no chances and rewrite it.
57615  # Note: m4 eats our [], so we need to use [ and ] instead.
57616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57617  if test "x$has_forbidden_chars" != x; then
57618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57622      # Going to short mode and back again did indeed matter. Since short mode is
57623      # case insensitive, let's make it lowercase to improve readability.
57624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57625      # Now convert it back to Unix-style (cygpath)
57626      input_path=`$CYGPATH -u "$shortmode_path"`
57627      new_path="$input_path"
57628    fi
57629  fi
57630
57631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57632  if test "x$test_cygdrive_prefix" = x; then
57633    # As a simple fix, exclude /usr/bin since it's not a real path.
57634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57636      # a path prefixed by /cygdrive for fixpath to work.
57637      new_path="$CYGWIN_ROOT_PATH$input_path"
57638    fi
57639  fi
57640
57641
57642  if test "x$path" != "x$new_path"; then
57643    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57646  fi
57647
57648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57649
57650  path="$POTENTIAL_FREETYPE_LIB_PATH"
57651  has_colon=`$ECHO $path | $GREP ^.:`
57652  new_path="$path"
57653  if test "x$has_colon" = x; then
57654    # Not in mixed or Windows style, start by that.
57655    new_path=`cmd //c echo $path`
57656  fi
57657
57658
57659  input_path="$new_path"
57660  # Check if we need to convert this using DOS-style short mode. If the path
57661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57662  # take no chances and rewrite it.
57663  # Note: m4 eats our [], so we need to use [ and ] instead.
57664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57665  if test "x$has_forbidden_chars" != x; then
57666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57668  fi
57669
57670
57671  windows_path="$new_path"
57672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57673    unix_path=`$CYGPATH -u "$windows_path"`
57674    new_path="$unix_path"
57675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57677    new_path="$unix_path"
57678  fi
57679
57680  if test "x$path" != "x$new_path"; then
57681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57684  fi
57685
57686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57688
57689    else
57690      # We're on a unix platform. Hooray! :)
57691      path="$POTENTIAL_FREETYPE_LIB_PATH"
57692      has_space=`$ECHO "$path" | $GREP " "`
57693      if test "x$has_space" != x; then
57694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57697      fi
57698
57699      # Use eval to expand a potential ~
57700      eval path="$path"
57701      if test ! -f "$path" && test ! -d "$path"; then
57702        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57703      fi
57704
57705      if test -d "$path"; then
57706        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57707      else
57708        dir="`$DIRNAME "$path"`"
57709        base="`$BASENAME "$path"`"
57710        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57711      fi
57712    fi
57713  fi
57714
57715
57716    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57718$as_echo_n "checking for freetype includes... " >&6; }
57719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57720$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57721    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57723$as_echo_n "checking for freetype libraries... " >&6; }
57724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57725$as_echo "$FREETYPE_LIB_PATH" >&6; }
57726  fi
57727
57728              else
57729
57730  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57731  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
57732  METHOD="well-known location"
57733
57734  # Let's start with an optimistic view of the world :-)
57735  FOUND_FREETYPE=yes
57736
57737  # First look for the canonical freetype main include file ft2build.h.
57738  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57739    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57740    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57741    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57742      # Fail.
57743      FOUND_FREETYPE=no
57744    fi
57745  fi
57746
57747  if test "x$FOUND_FREETYPE" = xyes; then
57748    # Include file found, let's continue the sanity check.
57749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57750$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57751
57752    # Reset to default value
57753    FREETYPE_BASE_NAME=freetype
57754    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57755    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57756      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57758        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57759        # for the .6 version explicitly.
57760        FREETYPE_BASE_NAME=freetype.6
57761        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57762        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57763$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57764      else
57765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57767        FOUND_FREETYPE=no
57768      fi
57769    else
57770      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57771        # On Windows, we will need both .lib and .dll file.
57772        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57773          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57775          FOUND_FREETYPE=no
57776        fi
57777      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57778          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57779        # Found lib in isa dir, use that instead.
57780        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57781        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57782$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57783      fi
57784    fi
57785  fi
57786
57787  if test "x$FOUND_FREETYPE" = xyes; then
57788
57789  # Only process if variable expands to non-empty
57790
57791  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57793
57794  # Input might be given as Windows format, start by converting to
57795  # unix format.
57796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57797  new_path=`$CYGPATH -u "$path"`
57798
57799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57802  # "foo.exe" is OK but "foo" is an error.
57803  #
57804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57805  # It is also a way to make sure we got the proper file name for the real test later on.
57806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57807  if test "x$test_shortpath" = x; then
57808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57811  fi
57812
57813  # Call helper function which possibly converts this using DOS-style short mode.
57814  # If so, the updated path is stored in $new_path.
57815
57816  input_path="$new_path"
57817  # Check if we need to convert this using DOS-style short mode. If the path
57818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57819  # take no chances and rewrite it.
57820  # Note: m4 eats our [], so we need to use [ and ] instead.
57821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57822  if test "x$has_forbidden_chars" != x; then
57823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57827      # Going to short mode and back again did indeed matter. Since short mode is
57828      # case insensitive, let's make it lowercase to improve readability.
57829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57830      # Now convert it back to Unix-style (cygpath)
57831      input_path=`$CYGPATH -u "$shortmode_path"`
57832      new_path="$input_path"
57833    fi
57834  fi
57835
57836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57837  if test "x$test_cygdrive_prefix" = x; then
57838    # As a simple fix, exclude /usr/bin since it's not a real path.
57839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57841      # a path prefixed by /cygdrive for fixpath to work.
57842      new_path="$CYGWIN_ROOT_PATH$input_path"
57843    fi
57844  fi
57845
57846
57847  if test "x$path" != "x$new_path"; then
57848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57851  fi
57852
57853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57854
57855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57856  has_colon=`$ECHO $path | $GREP ^.:`
57857  new_path="$path"
57858  if test "x$has_colon" = x; then
57859    # Not in mixed or Windows style, start by that.
57860    new_path=`cmd //c echo $path`
57861  fi
57862
57863
57864  input_path="$new_path"
57865  # Check if we need to convert this using DOS-style short mode. If the path
57866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57867  # take no chances and rewrite it.
57868  # Note: m4 eats our [], so we need to use [ and ] instead.
57869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57870  if test "x$has_forbidden_chars" != x; then
57871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57873  fi
57874
57875
57876  windows_path="$new_path"
57877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57878    unix_path=`$CYGPATH -u "$windows_path"`
57879    new_path="$unix_path"
57880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57882    new_path="$unix_path"
57883  fi
57884
57885  if test "x$path" != "x$new_path"; then
57886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57889  fi
57890
57891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57893
57894    else
57895      # We're on a unix platform. Hooray! :)
57896      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57897      has_space=`$ECHO "$path" | $GREP " "`
57898      if test "x$has_space" != x; then
57899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57902      fi
57903
57904      # Use eval to expand a potential ~
57905      eval path="$path"
57906      if test ! -f "$path" && test ! -d "$path"; then
57907        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57908      fi
57909
57910      if test -d "$path"; then
57911        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57912      else
57913        dir="`$DIRNAME "$path"`"
57914        base="`$BASENAME "$path"`"
57915        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57916      fi
57917    fi
57918  fi
57919
57920
57921  # Only process if variable expands to non-empty
57922
57923  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57925
57926  # Input might be given as Windows format, start by converting to
57927  # unix format.
57928  path="$POTENTIAL_FREETYPE_LIB_PATH"
57929  new_path=`$CYGPATH -u "$path"`
57930
57931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57934  # "foo.exe" is OK but "foo" is an error.
57935  #
57936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57937  # It is also a way to make sure we got the proper file name for the real test later on.
57938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57939  if test "x$test_shortpath" = x; then
57940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57942    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57943  fi
57944
57945  # Call helper function which possibly converts this using DOS-style short mode.
57946  # If so, the updated path is stored in $new_path.
57947
57948  input_path="$new_path"
57949  # Check if we need to convert this using DOS-style short mode. If the path
57950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57951  # take no chances and rewrite it.
57952  # Note: m4 eats our [], so we need to use [ and ] instead.
57953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57954  if test "x$has_forbidden_chars" != x; then
57955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57959      # Going to short mode and back again did indeed matter. Since short mode is
57960      # case insensitive, let's make it lowercase to improve readability.
57961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57962      # Now convert it back to Unix-style (cygpath)
57963      input_path=`$CYGPATH -u "$shortmode_path"`
57964      new_path="$input_path"
57965    fi
57966  fi
57967
57968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57969  if test "x$test_cygdrive_prefix" = x; then
57970    # As a simple fix, exclude /usr/bin since it's not a real path.
57971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57973      # a path prefixed by /cygdrive for fixpath to work.
57974      new_path="$CYGWIN_ROOT_PATH$input_path"
57975    fi
57976  fi
57977
57978
57979  if test "x$path" != "x$new_path"; then
57980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57983  fi
57984
57985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57986
57987  path="$POTENTIAL_FREETYPE_LIB_PATH"
57988  has_colon=`$ECHO $path | $GREP ^.:`
57989  new_path="$path"
57990  if test "x$has_colon" = x; then
57991    # Not in mixed or Windows style, start by that.
57992    new_path=`cmd //c echo $path`
57993  fi
57994
57995
57996  input_path="$new_path"
57997  # Check if we need to convert this using DOS-style short mode. If the path
57998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57999  # take no chances and rewrite it.
58000  # Note: m4 eats our [], so we need to use [ and ] instead.
58001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58002  if test "x$has_forbidden_chars" != x; then
58003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58005  fi
58006
58007
58008  windows_path="$new_path"
58009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58010    unix_path=`$CYGPATH -u "$windows_path"`
58011    new_path="$unix_path"
58012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58014    new_path="$unix_path"
58015  fi
58016
58017  if test "x$path" != "x$new_path"; then
58018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58021  fi
58022
58023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58025
58026    else
58027      # We're on a unix platform. Hooray! :)
58028      path="$POTENTIAL_FREETYPE_LIB_PATH"
58029      has_space=`$ECHO "$path" | $GREP " "`
58030      if test "x$has_space" != x; then
58031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58034      fi
58035
58036      # Use eval to expand a potential ~
58037      eval path="$path"
58038      if test ! -f "$path" && test ! -d "$path"; then
58039        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58040      fi
58041
58042      if test -d "$path"; then
58043        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58044      else
58045        dir="`$DIRNAME "$path"`"
58046        base="`$BASENAME "$path"`"
58047        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58048      fi
58049    fi
58050  fi
58051
58052
58053    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58055$as_echo_n "checking for freetype includes... " >&6; }
58056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58057$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58058    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58060$as_echo_n "checking for freetype libraries... " >&6; }
58061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58062$as_echo "$FREETYPE_LIB_PATH" >&6; }
58063  fi
58064
58065              fi
58066            fi
58067          fi
58068        else
58069          FREETYPE_BASE_DIR="$SYSROOT/usr"
58070
58071  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58072  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58073  METHOD="well-known location"
58074
58075  # Let's start with an optimistic view of the world :-)
58076  FOUND_FREETYPE=yes
58077
58078  # First look for the canonical freetype main include file ft2build.h.
58079  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58080    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58081    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58082    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58083      # Fail.
58084      FOUND_FREETYPE=no
58085    fi
58086  fi
58087
58088  if test "x$FOUND_FREETYPE" = xyes; then
58089    # Include file found, let's continue the sanity check.
58090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58091$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58092
58093    # Reset to default value
58094    FREETYPE_BASE_NAME=freetype
58095    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58096    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58097      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58098          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58099        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58100        # for the .6 version explicitly.
58101        FREETYPE_BASE_NAME=freetype.6
58102        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58103        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58104$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58105      else
58106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58108        FOUND_FREETYPE=no
58109      fi
58110    else
58111      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58112        # On Windows, we will need both .lib and .dll file.
58113        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58114          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58115$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58116          FOUND_FREETYPE=no
58117        fi
58118      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58120        # Found lib in isa dir, use that instead.
58121        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58122        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58123$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58124      fi
58125    fi
58126  fi
58127
58128  if test "x$FOUND_FREETYPE" = xyes; then
58129
58130  # Only process if variable expands to non-empty
58131
58132  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58134
58135  # Input might be given as Windows format, start by converting to
58136  # unix format.
58137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58138  new_path=`$CYGPATH -u "$path"`
58139
58140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58143  # "foo.exe" is OK but "foo" is an error.
58144  #
58145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58146  # It is also a way to make sure we got the proper file name for the real test later on.
58147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58148  if test "x$test_shortpath" = x; then
58149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58152  fi
58153
58154  # Call helper function which possibly converts this using DOS-style short mode.
58155  # If so, the updated path is stored in $new_path.
58156
58157  input_path="$new_path"
58158  # Check if we need to convert this using DOS-style short mode. If the path
58159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58160  # take no chances and rewrite it.
58161  # Note: m4 eats our [], so we need to use [ and ] instead.
58162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58163  if test "x$has_forbidden_chars" != x; then
58164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58168      # Going to short mode and back again did indeed matter. Since short mode is
58169      # case insensitive, let's make it lowercase to improve readability.
58170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58171      # Now convert it back to Unix-style (cygpath)
58172      input_path=`$CYGPATH -u "$shortmode_path"`
58173      new_path="$input_path"
58174    fi
58175  fi
58176
58177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58178  if test "x$test_cygdrive_prefix" = x; then
58179    # As a simple fix, exclude /usr/bin since it's not a real path.
58180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58182      # a path prefixed by /cygdrive for fixpath to work.
58183      new_path="$CYGWIN_ROOT_PATH$input_path"
58184    fi
58185  fi
58186
58187
58188  if test "x$path" != "x$new_path"; then
58189    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58192  fi
58193
58194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58195
58196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58197  has_colon=`$ECHO $path | $GREP ^.:`
58198  new_path="$path"
58199  if test "x$has_colon" = x; then
58200    # Not in mixed or Windows style, start by that.
58201    new_path=`cmd //c echo $path`
58202  fi
58203
58204
58205  input_path="$new_path"
58206  # Check if we need to convert this using DOS-style short mode. If the path
58207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58208  # take no chances and rewrite it.
58209  # Note: m4 eats our [], so we need to use [ and ] instead.
58210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58211  if test "x$has_forbidden_chars" != x; then
58212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58214  fi
58215
58216
58217  windows_path="$new_path"
58218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58219    unix_path=`$CYGPATH -u "$windows_path"`
58220    new_path="$unix_path"
58221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58223    new_path="$unix_path"
58224  fi
58225
58226  if test "x$path" != "x$new_path"; then
58227    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58230  fi
58231
58232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58234
58235    else
58236      # We're on a unix platform. Hooray! :)
58237      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58238      has_space=`$ECHO "$path" | $GREP " "`
58239      if test "x$has_space" != x; then
58240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58243      fi
58244
58245      # Use eval to expand a potential ~
58246      eval path="$path"
58247      if test ! -f "$path" && test ! -d "$path"; then
58248        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58249      fi
58250
58251      if test -d "$path"; then
58252        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58253      else
58254        dir="`$DIRNAME "$path"`"
58255        base="`$BASENAME "$path"`"
58256        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58257      fi
58258    fi
58259  fi
58260
58261
58262  # Only process if variable expands to non-empty
58263
58264  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58266
58267  # Input might be given as Windows format, start by converting to
58268  # unix format.
58269  path="$POTENTIAL_FREETYPE_LIB_PATH"
58270  new_path=`$CYGPATH -u "$path"`
58271
58272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58275  # "foo.exe" is OK but "foo" is an error.
58276  #
58277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58278  # It is also a way to make sure we got the proper file name for the real test later on.
58279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58280  if test "x$test_shortpath" = x; then
58281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58283    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58284  fi
58285
58286  # Call helper function which possibly converts this using DOS-style short mode.
58287  # If so, the updated path is stored in $new_path.
58288
58289  input_path="$new_path"
58290  # Check if we need to convert this using DOS-style short mode. If the path
58291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58292  # take no chances and rewrite it.
58293  # Note: m4 eats our [], so we need to use [ and ] instead.
58294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58295  if test "x$has_forbidden_chars" != x; then
58296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58300      # Going to short mode and back again did indeed matter. Since short mode is
58301      # case insensitive, let's make it lowercase to improve readability.
58302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58303      # Now convert it back to Unix-style (cygpath)
58304      input_path=`$CYGPATH -u "$shortmode_path"`
58305      new_path="$input_path"
58306    fi
58307  fi
58308
58309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58310  if test "x$test_cygdrive_prefix" = x; then
58311    # As a simple fix, exclude /usr/bin since it's not a real path.
58312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58314      # a path prefixed by /cygdrive for fixpath to work.
58315      new_path="$CYGWIN_ROOT_PATH$input_path"
58316    fi
58317  fi
58318
58319
58320  if test "x$path" != "x$new_path"; then
58321    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58324  fi
58325
58326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58327
58328  path="$POTENTIAL_FREETYPE_LIB_PATH"
58329  has_colon=`$ECHO $path | $GREP ^.:`
58330  new_path="$path"
58331  if test "x$has_colon" = x; then
58332    # Not in mixed or Windows style, start by that.
58333    new_path=`cmd //c echo $path`
58334  fi
58335
58336
58337  input_path="$new_path"
58338  # Check if we need to convert this using DOS-style short mode. If the path
58339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58340  # take no chances and rewrite it.
58341  # Note: m4 eats our [], so we need to use [ and ] instead.
58342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58343  if test "x$has_forbidden_chars" != x; then
58344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58346  fi
58347
58348
58349  windows_path="$new_path"
58350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58351    unix_path=`$CYGPATH -u "$windows_path"`
58352    new_path="$unix_path"
58353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58355    new_path="$unix_path"
58356  fi
58357
58358  if test "x$path" != "x$new_path"; then
58359    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58362  fi
58363
58364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58366
58367    else
58368      # We're on a unix platform. Hooray! :)
58369      path="$POTENTIAL_FREETYPE_LIB_PATH"
58370      has_space=`$ECHO "$path" | $GREP " "`
58371      if test "x$has_space" != x; then
58372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58375      fi
58376
58377      # Use eval to expand a potential ~
58378      eval path="$path"
58379      if test ! -f "$path" && test ! -d "$path"; then
58380        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58381      fi
58382
58383      if test -d "$path"; then
58384        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58385      else
58386        dir="`$DIRNAME "$path"`"
58387        base="`$BASENAME "$path"`"
58388        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58389      fi
58390    fi
58391  fi
58392
58393
58394    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58396$as_echo_n "checking for freetype includes... " >&6; }
58397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58398$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58399    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58401$as_echo_n "checking for freetype libraries... " >&6; }
58402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58403$as_echo "$FREETYPE_LIB_PATH" >&6; }
58404  fi
58405
58406
58407          if test "x$FOUND_FREETYPE" != xyes; then
58408            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
58409
58410  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58411  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58412  METHOD="well-known location"
58413
58414  # Let's start with an optimistic view of the world :-)
58415  FOUND_FREETYPE=yes
58416
58417  # First look for the canonical freetype main include file ft2build.h.
58418  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58419    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58420    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58421    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58422      # Fail.
58423      FOUND_FREETYPE=no
58424    fi
58425  fi
58426
58427  if test "x$FOUND_FREETYPE" = xyes; then
58428    # Include file found, let's continue the sanity check.
58429    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58430$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58431
58432    # Reset to default value
58433    FREETYPE_BASE_NAME=freetype
58434    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58435    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58436      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58437          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58438        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58439        # for the .6 version explicitly.
58440        FREETYPE_BASE_NAME=freetype.6
58441        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58442        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58443$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58444      else
58445        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58446$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58447        FOUND_FREETYPE=no
58448      fi
58449    else
58450      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58451        # On Windows, we will need both .lib and .dll file.
58452        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58453          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58454$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58455          FOUND_FREETYPE=no
58456        fi
58457      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58459        # Found lib in isa dir, use that instead.
58460        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58461        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58462$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58463      fi
58464    fi
58465  fi
58466
58467  if test "x$FOUND_FREETYPE" = xyes; then
58468
58469  # Only process if variable expands to non-empty
58470
58471  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58473
58474  # Input might be given as Windows format, start by converting to
58475  # unix format.
58476  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58477  new_path=`$CYGPATH -u "$path"`
58478
58479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58482  # "foo.exe" is OK but "foo" is an error.
58483  #
58484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58485  # It is also a way to make sure we got the proper file name for the real test later on.
58486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58487  if test "x$test_shortpath" = x; then
58488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58490    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58491  fi
58492
58493  # Call helper function which possibly converts this using DOS-style short mode.
58494  # If so, the updated path is stored in $new_path.
58495
58496  input_path="$new_path"
58497  # Check if we need to convert this using DOS-style short mode. If the path
58498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58499  # take no chances and rewrite it.
58500  # Note: m4 eats our [], so we need to use [ and ] instead.
58501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58502  if test "x$has_forbidden_chars" != x; then
58503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58507      # Going to short mode and back again did indeed matter. Since short mode is
58508      # case insensitive, let's make it lowercase to improve readability.
58509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58510      # Now convert it back to Unix-style (cygpath)
58511      input_path=`$CYGPATH -u "$shortmode_path"`
58512      new_path="$input_path"
58513    fi
58514  fi
58515
58516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58517  if test "x$test_cygdrive_prefix" = x; then
58518    # As a simple fix, exclude /usr/bin since it's not a real path.
58519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58521      # a path prefixed by /cygdrive for fixpath to work.
58522      new_path="$CYGWIN_ROOT_PATH$input_path"
58523    fi
58524  fi
58525
58526
58527  if test "x$path" != "x$new_path"; then
58528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58531  fi
58532
58533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58534
58535  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58536  has_colon=`$ECHO $path | $GREP ^.:`
58537  new_path="$path"
58538  if test "x$has_colon" = x; then
58539    # Not in mixed or Windows style, start by that.
58540    new_path=`cmd //c echo $path`
58541  fi
58542
58543
58544  input_path="$new_path"
58545  # Check if we need to convert this using DOS-style short mode. If the path
58546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58547  # take no chances and rewrite it.
58548  # Note: m4 eats our [], so we need to use [ and ] instead.
58549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58550  if test "x$has_forbidden_chars" != x; then
58551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58553  fi
58554
58555
58556  windows_path="$new_path"
58557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58558    unix_path=`$CYGPATH -u "$windows_path"`
58559    new_path="$unix_path"
58560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58562    new_path="$unix_path"
58563  fi
58564
58565  if test "x$path" != "x$new_path"; then
58566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58569  fi
58570
58571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58573
58574    else
58575      # We're on a unix platform. Hooray! :)
58576      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58577      has_space=`$ECHO "$path" | $GREP " "`
58578      if test "x$has_space" != x; then
58579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58582      fi
58583
58584      # Use eval to expand a potential ~
58585      eval path="$path"
58586      if test ! -f "$path" && test ! -d "$path"; then
58587        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58588      fi
58589
58590      if test -d "$path"; then
58591        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58592      else
58593        dir="`$DIRNAME "$path"`"
58594        base="`$BASENAME "$path"`"
58595        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58596      fi
58597    fi
58598  fi
58599
58600
58601  # Only process if variable expands to non-empty
58602
58603  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58605
58606  # Input might be given as Windows format, start by converting to
58607  # unix format.
58608  path="$POTENTIAL_FREETYPE_LIB_PATH"
58609  new_path=`$CYGPATH -u "$path"`
58610
58611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58614  # "foo.exe" is OK but "foo" is an error.
58615  #
58616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58617  # It is also a way to make sure we got the proper file name for the real test later on.
58618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58619  if test "x$test_shortpath" = x; then
58620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58621$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58622    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58623  fi
58624
58625  # Call helper function which possibly converts this using DOS-style short mode.
58626  # If so, the updated path is stored in $new_path.
58627
58628  input_path="$new_path"
58629  # Check if we need to convert this using DOS-style short mode. If the path
58630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58631  # take no chances and rewrite it.
58632  # Note: m4 eats our [], so we need to use [ and ] instead.
58633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58634  if test "x$has_forbidden_chars" != x; then
58635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58639      # Going to short mode and back again did indeed matter. Since short mode is
58640      # case insensitive, let's make it lowercase to improve readability.
58641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58642      # Now convert it back to Unix-style (cygpath)
58643      input_path=`$CYGPATH -u "$shortmode_path"`
58644      new_path="$input_path"
58645    fi
58646  fi
58647
58648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58649  if test "x$test_cygdrive_prefix" = x; then
58650    # As a simple fix, exclude /usr/bin since it's not a real path.
58651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58653      # a path prefixed by /cygdrive for fixpath to work.
58654      new_path="$CYGWIN_ROOT_PATH$input_path"
58655    fi
58656  fi
58657
58658
58659  if test "x$path" != "x$new_path"; then
58660    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58663  fi
58664
58665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58666
58667  path="$POTENTIAL_FREETYPE_LIB_PATH"
58668  has_colon=`$ECHO $path | $GREP ^.:`
58669  new_path="$path"
58670  if test "x$has_colon" = x; then
58671    # Not in mixed or Windows style, start by that.
58672    new_path=`cmd //c echo $path`
58673  fi
58674
58675
58676  input_path="$new_path"
58677  # Check if we need to convert this using DOS-style short mode. If the path
58678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58679  # take no chances and rewrite it.
58680  # Note: m4 eats our [], so we need to use [ and ] instead.
58681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58682  if test "x$has_forbidden_chars" != x; then
58683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58685  fi
58686
58687
58688  windows_path="$new_path"
58689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58690    unix_path=`$CYGPATH -u "$windows_path"`
58691    new_path="$unix_path"
58692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58694    new_path="$unix_path"
58695  fi
58696
58697  if test "x$path" != "x$new_path"; then
58698    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58701  fi
58702
58703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58705
58706    else
58707      # We're on a unix platform. Hooray! :)
58708      path="$POTENTIAL_FREETYPE_LIB_PATH"
58709      has_space=`$ECHO "$path" | $GREP " "`
58710      if test "x$has_space" != x; then
58711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58714      fi
58715
58716      # Use eval to expand a potential ~
58717      eval path="$path"
58718      if test ! -f "$path" && test ! -d "$path"; then
58719        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58720      fi
58721
58722      if test -d "$path"; then
58723        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58724      else
58725        dir="`$DIRNAME "$path"`"
58726        base="`$BASENAME "$path"`"
58727        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58728      fi
58729    fi
58730  fi
58731
58732
58733    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58735$as_echo_n "checking for freetype includes... " >&6; }
58736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58737$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58738    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58740$as_echo_n "checking for freetype libraries... " >&6; }
58741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58742$as_echo "$FREETYPE_LIB_PATH" >&6; }
58743  fi
58744
58745          fi
58746
58747          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58748            if test "x$FOUND_FREETYPE" != xyes; then
58749              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
58750              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
58751
58752  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58753  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58754  METHOD="well-known location"
58755
58756  # Let's start with an optimistic view of the world :-)
58757  FOUND_FREETYPE=yes
58758
58759  # First look for the canonical freetype main include file ft2build.h.
58760  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58761    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58762    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58763    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58764      # Fail.
58765      FOUND_FREETYPE=no
58766    fi
58767  fi
58768
58769  if test "x$FOUND_FREETYPE" = xyes; then
58770    # Include file found, let's continue the sanity check.
58771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58772$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58773
58774    # Reset to default value
58775    FREETYPE_BASE_NAME=freetype
58776    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58777    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58778      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58779          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58780        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58781        # for the .6 version explicitly.
58782        FREETYPE_BASE_NAME=freetype.6
58783        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58784        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58785$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58786      else
58787        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58789        FOUND_FREETYPE=no
58790      fi
58791    else
58792      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58793        # On Windows, we will need both .lib and .dll file.
58794        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58795          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58796$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58797          FOUND_FREETYPE=no
58798        fi
58799      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58800          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58801        # Found lib in isa dir, use that instead.
58802        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58803        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58804$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58805      fi
58806    fi
58807  fi
58808
58809  if test "x$FOUND_FREETYPE" = xyes; then
58810
58811  # Only process if variable expands to non-empty
58812
58813  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58815
58816  # Input might be given as Windows format, start by converting to
58817  # unix format.
58818  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58819  new_path=`$CYGPATH -u "$path"`
58820
58821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58824  # "foo.exe" is OK but "foo" is an error.
58825  #
58826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58827  # It is also a way to make sure we got the proper file name for the real test later on.
58828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58829  if test "x$test_shortpath" = x; then
58830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58833  fi
58834
58835  # Call helper function which possibly converts this using DOS-style short mode.
58836  # If so, the updated path is stored in $new_path.
58837
58838  input_path="$new_path"
58839  # Check if we need to convert this using DOS-style short mode. If the path
58840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58841  # take no chances and rewrite it.
58842  # Note: m4 eats our [], so we need to use [ and ] instead.
58843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58844  if test "x$has_forbidden_chars" != x; then
58845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58849      # Going to short mode and back again did indeed matter. Since short mode is
58850      # case insensitive, let's make it lowercase to improve readability.
58851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58852      # Now convert it back to Unix-style (cygpath)
58853      input_path=`$CYGPATH -u "$shortmode_path"`
58854      new_path="$input_path"
58855    fi
58856  fi
58857
58858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58859  if test "x$test_cygdrive_prefix" = x; then
58860    # As a simple fix, exclude /usr/bin since it's not a real path.
58861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58863      # a path prefixed by /cygdrive for fixpath to work.
58864      new_path="$CYGWIN_ROOT_PATH$input_path"
58865    fi
58866  fi
58867
58868
58869  if test "x$path" != "x$new_path"; then
58870    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58873  fi
58874
58875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58876
58877  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58878  has_colon=`$ECHO $path | $GREP ^.:`
58879  new_path="$path"
58880  if test "x$has_colon" = x; then
58881    # Not in mixed or Windows style, start by that.
58882    new_path=`cmd //c echo $path`
58883  fi
58884
58885
58886  input_path="$new_path"
58887  # Check if we need to convert this using DOS-style short mode. If the path
58888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58889  # take no chances and rewrite it.
58890  # Note: m4 eats our [], so we need to use [ and ] instead.
58891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58892  if test "x$has_forbidden_chars" != x; then
58893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58895  fi
58896
58897
58898  windows_path="$new_path"
58899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58900    unix_path=`$CYGPATH -u "$windows_path"`
58901    new_path="$unix_path"
58902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58904    new_path="$unix_path"
58905  fi
58906
58907  if test "x$path" != "x$new_path"; then
58908    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58911  fi
58912
58913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58915
58916    else
58917      # We're on a unix platform. Hooray! :)
58918      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58919      has_space=`$ECHO "$path" | $GREP " "`
58920      if test "x$has_space" != x; then
58921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58924      fi
58925
58926      # Use eval to expand a potential ~
58927      eval path="$path"
58928      if test ! -f "$path" && test ! -d "$path"; then
58929        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58930      fi
58931
58932      if test -d "$path"; then
58933        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58934      else
58935        dir="`$DIRNAME "$path"`"
58936        base="`$BASENAME "$path"`"
58937        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58938      fi
58939    fi
58940  fi
58941
58942
58943  # Only process if variable expands to non-empty
58944
58945  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58947
58948  # Input might be given as Windows format, start by converting to
58949  # unix format.
58950  path="$POTENTIAL_FREETYPE_LIB_PATH"
58951  new_path=`$CYGPATH -u "$path"`
58952
58953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58956  # "foo.exe" is OK but "foo" is an error.
58957  #
58958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58959  # It is also a way to make sure we got the proper file name for the real test later on.
58960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58961  if test "x$test_shortpath" = x; then
58962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58964    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58965  fi
58966
58967  # Call helper function which possibly converts this using DOS-style short mode.
58968  # If so, the updated path is stored in $new_path.
58969
58970  input_path="$new_path"
58971  # Check if we need to convert this using DOS-style short mode. If the path
58972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58973  # take no chances and rewrite it.
58974  # Note: m4 eats our [], so we need to use [ and ] instead.
58975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58976  if test "x$has_forbidden_chars" != x; then
58977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58981      # Going to short mode and back again did indeed matter. Since short mode is
58982      # case insensitive, let's make it lowercase to improve readability.
58983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58984      # Now convert it back to Unix-style (cygpath)
58985      input_path=`$CYGPATH -u "$shortmode_path"`
58986      new_path="$input_path"
58987    fi
58988  fi
58989
58990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58991  if test "x$test_cygdrive_prefix" = x; then
58992    # As a simple fix, exclude /usr/bin since it's not a real path.
58993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58995      # a path prefixed by /cygdrive for fixpath to work.
58996      new_path="$CYGWIN_ROOT_PATH$input_path"
58997    fi
58998  fi
58999
59000
59001  if test "x$path" != "x$new_path"; then
59002    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59005  fi
59006
59007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59008
59009  path="$POTENTIAL_FREETYPE_LIB_PATH"
59010  has_colon=`$ECHO $path | $GREP ^.:`
59011  new_path="$path"
59012  if test "x$has_colon" = x; then
59013    # Not in mixed or Windows style, start by that.
59014    new_path=`cmd //c echo $path`
59015  fi
59016
59017
59018  input_path="$new_path"
59019  # Check if we need to convert this using DOS-style short mode. If the path
59020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59021  # take no chances and rewrite it.
59022  # Note: m4 eats our [], so we need to use [ and ] instead.
59023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59024  if test "x$has_forbidden_chars" != x; then
59025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59027  fi
59028
59029
59030  windows_path="$new_path"
59031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59032    unix_path=`$CYGPATH -u "$windows_path"`
59033    new_path="$unix_path"
59034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59036    new_path="$unix_path"
59037  fi
59038
59039  if test "x$path" != "x$new_path"; then
59040    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59043  fi
59044
59045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59047
59048    else
59049      # We're on a unix platform. Hooray! :)
59050      path="$POTENTIAL_FREETYPE_LIB_PATH"
59051      has_space=`$ECHO "$path" | $GREP " "`
59052      if test "x$has_space" != x; then
59053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59055        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59056      fi
59057
59058      # Use eval to expand a potential ~
59059      eval path="$path"
59060      if test ! -f "$path" && test ! -d "$path"; then
59061        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59062      fi
59063
59064      if test -d "$path"; then
59065        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59066      else
59067        dir="`$DIRNAME "$path"`"
59068        base="`$BASENAME "$path"`"
59069        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59070      fi
59071    fi
59072  fi
59073
59074
59075    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59077$as_echo_n "checking for freetype includes... " >&6; }
59078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59079$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59080    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59082$as_echo_n "checking for freetype libraries... " >&6; }
59083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59084$as_echo "$FREETYPE_LIB_PATH" >&6; }
59085  fi
59086
59087            fi
59088          fi
59089
59090          if test "x$FOUND_FREETYPE" != xyes; then
59091            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
59092
59093  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59094  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59095  METHOD="well-known location"
59096
59097  # Let's start with an optimistic view of the world :-)
59098  FOUND_FREETYPE=yes
59099
59100  # First look for the canonical freetype main include file ft2build.h.
59101  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59102    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59103    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59104    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59105      # Fail.
59106      FOUND_FREETYPE=no
59107    fi
59108  fi
59109
59110  if test "x$FOUND_FREETYPE" = xyes; then
59111    # Include file found, let's continue the sanity check.
59112    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59113$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59114
59115    # Reset to default value
59116    FREETYPE_BASE_NAME=freetype
59117    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59118    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59119      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59120          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59121        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59122        # for the .6 version explicitly.
59123        FREETYPE_BASE_NAME=freetype.6
59124        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59125        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59126$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59127      else
59128        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59129$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59130        FOUND_FREETYPE=no
59131      fi
59132    else
59133      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59134        # On Windows, we will need both .lib and .dll file.
59135        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59136          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59137$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59138          FOUND_FREETYPE=no
59139        fi
59140      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59141          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59142        # Found lib in isa dir, use that instead.
59143        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59144        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59145$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59146      fi
59147    fi
59148  fi
59149
59150  if test "x$FOUND_FREETYPE" = xyes; then
59151
59152  # Only process if variable expands to non-empty
59153
59154  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59156
59157  # Input might be given as Windows format, start by converting to
59158  # unix format.
59159  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59160  new_path=`$CYGPATH -u "$path"`
59161
59162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59165  # "foo.exe" is OK but "foo" is an error.
59166  #
59167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59168  # It is also a way to make sure we got the proper file name for the real test later on.
59169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59170  if test "x$test_shortpath" = x; then
59171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59173    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59174  fi
59175
59176  # Call helper function which possibly converts this using DOS-style short mode.
59177  # If so, the updated path is stored in $new_path.
59178
59179  input_path="$new_path"
59180  # Check if we need to convert this using DOS-style short mode. If the path
59181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59182  # take no chances and rewrite it.
59183  # Note: m4 eats our [], so we need to use [ and ] instead.
59184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59185  if test "x$has_forbidden_chars" != x; then
59186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59190      # Going to short mode and back again did indeed matter. Since short mode is
59191      # case insensitive, let's make it lowercase to improve readability.
59192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59193      # Now convert it back to Unix-style (cygpath)
59194      input_path=`$CYGPATH -u "$shortmode_path"`
59195      new_path="$input_path"
59196    fi
59197  fi
59198
59199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59200  if test "x$test_cygdrive_prefix" = x; then
59201    # As a simple fix, exclude /usr/bin since it's not a real path.
59202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59204      # a path prefixed by /cygdrive for fixpath to work.
59205      new_path="$CYGWIN_ROOT_PATH$input_path"
59206    fi
59207  fi
59208
59209
59210  if test "x$path" != "x$new_path"; then
59211    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59213$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59214  fi
59215
59216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59217
59218  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59219  has_colon=`$ECHO $path | $GREP ^.:`
59220  new_path="$path"
59221  if test "x$has_colon" = x; then
59222    # Not in mixed or Windows style, start by that.
59223    new_path=`cmd //c echo $path`
59224  fi
59225
59226
59227  input_path="$new_path"
59228  # Check if we need to convert this using DOS-style short mode. If the path
59229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59230  # take no chances and rewrite it.
59231  # Note: m4 eats our [], so we need to use [ and ] instead.
59232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59233  if test "x$has_forbidden_chars" != x; then
59234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59236  fi
59237
59238
59239  windows_path="$new_path"
59240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59241    unix_path=`$CYGPATH -u "$windows_path"`
59242    new_path="$unix_path"
59243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59245    new_path="$unix_path"
59246  fi
59247
59248  if test "x$path" != "x$new_path"; then
59249    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59251$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59252  fi
59253
59254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59256
59257    else
59258      # We're on a unix platform. Hooray! :)
59259      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59260      has_space=`$ECHO "$path" | $GREP " "`
59261      if test "x$has_space" != x; then
59262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59265      fi
59266
59267      # Use eval to expand a potential ~
59268      eval path="$path"
59269      if test ! -f "$path" && test ! -d "$path"; then
59270        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59271      fi
59272
59273      if test -d "$path"; then
59274        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59275      else
59276        dir="`$DIRNAME "$path"`"
59277        base="`$BASENAME "$path"`"
59278        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59279      fi
59280    fi
59281  fi
59282
59283
59284  # Only process if variable expands to non-empty
59285
59286  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59288
59289  # Input might be given as Windows format, start by converting to
59290  # unix format.
59291  path="$POTENTIAL_FREETYPE_LIB_PATH"
59292  new_path=`$CYGPATH -u "$path"`
59293
59294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59297  # "foo.exe" is OK but "foo" is an error.
59298  #
59299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59300  # It is also a way to make sure we got the proper file name for the real test later on.
59301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59302  if test "x$test_shortpath" = x; then
59303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59305    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59306  fi
59307
59308  # Call helper function which possibly converts this using DOS-style short mode.
59309  # If so, the updated path is stored in $new_path.
59310
59311  input_path="$new_path"
59312  # Check if we need to convert this using DOS-style short mode. If the path
59313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59314  # take no chances and rewrite it.
59315  # Note: m4 eats our [], so we need to use [ and ] instead.
59316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59317  if test "x$has_forbidden_chars" != x; then
59318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59322      # Going to short mode and back again did indeed matter. Since short mode is
59323      # case insensitive, let's make it lowercase to improve readability.
59324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59325      # Now convert it back to Unix-style (cygpath)
59326      input_path=`$CYGPATH -u "$shortmode_path"`
59327      new_path="$input_path"
59328    fi
59329  fi
59330
59331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59332  if test "x$test_cygdrive_prefix" = x; then
59333    # As a simple fix, exclude /usr/bin since it's not a real path.
59334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59336      # a path prefixed by /cygdrive for fixpath to work.
59337      new_path="$CYGWIN_ROOT_PATH$input_path"
59338    fi
59339  fi
59340
59341
59342  if test "x$path" != "x$new_path"; then
59343    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59345$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59346  fi
59347
59348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59349
59350  path="$POTENTIAL_FREETYPE_LIB_PATH"
59351  has_colon=`$ECHO $path | $GREP ^.:`
59352  new_path="$path"
59353  if test "x$has_colon" = x; then
59354    # Not in mixed or Windows style, start by that.
59355    new_path=`cmd //c echo $path`
59356  fi
59357
59358
59359  input_path="$new_path"
59360  # Check if we need to convert this using DOS-style short mode. If the path
59361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59362  # take no chances and rewrite it.
59363  # Note: m4 eats our [], so we need to use [ and ] instead.
59364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59365  if test "x$has_forbidden_chars" != x; then
59366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59368  fi
59369
59370
59371  windows_path="$new_path"
59372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59373    unix_path=`$CYGPATH -u "$windows_path"`
59374    new_path="$unix_path"
59375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59377    new_path="$unix_path"
59378  fi
59379
59380  if test "x$path" != "x$new_path"; then
59381    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59383$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59384  fi
59385
59386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59388
59389    else
59390      # We're on a unix platform. Hooray! :)
59391      path="$POTENTIAL_FREETYPE_LIB_PATH"
59392      has_space=`$ECHO "$path" | $GREP " "`
59393      if test "x$has_space" != x; then
59394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59395$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59397      fi
59398
59399      # Use eval to expand a potential ~
59400      eval path="$path"
59401      if test ! -f "$path" && test ! -d "$path"; then
59402        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59403      fi
59404
59405      if test -d "$path"; then
59406        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59407      else
59408        dir="`$DIRNAME "$path"`"
59409        base="`$BASENAME "$path"`"
59410        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59411      fi
59412    fi
59413  fi
59414
59415
59416    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59418$as_echo_n "checking for freetype includes... " >&6; }
59419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59420$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59421    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59423$as_echo_n "checking for freetype libraries... " >&6; }
59424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59425$as_echo "$FREETYPE_LIB_PATH" >&6; }
59426  fi
59427
59428          fi
59429
59430          if test "x$FOUND_FREETYPE" != xyes; then
59431            FREETYPE_BASE_DIR="$SYSROOT/usr"
59432            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59433
59434  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59435  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
59436  METHOD="well-known location"
59437
59438  # Let's start with an optimistic view of the world :-)
59439  FOUND_FREETYPE=yes
59440
59441  # First look for the canonical freetype main include file ft2build.h.
59442  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59443    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59444    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59445    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59446      # Fail.
59447      FOUND_FREETYPE=no
59448    fi
59449  fi
59450
59451  if test "x$FOUND_FREETYPE" = xyes; then
59452    # Include file found, let's continue the sanity check.
59453    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59454$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59455
59456    # Reset to default value
59457    FREETYPE_BASE_NAME=freetype
59458    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59459    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59460      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59461          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59462        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59463        # for the .6 version explicitly.
59464        FREETYPE_BASE_NAME=freetype.6
59465        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59466        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59467$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59468      else
59469        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59470$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59471        FOUND_FREETYPE=no
59472      fi
59473    else
59474      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59475        # On Windows, we will need both .lib and .dll file.
59476        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59477          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59478$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59479          FOUND_FREETYPE=no
59480        fi
59481      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59483        # Found lib in isa dir, use that instead.
59484        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59485        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59486$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59487      fi
59488    fi
59489  fi
59490
59491  if test "x$FOUND_FREETYPE" = xyes; then
59492
59493  # Only process if variable expands to non-empty
59494
59495  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59497
59498  # Input might be given as Windows format, start by converting to
59499  # unix format.
59500  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59501  new_path=`$CYGPATH -u "$path"`
59502
59503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59506  # "foo.exe" is OK but "foo" is an error.
59507  #
59508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59509  # It is also a way to make sure we got the proper file name for the real test later on.
59510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59511  if test "x$test_shortpath" = x; then
59512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59514    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59515  fi
59516
59517  # Call helper function which possibly converts this using DOS-style short mode.
59518  # If so, the updated path is stored in $new_path.
59519
59520  input_path="$new_path"
59521  # Check if we need to convert this using DOS-style short mode. If the path
59522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59523  # take no chances and rewrite it.
59524  # Note: m4 eats our [], so we need to use [ and ] instead.
59525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59526  if test "x$has_forbidden_chars" != x; then
59527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59531      # Going to short mode and back again did indeed matter. Since short mode is
59532      # case insensitive, let's make it lowercase to improve readability.
59533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59534      # Now convert it back to Unix-style (cygpath)
59535      input_path=`$CYGPATH -u "$shortmode_path"`
59536      new_path="$input_path"
59537    fi
59538  fi
59539
59540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59541  if test "x$test_cygdrive_prefix" = x; then
59542    # As a simple fix, exclude /usr/bin since it's not a real path.
59543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59545      # a path prefixed by /cygdrive for fixpath to work.
59546      new_path="$CYGWIN_ROOT_PATH$input_path"
59547    fi
59548  fi
59549
59550
59551  if test "x$path" != "x$new_path"; then
59552    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59554$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59555  fi
59556
59557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59558
59559  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59560  has_colon=`$ECHO $path | $GREP ^.:`
59561  new_path="$path"
59562  if test "x$has_colon" = x; then
59563    # Not in mixed or Windows style, start by that.
59564    new_path=`cmd //c echo $path`
59565  fi
59566
59567
59568  input_path="$new_path"
59569  # Check if we need to convert this using DOS-style short mode. If the path
59570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59571  # take no chances and rewrite it.
59572  # Note: m4 eats our [], so we need to use [ and ] instead.
59573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59574  if test "x$has_forbidden_chars" != x; then
59575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59577  fi
59578
59579
59580  windows_path="$new_path"
59581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59582    unix_path=`$CYGPATH -u "$windows_path"`
59583    new_path="$unix_path"
59584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59586    new_path="$unix_path"
59587  fi
59588
59589  if test "x$path" != "x$new_path"; then
59590    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59593  fi
59594
59595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59597
59598    else
59599      # We're on a unix platform. Hooray! :)
59600      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59601      has_space=`$ECHO "$path" | $GREP " "`
59602      if test "x$has_space" != x; then
59603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59606      fi
59607
59608      # Use eval to expand a potential ~
59609      eval path="$path"
59610      if test ! -f "$path" && test ! -d "$path"; then
59611        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59612      fi
59613
59614      if test -d "$path"; then
59615        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59616      else
59617        dir="`$DIRNAME "$path"`"
59618        base="`$BASENAME "$path"`"
59619        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59620      fi
59621    fi
59622  fi
59623
59624
59625  # Only process if variable expands to non-empty
59626
59627  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59629
59630  # Input might be given as Windows format, start by converting to
59631  # unix format.
59632  path="$POTENTIAL_FREETYPE_LIB_PATH"
59633  new_path=`$CYGPATH -u "$path"`
59634
59635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59638  # "foo.exe" is OK but "foo" is an error.
59639  #
59640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59641  # It is also a way to make sure we got the proper file name for the real test later on.
59642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59643  if test "x$test_shortpath" = x; then
59644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59646    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59647  fi
59648
59649  # Call helper function which possibly converts this using DOS-style short mode.
59650  # If so, the updated path is stored in $new_path.
59651
59652  input_path="$new_path"
59653  # Check if we need to convert this using DOS-style short mode. If the path
59654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59655  # take no chances and rewrite it.
59656  # Note: m4 eats our [], so we need to use [ and ] instead.
59657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59658  if test "x$has_forbidden_chars" != x; then
59659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59663      # Going to short mode and back again did indeed matter. Since short mode is
59664      # case insensitive, let's make it lowercase to improve readability.
59665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59666      # Now convert it back to Unix-style (cygpath)
59667      input_path=`$CYGPATH -u "$shortmode_path"`
59668      new_path="$input_path"
59669    fi
59670  fi
59671
59672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59673  if test "x$test_cygdrive_prefix" = x; then
59674    # As a simple fix, exclude /usr/bin since it's not a real path.
59675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59677      # a path prefixed by /cygdrive for fixpath to work.
59678      new_path="$CYGWIN_ROOT_PATH$input_path"
59679    fi
59680  fi
59681
59682
59683  if test "x$path" != "x$new_path"; then
59684    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59686$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59687  fi
59688
59689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59690
59691  path="$POTENTIAL_FREETYPE_LIB_PATH"
59692  has_colon=`$ECHO $path | $GREP ^.:`
59693  new_path="$path"
59694  if test "x$has_colon" = x; then
59695    # Not in mixed or Windows style, start by that.
59696    new_path=`cmd //c echo $path`
59697  fi
59698
59699
59700  input_path="$new_path"
59701  # Check if we need to convert this using DOS-style short mode. If the path
59702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59703  # take no chances and rewrite it.
59704  # Note: m4 eats our [], so we need to use [ and ] instead.
59705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59706  if test "x$has_forbidden_chars" != x; then
59707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59709  fi
59710
59711
59712  windows_path="$new_path"
59713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59714    unix_path=`$CYGPATH -u "$windows_path"`
59715    new_path="$unix_path"
59716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59718    new_path="$unix_path"
59719  fi
59720
59721  if test "x$path" != "x$new_path"; then
59722    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59724$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59725  fi
59726
59727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59729
59730    else
59731      # We're on a unix platform. Hooray! :)
59732      path="$POTENTIAL_FREETYPE_LIB_PATH"
59733      has_space=`$ECHO "$path" | $GREP " "`
59734      if test "x$has_space" != x; then
59735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59738      fi
59739
59740      # Use eval to expand a potential ~
59741      eval path="$path"
59742      if test ! -f "$path" && test ! -d "$path"; then
59743        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59744      fi
59745
59746      if test -d "$path"; then
59747        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59748      else
59749        dir="`$DIRNAME "$path"`"
59750        base="`$BASENAME "$path"`"
59751        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59752      fi
59753    fi
59754  fi
59755
59756
59757    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59759$as_echo_n "checking for freetype includes... " >&6; }
59760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59761$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59762    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59764$as_echo_n "checking for freetype libraries... " >&6; }
59765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59766$as_echo "$FREETYPE_LIB_PATH" >&6; }
59767  fi
59768
59769            else
59770
59771  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59772  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
59773  METHOD="well-known location"
59774
59775  # Let's start with an optimistic view of the world :-)
59776  FOUND_FREETYPE=yes
59777
59778  # First look for the canonical freetype main include file ft2build.h.
59779  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59780    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59781    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59782    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59783      # Fail.
59784      FOUND_FREETYPE=no
59785    fi
59786  fi
59787
59788  if test "x$FOUND_FREETYPE" = xyes; then
59789    # Include file found, let's continue the sanity check.
59790    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59791$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59792
59793    # Reset to default value
59794    FREETYPE_BASE_NAME=freetype
59795    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59796    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59797      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59798          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59799        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59800        # for the .6 version explicitly.
59801        FREETYPE_BASE_NAME=freetype.6
59802        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59803        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59804$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59805      else
59806        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59807$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59808        FOUND_FREETYPE=no
59809      fi
59810    else
59811      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59812        # On Windows, we will need both .lib and .dll file.
59813        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59814          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59815$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59816          FOUND_FREETYPE=no
59817        fi
59818      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59819          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59820        # Found lib in isa dir, use that instead.
59821        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59822        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59823$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59824      fi
59825    fi
59826  fi
59827
59828  if test "x$FOUND_FREETYPE" = xyes; then
59829
59830  # Only process if variable expands to non-empty
59831
59832  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59834
59835  # Input might be given as Windows format, start by converting to
59836  # unix format.
59837  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59838  new_path=`$CYGPATH -u "$path"`
59839
59840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59843  # "foo.exe" is OK but "foo" is an error.
59844  #
59845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59846  # It is also a way to make sure we got the proper file name for the real test later on.
59847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59848  if test "x$test_shortpath" = x; then
59849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59851    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59852  fi
59853
59854  # Call helper function which possibly converts this using DOS-style short mode.
59855  # If so, the updated path is stored in $new_path.
59856
59857  input_path="$new_path"
59858  # Check if we need to convert this using DOS-style short mode. If the path
59859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59860  # take no chances and rewrite it.
59861  # Note: m4 eats our [], so we need to use [ and ] instead.
59862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59863  if test "x$has_forbidden_chars" != x; then
59864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59868      # Going to short mode and back again did indeed matter. Since short mode is
59869      # case insensitive, let's make it lowercase to improve readability.
59870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59871      # Now convert it back to Unix-style (cygpath)
59872      input_path=`$CYGPATH -u "$shortmode_path"`
59873      new_path="$input_path"
59874    fi
59875  fi
59876
59877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59878  if test "x$test_cygdrive_prefix" = x; then
59879    # As a simple fix, exclude /usr/bin since it's not a real path.
59880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59882      # a path prefixed by /cygdrive for fixpath to work.
59883      new_path="$CYGWIN_ROOT_PATH$input_path"
59884    fi
59885  fi
59886
59887
59888  if test "x$path" != "x$new_path"; then
59889    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59892  fi
59893
59894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59895
59896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59897  has_colon=`$ECHO $path | $GREP ^.:`
59898  new_path="$path"
59899  if test "x$has_colon" = x; then
59900    # Not in mixed or Windows style, start by that.
59901    new_path=`cmd //c echo $path`
59902  fi
59903
59904
59905  input_path="$new_path"
59906  # Check if we need to convert this using DOS-style short mode. If the path
59907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59908  # take no chances and rewrite it.
59909  # Note: m4 eats our [], so we need to use [ and ] instead.
59910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59911  if test "x$has_forbidden_chars" != x; then
59912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59914  fi
59915
59916
59917  windows_path="$new_path"
59918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59919    unix_path=`$CYGPATH -u "$windows_path"`
59920    new_path="$unix_path"
59921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59923    new_path="$unix_path"
59924  fi
59925
59926  if test "x$path" != "x$new_path"; then
59927    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59930  fi
59931
59932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59934
59935    else
59936      # We're on a unix platform. Hooray! :)
59937      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59938      has_space=`$ECHO "$path" | $GREP " "`
59939      if test "x$has_space" != x; then
59940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59943      fi
59944
59945      # Use eval to expand a potential ~
59946      eval path="$path"
59947      if test ! -f "$path" && test ! -d "$path"; then
59948        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59949      fi
59950
59951      if test -d "$path"; then
59952        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59953      else
59954        dir="`$DIRNAME "$path"`"
59955        base="`$BASENAME "$path"`"
59956        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59957      fi
59958    fi
59959  fi
59960
59961
59962  # Only process if variable expands to non-empty
59963
59964  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59966
59967  # Input might be given as Windows format, start by converting to
59968  # unix format.
59969  path="$POTENTIAL_FREETYPE_LIB_PATH"
59970  new_path=`$CYGPATH -u "$path"`
59971
59972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59975  # "foo.exe" is OK but "foo" is an error.
59976  #
59977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59978  # It is also a way to make sure we got the proper file name for the real test later on.
59979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59980  if test "x$test_shortpath" = x; then
59981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59983    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59984  fi
59985
59986  # Call helper function which possibly converts this using DOS-style short mode.
59987  # If so, the updated path is stored in $new_path.
59988
59989  input_path="$new_path"
59990  # Check if we need to convert this using DOS-style short mode. If the path
59991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59992  # take no chances and rewrite it.
59993  # Note: m4 eats our [], so we need to use [ and ] instead.
59994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59995  if test "x$has_forbidden_chars" != x; then
59996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60000      # Going to short mode and back again did indeed matter. Since short mode is
60001      # case insensitive, let's make it lowercase to improve readability.
60002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60003      # Now convert it back to Unix-style (cygpath)
60004      input_path=`$CYGPATH -u "$shortmode_path"`
60005      new_path="$input_path"
60006    fi
60007  fi
60008
60009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60010  if test "x$test_cygdrive_prefix" = x; then
60011    # As a simple fix, exclude /usr/bin since it's not a real path.
60012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60014      # a path prefixed by /cygdrive for fixpath to work.
60015      new_path="$CYGWIN_ROOT_PATH$input_path"
60016    fi
60017  fi
60018
60019
60020  if test "x$path" != "x$new_path"; then
60021    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60024  fi
60025
60026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60027
60028  path="$POTENTIAL_FREETYPE_LIB_PATH"
60029  has_colon=`$ECHO $path | $GREP ^.:`
60030  new_path="$path"
60031  if test "x$has_colon" = x; then
60032    # Not in mixed or Windows style, start by that.
60033    new_path=`cmd //c echo $path`
60034  fi
60035
60036
60037  input_path="$new_path"
60038  # Check if we need to convert this using DOS-style short mode. If the path
60039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60040  # take no chances and rewrite it.
60041  # Note: m4 eats our [], so we need to use [ and ] instead.
60042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60043  if test "x$has_forbidden_chars" != x; then
60044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60046  fi
60047
60048
60049  windows_path="$new_path"
60050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60051    unix_path=`$CYGPATH -u "$windows_path"`
60052    new_path="$unix_path"
60053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60055    new_path="$unix_path"
60056  fi
60057
60058  if test "x$path" != "x$new_path"; then
60059    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60062  fi
60063
60064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60066
60067    else
60068      # We're on a unix platform. Hooray! :)
60069      path="$POTENTIAL_FREETYPE_LIB_PATH"
60070      has_space=`$ECHO "$path" | $GREP " "`
60071      if test "x$has_space" != x; then
60072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60075      fi
60076
60077      # Use eval to expand a potential ~
60078      eval path="$path"
60079      if test ! -f "$path" && test ! -d "$path"; then
60080        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60081      fi
60082
60083      if test -d "$path"; then
60084        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60085      else
60086        dir="`$DIRNAME "$path"`"
60087        base="`$BASENAME "$path"`"
60088        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60089      fi
60090    fi
60091  fi
60092
60093
60094    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60096$as_echo_n "checking for freetype includes... " >&6; }
60097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60098$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60099    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60101$as_echo_n "checking for freetype libraries... " >&6; }
60102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60103$as_echo "$FREETYPE_LIB_PATH" >&6; }
60104  fi
60105
60106              if test "x$FOUND_FREETYPE" != xyes; then
60107
60108  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60109  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60110  METHOD="well-known location"
60111
60112  # Let's start with an optimistic view of the world :-)
60113  FOUND_FREETYPE=yes
60114
60115  # First look for the canonical freetype main include file ft2build.h.
60116  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60117    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60118    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60119    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60120      # Fail.
60121      FOUND_FREETYPE=no
60122    fi
60123  fi
60124
60125  if test "x$FOUND_FREETYPE" = xyes; then
60126    # Include file found, let's continue the sanity check.
60127    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60128$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60129
60130    # Reset to default value
60131    FREETYPE_BASE_NAME=freetype
60132    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60133    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60134      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60135          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60136        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60137        # for the .6 version explicitly.
60138        FREETYPE_BASE_NAME=freetype.6
60139        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60140        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60141$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60142      else
60143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60144$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60145        FOUND_FREETYPE=no
60146      fi
60147    else
60148      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60149        # On Windows, we will need both .lib and .dll file.
60150        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60151          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60152$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60153          FOUND_FREETYPE=no
60154        fi
60155      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60156          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60157        # Found lib in isa dir, use that instead.
60158        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60159        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60160$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60161      fi
60162    fi
60163  fi
60164
60165  if test "x$FOUND_FREETYPE" = xyes; then
60166
60167  # Only process if variable expands to non-empty
60168
60169  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60171
60172  # Input might be given as Windows format, start by converting to
60173  # unix format.
60174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60175  new_path=`$CYGPATH -u "$path"`
60176
60177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60180  # "foo.exe" is OK but "foo" is an error.
60181  #
60182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60183  # It is also a way to make sure we got the proper file name for the real test later on.
60184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60185  if test "x$test_shortpath" = x; then
60186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60188    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60189  fi
60190
60191  # Call helper function which possibly converts this using DOS-style short mode.
60192  # If so, the updated path is stored in $new_path.
60193
60194  input_path="$new_path"
60195  # Check if we need to convert this using DOS-style short mode. If the path
60196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60197  # take no chances and rewrite it.
60198  # Note: m4 eats our [], so we need to use [ and ] instead.
60199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60200  if test "x$has_forbidden_chars" != x; then
60201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60205      # Going to short mode and back again did indeed matter. Since short mode is
60206      # case insensitive, let's make it lowercase to improve readability.
60207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60208      # Now convert it back to Unix-style (cygpath)
60209      input_path=`$CYGPATH -u "$shortmode_path"`
60210      new_path="$input_path"
60211    fi
60212  fi
60213
60214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60215  if test "x$test_cygdrive_prefix" = x; then
60216    # As a simple fix, exclude /usr/bin since it's not a real path.
60217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60219      # a path prefixed by /cygdrive for fixpath to work.
60220      new_path="$CYGWIN_ROOT_PATH$input_path"
60221    fi
60222  fi
60223
60224
60225  if test "x$path" != "x$new_path"; then
60226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60229  fi
60230
60231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60232
60233  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60234  has_colon=`$ECHO $path | $GREP ^.:`
60235  new_path="$path"
60236  if test "x$has_colon" = x; then
60237    # Not in mixed or Windows style, start by that.
60238    new_path=`cmd //c echo $path`
60239  fi
60240
60241
60242  input_path="$new_path"
60243  # Check if we need to convert this using DOS-style short mode. If the path
60244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60245  # take no chances and rewrite it.
60246  # Note: m4 eats our [], so we need to use [ and ] instead.
60247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60248  if test "x$has_forbidden_chars" != x; then
60249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60251  fi
60252
60253
60254  windows_path="$new_path"
60255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60256    unix_path=`$CYGPATH -u "$windows_path"`
60257    new_path="$unix_path"
60258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60260    new_path="$unix_path"
60261  fi
60262
60263  if test "x$path" != "x$new_path"; then
60264    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60266$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60267  fi
60268
60269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60271
60272    else
60273      # We're on a unix platform. Hooray! :)
60274      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60275      has_space=`$ECHO "$path" | $GREP " "`
60276      if test "x$has_space" != x; then
60277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60278$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60280      fi
60281
60282      # Use eval to expand a potential ~
60283      eval path="$path"
60284      if test ! -f "$path" && test ! -d "$path"; then
60285        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60286      fi
60287
60288      if test -d "$path"; then
60289        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60290      else
60291        dir="`$DIRNAME "$path"`"
60292        base="`$BASENAME "$path"`"
60293        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60294      fi
60295    fi
60296  fi
60297
60298
60299  # Only process if variable expands to non-empty
60300
60301  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60303
60304  # Input might be given as Windows format, start by converting to
60305  # unix format.
60306  path="$POTENTIAL_FREETYPE_LIB_PATH"
60307  new_path=`$CYGPATH -u "$path"`
60308
60309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60312  # "foo.exe" is OK but "foo" is an error.
60313  #
60314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60315  # It is also a way to make sure we got the proper file name for the real test later on.
60316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60317  if test "x$test_shortpath" = x; then
60318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60321  fi
60322
60323  # Call helper function which possibly converts this using DOS-style short mode.
60324  # If so, the updated path is stored in $new_path.
60325
60326  input_path="$new_path"
60327  # Check if we need to convert this using DOS-style short mode. If the path
60328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60329  # take no chances and rewrite it.
60330  # Note: m4 eats our [], so we need to use [ and ] instead.
60331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60332  if test "x$has_forbidden_chars" != x; then
60333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60337      # Going to short mode and back again did indeed matter. Since short mode is
60338      # case insensitive, let's make it lowercase to improve readability.
60339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60340      # Now convert it back to Unix-style (cygpath)
60341      input_path=`$CYGPATH -u "$shortmode_path"`
60342      new_path="$input_path"
60343    fi
60344  fi
60345
60346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60347  if test "x$test_cygdrive_prefix" = x; then
60348    # As a simple fix, exclude /usr/bin since it's not a real path.
60349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60351      # a path prefixed by /cygdrive for fixpath to work.
60352      new_path="$CYGWIN_ROOT_PATH$input_path"
60353    fi
60354  fi
60355
60356
60357  if test "x$path" != "x$new_path"; then
60358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60361  fi
60362
60363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60364
60365  path="$POTENTIAL_FREETYPE_LIB_PATH"
60366  has_colon=`$ECHO $path | $GREP ^.:`
60367  new_path="$path"
60368  if test "x$has_colon" = x; then
60369    # Not in mixed or Windows style, start by that.
60370    new_path=`cmd //c echo $path`
60371  fi
60372
60373
60374  input_path="$new_path"
60375  # Check if we need to convert this using DOS-style short mode. If the path
60376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60377  # take no chances and rewrite it.
60378  # Note: m4 eats our [], so we need to use [ and ] instead.
60379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60380  if test "x$has_forbidden_chars" != x; then
60381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60383  fi
60384
60385
60386  windows_path="$new_path"
60387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60388    unix_path=`$CYGPATH -u "$windows_path"`
60389    new_path="$unix_path"
60390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60392    new_path="$unix_path"
60393  fi
60394
60395  if test "x$path" != "x$new_path"; then
60396    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60399  fi
60400
60401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60403
60404    else
60405      # We're on a unix platform. Hooray! :)
60406      path="$POTENTIAL_FREETYPE_LIB_PATH"
60407      has_space=`$ECHO "$path" | $GREP " "`
60408      if test "x$has_space" != x; then
60409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60412      fi
60413
60414      # Use eval to expand a potential ~
60415      eval path="$path"
60416      if test ! -f "$path" && test ! -d "$path"; then
60417        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60418      fi
60419
60420      if test -d "$path"; then
60421        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60422      else
60423        dir="`$DIRNAME "$path"`"
60424        base="`$BASENAME "$path"`"
60425        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60426      fi
60427    fi
60428  fi
60429
60430
60431    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60433$as_echo_n "checking for freetype includes... " >&6; }
60434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60435$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60436    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60438$as_echo_n "checking for freetype libraries... " >&6; }
60439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60440$as_echo "$FREETYPE_LIB_PATH" >&6; }
60441  fi
60442
60443              fi
60444            fi
60445          fi
60446        fi
60447      fi # end check in well-known locations
60448
60449      if test "x$FOUND_FREETYPE" != xyes; then
60450
60451  # Print a helpful message on how to acquire the necessary build dependency.
60452  # freetype is the help tag: freetype, cups, alsa etc
60453  MISSING_DEPENDENCY=freetype
60454
60455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60456    cygwin_help $MISSING_DEPENDENCY
60457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60458    msys_help $MISSING_DEPENDENCY
60459  else
60460    PKGHANDLER_COMMAND=
60461
60462    case $PKGHANDLER in
60463      apt-get)
60464        apt_help     $MISSING_DEPENDENCY ;;
60465      yum)
60466        yum_help     $MISSING_DEPENDENCY ;;
60467      port)
60468        port_help    $MISSING_DEPENDENCY ;;
60469      pkgutil)
60470        pkgutil_help $MISSING_DEPENDENCY ;;
60471      pkgadd)
60472        pkgadd_help  $MISSING_DEPENDENCY ;;
60473    esac
60474
60475    if test "x$PKGHANDLER_COMMAND" != x; then
60476      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
60477    fi
60478  fi
60479
60480        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
60481      fi
60482    fi # end user specified settings
60483
60484    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
60485    if test "x$FREETYPE_CFLAGS" = x; then
60486
60487  # Only process if variable expands to non-empty
60488
60489  if test "x$FREETYPE_INCLUDE_PATH" != x; then
60490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60491
60492  # Input might be given as Windows format, start by converting to
60493  # unix format.
60494  path="$FREETYPE_INCLUDE_PATH"
60495  new_path=`$CYGPATH -u "$path"`
60496
60497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60500  # "foo.exe" is OK but "foo" is an error.
60501  #
60502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60503  # It is also a way to make sure we got the proper file name for the real test later on.
60504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60505  if test "x$test_shortpath" = x; then
60506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60507$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60508    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
60509  fi
60510
60511  # Call helper function which possibly converts this using DOS-style short mode.
60512  # If so, the updated path is stored in $new_path.
60513
60514  input_path="$new_path"
60515  # Check if we need to convert this using DOS-style short mode. If the path
60516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60517  # take no chances and rewrite it.
60518  # Note: m4 eats our [], so we need to use [ and ] instead.
60519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60520  if test "x$has_forbidden_chars" != x; then
60521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60525      # Going to short mode and back again did indeed matter. Since short mode is
60526      # case insensitive, let's make it lowercase to improve readability.
60527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60528      # Now convert it back to Unix-style (cygpath)
60529      input_path=`$CYGPATH -u "$shortmode_path"`
60530      new_path="$input_path"
60531    fi
60532  fi
60533
60534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60535  if test "x$test_cygdrive_prefix" = x; then
60536    # As a simple fix, exclude /usr/bin since it's not a real path.
60537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60539      # a path prefixed by /cygdrive for fixpath to work.
60540      new_path="$CYGWIN_ROOT_PATH$input_path"
60541    fi
60542  fi
60543
60544
60545  if test "x$path" != "x$new_path"; then
60546    FREETYPE_INCLUDE_PATH="$new_path"
60547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60548$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60549  fi
60550
60551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60552
60553  path="$FREETYPE_INCLUDE_PATH"
60554  has_colon=`$ECHO $path | $GREP ^.:`
60555  new_path="$path"
60556  if test "x$has_colon" = x; then
60557    # Not in mixed or Windows style, start by that.
60558    new_path=`cmd //c echo $path`
60559  fi
60560
60561
60562  input_path="$new_path"
60563  # Check if we need to convert this using DOS-style short mode. If the path
60564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60565  # take no chances and rewrite it.
60566  # Note: m4 eats our [], so we need to use [ and ] instead.
60567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60568  if test "x$has_forbidden_chars" != x; then
60569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60571  fi
60572
60573
60574  windows_path="$new_path"
60575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60576    unix_path=`$CYGPATH -u "$windows_path"`
60577    new_path="$unix_path"
60578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60580    new_path="$unix_path"
60581  fi
60582
60583  if test "x$path" != "x$new_path"; then
60584    FREETYPE_INCLUDE_PATH="$new_path"
60585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60586$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60587  fi
60588
60589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60591
60592    else
60593      # We're on a unix platform. Hooray! :)
60594      path="$FREETYPE_INCLUDE_PATH"
60595      has_space=`$ECHO "$path" | $GREP " "`
60596      if test "x$has_space" != x; then
60597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60598$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60599        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60600      fi
60601
60602      # Use eval to expand a potential ~
60603      eval path="$path"
60604      if test ! -f "$path" && test ! -d "$path"; then
60605        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60606      fi
60607
60608      if test -d "$path"; then
60609        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60610      else
60611        dir="`$DIRNAME "$path"`"
60612        base="`$BASENAME "$path"`"
60613        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60614      fi
60615    fi
60616  fi
60617
60618      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
60619        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
60620      else
60621        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
60622      fi
60623    fi
60624
60625    if test "x$FREETYPE_LIBS" = x; then
60626
60627  # Only process if variable expands to non-empty
60628
60629  if test "x$FREETYPE_LIB_PATH" != x; then
60630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60631
60632  # Input might be given as Windows format, start by converting to
60633  # unix format.
60634  path="$FREETYPE_LIB_PATH"
60635  new_path=`$CYGPATH -u "$path"`
60636
60637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60640  # "foo.exe" is OK but "foo" is an error.
60641  #
60642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60643  # It is also a way to make sure we got the proper file name for the real test later on.
60644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60645  if test "x$test_shortpath" = x; then
60646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60647$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60648    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
60649  fi
60650
60651  # Call helper function which possibly converts this using DOS-style short mode.
60652  # If so, the updated path is stored in $new_path.
60653
60654  input_path="$new_path"
60655  # Check if we need to convert this using DOS-style short mode. If the path
60656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60657  # take no chances and rewrite it.
60658  # Note: m4 eats our [], so we need to use [ and ] instead.
60659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60660  if test "x$has_forbidden_chars" != x; then
60661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60665      # Going to short mode and back again did indeed matter. Since short mode is
60666      # case insensitive, let's make it lowercase to improve readability.
60667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60668      # Now convert it back to Unix-style (cygpath)
60669      input_path=`$CYGPATH -u "$shortmode_path"`
60670      new_path="$input_path"
60671    fi
60672  fi
60673
60674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60675  if test "x$test_cygdrive_prefix" = x; then
60676    # As a simple fix, exclude /usr/bin since it's not a real path.
60677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60679      # a path prefixed by /cygdrive for fixpath to work.
60680      new_path="$CYGWIN_ROOT_PATH$input_path"
60681    fi
60682  fi
60683
60684
60685  if test "x$path" != "x$new_path"; then
60686    FREETYPE_LIB_PATH="$new_path"
60687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
60688$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60689  fi
60690
60691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60692
60693  path="$FREETYPE_LIB_PATH"
60694  has_colon=`$ECHO $path | $GREP ^.:`
60695  new_path="$path"
60696  if test "x$has_colon" = x; then
60697    # Not in mixed or Windows style, start by that.
60698    new_path=`cmd //c echo $path`
60699  fi
60700
60701
60702  input_path="$new_path"
60703  # Check if we need to convert this using DOS-style short mode. If the path
60704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60705  # take no chances and rewrite it.
60706  # Note: m4 eats our [], so we need to use [ and ] instead.
60707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60708  if test "x$has_forbidden_chars" != x; then
60709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60711  fi
60712
60713
60714  windows_path="$new_path"
60715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60716    unix_path=`$CYGPATH -u "$windows_path"`
60717    new_path="$unix_path"
60718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60720    new_path="$unix_path"
60721  fi
60722
60723  if test "x$path" != "x$new_path"; then
60724    FREETYPE_LIB_PATH="$new_path"
60725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
60726$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60727  fi
60728
60729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60731
60732    else
60733      # We're on a unix platform. Hooray! :)
60734      path="$FREETYPE_LIB_PATH"
60735      has_space=`$ECHO "$path" | $GREP " "`
60736      if test "x$has_space" != x; then
60737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60738$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60740      fi
60741
60742      # Use eval to expand a potential ~
60743      eval path="$path"
60744      if test ! -f "$path" && test ! -d "$path"; then
60745        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60746      fi
60747
60748      if test -d "$path"; then
60749        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60750      else
60751        dir="`$DIRNAME "$path"`"
60752        base="`$BASENAME "$path"`"
60753        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60754      fi
60755    fi
60756  fi
60757
60758      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60759        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
60760      else
60761        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
60762      fi
60763    fi
60764
60765    # Try to compile it
60766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
60767$as_echo_n "checking if we can compile and link with freetype... " >&6; }
60768    ac_ext=cpp
60769ac_cpp='$CXXCPP $CPPFLAGS'
60770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
60771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
60772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
60773
60774    PREV_CXXCFLAGS="$CXXFLAGS"
60775    PREV_LIBS="$LIBS"
60776    PREV_CXX="$CXX"
60777    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
60778    LIBS="$LIBS $FREETYPE_LIBS"
60779    CXX="$FIXPATH $CXX"
60780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60781/* end confdefs.h.  */
60782
60783          #include<ft2build.h>
60784          #include FT_FREETYPE_H
60785          int main () {
60786            FT_Init_FreeType(NULL);
60787            return 0;
60788          }
60789
60790_ACEOF
60791if ac_fn_cxx_try_link "$LINENO"; then :
60792
60793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60794$as_echo "yes" >&6; }
60795
60796else
60797
60798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60799$as_echo "no" >&6; }
60800          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
60801$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
60802          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
60803$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
60804
60805
60806  # Print a helpful message on how to acquire the necessary build dependency.
60807  # freetype is the help tag: freetype, cups, alsa etc
60808  MISSING_DEPENDENCY=freetype
60809
60810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60811    cygwin_help $MISSING_DEPENDENCY
60812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60813    msys_help $MISSING_DEPENDENCY
60814  else
60815    PKGHANDLER_COMMAND=
60816
60817    case $PKGHANDLER in
60818      apt-get)
60819        apt_help     $MISSING_DEPENDENCY ;;
60820      yum)
60821        yum_help     $MISSING_DEPENDENCY ;;
60822      port)
60823        port_help    $MISSING_DEPENDENCY ;;
60824      pkgutil)
60825        pkgutil_help $MISSING_DEPENDENCY ;;
60826      pkgadd)
60827        pkgadd_help  $MISSING_DEPENDENCY ;;
60828    esac
60829
60830    if test "x$PKGHANDLER_COMMAND" != x; then
60831      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
60832    fi
60833  fi
60834
60835
60836          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
60837
60838
60839fi
60840rm -f core conftest.err conftest.$ac_objext \
60841    conftest$ac_exeext conftest.$ac_ext
60842    CXXCFLAGS="$PREV_CXXFLAGS"
60843    LIBS="$PREV_LIBS"
60844    CXX="$PREV_CXX"
60845    ac_ext=cpp
60846ac_cpp='$CXXCPP $CPPFLAGS'
60847ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
60848ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
60849ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
60850
60851
60852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
60853$as_echo_n "checking if we should bundle freetype... " >&6; }
60854    if test "x$BUNDLE_FREETYPE" = xyes; then
60855      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
60856    fi
60857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
60858$as_echo "$BUNDLE_FREETYPE" >&6; }
60859
60860  fi # end freetype needed
60861
60862
60863
60864
60865
60866
60867
60868# Check whether --with-alsa was given.
60869if test "${with_alsa+set}" = set; then :
60870  withval=$with_alsa;
60871fi
60872
60873
60874# Check whether --with-alsa-include was given.
60875if test "${with_alsa_include+set}" = set; then :
60876  withval=$with_alsa_include;
60877fi
60878
60879
60880# Check whether --with-alsa-lib was given.
60881if test "${with_alsa_lib+set}" = set; then :
60882  withval=$with_alsa_lib;
60883fi
60884
60885
60886  if test "x$NEEDS_LIB_ALSA" = xfalse; then
60887    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
60888        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
60889        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
60890      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
60891$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
60892    fi
60893    ALSA_CFLAGS=
60894    ALSA_LIBS=
60895  else
60896    ALSA_FOUND=no
60897
60898    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
60899      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
60900    fi
60901
60902    if test "x${with_alsa}" != x; then
60903      ALSA_LIBS="-L${with_alsa}/lib -lasound"
60904      ALSA_CFLAGS="-I${with_alsa}/include"
60905      ALSA_FOUND=yes
60906    fi
60907    if test "x${with_alsa_include}" != x; then
60908      ALSA_CFLAGS="-I${with_alsa_include}"
60909      ALSA_FOUND=yes
60910    fi
60911    if test "x${with_alsa_lib}" != x; then
60912      ALSA_LIBS="-L${with_alsa_lib} -lasound"
60913      ALSA_FOUND=yes
60914    fi
60915    # Do not try pkg-config if we have a sysroot set.
60916    if test "x$SYSROOT" = x; then
60917      if test "x$ALSA_FOUND" = xno; then
60918
60919pkg_failed=no
60920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
60921$as_echo_n "checking for ALSA... " >&6; }
60922
60923if test -n "$ALSA_CFLAGS"; then
60924    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
60925 elif test -n "$PKG_CONFIG"; then
60926    if test -n "$PKG_CONFIG" && \
60927    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
60928  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
60929  ac_status=$?
60930  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60931  test $ac_status = 0; }; then
60932  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
60933else
60934  pkg_failed=yes
60935fi
60936 else
60937    pkg_failed=untried
60938fi
60939if test -n "$ALSA_LIBS"; then
60940    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
60941 elif test -n "$PKG_CONFIG"; then
60942    if test -n "$PKG_CONFIG" && \
60943    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
60944  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
60945  ac_status=$?
60946  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60947  test $ac_status = 0; }; then
60948  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
60949else
60950  pkg_failed=yes
60951fi
60952 else
60953    pkg_failed=untried
60954fi
60955
60956
60957
60958if test $pkg_failed = yes; then
60959
60960if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60961        _pkg_short_errors_supported=yes
60962else
60963        _pkg_short_errors_supported=no
60964fi
60965        if test $_pkg_short_errors_supported = yes; then
60966	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
60967        else
60968	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
60969        fi
60970	# Put the nasty error message in config.log where it belongs
60971	echo "$ALSA_PKG_ERRORS" >&5
60972
60973	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60974$as_echo "no" >&6; }
60975                ALSA_FOUND=no
60976elif test $pkg_failed = untried; then
60977	ALSA_FOUND=no
60978else
60979	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
60980	ALSA_LIBS=$pkg_cv_ALSA_LIBS
60981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60982$as_echo "yes" >&6; }
60983	ALSA_FOUND=yes
60984fi
60985      fi
60986    fi
60987    if test "x$ALSA_FOUND" = xno; then
60988      for ac_header in alsa/asoundlib.h
60989do :
60990  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
60991if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
60992  cat >>confdefs.h <<_ACEOF
60993#define HAVE_ALSA_ASOUNDLIB_H 1
60994_ACEOF
60995
60996            ALSA_FOUND=yes
60997            ALSA_CFLAGS=-Iignoreme
60998            ALSA_LIBS=-lasound
60999            DEFAULT_ALSA=yes
61000
61001else
61002  ALSA_FOUND=no
61003
61004fi
61005
61006done
61007
61008    fi
61009    if test "x$ALSA_FOUND" = xno; then
61010
61011  # Print a helpful message on how to acquire the necessary build dependency.
61012  # alsa is the help tag: freetype, cups, alsa etc
61013  MISSING_DEPENDENCY=alsa
61014
61015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61016    cygwin_help $MISSING_DEPENDENCY
61017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61018    msys_help $MISSING_DEPENDENCY
61019  else
61020    PKGHANDLER_COMMAND=
61021
61022    case $PKGHANDLER in
61023      apt-get)
61024        apt_help     $MISSING_DEPENDENCY ;;
61025      yum)
61026        yum_help     $MISSING_DEPENDENCY ;;
61027      port)
61028        port_help    $MISSING_DEPENDENCY ;;
61029      pkgutil)
61030        pkgutil_help $MISSING_DEPENDENCY ;;
61031      pkgadd)
61032        pkgadd_help  $MISSING_DEPENDENCY ;;
61033    esac
61034
61035    if test "x$PKGHANDLER_COMMAND" != x; then
61036      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
61037    fi
61038  fi
61039
61040      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
61041    fi
61042  fi
61043
61044
61045
61046
61047
61048
61049# Check whether --with-libffi was given.
61050if test "${with_libffi+set}" = set; then :
61051  withval=$with_libffi;
61052fi
61053
61054
61055# Check whether --with-libffi-include was given.
61056if test "${with_libffi_include+set}" = set; then :
61057  withval=$with_libffi_include;
61058fi
61059
61060
61061# Check whether --with-libffi-lib was given.
61062if test "${with_libffi_lib+set}" = set; then :
61063  withval=$with_libffi_lib;
61064fi
61065
61066
61067  if test "x$NEEDS_LIB_FFI" = xfalse; then
61068    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
61069        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
61070        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
61071      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
61072$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
61073    fi
61074    LIBFFI_CFLAGS=
61075    LIBFFI_LIBS=
61076  else
61077    LIBFFI_FOUND=no
61078
61079    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
61080      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
61081    fi
61082
61083    if test "x${with_libffi}" != x; then
61084      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
61085      LIBFFI_CFLAGS="-I${with_libffi}/include"
61086      LIBFFI_FOUND=yes
61087    fi
61088    if test "x${with_libffi_include}" != x; then
61089      LIBFFI_CFLAGS="-I${with_libffi_include}"
61090      LIBFFI_FOUND=yes
61091    fi
61092    if test "x${with_libffi_lib}" != x; then
61093      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
61094      LIBFFI_FOUND=yes
61095    fi
61096    # Do not try pkg-config if we have a sysroot set.
61097    if test "x$SYSROOT" = x; then
61098      if test "x$LIBFFI_FOUND" = xno; then
61099        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
61100
61101pkg_failed=no
61102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
61103$as_echo_n "checking for LIBFFI... " >&6; }
61104
61105if test -n "$LIBFFI_CFLAGS"; then
61106    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
61107 elif test -n "$PKG_CONFIG"; then
61108    if test -n "$PKG_CONFIG" && \
61109    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
61110  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
61111  ac_status=$?
61112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61113  test $ac_status = 0; }; then
61114  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
61115else
61116  pkg_failed=yes
61117fi
61118 else
61119    pkg_failed=untried
61120fi
61121if test -n "$LIBFFI_LIBS"; then
61122    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
61123 elif test -n "$PKG_CONFIG"; then
61124    if test -n "$PKG_CONFIG" && \
61125    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
61126  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
61127  ac_status=$?
61128  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61129  test $ac_status = 0; }; then
61130  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
61131else
61132  pkg_failed=yes
61133fi
61134 else
61135    pkg_failed=untried
61136fi
61137
61138
61139
61140if test $pkg_failed = yes; then
61141
61142if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61143        _pkg_short_errors_supported=yes
61144else
61145        _pkg_short_errors_supported=no
61146fi
61147        if test $_pkg_short_errors_supported = yes; then
61148	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
61149        else
61150	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
61151        fi
61152	# Put the nasty error message in config.log where it belongs
61153	echo "$LIBFFI_PKG_ERRORS" >&5
61154
61155	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61156$as_echo "no" >&6; }
61157                LIBFFI_FOUND=no
61158elif test $pkg_failed = untried; then
61159	LIBFFI_FOUND=no
61160else
61161	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
61162	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
61163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61164$as_echo "yes" >&6; }
61165	LIBFFI_FOUND=yes
61166fi
61167      fi
61168    fi
61169    if test "x$LIBFFI_FOUND" = xno; then
61170      for ac_header in ffi.h
61171do :
61172  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
61173if test "x$ac_cv_header_ffi_h" = xyes; then :
61174  cat >>confdefs.h <<_ACEOF
61175#define HAVE_FFI_H 1
61176_ACEOF
61177
61178            LIBFFI_FOUND=yes
61179            LIBFFI_CFLAGS=
61180            LIBFFI_LIBS=-lffi
61181
61182else
61183  LIBFFI_FOUND=no
61184
61185fi
61186
61187done
61188
61189    fi
61190    if test "x$LIBFFI_FOUND" = xno; then
61191
61192  # Print a helpful message on how to acquire the necessary build dependency.
61193  # ffi is the help tag: freetype, cups, alsa etc
61194  MISSING_DEPENDENCY=ffi
61195
61196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61197    cygwin_help $MISSING_DEPENDENCY
61198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61199    msys_help $MISSING_DEPENDENCY
61200  else
61201    PKGHANDLER_COMMAND=
61202
61203    case $PKGHANDLER in
61204      apt-get)
61205        apt_help     $MISSING_DEPENDENCY ;;
61206      yum)
61207        yum_help     $MISSING_DEPENDENCY ;;
61208      port)
61209        port_help    $MISSING_DEPENDENCY ;;
61210      pkgutil)
61211        pkgutil_help $MISSING_DEPENDENCY ;;
61212      pkgadd)
61213        pkgadd_help  $MISSING_DEPENDENCY ;;
61214    esac
61215
61216    if test "x$PKGHANDLER_COMMAND" != x; then
61217      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
61218    fi
61219  fi
61220
61221      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
61222    fi
61223
61224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
61225$as_echo_n "checking if libffi works... " >&6; }
61226    ac_ext=c
61227ac_cpp='$CPP $CPPFLAGS'
61228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
61229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
61230ac_compiler_gnu=$ac_cv_c_compiler_gnu
61231
61232    OLD_CFLAGS="$CFLAGS"
61233    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
61234    OLD_LIBS="$LIBS"
61235    LIBS="$LIBS $LIBFFI_LIBS"
61236    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61237/* end confdefs.h.  */
61238#include <ffi.h>
61239int
61240main ()
61241{
61242
61243          ffi_call(NULL, NULL, NULL, NULL);
61244          return 0;
61245
61246  ;
61247  return 0;
61248}
61249_ACEOF
61250if ac_fn_c_try_link "$LINENO"; then :
61251  LIBFFI_WORKS=yes
61252else
61253  LIBFFI_WORKS=no
61254
61255fi
61256rm -f core conftest.err conftest.$ac_objext \
61257    conftest$ac_exeext conftest.$ac_ext
61258    CFLAGS="$OLD_CFLAGS"
61259    LIBS="$OLD_LIBS"
61260    ac_ext=cpp
61261ac_cpp='$CXXCPP $CPPFLAGS'
61262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
61263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
61264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
61265
61266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
61267$as_echo "$LIBFFI_WORKS" >&6; }
61268
61269    if test "x$LIBFFI_WORKS" = xno; then
61270
61271  # Print a helpful message on how to acquire the necessary build dependency.
61272  # ffi is the help tag: freetype, cups, alsa etc
61273  MISSING_DEPENDENCY=ffi
61274
61275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61276    cygwin_help $MISSING_DEPENDENCY
61277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61278    msys_help $MISSING_DEPENDENCY
61279  else
61280    PKGHANDLER_COMMAND=
61281
61282    case $PKGHANDLER in
61283      apt-get)
61284        apt_help     $MISSING_DEPENDENCY ;;
61285      yum)
61286        yum_help     $MISSING_DEPENDENCY ;;
61287      port)
61288        port_help    $MISSING_DEPENDENCY ;;
61289      pkgutil)
61290        pkgutil_help $MISSING_DEPENDENCY ;;
61291      pkgadd)
61292        pkgadd_help  $MISSING_DEPENDENCY ;;
61293    esac
61294
61295    if test "x$PKGHANDLER_COMMAND" != x; then
61296      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
61297    fi
61298  fi
61299
61300      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
61301    fi
61302  fi
61303
61304
61305
61306
61307
61308  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
61309    # Extract the first word of "llvm-config", so it can be a program name with args.
61310set dummy llvm-config; ac_word=$2
61311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61312$as_echo_n "checking for $ac_word... " >&6; }
61313if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
61314  $as_echo_n "(cached) " >&6
61315else
61316  if test -n "$LLVM_CONFIG"; then
61317  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
61318else
61319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61320for as_dir in $PATH
61321do
61322  IFS=$as_save_IFS
61323  test -z "$as_dir" && as_dir=.
61324    for ac_exec_ext in '' $ac_executable_extensions; do
61325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61326    ac_cv_prog_LLVM_CONFIG="llvm-config"
61327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61328    break 2
61329  fi
61330done
61331  done
61332IFS=$as_save_IFS
61333
61334fi
61335fi
61336LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
61337if test -n "$LLVM_CONFIG"; then
61338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
61339$as_echo "$LLVM_CONFIG" >&6; }
61340else
61341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61342$as_echo "no" >&6; }
61343fi
61344
61345
61346
61347    if test "x$LLVM_CONFIG" != xllvm-config; then
61348      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
61349    fi
61350
61351    llvm_components="jit mcjit engine nativecodegen native"
61352    unset LLVM_CFLAGS
61353    for flag in $("$LLVM_CONFIG" --cxxflags); do
61354      if echo "${flag}" | grep -q '^-[ID]'; then
61355        if test "${flag}" != "-D_DEBUG" ; then
61356          if test "${LLVM_CFLAGS}" != "" ; then
61357            LLVM_CFLAGS="${LLVM_CFLAGS} "
61358          fi
61359          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
61360        fi
61361      fi
61362    done
61363    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
61364    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
61365
61366    unset LLVM_LDFLAGS
61367    for flag in $("${LLVM_CONFIG}" --ldflags); do
61368      if echo "${flag}" | grep -q '^-L'; then
61369        if test "${LLVM_LDFLAGS}" != ""; then
61370          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
61371        fi
61372        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
61373      fi
61374    done
61375
61376    unset LLVM_LIBS
61377    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
61378      if echo "${flag}" | grep -q '^-l'; then
61379        if test "${LLVM_LIBS}" != ""; then
61380          LLVM_LIBS="${LLVM_LIBS} "
61381        fi
61382        LLVM_LIBS="${LLVM_LIBS}${flag}"
61383      fi
61384    done
61385
61386    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
61387    # always properly detect -ltinfo
61388    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
61389
61390
61391
61392
61393  fi
61394
61395
61396
61397# Check whether --with-libjpeg was given.
61398if test "${with_libjpeg+set}" = set; then :
61399  withval=$with_libjpeg;
61400fi
61401
61402
61403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
61404$as_echo_n "checking for which libjpeg to use... " >&6; }
61405  # default is bundled
61406  DEFAULT_LIBJPEG=bundled
61407  # if user didn't specify, use DEFAULT_LIBJPEG
61408  if test "x${with_libjpeg}" = "x"; then
61409    with_libjpeg=${DEFAULT_LIBJPEG}
61410  fi
61411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
61412$as_echo "${with_libjpeg}" >&6; }
61413
61414  if test "x${with_libjpeg}" = "xbundled"; then
61415    USE_EXTERNAL_LIBJPEG=false
61416  elif test "x${with_libjpeg}" = "xsystem"; then
61417    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
61418if test "x$ac_cv_header_jpeglib_h" = xyes; then :
61419
61420else
61421   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
61422fi
61423
61424
61425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
61426$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
61427if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
61428  $as_echo_n "(cached) " >&6
61429else
61430  ac_check_lib_save_LIBS=$LIBS
61431LIBS="-ljpeg  $LIBS"
61432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61433/* end confdefs.h.  */
61434
61435/* Override any GCC internal prototype to avoid an error.
61436   Use char because int might match the return type of a GCC
61437   builtin and then its argument prototype would still apply.  */
61438#ifdef __cplusplus
61439extern "C"
61440#endif
61441char jpeg_CreateDecompress ();
61442int
61443main ()
61444{
61445return jpeg_CreateDecompress ();
61446  ;
61447  return 0;
61448}
61449_ACEOF
61450if ac_fn_cxx_try_link "$LINENO"; then :
61451  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
61452else
61453  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
61454fi
61455rm -f core conftest.err conftest.$ac_objext \
61456    conftest$ac_exeext conftest.$ac_ext
61457LIBS=$ac_check_lib_save_LIBS
61458fi
61459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
61460$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
61461if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
61462  cat >>confdefs.h <<_ACEOF
61463#define HAVE_LIBJPEG 1
61464_ACEOF
61465
61466  LIBS="-ljpeg $LIBS"
61467
61468else
61469   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
61470fi
61471
61472
61473    USE_EXTERNAL_LIBJPEG=true
61474  else
61475    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
61476  fi
61477
61478
61479
61480
61481
61482# Check whether --with-giflib was given.
61483if test "${with_giflib+set}" = set; then :
61484  withval=$with_giflib;
61485fi
61486
61487
61488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
61489$as_echo_n "checking for which giflib to use... " >&6; }
61490  # default is bundled
61491  DEFAULT_GIFLIB=bundled
61492  # if user didn't specify, use DEFAULT_GIFLIB
61493  if test "x${with_giflib}" = "x"; then
61494    with_giflib=${DEFAULT_GIFLIB}
61495  fi
61496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
61497$as_echo "${with_giflib}" >&6; }
61498
61499  if test "x${with_giflib}" = "xbundled"; then
61500    USE_EXTERNAL_LIBGIF=false
61501  elif test "x${with_giflib}" = "xsystem"; then
61502    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
61503if test "x$ac_cv_header_gif_lib_h" = xyes; then :
61504
61505else
61506   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
61507fi
61508
61509
61510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
61511$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
61512if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
61513  $as_echo_n "(cached) " >&6
61514else
61515  ac_check_lib_save_LIBS=$LIBS
61516LIBS="-lgif  $LIBS"
61517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61518/* end confdefs.h.  */
61519
61520/* Override any GCC internal prototype to avoid an error.
61521   Use char because int might match the return type of a GCC
61522   builtin and then its argument prototype would still apply.  */
61523#ifdef __cplusplus
61524extern "C"
61525#endif
61526char DGifGetCode ();
61527int
61528main ()
61529{
61530return DGifGetCode ();
61531  ;
61532  return 0;
61533}
61534_ACEOF
61535if ac_fn_cxx_try_link "$LINENO"; then :
61536  ac_cv_lib_gif_DGifGetCode=yes
61537else
61538  ac_cv_lib_gif_DGifGetCode=no
61539fi
61540rm -f core conftest.err conftest.$ac_objext \
61541    conftest$ac_exeext conftest.$ac_ext
61542LIBS=$ac_check_lib_save_LIBS
61543fi
61544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
61545$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
61546if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
61547  cat >>confdefs.h <<_ACEOF
61548#define HAVE_LIBGIF 1
61549_ACEOF
61550
61551  LIBS="-lgif $LIBS"
61552
61553else
61554   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
61555fi
61556
61557
61558    USE_EXTERNAL_LIBGIF=true
61559  else
61560    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
61561  fi
61562
61563
61564
61565
61566
61567# Check whether --with-libpng was given.
61568if test "${with_libpng+set}" = set; then :
61569  withval=$with_libpng;
61570fi
61571
61572
61573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
61574$as_echo_n "checking for which libpng to use... " >&6; }
61575
61576  # default is bundled
61577  DEFAULT_LIBPNG=bundled
61578  # if user didn't specify, use DEFAULT_LIBPNG
61579  if test "x${with_libpng}" = "x"; then
61580      with_libpng=${DEFAULT_LIBPNG}
61581  fi
61582
61583  if test "x${with_libpng}" = "xbundled"; then
61584      USE_EXTERNAL_LIBPNG=false
61585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
61586$as_echo "bundled" >&6; }
61587  elif test "x${with_libpng}" = "xsystem"; then
61588
61589pkg_failed=no
61590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
61591$as_echo_n "checking for PNG... " >&6; }
61592
61593if test -n "$PNG_CFLAGS"; then
61594    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
61595 elif test -n "$PKG_CONFIG"; then
61596    if test -n "$PKG_CONFIG" && \
61597    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
61598  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
61599  ac_status=$?
61600  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61601  test $ac_status = 0; }; then
61602  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
61603else
61604  pkg_failed=yes
61605fi
61606 else
61607    pkg_failed=untried
61608fi
61609if test -n "$PNG_LIBS"; then
61610    pkg_cv_PNG_LIBS="$PNG_LIBS"
61611 elif test -n "$PKG_CONFIG"; then
61612    if test -n "$PKG_CONFIG" && \
61613    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
61614  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
61615  ac_status=$?
61616  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61617  test $ac_status = 0; }; then
61618  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
61619else
61620  pkg_failed=yes
61621fi
61622 else
61623    pkg_failed=untried
61624fi
61625
61626
61627
61628if test $pkg_failed = yes; then
61629
61630if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61631        _pkg_short_errors_supported=yes
61632else
61633        _pkg_short_errors_supported=no
61634fi
61635        if test $_pkg_short_errors_supported = yes; then
61636	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
61637        else
61638	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
61639        fi
61640	# Put the nasty error message in config.log where it belongs
61641	echo "$PNG_PKG_ERRORS" >&5
61642
61643	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61644$as_echo "no" >&6; }
61645                 LIBPNG_FOUND=no
61646elif test $pkg_failed = untried; then
61647	 LIBPNG_FOUND=no
61648else
61649	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
61650	PNG_LIBS=$pkg_cv_PNG_LIBS
61651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61652$as_echo "yes" >&6; }
61653	 LIBPNG_FOUND=yes
61654fi
61655      if test "x${LIBPNG_FOUND}" = "xyes"; then
61656          USE_EXTERNAL_LIBPNG=true
61657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
61658$as_echo "system" >&6; }
61659      else
61660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
61661$as_echo "system not found" >&6; }
61662          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
61663      fi
61664  else
61665      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
61666  fi
61667
61668
61669
61670
61671
61672# Check whether --with-zlib was given.
61673if test "${with_zlib+set}" = set; then :
61674  withval=$with_zlib;
61675fi
61676
61677
61678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
61679$as_echo_n "checking for compress in -lz... " >&6; }
61680if ${ac_cv_lib_z_compress+:} false; then :
61681  $as_echo_n "(cached) " >&6
61682else
61683  ac_check_lib_save_LIBS=$LIBS
61684LIBS="-lz  $LIBS"
61685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61686/* end confdefs.h.  */
61687
61688/* Override any GCC internal prototype to avoid an error.
61689   Use char because int might match the return type of a GCC
61690   builtin and then its argument prototype would still apply.  */
61691#ifdef __cplusplus
61692extern "C"
61693#endif
61694char compress ();
61695int
61696main ()
61697{
61698return compress ();
61699  ;
61700  return 0;
61701}
61702_ACEOF
61703if ac_fn_cxx_try_link "$LINENO"; then :
61704  ac_cv_lib_z_compress=yes
61705else
61706  ac_cv_lib_z_compress=no
61707fi
61708rm -f core conftest.err conftest.$ac_objext \
61709    conftest$ac_exeext conftest.$ac_ext
61710LIBS=$ac_check_lib_save_LIBS
61711fi
61712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
61713$as_echo "$ac_cv_lib_z_compress" >&6; }
61714if test "x$ac_cv_lib_z_compress" = xyes; then :
61715   ZLIB_FOUND=yes
61716else
61717   ZLIB_FOUND=no
61718fi
61719
61720
61721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
61722$as_echo_n "checking for which zlib to use... " >&6; }
61723
61724  DEFAULT_ZLIB=system
61725  if test "x$OPENJDK_TARGET_OS" = xwindows; then
61726    # On windows default is bundled...on others default is system
61727    DEFAULT_ZLIB=bundled
61728  fi
61729
61730  if test "x${ZLIB_FOUND}" != "xyes"; then
61731    # If we don't find any system...set default to bundled
61732    DEFAULT_ZLIB=bundled
61733  fi
61734
61735  # If user didn't specify, use DEFAULT_ZLIB
61736  if test "x${with_zlib}" = "x"; then
61737    with_zlib=${DEFAULT_ZLIB}
61738  fi
61739
61740  if test "x${with_zlib}" = "xbundled"; then
61741    USE_EXTERNAL_LIBZ=false
61742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
61743$as_echo "bundled" >&6; }
61744  elif test "x${with_zlib}" = "xsystem"; then
61745    if test "x${ZLIB_FOUND}" = "xyes"; then
61746      USE_EXTERNAL_LIBZ=true
61747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
61748$as_echo "system" >&6; }
61749    else
61750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
61751$as_echo "system not found" >&6; }
61752      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
61753    fi
61754  else
61755    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
61756  fi
61757
61758
61759
61760
61761
61762# Check whether --with-lcms was given.
61763if test "${with_lcms+set}" = set; then :
61764  withval=$with_lcms;
61765fi
61766
61767
61768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
61769$as_echo_n "checking for which lcms to use... " >&6; }
61770
61771  DEFAULT_LCMS=bundled
61772  # If user didn't specify, use DEFAULT_LCMS
61773  if test "x${with_lcms}" = "x"; then
61774      with_lcms=${DEFAULT_LCMS}
61775  fi
61776
61777  if test "x${with_lcms}" = "xbundled"; then
61778    USE_EXTERNAL_LCMS=false
61779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
61780$as_echo "bundled" >&6; }
61781  elif test "x${with_lcms}" = "xsystem"; then
61782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
61783$as_echo "system" >&6; }
61784
61785pkg_failed=no
61786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
61787$as_echo_n "checking for LCMS... " >&6; }
61788
61789if test -n "$LCMS_CFLAGS"; then
61790    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
61791 elif test -n "$PKG_CONFIG"; then
61792    if test -n "$PKG_CONFIG" && \
61793    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
61794  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
61795  ac_status=$?
61796  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61797  test $ac_status = 0; }; then
61798  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
61799else
61800  pkg_failed=yes
61801fi
61802 else
61803    pkg_failed=untried
61804fi
61805if test -n "$LCMS_LIBS"; then
61806    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
61807 elif test -n "$PKG_CONFIG"; then
61808    if test -n "$PKG_CONFIG" && \
61809    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
61810  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
61811  ac_status=$?
61812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61813  test $ac_status = 0; }; then
61814  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
61815else
61816  pkg_failed=yes
61817fi
61818 else
61819    pkg_failed=untried
61820fi
61821
61822
61823
61824if test $pkg_failed = yes; then
61825
61826if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61827        _pkg_short_errors_supported=yes
61828else
61829        _pkg_short_errors_supported=no
61830fi
61831        if test $_pkg_short_errors_supported = yes; then
61832	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
61833        else
61834	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
61835        fi
61836	# Put the nasty error message in config.log where it belongs
61837	echo "$LCMS_PKG_ERRORS" >&5
61838
61839	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61840$as_echo "no" >&6; }
61841                LCMS_FOUND=no
61842elif test $pkg_failed = untried; then
61843	LCMS_FOUND=no
61844else
61845	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
61846	LCMS_LIBS=$pkg_cv_LCMS_LIBS
61847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61848$as_echo "yes" >&6; }
61849	LCMS_FOUND=yes
61850fi
61851    if test "x${LCMS_FOUND}" = "xyes"; then
61852      USE_EXTERNAL_LCMS=true
61853    else
61854      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
61855    fi
61856  else
61857    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
61858  fi
61859
61860
61861
61862
61863
61864
61865
61866
61867
61868
61869
61870  # Setup libm (the maths library)
61871  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
61872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
61873$as_echo_n "checking for cos in -lm... " >&6; }
61874if ${ac_cv_lib_m_cos+:} false; then :
61875  $as_echo_n "(cached) " >&6
61876else
61877  ac_check_lib_save_LIBS=$LIBS
61878LIBS="-lm  $LIBS"
61879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61880/* end confdefs.h.  */
61881
61882/* Override any GCC internal prototype to avoid an error.
61883   Use char because int might match the return type of a GCC
61884   builtin and then its argument prototype would still apply.  */
61885#ifdef __cplusplus
61886extern "C"
61887#endif
61888char cos ();
61889int
61890main ()
61891{
61892return cos ();
61893  ;
61894  return 0;
61895}
61896_ACEOF
61897if ac_fn_cxx_try_link "$LINENO"; then :
61898  ac_cv_lib_m_cos=yes
61899else
61900  ac_cv_lib_m_cos=no
61901fi
61902rm -f core conftest.err conftest.$ac_objext \
61903    conftest$ac_exeext conftest.$ac_ext
61904LIBS=$ac_check_lib_save_LIBS
61905fi
61906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
61907$as_echo "$ac_cv_lib_m_cos" >&6; }
61908if test "x$ac_cv_lib_m_cos" = xyes; then :
61909  cat >>confdefs.h <<_ACEOF
61910#define HAVE_LIBM 1
61911_ACEOF
61912
61913  LIBS="-lm $LIBS"
61914
61915else
61916
61917        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
61918$as_echo "$as_me: Maths library was not found" >&6;}
61919
61920fi
61921
61922    LIBM="-lm"
61923  else
61924    LIBM=""
61925  fi
61926
61927
61928  # Setup libdl (for dynamic library loading)
61929  save_LIBS="$LIBS"
61930  LIBS=""
61931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
61932$as_echo_n "checking for dlopen in -ldl... " >&6; }
61933if ${ac_cv_lib_dl_dlopen+:} false; then :
61934  $as_echo_n "(cached) " >&6
61935else
61936  ac_check_lib_save_LIBS=$LIBS
61937LIBS="-ldl  $LIBS"
61938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61939/* end confdefs.h.  */
61940
61941/* Override any GCC internal prototype to avoid an error.
61942   Use char because int might match the return type of a GCC
61943   builtin and then its argument prototype would still apply.  */
61944#ifdef __cplusplus
61945extern "C"
61946#endif
61947char dlopen ();
61948int
61949main ()
61950{
61951return dlopen ();
61952  ;
61953  return 0;
61954}
61955_ACEOF
61956if ac_fn_cxx_try_link "$LINENO"; then :
61957  ac_cv_lib_dl_dlopen=yes
61958else
61959  ac_cv_lib_dl_dlopen=no
61960fi
61961rm -f core conftest.err conftest.$ac_objext \
61962    conftest$ac_exeext conftest.$ac_ext
61963LIBS=$ac_check_lib_save_LIBS
61964fi
61965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
61966$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
61967if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
61968  cat >>confdefs.h <<_ACEOF
61969#define HAVE_LIBDL 1
61970_ACEOF
61971
61972  LIBS="-ldl $LIBS"
61973
61974fi
61975
61976  LIBDL="$LIBS"
61977
61978  LIBS="$save_LIBS"
61979
61980  # Deprecated libraries, keep the flags for backwards compatibility
61981  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
61982
61983
61984# Check whether --with-dxsdk was given.
61985if test "${with_dxsdk+set}" = set; then :
61986  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
61987$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
61988fi
61989
61990
61991
61992
61993# Check whether --with-dxsdk-lib was given.
61994if test "${with_dxsdk_lib+set}" = set; then :
61995  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
61996$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
61997fi
61998
61999
62000
62001
62002# Check whether --with-dxsdk-include was given.
62003if test "${with_dxsdk_include+set}" = set; then :
62004  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
62005$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
62006fi
62007
62008
62009  fi
62010
62011  # Control if libzip can use mmap. Available for purposes of overriding.
62012  LIBZIP_CAN_USE_MMAP=true
62013
62014
62015
62016
62017
62018
62019
62020
62021
62022
62023
62024
62025
62026
62027###############################################################################
62028#
62029# We need to do some final tweaking, when everything else is done.
62030#
62031###############################################################################
62032
62033
62034  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
62035
62036
62037
62038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
62039$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
62040
62041  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
62042    ENABLE_INTREE_EC=yes
62043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62044$as_echo "yes" >&6; }
62045  else
62046    ENABLE_INTREE_EC=no
62047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62048$as_echo "no" >&6; }
62049  fi
62050
62051
62052
62053
62054  # Check whether --enable-jtreg-failure-handler was given.
62055if test "${enable_jtreg_failure_handler+set}" = set; then :
62056  enableval=$enable_jtreg_failure_handler;
62057fi
62058
62059
62060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
62061$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
62062
62063  if test "x$enable_jtreg_failure_handler" = "xyes"; then
62064    if test "x$JT_HOME" = "x"; then
62065      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
62066    else
62067      BUILD_FAILURE_HANDLER=true
62068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62069$as_echo "yes, forced" >&6; }
62070    fi
62071  elif test "x$enable_jtreg_failure_handler" = "xno"; then
62072    BUILD_FAILURE_HANDLER=false
62073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62074$as_echo "no, forced" >&6; }
62075  elif test "x$enable_jtreg_failure_handler" = "xauto" \
62076      || test "x$enable_jtreg_failure_handler" = "x"; then
62077    if test "x$JT_HOME" = "x"; then
62078      BUILD_FAILURE_HANDLER=false
62079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
62080$as_echo "no, missing jtreg" >&6; }
62081    else
62082      BUILD_FAILURE_HANDLER=true
62083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
62084$as_echo "yes, jtreg present" >&6; }
62085    fi
62086  else
62087    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
62088  fi
62089
62090
62091
62092
62093###############################################################################
62094#
62095# Configure parts of the build that only affect the build performance,
62096# not the result.
62097#
62098###############################################################################
62099
62100
62101  # How many cores do we have on this build system?
62102
62103# Check whether --with-num-cores was given.
62104if test "${with_num_cores+set}" = set; then :
62105  withval=$with_num_cores;
62106fi
62107
62108  if test "x$with_num_cores" = x; then
62109    # The number of cores were not specified, try to probe them.
62110
62111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
62112$as_echo_n "checking for number of cores... " >&6; }
62113  NUM_CORES=1
62114  FOUND_CORES=no
62115
62116  if test -f /proc/cpuinfo; then
62117    # Looks like a Linux (or cygwin) system
62118    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
62119    FOUND_CORES=yes
62120  elif test -x /usr/sbin/psrinfo; then
62121    # Looks like a Solaris system
62122    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
62123    FOUND_CORES=yes
62124  elif test -x /usr/sbin/sysctl; then
62125    # Looks like a MacOSX system
62126    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
62127    FOUND_CORES=yes
62128  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
62129    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
62130    FOUND_CORES=yes
62131  elif test -n "$NUMBER_OF_PROCESSORS"; then
62132    # On windows, look in the env
62133    NUM_CORES=$NUMBER_OF_PROCESSORS
62134    FOUND_CORES=yes
62135  fi
62136
62137  if test "x$FOUND_CORES" = xyes; then
62138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
62139$as_echo "$NUM_CORES" >&6; }
62140  else
62141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
62142$as_echo "could not detect number of cores, defaulting to 1" >&6; }
62143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
62144$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
62145  fi
62146
62147  else
62148    NUM_CORES=$with_num_cores
62149  fi
62150
62151
62152
62153  # How much memory do we have on this build system?
62154
62155# Check whether --with-memory-size was given.
62156if test "${with_memory_size+set}" = set; then :
62157  withval=$with_memory_size;
62158fi
62159
62160  if test "x$with_memory_size" = x; then
62161    # The memory size was not specified, try to probe it.
62162
62163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
62164$as_echo_n "checking for memory size... " >&6; }
62165  # Default to 1024 MB
62166  MEMORY_SIZE=1024
62167  FOUND_MEM=no
62168
62169  if test -f /proc/meminfo; then
62170    # Looks like a Linux (or cygwin) system
62171    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
62172    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
62173    FOUND_MEM=yes
62174  elif test -x /usr/sbin/prtconf; then
62175    # Looks like a Solaris or AIX system
62176    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
62177    FOUND_MEM=yes
62178  elif test -x /usr/sbin/sysctl; then
62179    # Looks like a MacOSX system
62180    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
62181    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
62182    FOUND_MEM=yes
62183  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
62184    # Windows, but without cygwin
62185    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
62186    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
62187    FOUND_MEM=yes
62188  fi
62189
62190  if test "x$FOUND_MEM" = xyes; then
62191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
62192$as_echo "$MEMORY_SIZE MB" >&6; }
62193  else
62194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
62195$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
62196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
62197$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
62198  fi
62199
62200  else
62201    MEMORY_SIZE=$with_memory_size
62202  fi
62203
62204
62205
62206  # Provide a decent default number of parallel jobs for make depending on
62207  # number of cores, amount of memory and machine architecture.
62208
62209# Check whether --with-jobs was given.
62210if test "${with_jobs+set}" = set; then :
62211  withval=$with_jobs;
62212fi
62213
62214  if test "x$with_jobs" = x; then
62215    # Number of jobs was not specified, calculate.
62216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
62217$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
62218    # Approximate memory in GB.
62219    memory_gb=`expr $MEMORY_SIZE / 1024`
62220    # Pick the lowest of memory in gb and number of cores.
62221    if test "$memory_gb" -lt "$NUM_CORES"; then
62222      JOBS="$memory_gb"
62223    else
62224      JOBS="$NUM_CORES"
62225    fi
62226    if test "$JOBS" -eq "0"; then
62227      JOBS=1
62228    fi
62229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
62230$as_echo "$JOBS" >&6; }
62231  else
62232    JOBS=$with_jobs
62233  fi
62234
62235
62236
62237  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
62238
62239# Check whether --with-test-jobs was given.
62240if test "${with_test_jobs+set}" = set; then :
62241  withval=$with_test_jobs;
62242fi
62243
62244  if test "x$with_test_jobs" = x; then
62245      TEST_JOBS=0
62246  else
62247      TEST_JOBS=$with_test_jobs
62248  fi
62249
62250
62251
62252# Setup arguments for the boot jdk (after cores and memory have been setup)
62253
62254  ##############################################################################
62255  #
62256  # Specify jvm options for anything that is run with the Boot JDK.
62257  # Not all JVM:s accept the same arguments on the command line.
62258  #
62259
62260# Check whether --with-boot-jdk-jvmargs was given.
62261if test "${with_boot_jdk_jvmargs+set}" = set; then :
62262  withval=$with_boot_jdk_jvmargs;
62263fi
62264
62265
62266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
62267$as_echo_n "checking flags for boot jdk java command ... " >&6; }
62268
62269  # Disable special log output when a debug build is used as Boot JDK...
62270
62271  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
62272  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
62273  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
62274  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62275  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62276  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62277    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
62278    JVM_ARG_OK=true
62279  else
62280    $ECHO "Arg failed:" >&5
62281    $ECHO "$OUTPUT" >&5
62282    JVM_ARG_OK=false
62283  fi
62284
62285
62286  # Apply user provided options.
62287
62288  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
62289  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
62290  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
62291  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62292  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62293  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62294    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
62295    JVM_ARG_OK=true
62296  else
62297    $ECHO "Arg failed:" >&5
62298    $ECHO "$OUTPUT" >&5
62299    JVM_ARG_OK=false
62300  fi
62301
62302
62303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
62304$as_echo "$boot_jdk_jvmargs" >&6; }
62305
62306  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
62307  JAVA_FLAGS=$boot_jdk_jvmargs
62308
62309
62310
62311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
62312$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
62313
62314  # Starting amount of heap memory.
62315
62316  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
62317  $ECHO "Command: $JAVA -Xms64M -version" >&5
62318  OUTPUT=`$JAVA -Xms64M -version 2>&1`
62319  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62320  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62321  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62322    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
62323    JVM_ARG_OK=true
62324  else
62325    $ECHO "Arg failed:" >&5
62326    $ECHO "$OUTPUT" >&5
62327    JVM_ARG_OK=false
62328  fi
62329
62330
62331  # Maximum amount of heap memory.
62332  # Maximum stack size.
62333  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
62334  if test "x$BOOT_JDK_BITS" = "x32"; then
62335    if test "$JVM_MAX_HEAP" -gt "1100"; then
62336      JVM_MAX_HEAP=1100
62337    elif test "$JVM_MAX_HEAP" -lt "512"; then
62338      JVM_MAX_HEAP=512
62339    fi
62340    STACK_SIZE=768
62341  else
62342    # Running a 64 bit JVM allows for and requires a bigger heap
62343    if test "$JVM_MAX_HEAP" -gt "1600"; then
62344      JVM_MAX_HEAP=1600
62345    elif test "$JVM_MAX_HEAP" -lt "512"; then
62346      JVM_MAX_HEAP=512
62347    fi
62348    STACK_SIZE=1536
62349  fi
62350
62351  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
62352  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
62353  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
62354  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62355  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62356  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62357    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
62358    JVM_ARG_OK=true
62359  else
62360    $ECHO "Arg failed:" >&5
62361    $ECHO "$OUTPUT" >&5
62362    JVM_ARG_OK=false
62363  fi
62364
62365
62366  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
62367  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
62368  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
62369  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62370  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62371  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62372    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
62373    JVM_ARG_OK=true
62374  else
62375    $ECHO "Arg failed:" >&5
62376    $ECHO "$OUTPUT" >&5
62377    JVM_ARG_OK=false
62378  fi
62379
62380
62381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
62382$as_echo "$boot_jdk_jvmargs_big" >&6; }
62383
62384  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
62385
62386
62387  # By default, the main javac compilations use big
62388  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
62389
62390
62391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
62392$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
62393
62394  # Use serial gc for small short lived tools if possible
62395
62396  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
62397  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
62398  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
62399  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62400  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62401  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62402    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
62403    JVM_ARG_OK=true
62404  else
62405    $ECHO "Arg failed:" >&5
62406    $ECHO "$OUTPUT" >&5
62407    JVM_ARG_OK=false
62408  fi
62409
62410
62411  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
62412  $ECHO "Command: $JAVA -Xms32M -version" >&5
62413  OUTPUT=`$JAVA -Xms32M -version 2>&1`
62414  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62415  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62416  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62417    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
62418    JVM_ARG_OK=true
62419  else
62420    $ECHO "Arg failed:" >&5
62421    $ECHO "$OUTPUT" >&5
62422    JVM_ARG_OK=false
62423  fi
62424
62425
62426  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
62427  $ECHO "Command: $JAVA -Xmx512M -version" >&5
62428  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
62429  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62430  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62431  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62432    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
62433    JVM_ARG_OK=true
62434  else
62435    $ECHO "Arg failed:" >&5
62436    $ECHO "$OUTPUT" >&5
62437    JVM_ARG_OK=false
62438  fi
62439
62440
62441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
62442$as_echo "$boot_jdk_jvmargs_small" >&6; }
62443
62444  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
62445
62446
62447  JAVA_TOOL_FLAGS_SMALL=""
62448  for f in $JAVA_FLAGS_SMALL; do
62449    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
62450  done
62451
62452
62453
62454# Setup smart javac (after cores and memory have been setup)
62455
62456
62457# Check whether --with-sjavac-server-java was given.
62458if test "${with_sjavac_server_java+set}" = set; then :
62459  withval=$with_sjavac_server_java;
62460fi
62461
62462
62463  if test "x$with_sjavac_server_java" != x; then
62464    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
62465    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
62466    if test "x$FOUND_VERSION" = x; then
62467      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
62468    fi
62469  else
62470    SJAVAC_SERVER_JAVA="$JAVA"
62471  fi
62472
62473
62474  if test "$MEMORY_SIZE" -gt "3000"; then
62475
62476  $ECHO "Check if jvm arg is ok: -d64" >&5
62477  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
62478  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
62479  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62480  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62481  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62482    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
62483    JVM_ARG_OK=true
62484  else
62485    $ECHO "Arg failed:" >&5
62486    $ECHO "$OUTPUT" >&5
62487    JVM_ARG_OK=false
62488  fi
62489
62490    if test "$JVM_ARG_OK" = true; then
62491      JVM_64BIT=true
62492      JVM_ARG_OK=false
62493    fi
62494  fi
62495
62496  MX_VALUE=`expr $MEMORY_SIZE / 2`
62497  if test "$JVM_64BIT" = true; then
62498    # Set ms lower than mx since more than one instance of the server might
62499    # get launched at the same time before they figure out which instance won.
62500    MS_VALUE=512
62501    if test "$MX_VALUE" -gt "2048"; then
62502      MX_VALUE=2048
62503    fi
62504  else
62505    MS_VALUE=256
62506    if test "$MX_VALUE" -gt "1500"; then
62507      MX_VALUE=1500
62508    fi
62509  fi
62510  if test "$MX_VALUE" -lt "512"; then
62511    MX_VALUE=512
62512  fi
62513
62514  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
62515  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
62516  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
62517  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
62518  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
62519  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
62520    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
62521    JVM_ARG_OK=true
62522  else
62523    $ECHO "Arg failed:" >&5
62524    $ECHO "$OUTPUT" >&5
62525    JVM_ARG_OK=false
62526  fi
62527
62528
62529
62530  # Check whether --enable-sjavac was given.
62531if test "${enable_sjavac+set}" = set; then :
62532  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
62533else
62534  ENABLE_SJAVAC="no"
62535fi
62536
62537  if test "x$JVM_ARG_OK" = "xfalse"; then
62538    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
62539$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
62540    ENABLE_SJAVAC="no"
62541  fi
62542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
62543$as_echo_n "checking whether to use sjavac... " >&6; }
62544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
62545$as_echo "$ENABLE_SJAVAC" >&6; }
62546
62547
62548  # Check whether --enable-javac-server was given.
62549if test "${enable_javac_server+set}" = set; then :
62550  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
62551else
62552  ENABLE_JAVAC_SERVER="yes"
62553fi
62554
62555  if test "x$JVM_ARG_OK" = "xfalse"; then
62556    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
62557$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
62558    ENABLE_JAVAC_SERVER="no"
62559  fi
62560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
62561$as_echo_n "checking whether to use javac server... " >&6; }
62562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
62563$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
62564
62565
62566  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
62567    # When using a server javac, the small client instances do not need much
62568    # resources.
62569    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
62570  fi
62571
62572
62573# Setup use of icecc if requested
62574
62575  # Check whether --enable-icecc was given.
62576if test "${enable_icecc+set}" = set; then :
62577  enableval=$enable_icecc;
62578fi
62579
62580
62581  if test "x${enable_icecc}" = "xyes"; then
62582
62583
62584
62585  # Publish this variable in the help.
62586
62587
62588  if [ -z "${ICECC_CMD+x}" ]; then
62589    # The variable is not set by user, try to locate tool using the code snippet
62590    for ac_prog in icecc
62591do
62592  # Extract the first word of "$ac_prog", so it can be a program name with args.
62593set dummy $ac_prog; ac_word=$2
62594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62595$as_echo_n "checking for $ac_word... " >&6; }
62596if ${ac_cv_path_ICECC_CMD+:} false; then :
62597  $as_echo_n "(cached) " >&6
62598else
62599  case $ICECC_CMD in
62600  [\\/]* | ?:[\\/]*)
62601  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
62602  ;;
62603  *)
62604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62605for as_dir in $PATH
62606do
62607  IFS=$as_save_IFS
62608  test -z "$as_dir" && as_dir=.
62609    for ac_exec_ext in '' $ac_executable_extensions; do
62610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62611    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
62612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62613    break 2
62614  fi
62615done
62616  done
62617IFS=$as_save_IFS
62618
62619  ;;
62620esac
62621fi
62622ICECC_CMD=$ac_cv_path_ICECC_CMD
62623if test -n "$ICECC_CMD"; then
62624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
62625$as_echo "$ICECC_CMD" >&6; }
62626else
62627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62628$as_echo "no" >&6; }
62629fi
62630
62631
62632  test -n "$ICECC_CMD" && break
62633done
62634
62635  else
62636    # The variable is set, but is it from the command line or the environment?
62637
62638    # Try to remove the string !ICECC_CMD! from our list.
62639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
62640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
62641      # If it failed, the variable was not from the command line. Ignore it,
62642      # but warn the user (except for BASH, which is always set by the calling BASH).
62643      if test "xICECC_CMD" != xBASH; then
62644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
62645$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
62646      fi
62647      # Try to locate tool using the code snippet
62648      for ac_prog in icecc
62649do
62650  # Extract the first word of "$ac_prog", so it can be a program name with args.
62651set dummy $ac_prog; ac_word=$2
62652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62653$as_echo_n "checking for $ac_word... " >&6; }
62654if ${ac_cv_path_ICECC_CMD+:} false; then :
62655  $as_echo_n "(cached) " >&6
62656else
62657  case $ICECC_CMD in
62658  [\\/]* | ?:[\\/]*)
62659  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
62660  ;;
62661  *)
62662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62663for as_dir in $PATH
62664do
62665  IFS=$as_save_IFS
62666  test -z "$as_dir" && as_dir=.
62667    for ac_exec_ext in '' $ac_executable_extensions; do
62668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62669    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
62670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62671    break 2
62672  fi
62673done
62674  done
62675IFS=$as_save_IFS
62676
62677  ;;
62678esac
62679fi
62680ICECC_CMD=$ac_cv_path_ICECC_CMD
62681if test -n "$ICECC_CMD"; then
62682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
62683$as_echo "$ICECC_CMD" >&6; }
62684else
62685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62686$as_echo "no" >&6; }
62687fi
62688
62689
62690  test -n "$ICECC_CMD" && break
62691done
62692
62693    else
62694      # If it succeeded, then it was overridden by the user. We will use it
62695      # for the tool.
62696
62697      # First remove it from the list of overridden variables, so we can test
62698      # for unknown variables in the end.
62699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
62700
62701      # Check if we try to supply an empty value
62702      if test "x$ICECC_CMD" = x; then
62703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
62704$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
62705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
62706$as_echo_n "checking for ICECC_CMD... " >&6; }
62707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
62708$as_echo "disabled" >&6; }
62709      else
62710        # Check if the provided tool contains a complete path.
62711        tool_specified="$ICECC_CMD"
62712        tool_basename="${tool_specified##*/}"
62713        if test "x$tool_basename" = "x$tool_specified"; then
62714          # A command without a complete path is provided, search $PATH.
62715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
62716$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
62717          # Extract the first word of "$tool_basename", so it can be a program name with args.
62718set dummy $tool_basename; ac_word=$2
62719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62720$as_echo_n "checking for $ac_word... " >&6; }
62721if ${ac_cv_path_ICECC_CMD+:} false; then :
62722  $as_echo_n "(cached) " >&6
62723else
62724  case $ICECC_CMD in
62725  [\\/]* | ?:[\\/]*)
62726  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
62727  ;;
62728  *)
62729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62730for as_dir in $PATH
62731do
62732  IFS=$as_save_IFS
62733  test -z "$as_dir" && as_dir=.
62734    for ac_exec_ext in '' $ac_executable_extensions; do
62735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62736    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
62737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62738    break 2
62739  fi
62740done
62741  done
62742IFS=$as_save_IFS
62743
62744  ;;
62745esac
62746fi
62747ICECC_CMD=$ac_cv_path_ICECC_CMD
62748if test -n "$ICECC_CMD"; then
62749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
62750$as_echo "$ICECC_CMD" >&6; }
62751else
62752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62753$as_echo "no" >&6; }
62754fi
62755
62756
62757          if test "x$ICECC_CMD" = x; then
62758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
62759          fi
62760        else
62761          # Otherwise we believe it is a complete path. Use it as it is.
62762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
62763$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
62764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
62765$as_echo_n "checking for ICECC_CMD... " >&6; }
62766          if test ! -x "$tool_specified"; then
62767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
62768$as_echo "not found" >&6; }
62769            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
62770          fi
62771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
62772$as_echo "$tool_specified" >&6; }
62773        fi
62774      fi
62775    fi
62776
62777  fi
62778
62779
62780
62781  if test "x$ICECC_CMD" = x; then
62782    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
62783  fi
62784
62785
62786    old_path="$PATH"
62787
62788    # Look for icecc-create-env in some known places
62789    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
62790
62791
62792
62793  # Publish this variable in the help.
62794
62795
62796  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
62797    # The variable is not set by user, try to locate tool using the code snippet
62798    for ac_prog in icecc-create-env
62799do
62800  # Extract the first word of "$ac_prog", so it can be a program name with args.
62801set dummy $ac_prog; ac_word=$2
62802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62803$as_echo_n "checking for $ac_word... " >&6; }
62804if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
62805  $as_echo_n "(cached) " >&6
62806else
62807  case $ICECC_CREATE_ENV in
62808  [\\/]* | ?:[\\/]*)
62809  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
62810  ;;
62811  *)
62812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62813for as_dir in $PATH
62814do
62815  IFS=$as_save_IFS
62816  test -z "$as_dir" && as_dir=.
62817    for ac_exec_ext in '' $ac_executable_extensions; do
62818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62819    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
62820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62821    break 2
62822  fi
62823done
62824  done
62825IFS=$as_save_IFS
62826
62827  ;;
62828esac
62829fi
62830ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
62831if test -n "$ICECC_CREATE_ENV"; then
62832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
62833$as_echo "$ICECC_CREATE_ENV" >&6; }
62834else
62835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62836$as_echo "no" >&6; }
62837fi
62838
62839
62840  test -n "$ICECC_CREATE_ENV" && break
62841done
62842
62843  else
62844    # The variable is set, but is it from the command line or the environment?
62845
62846    # Try to remove the string !ICECC_CREATE_ENV! from our list.
62847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
62848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
62849      # If it failed, the variable was not from the command line. Ignore it,
62850      # but warn the user (except for BASH, which is always set by the calling BASH).
62851      if test "xICECC_CREATE_ENV" != xBASH; then
62852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
62853$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
62854      fi
62855      # Try to locate tool using the code snippet
62856      for ac_prog in icecc-create-env
62857do
62858  # Extract the first word of "$ac_prog", so it can be a program name with args.
62859set dummy $ac_prog; ac_word=$2
62860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62861$as_echo_n "checking for $ac_word... " >&6; }
62862if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
62863  $as_echo_n "(cached) " >&6
62864else
62865  case $ICECC_CREATE_ENV in
62866  [\\/]* | ?:[\\/]*)
62867  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
62868  ;;
62869  *)
62870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62871for as_dir in $PATH
62872do
62873  IFS=$as_save_IFS
62874  test -z "$as_dir" && as_dir=.
62875    for ac_exec_ext in '' $ac_executable_extensions; do
62876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62877    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
62878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62879    break 2
62880  fi
62881done
62882  done
62883IFS=$as_save_IFS
62884
62885  ;;
62886esac
62887fi
62888ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
62889if test -n "$ICECC_CREATE_ENV"; then
62890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
62891$as_echo "$ICECC_CREATE_ENV" >&6; }
62892else
62893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62894$as_echo "no" >&6; }
62895fi
62896
62897
62898  test -n "$ICECC_CREATE_ENV" && break
62899done
62900
62901    else
62902      # If it succeeded, then it was overridden by the user. We will use it
62903      # for the tool.
62904
62905      # First remove it from the list of overridden variables, so we can test
62906      # for unknown variables in the end.
62907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
62908
62909      # Check if we try to supply an empty value
62910      if test "x$ICECC_CREATE_ENV" = x; then
62911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
62912$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
62913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
62914$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
62915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
62916$as_echo "disabled" >&6; }
62917      else
62918        # Check if the provided tool contains a complete path.
62919        tool_specified="$ICECC_CREATE_ENV"
62920        tool_basename="${tool_specified##*/}"
62921        if test "x$tool_basename" = "x$tool_specified"; then
62922          # A command without a complete path is provided, search $PATH.
62923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
62924$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
62925          # Extract the first word of "$tool_basename", so it can be a program name with args.
62926set dummy $tool_basename; ac_word=$2
62927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62928$as_echo_n "checking for $ac_word... " >&6; }
62929if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
62930  $as_echo_n "(cached) " >&6
62931else
62932  case $ICECC_CREATE_ENV in
62933  [\\/]* | ?:[\\/]*)
62934  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
62935  ;;
62936  *)
62937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62938for as_dir in $PATH
62939do
62940  IFS=$as_save_IFS
62941  test -z "$as_dir" && as_dir=.
62942    for ac_exec_ext in '' $ac_executable_extensions; do
62943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62944    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
62945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62946    break 2
62947  fi
62948done
62949  done
62950IFS=$as_save_IFS
62951
62952  ;;
62953esac
62954fi
62955ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
62956if test -n "$ICECC_CREATE_ENV"; then
62957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
62958$as_echo "$ICECC_CREATE_ENV" >&6; }
62959else
62960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62961$as_echo "no" >&6; }
62962fi
62963
62964
62965          if test "x$ICECC_CREATE_ENV" = x; then
62966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
62967          fi
62968        else
62969          # Otherwise we believe it is a complete path. Use it as it is.
62970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
62971$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
62972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
62973$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
62974          if test ! -x "$tool_specified"; then
62975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
62976$as_echo "not found" >&6; }
62977            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
62978          fi
62979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
62980$as_echo "$tool_specified" >&6; }
62981        fi
62982      fi
62983    fi
62984
62985  fi
62986
62987
62988
62989  if test "x$ICECC_CREATE_ENV" = x; then
62990    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
62991  fi
62992
62993
62994    # Use icecc-create-env to create a minimal compilation environment that can
62995    # be sent to the other hosts in the icecream cluster.
62996    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
62997    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
62998    # Older versions of icecc does not have the --gcc parameter
62999    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
63000      icecc_gcc_arg="--gcc"
63001    fi
63002    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
63003
63004  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63005      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
63006          ${icecc_create_env_log} 2>&1 )
63007  if test "$?" != "0"; then
63008    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63009$as_echo "$as_me: icecc-create-env output:" >&6;}
63010    cat \
63011          ${icecc_create_env_log}
63012    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63013  fi
63014
63015    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
63016      # For clang, the icecc compilerwrapper is needed. It usually resides next
63017      # to icecc-create-env.
63018
63019
63020
63021  # Publish this variable in the help.
63022
63023
63024  if [ -z "${ICECC_WRAPPER+x}" ]; then
63025    # The variable is not set by user, try to locate tool using the code snippet
63026    for ac_prog in compilerwrapper
63027do
63028  # Extract the first word of "$ac_prog", so it can be a program name with args.
63029set dummy $ac_prog; ac_word=$2
63030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63031$as_echo_n "checking for $ac_word... " >&6; }
63032if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
63033  $as_echo_n "(cached) " >&6
63034else
63035  case $ICECC_WRAPPER in
63036  [\\/]* | ?:[\\/]*)
63037  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
63038  ;;
63039  *)
63040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63041for as_dir in $PATH
63042do
63043  IFS=$as_save_IFS
63044  test -z "$as_dir" && as_dir=.
63045    for ac_exec_ext in '' $ac_executable_extensions; do
63046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63047    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
63048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63049    break 2
63050  fi
63051done
63052  done
63053IFS=$as_save_IFS
63054
63055  ;;
63056esac
63057fi
63058ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
63059if test -n "$ICECC_WRAPPER"; then
63060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
63061$as_echo "$ICECC_WRAPPER" >&6; }
63062else
63063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63064$as_echo "no" >&6; }
63065fi
63066
63067
63068  test -n "$ICECC_WRAPPER" && break
63069done
63070
63071  else
63072    # The variable is set, but is it from the command line or the environment?
63073
63074    # Try to remove the string !ICECC_WRAPPER! from our list.
63075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
63076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
63077      # If it failed, the variable was not from the command line. Ignore it,
63078      # but warn the user (except for BASH, which is always set by the calling BASH).
63079      if test "xICECC_WRAPPER" != xBASH; then
63080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
63081$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
63082      fi
63083      # Try to locate tool using the code snippet
63084      for ac_prog in compilerwrapper
63085do
63086  # Extract the first word of "$ac_prog", so it can be a program name with args.
63087set dummy $ac_prog; ac_word=$2
63088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63089$as_echo_n "checking for $ac_word... " >&6; }
63090if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
63091  $as_echo_n "(cached) " >&6
63092else
63093  case $ICECC_WRAPPER in
63094  [\\/]* | ?:[\\/]*)
63095  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
63096  ;;
63097  *)
63098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63099for as_dir in $PATH
63100do
63101  IFS=$as_save_IFS
63102  test -z "$as_dir" && as_dir=.
63103    for ac_exec_ext in '' $ac_executable_extensions; do
63104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63105    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
63106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63107    break 2
63108  fi
63109done
63110  done
63111IFS=$as_save_IFS
63112
63113  ;;
63114esac
63115fi
63116ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
63117if test -n "$ICECC_WRAPPER"; then
63118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
63119$as_echo "$ICECC_WRAPPER" >&6; }
63120else
63121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63122$as_echo "no" >&6; }
63123fi
63124
63125
63126  test -n "$ICECC_WRAPPER" && break
63127done
63128
63129    else
63130      # If it succeeded, then it was overridden by the user. We will use it
63131      # for the tool.
63132
63133      # First remove it from the list of overridden variables, so we can test
63134      # for unknown variables in the end.
63135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
63136
63137      # Check if we try to supply an empty value
63138      if test "x$ICECC_WRAPPER" = x; then
63139        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
63140$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
63141        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
63142$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
63143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
63144$as_echo "disabled" >&6; }
63145      else
63146        # Check if the provided tool contains a complete path.
63147        tool_specified="$ICECC_WRAPPER"
63148        tool_basename="${tool_specified##*/}"
63149        if test "x$tool_basename" = "x$tool_specified"; then
63150          # A command without a complete path is provided, search $PATH.
63151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
63152$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
63153          # Extract the first word of "$tool_basename", so it can be a program name with args.
63154set dummy $tool_basename; ac_word=$2
63155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63156$as_echo_n "checking for $ac_word... " >&6; }
63157if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
63158  $as_echo_n "(cached) " >&6
63159else
63160  case $ICECC_WRAPPER in
63161  [\\/]* | ?:[\\/]*)
63162  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
63163  ;;
63164  *)
63165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63166for as_dir in $PATH
63167do
63168  IFS=$as_save_IFS
63169  test -z "$as_dir" && as_dir=.
63170    for ac_exec_ext in '' $ac_executable_extensions; do
63171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63172    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
63173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63174    break 2
63175  fi
63176done
63177  done
63178IFS=$as_save_IFS
63179
63180  ;;
63181esac
63182fi
63183ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
63184if test -n "$ICECC_WRAPPER"; then
63185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
63186$as_echo "$ICECC_WRAPPER" >&6; }
63187else
63188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63189$as_echo "no" >&6; }
63190fi
63191
63192
63193          if test "x$ICECC_WRAPPER" = x; then
63194            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
63195          fi
63196        else
63197          # Otherwise we believe it is a complete path. Use it as it is.
63198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
63199$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
63200          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
63201$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
63202          if test ! -x "$tool_specified"; then
63203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
63204$as_echo "not found" >&6; }
63205            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
63206          fi
63207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
63208$as_echo "$tool_specified" >&6; }
63209        fi
63210      fi
63211    fi
63212
63213  fi
63214
63215
63216
63217  if test "x$ICECC_WRAPPER" = x; then
63218    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
63219  fi
63220
63221
63222
63223  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63224      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
63225  if test "$?" != "0"; then
63226    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63227$as_echo "$as_me: icecc-create-env output:" >&6;}
63228    cat ${icecc_create_env_log}
63229    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63230  fi
63231
63232    else
63233      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
63234    fi
63235    PATH="$old_path"
63236    # The bundle with the compiler gets a name based on checksums. Parse log file
63237    # to find it.
63238    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
63239    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
63240    if test ! -f ${ICECC_ENV_BUNDLE}; then
63241      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
63242    fi
63243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
63244$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
63245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
63246$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
63247    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
63248
63249    if test "x${COMPILE_TYPE}" = "xcross"; then
63250      # If cross compiling, create a separate env package for the build compiler
63251      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
63252      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
63253      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
63254
63255  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63256      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
63257            ${icecc_create_env_log_build} 2>&1 )
63258  if test "$?" != "0"; then
63259    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63260$as_echo "$as_me: icecc-create-env output:" >&6;}
63261    cat \
63262            ${icecc_create_env_log_build}
63263    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63264  fi
63265
63266      elif test "x${BUILD_CC##*/}" = "xclang"; then
63267
63268  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
63269      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
63270  if test "$?" != "0"; then
63271    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
63272$as_echo "$as_me: icecc-create-env output:" >&6;}
63273    cat ${icecc_create_env_log_build}
63274    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
63275  fi
63276
63277      else
63278        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
63279      fi
63280      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
63281      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
63282      if test ! -f ${ICECC_ENV_BUNDLE}; then
63283        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
63284      fi
63285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
63286$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
63287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
63288$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
63289      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
63290          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
63291    else
63292      BUILD_ICECC="${ICECC}"
63293    fi
63294
63295
63296  fi
63297
63298
63299# Can the C/C++ compiler use precompiled headers?
63300
63301
63302  ###############################################################################
63303  #
63304  # Can the C/C++ compiler use precompiled headers?
63305  #
63306  # Check whether --enable-precompiled-headers was given.
63307if test "${enable_precompiled_headers+set}" = set; then :
63308  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
63309else
63310  ENABLE_PRECOMPH=yes
63311fi
63312
63313
63314  USE_PRECOMPILED_HEADER=1
63315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
63316$as_echo_n "checking If precompiled header is enabled... " >&6; }
63317  if test "x$ENABLE_PRECOMPH" = xno; then
63318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63319$as_echo "no, forced" >&6; }
63320    USE_PRECOMPILED_HEADER=0
63321  elif test "x$ICECC" != "x"; then
63322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
63323$as_echo "no, does not work effectively with icecc" >&6; }
63324    USE_PRECOMPILED_HEADER=0
63325  else
63326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63327$as_echo "yes" >&6; }
63328  fi
63329
63330  if test "x$ENABLE_PRECOMPH" = xyes; then
63331    # Check that the compiler actually supports precomp headers.
63332    if test "x$TOOLCHAIN_TYPE" = xgcc; then
63333      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
63334$as_echo_n "checking that precompiled headers work... " >&6; }
63335      echo "int alfa();" > conftest.h
63336      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
63337      if test ! -f conftest.hpp.gch; then
63338        USE_PRECOMPILED_HEADER=0
63339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63340$as_echo "no" >&6; }
63341      else
63342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63343$as_echo "yes" >&6; }
63344      fi
63345      rm -f conftest.h conftest.hpp.gch
63346    fi
63347  fi
63348
63349
63350
63351
63352# Setup use of ccache, if available
63353
63354  # Check whether --enable-ccache was given.
63355if test "${enable_ccache+set}" = set; then :
63356  enableval=$enable_ccache;
63357fi
63358
63359
63360  CCACHE=
63361  CCACHE_STATUS=
63362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
63363$as_echo_n "checking is ccache enabled... " >&6; }
63364  if test "x$enable_ccache" = xyes; then
63365    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
63366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63367$as_echo "yes" >&6; }
63368      OLD_PATH="$PATH"
63369      if test "x$TOOLCHAIN_PATH" != x; then
63370        PATH=$TOOLCHAIN_PATH:$PATH
63371      fi
63372
63373
63374
63375  # Publish this variable in the help.
63376
63377
63378  if [ -z "${CCACHE+x}" ]; then
63379    # The variable is not set by user, try to locate tool using the code snippet
63380    for ac_prog in ccache
63381do
63382  # Extract the first word of "$ac_prog", so it can be a program name with args.
63383set dummy $ac_prog; ac_word=$2
63384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63385$as_echo_n "checking for $ac_word... " >&6; }
63386if ${ac_cv_path_CCACHE+:} false; then :
63387  $as_echo_n "(cached) " >&6
63388else
63389  case $CCACHE in
63390  [\\/]* | ?:[\\/]*)
63391  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
63392  ;;
63393  *)
63394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63395for as_dir in $PATH
63396do
63397  IFS=$as_save_IFS
63398  test -z "$as_dir" && as_dir=.
63399    for ac_exec_ext in '' $ac_executable_extensions; do
63400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63401    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
63402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63403    break 2
63404  fi
63405done
63406  done
63407IFS=$as_save_IFS
63408
63409  ;;
63410esac
63411fi
63412CCACHE=$ac_cv_path_CCACHE
63413if test -n "$CCACHE"; then
63414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
63415$as_echo "$CCACHE" >&6; }
63416else
63417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63418$as_echo "no" >&6; }
63419fi
63420
63421
63422  test -n "$CCACHE" && break
63423done
63424
63425  else
63426    # The variable is set, but is it from the command line or the environment?
63427
63428    # Try to remove the string !CCACHE! from our list.
63429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
63430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
63431      # If it failed, the variable was not from the command line. Ignore it,
63432      # but warn the user (except for BASH, which is always set by the calling BASH).
63433      if test "xCCACHE" != xBASH; then
63434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
63435$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
63436      fi
63437      # Try to locate tool using the code snippet
63438      for ac_prog in ccache
63439do
63440  # Extract the first word of "$ac_prog", so it can be a program name with args.
63441set dummy $ac_prog; ac_word=$2
63442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63443$as_echo_n "checking for $ac_word... " >&6; }
63444if ${ac_cv_path_CCACHE+:} false; then :
63445  $as_echo_n "(cached) " >&6
63446else
63447  case $CCACHE in
63448  [\\/]* | ?:[\\/]*)
63449  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
63450  ;;
63451  *)
63452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63453for as_dir in $PATH
63454do
63455  IFS=$as_save_IFS
63456  test -z "$as_dir" && as_dir=.
63457    for ac_exec_ext in '' $ac_executable_extensions; do
63458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63459    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
63460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63461    break 2
63462  fi
63463done
63464  done
63465IFS=$as_save_IFS
63466
63467  ;;
63468esac
63469fi
63470CCACHE=$ac_cv_path_CCACHE
63471if test -n "$CCACHE"; then
63472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
63473$as_echo "$CCACHE" >&6; }
63474else
63475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63476$as_echo "no" >&6; }
63477fi
63478
63479
63480  test -n "$CCACHE" && break
63481done
63482
63483    else
63484      # If it succeeded, then it was overridden by the user. We will use it
63485      # for the tool.
63486
63487      # First remove it from the list of overridden variables, so we can test
63488      # for unknown variables in the end.
63489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
63490
63491      # Check if we try to supply an empty value
63492      if test "x$CCACHE" = x; then
63493        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
63494$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
63495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
63496$as_echo_n "checking for CCACHE... " >&6; }
63497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
63498$as_echo "disabled" >&6; }
63499      else
63500        # Check if the provided tool contains a complete path.
63501        tool_specified="$CCACHE"
63502        tool_basename="${tool_specified##*/}"
63503        if test "x$tool_basename" = "x$tool_specified"; then
63504          # A command without a complete path is provided, search $PATH.
63505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
63506$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
63507          # Extract the first word of "$tool_basename", so it can be a program name with args.
63508set dummy $tool_basename; ac_word=$2
63509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63510$as_echo_n "checking for $ac_word... " >&6; }
63511if ${ac_cv_path_CCACHE+:} false; then :
63512  $as_echo_n "(cached) " >&6
63513else
63514  case $CCACHE in
63515  [\\/]* | ?:[\\/]*)
63516  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
63517  ;;
63518  *)
63519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63520for as_dir in $PATH
63521do
63522  IFS=$as_save_IFS
63523  test -z "$as_dir" && as_dir=.
63524    for ac_exec_ext in '' $ac_executable_extensions; do
63525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63526    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
63527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63528    break 2
63529  fi
63530done
63531  done
63532IFS=$as_save_IFS
63533
63534  ;;
63535esac
63536fi
63537CCACHE=$ac_cv_path_CCACHE
63538if test -n "$CCACHE"; then
63539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
63540$as_echo "$CCACHE" >&6; }
63541else
63542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63543$as_echo "no" >&6; }
63544fi
63545
63546
63547          if test "x$CCACHE" = x; then
63548            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
63549          fi
63550        else
63551          # Otherwise we believe it is a complete path. Use it as it is.
63552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
63553$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
63554          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
63555$as_echo_n "checking for CCACHE... " >&6; }
63556          if test ! -x "$tool_specified"; then
63557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
63558$as_echo "not found" >&6; }
63559            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
63560          fi
63561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
63562$as_echo "$tool_specified" >&6; }
63563        fi
63564      fi
63565    fi
63566
63567  fi
63568
63569
63570
63571  if test "x$CCACHE" = x; then
63572    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
63573  fi
63574
63575
63576      PATH="$OLD_PATH"
63577      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
63578      CCACHE_STATUS="Active ($CCACHE_VERSION)"
63579    else
63580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63581$as_echo "no" >&6; }
63582      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
63583$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
63584    fi
63585  elif test "x$enable_ccache" = xno; then
63586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
63587$as_echo "no, explicitly disabled" >&6; }
63588    CCACHE_STATUS="Disabled"
63589  elif test "x$enable_ccache" = x; then
63590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63591$as_echo "no" >&6; }
63592  else
63593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
63594$as_echo "unknown" >&6; }
63595    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
63596  fi
63597
63598
63599
63600# Check whether --with-ccache-dir was given.
63601if test "${with_ccache_dir+set}" = set; then :
63602  withval=$with_ccache_dir;
63603fi
63604
63605
63606  if test "x$with_ccache_dir" != x; then
63607    # When using a non home ccache directory, assume the use is to share ccache files
63608    # with other users. Thus change the umask.
63609    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
63610    if test "x$CCACHE" = x; then
63611      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
63612$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
63613    fi
63614  fi
63615
63616  if test "x$CCACHE" != x; then
63617
63618  if test "x$CCACHE" != x; then
63619    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
63620      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
63621          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
63622      if test "x$HAS_BAD_CCACHE" != "x"; then
63623        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
63624      fi
63625      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
63626$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
63627      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
63628      PUSHED_FLAGS="$CXXFLAGS"
63629      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
63630      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63631/* end confdefs.h.  */
63632
63633int
63634main ()
63635{
63636
63637  ;
63638  return 0;
63639}
63640_ACEOF
63641if ac_fn_cxx_try_compile "$LINENO"; then :
63642  CC_KNOWS_CCACHE_TRICK=yes
63643else
63644  CC_KNOWS_CCACHE_TRICK=no
63645fi
63646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63647      CXXFLAGS="$PUSHED_FLAGS"
63648      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
63649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63650$as_echo "yes" >&6; }
63651        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
63652
63653        CCACHE_SLOPPINESS=pch_defines,time_macros
63654      else
63655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63656$as_echo "no" >&6; }
63657        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
63658      fi
63659    fi
63660
63661    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
63662        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
63663
63664    if test "x$SET_CCACHE_DIR" != x; then
63665      mkdir -p $CCACHE_DIR > /dev/null 2>&1
63666      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
63667    fi
63668  fi
63669
63670  fi
63671
63672
63673###############################################################################
63674#
63675# And now the finish...
63676#
63677###############################################################################
63678
63679# Check for some common pitfalls
63680
63681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63682    file_to_test="$SRC_ROOT/LICENSE"
63683    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
63684      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
63685    fi
63686  fi
63687
63688
63689  # Did user specify any unknown variables?
63690
63691  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
63692    # Replace the separating ! with spaces before presenting for end user.
63693    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
63694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
63695$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
63696  fi
63697
63698
63699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
63700$as_echo_n "checking if build directory is on local disk... " >&6; }
63701
63702  # df -l lists only local disks; if the given directory is not found then
63703  # a non-zero exit code is given
63704  if test "x$DF" = x; then
63705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63706      # msys does not have df; use Windows "net use" instead.
63707      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
63708      if test "x$IS_NETWORK_DISK" = x; then
63709        OUTPUT_DIR_IS_LOCAL="yes"
63710      else
63711        OUTPUT_DIR_IS_LOCAL="no"
63712      fi
63713    else
63714      # No df here, say it's local
63715      OUTPUT_DIR_IS_LOCAL="yes"
63716    fi
63717  else
63718    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
63719      OUTPUT_DIR_IS_LOCAL="yes"
63720    else
63721      OUTPUT_DIR_IS_LOCAL="no"
63722    fi
63723  fi
63724
63725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
63726$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
63727
63728
63729
63730  # Check if the user has any old-style ALT_ variables set.
63731  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
63732
63733  # Before generating output files, test if they exist. If they do, this is a reconfigure.
63734  # Since we can't properly handle the dependencies for this, warn the user about the situation
63735  if test -e $OUTPUT_ROOT/spec.gmk; then
63736    IS_RECONFIGURE=yes
63737  else
63738    IS_RECONFIGURE=no
63739  fi
63740
63741
63742# At the end, call the custom hook. (Dummy macro if no custom sources available)
63743
63744
63745# We're messing a bit with internal autoconf variables to put the config.status
63746# in the output directory instead of the current directory.
63747CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
63748
63749# Create the actual output files. Now the main work of configure is done.
63750cat >confcache <<\_ACEOF
63751# This file is a shell script that caches the results of configure
63752# tests run on this system so they can be shared between configure
63753# scripts and configure runs, see configure's option --config-cache.
63754# It is not useful on other systems.  If it contains results you don't
63755# want to keep, you may remove or edit it.
63756#
63757# config.status only pays attention to the cache file if you give it
63758# the --recheck option to rerun configure.
63759#
63760# `ac_cv_env_foo' variables (set or unset) will be overridden when
63761# loading this file, other *unset* `ac_cv_foo' will be assigned the
63762# following values.
63763
63764_ACEOF
63765
63766# The following way of writing the cache mishandles newlines in values,
63767# but we know of no workaround that is simple, portable, and efficient.
63768# So, we kill variables containing newlines.
63769# Ultrix sh set writes to stderr and can't be redirected directly,
63770# and sets the high bit in the cache file unless we assign to the vars.
63771(
63772  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
63773    eval ac_val=\$$ac_var
63774    case $ac_val in #(
63775    *${as_nl}*)
63776      case $ac_var in #(
63777      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
63778$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
63779      esac
63780      case $ac_var in #(
63781      _ | IFS | as_nl) ;; #(
63782      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
63783      *) { eval $ac_var=; unset $ac_var;} ;;
63784      esac ;;
63785    esac
63786  done
63787
63788  (set) 2>&1 |
63789    case $as_nl`(ac_space=' '; set) 2>&1` in #(
63790    *${as_nl}ac_space=\ *)
63791      # `set' does not quote correctly, so add quotes: double-quote
63792      # substitution turns \\\\ into \\, and sed turns \\ into \.
63793      sed -n \
63794	"s/'/'\\\\''/g;
63795	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
63796      ;; #(
63797    *)
63798      # `set' quotes correctly as required by POSIX, so do not add quotes.
63799      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
63800      ;;
63801    esac |
63802    sort
63803) |
63804  sed '
63805     /^ac_cv_env_/b end
63806     t clear
63807     :clear
63808     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
63809     t end
63810     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
63811     :end' >>confcache
63812if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
63813  if test -w "$cache_file"; then
63814    if test "x$cache_file" != "x/dev/null"; then
63815      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
63816$as_echo "$as_me: updating cache $cache_file" >&6;}
63817      if test ! -f "$cache_file" || test -h "$cache_file"; then
63818	cat confcache >"$cache_file"
63819      else
63820        case $cache_file in #(
63821        */* | ?:*)
63822	  mv -f confcache "$cache_file"$$ &&
63823	  mv -f "$cache_file"$$ "$cache_file" ;; #(
63824        *)
63825	  mv -f confcache "$cache_file" ;;
63826	esac
63827      fi
63828    fi
63829  else
63830    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
63831$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
63832  fi
63833fi
63834rm -f confcache
63835
63836test "x$prefix" = xNONE && prefix=$ac_default_prefix
63837# Let make expand exec_prefix.
63838test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
63839
63840# Transform confdefs.h into DEFS.
63841# Protect against shell expansion while executing Makefile rules.
63842# Protect against Makefile macro expansion.
63843#
63844# If the first sed substitution is executed (which looks for macros that
63845# take arguments), then branch to the quote section.  Otherwise,
63846# look for a macro that doesn't take arguments.
63847ac_script='
63848:mline
63849/\\$/{
63850 N
63851 s,\\\n,,
63852 b mline
63853}
63854t clear
63855:clear
63856s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
63857t quote
63858s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
63859t quote
63860b any
63861:quote
63862s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
63863s/\[/\\&/g
63864s/\]/\\&/g
63865s/\$/$$/g
63866H
63867:any
63868${
63869	g
63870	s/^\n//
63871	s/\n/ /g
63872	p
63873}
63874'
63875DEFS=`sed -n "$ac_script" confdefs.h`
63876
63877
63878ac_libobjs=
63879ac_ltlibobjs=
63880U=
63881for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
63882  # 1. Remove the extension, and $U if already installed.
63883  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
63884  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
63885  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
63886  #    will be set to the directory where LIBOBJS objects are built.
63887  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
63888  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
63889done
63890LIBOBJS=$ac_libobjs
63891
63892LTLIBOBJS=$ac_ltlibobjs
63893
63894
63895
63896: "${CONFIG_STATUS=./config.status}"
63897ac_write_fail=0
63898ac_clean_files_save=$ac_clean_files
63899ac_clean_files="$ac_clean_files $CONFIG_STATUS"
63900{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
63901$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
63902as_write_fail=0
63903cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
63904#! $SHELL
63905# Generated by $as_me.
63906# Run this file to recreate the current configuration.
63907# Compiler output produced by configure, useful for debugging
63908# configure, is in config.log if it exists.
63909
63910debug=false
63911ac_cs_recheck=false
63912ac_cs_silent=false
63913
63914SHELL=\${CONFIG_SHELL-$SHELL}
63915export SHELL
63916_ASEOF
63917cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
63918## -------------------- ##
63919## M4sh Initialization. ##
63920## -------------------- ##
63921
63922# Be more Bourne compatible
63923DUALCASE=1; export DUALCASE # for MKS sh
63924if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
63925  emulate sh
63926  NULLCMD=:
63927  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
63928  # is contrary to our usage.  Disable this feature.
63929  alias -g '${1+"$@"}'='"$@"'
63930  setopt NO_GLOB_SUBST
63931else
63932  case `(set -o) 2>/dev/null` in #(
63933  *posix*) :
63934    set -o posix ;; #(
63935  *) :
63936     ;;
63937esac
63938fi
63939
63940
63941as_nl='
63942'
63943export as_nl
63944# Printing a long string crashes Solaris 7 /usr/bin/printf.
63945as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
63946as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
63947as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
63948# Prefer a ksh shell builtin over an external printf program on Solaris,
63949# but without wasting forks for bash or zsh.
63950if test -z "$BASH_VERSION$ZSH_VERSION" \
63951    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
63952  as_echo='print -r --'
63953  as_echo_n='print -rn --'
63954elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
63955  as_echo='printf %s\n'
63956  as_echo_n='printf %s'
63957else
63958  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
63959    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
63960    as_echo_n='/usr/ucb/echo -n'
63961  else
63962    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
63963    as_echo_n_body='eval
63964      arg=$1;
63965      case $arg in #(
63966      *"$as_nl"*)
63967	expr "X$arg" : "X\\(.*\\)$as_nl";
63968	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63969      esac;
63970      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63971    '
63972    export as_echo_n_body
63973    as_echo_n='sh -c $as_echo_n_body as_echo'
63974  fi
63975  export as_echo_body
63976  as_echo='sh -c $as_echo_body as_echo'
63977fi
63978
63979# The user is always right.
63980if test "${PATH_SEPARATOR+set}" != set; then
63981  PATH_SEPARATOR=:
63982  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
63983    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
63984      PATH_SEPARATOR=';'
63985  }
63986fi
63987
63988
63989# IFS
63990# We need space, tab and new line, in precisely that order.  Quoting is
63991# there to prevent editors from complaining about space-tab.
63992# (If _AS_PATH_WALK were called with IFS unset, it would disable word
63993# splitting by setting IFS to empty value.)
63994IFS=" ""	$as_nl"
63995
63996# Find who we are.  Look in the path if we contain no directory separator.
63997as_myself=
63998case $0 in #((
63999  *[\\/]* ) as_myself=$0 ;;
64000  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64001for as_dir in $PATH
64002do
64003  IFS=$as_save_IFS
64004  test -z "$as_dir" && as_dir=.
64005    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
64006  done
64007IFS=$as_save_IFS
64008
64009     ;;
64010esac
64011# We did not find ourselves, most probably we were run as `sh COMMAND'
64012# in which case we are not to be found in the path.
64013if test "x$as_myself" = x; then
64014  as_myself=$0
64015fi
64016if test ! -f "$as_myself"; then
64017  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
64018  exit 1
64019fi
64020
64021# Unset variables that we do not need and which cause bugs (e.g. in
64022# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
64023# suppresses any "Segmentation fault" message there.  '((' could
64024# trigger a bug in pdksh 5.2.14.
64025for as_var in BASH_ENV ENV MAIL MAILPATH
64026do eval test x\${$as_var+set} = xset \
64027  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
64028done
64029PS1='$ '
64030PS2='> '
64031PS4='+ '
64032
64033# NLS nuisances.
64034LC_ALL=C
64035export LC_ALL
64036LANGUAGE=C
64037export LANGUAGE
64038
64039# CDPATH.
64040(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
64041
64042
64043# as_fn_error STATUS ERROR [LINENO LOG_FD]
64044# ----------------------------------------
64045# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
64046# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
64047# script with STATUS, using 1 if that was 0.
64048as_fn_error ()
64049{
64050  as_status=$1; test $as_status -eq 0 && as_status=1
64051  if test "$4"; then
64052    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
64053    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
64054  fi
64055  $as_echo "$as_me: error: $2" >&2
64056  as_fn_exit $as_status
64057} # as_fn_error
64058
64059
64060# as_fn_set_status STATUS
64061# -----------------------
64062# Set $? to STATUS, without forking.
64063as_fn_set_status ()
64064{
64065  return $1
64066} # as_fn_set_status
64067
64068# as_fn_exit STATUS
64069# -----------------
64070# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
64071as_fn_exit ()
64072{
64073  set +e
64074  as_fn_set_status $1
64075  exit $1
64076} # as_fn_exit
64077
64078# as_fn_unset VAR
64079# ---------------
64080# Portably unset VAR.
64081as_fn_unset ()
64082{
64083  { eval $1=; unset $1;}
64084}
64085as_unset=as_fn_unset
64086# as_fn_append VAR VALUE
64087# ----------------------
64088# Append the text in VALUE to the end of the definition contained in VAR. Take
64089# advantage of any shell optimizations that allow amortized linear growth over
64090# repeated appends, instead of the typical quadratic growth present in naive
64091# implementations.
64092if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
64093  eval 'as_fn_append ()
64094  {
64095    eval $1+=\$2
64096  }'
64097else
64098  as_fn_append ()
64099  {
64100    eval $1=\$$1\$2
64101  }
64102fi # as_fn_append
64103
64104# as_fn_arith ARG...
64105# ------------------
64106# Perform arithmetic evaluation on the ARGs, and store the result in the
64107# global $as_val. Take advantage of shells that can avoid forks. The arguments
64108# must be portable across $(()) and expr.
64109if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
64110  eval 'as_fn_arith ()
64111  {
64112    as_val=$(( $* ))
64113  }'
64114else
64115  as_fn_arith ()
64116  {
64117    as_val=`expr "$@" || test $? -eq 1`
64118  }
64119fi # as_fn_arith
64120
64121
64122if expr a : '\(a\)' >/dev/null 2>&1 &&
64123   test "X`expr 00001 : '.*\(...\)'`" = X001; then
64124  as_expr=expr
64125else
64126  as_expr=false
64127fi
64128
64129if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
64130  as_basename=basename
64131else
64132  as_basename=false
64133fi
64134
64135if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
64136  as_dirname=dirname
64137else
64138  as_dirname=false
64139fi
64140
64141as_me=`$as_basename -- "$0" ||
64142$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
64143	 X"$0" : 'X\(//\)$' \| \
64144	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
64145$as_echo X/"$0" |
64146    sed '/^.*\/\([^/][^/]*\)\/*$/{
64147	    s//\1/
64148	    q
64149	  }
64150	  /^X\/\(\/\/\)$/{
64151	    s//\1/
64152	    q
64153	  }
64154	  /^X\/\(\/\).*/{
64155	    s//\1/
64156	    q
64157	  }
64158	  s/.*/./; q'`
64159
64160# Avoid depending upon Character Ranges.
64161as_cr_letters='abcdefghijklmnopqrstuvwxyz'
64162as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
64163as_cr_Letters=$as_cr_letters$as_cr_LETTERS
64164as_cr_digits='0123456789'
64165as_cr_alnum=$as_cr_Letters$as_cr_digits
64166
64167ECHO_C= ECHO_N= ECHO_T=
64168case `echo -n x` in #(((((
64169-n*)
64170  case `echo 'xy\c'` in
64171  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
64172  xy)  ECHO_C='\c';;
64173  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
64174       ECHO_T='	';;
64175  esac;;
64176*)
64177  ECHO_N='-n';;
64178esac
64179
64180rm -f conf$$ conf$$.exe conf$$.file
64181if test -d conf$$.dir; then
64182  rm -f conf$$.dir/conf$$.file
64183else
64184  rm -f conf$$.dir
64185  mkdir conf$$.dir 2>/dev/null
64186fi
64187if (echo >conf$$.file) 2>/dev/null; then
64188  if ln -s conf$$.file conf$$ 2>/dev/null; then
64189    as_ln_s='ln -s'
64190    # ... but there are two gotchas:
64191    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
64192    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
64193    # In both cases, we have to default to `cp -pR'.
64194    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
64195      as_ln_s='cp -pR'
64196  elif ln conf$$.file conf$$ 2>/dev/null; then
64197    as_ln_s=ln
64198  else
64199    as_ln_s='cp -pR'
64200  fi
64201else
64202  as_ln_s='cp -pR'
64203fi
64204rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
64205rmdir conf$$.dir 2>/dev/null
64206
64207
64208# as_fn_mkdir_p
64209# -------------
64210# Create "$as_dir" as a directory, including parents if necessary.
64211as_fn_mkdir_p ()
64212{
64213
64214  case $as_dir in #(
64215  -*) as_dir=./$as_dir;;
64216  esac
64217  test -d "$as_dir" || eval $as_mkdir_p || {
64218    as_dirs=
64219    while :; do
64220      case $as_dir in #(
64221      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
64222      *) as_qdir=$as_dir;;
64223      esac
64224      as_dirs="'$as_qdir' $as_dirs"
64225      as_dir=`$as_dirname -- "$as_dir" ||
64226$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
64227	 X"$as_dir" : 'X\(//\)[^/]' \| \
64228	 X"$as_dir" : 'X\(//\)$' \| \
64229	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
64230$as_echo X"$as_dir" |
64231    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
64232	    s//\1/
64233	    q
64234	  }
64235	  /^X\(\/\/\)[^/].*/{
64236	    s//\1/
64237	    q
64238	  }
64239	  /^X\(\/\/\)$/{
64240	    s//\1/
64241	    q
64242	  }
64243	  /^X\(\/\).*/{
64244	    s//\1/
64245	    q
64246	  }
64247	  s/.*/./; q'`
64248      test -d "$as_dir" && break
64249    done
64250    test -z "$as_dirs" || eval "mkdir $as_dirs"
64251  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
64252
64253
64254} # as_fn_mkdir_p
64255if mkdir -p . 2>/dev/null; then
64256  as_mkdir_p='mkdir -p "$as_dir"'
64257else
64258  test -d ./-p && rmdir ./-p
64259  as_mkdir_p=false
64260fi
64261
64262
64263# as_fn_executable_p FILE
64264# -----------------------
64265# Test if FILE is an executable regular file.
64266as_fn_executable_p ()
64267{
64268  test -f "$1" && test -x "$1"
64269} # as_fn_executable_p
64270as_test_x='test -x'
64271as_executable_p=as_fn_executable_p
64272
64273# Sed expression to map a string onto a valid CPP name.
64274as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
64275
64276# Sed expression to map a string onto a valid variable name.
64277as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
64278
64279
64280exec 6>&1
64281## ----------------------------------- ##
64282## Main body of $CONFIG_STATUS script. ##
64283## ----------------------------------- ##
64284_ASEOF
64285test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
64286
64287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64288# Save the log message, to keep $0 and so on meaningful, and to
64289# report actual input values of CONFIG_FILES etc. instead of their
64290# values after options handling.
64291ac_log="
64292This file was extended by OpenJDK $as_me jdk9, which was
64293generated by GNU Autoconf 2.69.  Invocation command line was
64294
64295  CONFIG_FILES    = $CONFIG_FILES
64296  CONFIG_HEADERS  = $CONFIG_HEADERS
64297  CONFIG_LINKS    = $CONFIG_LINKS
64298  CONFIG_COMMANDS = $CONFIG_COMMANDS
64299  $ $0 $@
64300
64301on `(hostname || uname -n) 2>/dev/null | sed 1q`
64302"
64303
64304_ACEOF
64305
64306case $ac_config_files in *"
64307"*) set x $ac_config_files; shift; ac_config_files=$*;;
64308esac
64309
64310
64311
64312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64313# Files that config.status was made for.
64314config_files="$ac_config_files"
64315
64316_ACEOF
64317
64318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64319ac_cs_usage="\
64320\`$as_me' instantiates files and other configuration actions
64321from templates according to the current configuration.  Unless the files
64322and actions are specified as TAGs, all are instantiated by default.
64323
64324Usage: $0 [OPTION]... [TAG]...
64325
64326  -h, --help       print this help, then exit
64327  -V, --version    print version number and configuration settings, then exit
64328      --config     print configuration, then exit
64329  -q, --quiet, --silent
64330                   do not print progress messages
64331  -d, --debug      don't remove temporary files
64332      --recheck    update $as_me by reconfiguring in the same conditions
64333      --file=FILE[:TEMPLATE]
64334                   instantiate the configuration file FILE
64335
64336Configuration files:
64337$config_files
64338
64339Report bugs to <build-dev@openjdk.java.net>.
64340OpenJDK home page: <http://openjdk.java.net>."
64341
64342_ACEOF
64343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64344ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
64345ac_cs_version="\\
64346OpenJDK config.status jdk9
64347configured by $0, generated by GNU Autoconf 2.69,
64348  with options \\"\$ac_cs_config\\"
64349
64350Copyright (C) 2012 Free Software Foundation, Inc.
64351This config.status script is free software; the Free Software Foundation
64352gives unlimited permission to copy, distribute and modify it."
64353
64354ac_pwd='$ac_pwd'
64355srcdir='$srcdir'
64356AWK='$AWK'
64357test -n "\$AWK" || AWK=awk
64358_ACEOF
64359
64360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64361# The default lists apply if the user does not specify any file.
64362ac_need_defaults=:
64363while test $# != 0
64364do
64365  case $1 in
64366  --*=?*)
64367    ac_option=`expr "X$1" : 'X\([^=]*\)='`
64368    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
64369    ac_shift=:
64370    ;;
64371  --*=)
64372    ac_option=`expr "X$1" : 'X\([^=]*\)='`
64373    ac_optarg=
64374    ac_shift=:
64375    ;;
64376  *)
64377    ac_option=$1
64378    ac_optarg=$2
64379    ac_shift=shift
64380    ;;
64381  esac
64382
64383  case $ac_option in
64384  # Handling of the options.
64385  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
64386    ac_cs_recheck=: ;;
64387  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
64388    $as_echo "$ac_cs_version"; exit ;;
64389  --config | --confi | --conf | --con | --co | --c )
64390    $as_echo "$ac_cs_config"; exit ;;
64391  --debug | --debu | --deb | --de | --d | -d )
64392    debug=: ;;
64393  --file | --fil | --fi | --f )
64394    $ac_shift
64395    case $ac_optarg in
64396    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
64397    '') as_fn_error $? "missing file argument" ;;
64398    esac
64399    as_fn_append CONFIG_FILES " '$ac_optarg'"
64400    ac_need_defaults=false;;
64401  --he | --h |  --help | --hel | -h )
64402    $as_echo "$ac_cs_usage"; exit ;;
64403  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
64404  | -silent | --silent | --silen | --sile | --sil | --si | --s)
64405    ac_cs_silent=: ;;
64406
64407  # This is an error.
64408  -*) as_fn_error $? "unrecognized option: \`$1'
64409Try \`$0 --help' for more information." ;;
64410
64411  *) as_fn_append ac_config_targets " $1"
64412     ac_need_defaults=false ;;
64413
64414  esac
64415  shift
64416done
64417
64418ac_configure_extra_args=
64419
64420if $ac_cs_silent; then
64421  exec 6>/dev/null
64422  ac_configure_extra_args="$ac_configure_extra_args --silent"
64423fi
64424
64425_ACEOF
64426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64427if \$ac_cs_recheck; then
64428  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
64429  shift
64430  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
64431  CONFIG_SHELL='$SHELL'
64432  export CONFIG_SHELL
64433  exec "\$@"
64434fi
64435
64436_ACEOF
64437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64438exec 5>>config.log
64439{
64440  echo
64441  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
64442## Running $as_me. ##
64443_ASBOX
64444  $as_echo "$ac_log"
64445} >&5
64446
64447_ACEOF
64448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64449_ACEOF
64450
64451cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64452
64453# Handling of arguments.
64454for ac_config_target in $ac_config_targets
64455do
64456  case $ac_config_target in
64457    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
64458    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
64459    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
64460    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
64461    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
64462    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
64463
64464  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
64465  esac
64466done
64467
64468
64469# If the user did not use the arguments to specify the items to instantiate,
64470# then the envvar interface is used.  Set only those that are not.
64471# We use the long form for the default assignment because of an extremely
64472# bizarre bug on SunOS 4.1.3.
64473if $ac_need_defaults; then
64474  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
64475fi
64476
64477# Have a temporary directory for convenience.  Make it in the build tree
64478# simply because there is no reason against having it here, and in addition,
64479# creating and moving files from /tmp can sometimes cause problems.
64480# Hook for its removal unless debugging.
64481# Note that there is a small window in which the directory will not be cleaned:
64482# after its creation but before its name has been assigned to `$tmp'.
64483$debug ||
64484{
64485  tmp= ac_tmp=
64486  trap 'exit_status=$?
64487  : "${ac_tmp:=$tmp}"
64488  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
64489' 0
64490  trap 'as_fn_exit 1' 1 2 13 15
64491}
64492# Create a (secure) tmp directory for tmp files.
64493
64494{
64495  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
64496  test -d "$tmp"
64497}  ||
64498{
64499  tmp=./conf$$-$RANDOM
64500  (umask 077 && mkdir "$tmp")
64501} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
64502ac_tmp=$tmp
64503
64504# Set up the scripts for CONFIG_FILES section.
64505# No need to generate them if there are no CONFIG_FILES.
64506# This happens for instance with `./config.status config.h'.
64507if test -n "$CONFIG_FILES"; then
64508
64509
64510ac_cr=`echo X | tr X '\015'`
64511# On cygwin, bash can eat \r inside `` if the user requested igncr.
64512# But we know of no other shell where ac_cr would be empty at this
64513# point, so we can use a bashism as a fallback.
64514if test "x$ac_cr" = x; then
64515  eval ac_cr=\$\'\\r\'
64516fi
64517ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
64518if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
64519  ac_cs_awk_cr='\\r'
64520else
64521  ac_cs_awk_cr=$ac_cr
64522fi
64523
64524echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
64525_ACEOF
64526
64527
64528{
64529  echo "cat >conf$$subs.awk <<_ACEOF" &&
64530  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
64531  echo "_ACEOF"
64532} >conf$$subs.sh ||
64533  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
64534ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
64535ac_delim='%!_!# '
64536for ac_last_try in false false false false false :; do
64537  . ./conf$$subs.sh ||
64538    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
64539
64540  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
64541  if test $ac_delim_n = $ac_delim_num; then
64542    break
64543  elif $ac_last_try; then
64544    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
64545  else
64546    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
64547  fi
64548done
64549rm -f conf$$subs.sh
64550
64551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64552cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
64553_ACEOF
64554sed -n '
64555h
64556s/^/S["/; s/!.*/"]=/
64557p
64558g
64559s/^[^!]*!//
64560:repl
64561t repl
64562s/'"$ac_delim"'$//
64563t delim
64564:nl
64565h
64566s/\(.\{148\}\)..*/\1/
64567t more1
64568s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
64569p
64570n
64571b repl
64572:more1
64573s/["\\]/\\&/g; s/^/"/; s/$/"\\/
64574p
64575g
64576s/.\{148\}//
64577t nl
64578:delim
64579h
64580s/\(.\{148\}\)..*/\1/
64581t more2
64582s/["\\]/\\&/g; s/^/"/; s/$/"/
64583p
64584b
64585:more2
64586s/["\\]/\\&/g; s/^/"/; s/$/"\\/
64587p
64588g
64589s/.\{148\}//
64590t delim
64591' <conf$$subs.awk | sed '
64592/^[^""]/{
64593  N
64594  s/\n//
64595}
64596' >>$CONFIG_STATUS || ac_write_fail=1
64597rm -f conf$$subs.awk
64598cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64599_ACAWK
64600cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
64601  for (key in S) S_is_set[key] = 1
64602  FS = ""
64603
64604}
64605{
64606  line = $ 0
64607  nfields = split(line, field, "@")
64608  substed = 0
64609  len = length(field[1])
64610  for (i = 2; i < nfields; i++) {
64611    key = field[i]
64612    keylen = length(key)
64613    if (S_is_set[key]) {
64614      value = S[key]
64615      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
64616      len += length(value) + length(field[++i])
64617      substed = 1
64618    } else
64619      len += 1 + keylen
64620  }
64621
64622  print line
64623}
64624
64625_ACAWK
64626_ACEOF
64627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64628if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
64629  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
64630else
64631  cat
64632fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
64633  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
64634_ACEOF
64635
64636# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
64637# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
64638# trailing colons and then remove the whole line if VPATH becomes empty
64639# (actually we leave an empty line to preserve line numbers).
64640if test "x$srcdir" = x.; then
64641  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
64642h
64643s///
64644s/^/:/
64645s/[	 ]*$/:/
64646s/:\$(srcdir):/:/g
64647s/:\${srcdir}:/:/g
64648s/:@srcdir@:/:/g
64649s/^:*//
64650s/:*$//
64651x
64652s/\(=[	 ]*\).*/\1/
64653G
64654s/\n//
64655s/^[^=]*=[	 ]*$//
64656}'
64657fi
64658
64659cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64660fi # test -n "$CONFIG_FILES"
64661
64662
64663eval set X "  :F $CONFIG_FILES      "
64664shift
64665for ac_tag
64666do
64667  case $ac_tag in
64668  :[FHLC]) ac_mode=$ac_tag; continue;;
64669  esac
64670  case $ac_mode$ac_tag in
64671  :[FHL]*:*);;
64672  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
64673  :[FH]-) ac_tag=-:-;;
64674  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
64675  esac
64676  ac_save_IFS=$IFS
64677  IFS=:
64678  set x $ac_tag
64679  IFS=$ac_save_IFS
64680  shift
64681  ac_file=$1
64682  shift
64683
64684  case $ac_mode in
64685  :L) ac_source=$1;;
64686  :[FH])
64687    ac_file_inputs=
64688    for ac_f
64689    do
64690      case $ac_f in
64691      -) ac_f="$ac_tmp/stdin";;
64692      *) # Look for the file first in the build tree, then in the source tree
64693	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
64694	 # because $ac_f cannot contain `:'.
64695	 test -f "$ac_f" ||
64696	   case $ac_f in
64697	   [\\/$]*) false;;
64698	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
64699	   esac ||
64700	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
64701      esac
64702      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
64703      as_fn_append ac_file_inputs " '$ac_f'"
64704    done
64705
64706    # Let's still pretend it is `configure' which instantiates (i.e., don't
64707    # use $as_me), people would be surprised to read:
64708    #    /* config.h.  Generated by config.status.  */
64709    configure_input='Generated from '`
64710	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
64711	`' by configure.'
64712    if test x"$ac_file" != x-; then
64713      configure_input="$ac_file.  $configure_input"
64714      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
64715$as_echo "$as_me: creating $ac_file" >&6;}
64716    fi
64717    # Neutralize special characters interpreted by sed in replacement strings.
64718    case $configure_input in #(
64719    *\&* | *\|* | *\\* )
64720       ac_sed_conf_input=`$as_echo "$configure_input" |
64721       sed 's/[\\\\&|]/\\\\&/g'`;; #(
64722    *) ac_sed_conf_input=$configure_input;;
64723    esac
64724
64725    case $ac_tag in
64726    *:-:* | *:-) cat >"$ac_tmp/stdin" \
64727      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
64728    esac
64729    ;;
64730  esac
64731
64732  ac_dir=`$as_dirname -- "$ac_file" ||
64733$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
64734	 X"$ac_file" : 'X\(//\)[^/]' \| \
64735	 X"$ac_file" : 'X\(//\)$' \| \
64736	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
64737$as_echo X"$ac_file" |
64738    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
64739	    s//\1/
64740	    q
64741	  }
64742	  /^X\(\/\/\)[^/].*/{
64743	    s//\1/
64744	    q
64745	  }
64746	  /^X\(\/\/\)$/{
64747	    s//\1/
64748	    q
64749	  }
64750	  /^X\(\/\).*/{
64751	    s//\1/
64752	    q
64753	  }
64754	  s/.*/./; q'`
64755  as_dir="$ac_dir"; as_fn_mkdir_p
64756  ac_builddir=.
64757
64758case "$ac_dir" in
64759.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
64760*)
64761  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
64762  # A ".." for each directory in $ac_dir_suffix.
64763  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
64764  case $ac_top_builddir_sub in
64765  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
64766  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
64767  esac ;;
64768esac
64769ac_abs_top_builddir=$ac_pwd
64770ac_abs_builddir=$ac_pwd$ac_dir_suffix
64771# for backward compatibility:
64772ac_top_builddir=$ac_top_build_prefix
64773
64774case $srcdir in
64775  .)  # We are building in place.
64776    ac_srcdir=.
64777    ac_top_srcdir=$ac_top_builddir_sub
64778    ac_abs_top_srcdir=$ac_pwd ;;
64779  [\\/]* | ?:[\\/]* )  # Absolute name.
64780    ac_srcdir=$srcdir$ac_dir_suffix;
64781    ac_top_srcdir=$srcdir
64782    ac_abs_top_srcdir=$srcdir ;;
64783  *) # Relative name.
64784    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
64785    ac_top_srcdir=$ac_top_build_prefix$srcdir
64786    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
64787esac
64788ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
64789
64790
64791  case $ac_mode in
64792  :F)
64793  #
64794  # CONFIG_FILE
64795  #
64796
64797_ACEOF
64798
64799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64800# If the template does not know about datarootdir, expand it.
64801# FIXME: This hack should be removed a few years after 2.60.
64802ac_datarootdir_hack=; ac_datarootdir_seen=
64803ac_sed_dataroot='
64804/datarootdir/ {
64805  p
64806  q
64807}
64808/@datadir@/p
64809/@docdir@/p
64810/@infodir@/p
64811/@localedir@/p
64812/@mandir@/p'
64813case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
64814*datarootdir*) ac_datarootdir_seen=yes;;
64815*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
64816  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
64817$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
64818_ACEOF
64819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64820  ac_datarootdir_hack='
64821  s&@datadir@&$datadir&g
64822  s&@docdir@&$docdir&g
64823  s&@infodir@&$infodir&g
64824  s&@localedir@&$localedir&g
64825  s&@mandir@&$mandir&g
64826  s&\\\${datarootdir}&$datarootdir&g' ;;
64827esac
64828_ACEOF
64829
64830# Neutralize VPATH when `$srcdir' = `.'.
64831# Shell code in configure.ac might set extrasub.
64832# FIXME: do we really want to maintain this feature?
64833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
64834ac_sed_extra="$ac_vpsub
64835$extrasub
64836_ACEOF
64837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
64838:t
64839/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
64840s|@configure_input@|$ac_sed_conf_input|;t t
64841s&@top_builddir@&$ac_top_builddir_sub&;t t
64842s&@top_build_prefix@&$ac_top_build_prefix&;t t
64843s&@srcdir@&$ac_srcdir&;t t
64844s&@abs_srcdir@&$ac_abs_srcdir&;t t
64845s&@top_srcdir@&$ac_top_srcdir&;t t
64846s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
64847s&@builddir@&$ac_builddir&;t t
64848s&@abs_builddir@&$ac_abs_builddir&;t t
64849s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
64850$ac_datarootdir_hack
64851"
64852eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
64853  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
64854
64855test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
64856  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
64857  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
64858      "$ac_tmp/out"`; test -z "$ac_out"; } &&
64859  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
64860which seems to be undefined.  Please make sure it is defined" >&5
64861$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
64862which seems to be undefined.  Please make sure it is defined" >&2;}
64863
64864  rm -f "$ac_tmp/stdin"
64865  case $ac_file in
64866  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
64867  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
64868  esac \
64869  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
64870 ;;
64871
64872
64873
64874  esac
64875
64876done # for ac_tag
64877
64878
64879as_fn_exit 0
64880_ACEOF
64881ac_clean_files=$ac_clean_files_save
64882
64883test $ac_write_fail = 0 ||
64884  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
64885
64886
64887# configure is writing to config.log, and then calls config.status.
64888# config.status does its own redirection, appending to config.log.
64889# Unfortunately, on DOS this fails, as config.log is still kept open
64890# by configure, so config.status won't be able to write to it; its
64891# output is simply discarded.  So we exec the FD to /dev/null,
64892# effectively closing config.log, so it can be properly (re)opened and
64893# appended to by config.status.  When coming back to configure, we
64894# need to make the FD available again.
64895if test "$no_create" != yes; then
64896  ac_cs_success=:
64897  ac_config_status_args=
64898  test "$silent" = yes &&
64899    ac_config_status_args="$ac_config_status_args --quiet"
64900  exec 5>/dev/null
64901  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
64902  exec 5>>config.log
64903  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
64904  # would make configure fail if this is the last instruction.
64905  $ac_cs_success || as_fn_exit 1
64906fi
64907if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
64908  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
64909$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
64910fi
64911
64912
64913# After AC_OUTPUT, we need to do final work
64914
64915
64916  # Try to move config.log (generated by autoconf) to the configure-support directory.
64917  if test -e ./config.log; then
64918    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
64919  fi
64920
64921  # Rotate our log file (configure.log)
64922  if test -e "$OUTPUT_ROOT/configure.log.old"; then
64923    $RM -f "$OUTPUT_ROOT/configure.log.old"
64924  fi
64925  if test -e "$OUTPUT_ROOT/configure.log"; then
64926    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
64927  fi
64928
64929  # Move configure.log from current directory to the build output root
64930  if test -e ./configure.log; then
64931    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
64932  fi
64933
64934  # Make the compare script executable
64935  $CHMOD +x $OUTPUT_ROOT/compare.sh
64936
64937
64938# Finally output some useful information to the user
64939
64940  # Finally output some useful information to the user
64941
64942  printf "\n"
64943  printf "====================================================\n"
64944  if test "x$no_create" != "xyes"; then
64945    if test "x$IS_RECONFIGURE" != "xyes"; then
64946      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
64947    else
64948      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
64949    fi
64950  else
64951    if test "x$IS_RECONFIGURE" != "xyes"; then
64952      printf "A configuration has been successfully checked but not created\n"
64953    else
64954      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
64955    fi
64956  fi
64957  if test "x$CONFIGURE_COMMAND_LINE" != x; then
64958    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
64959  else
64960    printf "using default settings.\n"
64961  fi
64962
64963  printf "\n"
64964  printf "Configuration summary:\n"
64965  printf "* Debug level:    $DEBUG_LEVEL\n"
64966  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
64967  printf "* JDK variant:    $JDK_VARIANT\n"
64968  printf "* JVM variants:   $with_jvm_variants\n"
64969  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
64970  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
64971
64972  printf "\n"
64973  printf "Tools summary:\n"
64974  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
64975    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
64976  fi
64977  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
64978  if test "x$TOOLCHAIN_VERSION" != "x"; then
64979    print_version=" $TOOLCHAIN_VERSION"
64980  fi
64981  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
64982  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
64983  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
64984
64985  printf "\n"
64986  printf "Build performance summary:\n"
64987  printf "* Cores to use:   $JOBS\n"
64988  printf "* Memory limit:   $MEMORY_SIZE MB\n"
64989  if test "x$CCACHE_STATUS" != "x"; then
64990    printf "* ccache status:  $CCACHE_STATUS\n"
64991  fi
64992  printf "\n"
64993
64994  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
64995    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
64996    printf "will result in longer build times.\n"
64997    printf "\n"
64998  fi
64999
65000  if test "x$FOUND_ALT_VARIABLES" != "x"; then
65001    printf "WARNING: You have old-style ALT_ environment variables set.\n"
65002    printf "These are not respected, and will be ignored. It is recommended\n"
65003    printf "that you clean your environment. The following variables are set:\n"
65004    printf "$FOUND_ALT_VARIABLES\n"
65005    printf "\n"
65006  fi
65007
65008  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
65009    printf "WARNING: Your build output directory is not on a local disk.\n"
65010    printf "This will severely degrade build performance!\n"
65011    printf "It is recommended that you create an output directory on a local disk,\n"
65012    printf "and run the configure script again from that directory.\n"
65013    printf "\n"
65014  fi
65015
65016  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
65017    printf "WARNING: The result of this configuration has overridden an older\n"
65018    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
65019    printf "proper build. Failure to do so might result in strange build problems.\n"
65020    printf "\n"
65021  fi
65022
65023  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
65024    printf "WARNING: The result of this configuration was not saved.\n"
65025    printf "You should run without '--no-create | -n' to create the configuration.\n"
65026    printf "\n"
65027  fi
65028
65029
65030
65031  # Locate config.log.
65032  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
65033    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
65034  elif test -e "./config.log"; then
65035    CONFIG_LOG_PATH="."
65036  fi
65037
65038  if test -e "$CONFIG_LOG_PATH/config.log"; then
65039    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
65040    if test $? -eq 0; then
65041      printf "The following warnings were produced. Repeated here for convenience:\n"
65042      # We must quote sed expression (using []) to stop m4 from eating the [].
65043      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
65044      printf "\n"
65045    fi
65046  fi
65047
65048