generated-configure.sh revision 2738:67c9a443c1ce
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    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
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701FIXPATH_DETACH_FLAG
702FIXPATH
703BUILD_GTEST
704ENABLE_AOT
705GCOV_ENABLED
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714LDFLAGS_TESTEXE
715LDFLAGS_TESTLIB
716CXXFLAGS_TESTEXE
717CXXFLAGS_TESTLIB
718CFLAGS_TESTEXE
719CFLAGS_TESTLIB
720OPENJDK_BUILD_JVM_LIBS
721OPENJDK_BUILD_JVM_ASFLAGS
722OPENJDK_BUILD_JVM_LDFLAGS
723OPENJDK_BUILD_JVM_CFLAGS
724OPENJDK_BUILD_LDFLAGS_HASH_STYLE
725OPENJDK_BUILD_LDFLAGS_CXX_JDK
726OPENJDK_BUILD_JDKEXE_LIBS
727OPENJDK_BUILD_JDKLIB_LIBS
728OPENJDK_BUILD_LDFLAGS_JDKEXE
729OPENJDK_BUILD_LDFLAGS_JDKLIB
730OPENJDK_BUILD_CXXFLAGS_JDKEXE
731OPENJDK_BUILD_CXXFLAGS_JDKLIB
732OPENJDK_BUILD_CFLAGS_JDKEXE
733OPENJDK_BUILD_CFLAGS_JDKLIB
734OPENJDK_BUILD_CXXSTD_CXXFLAG
735JVM_LIBS
736JVM_ASFLAGS
737JVM_LDFLAGS
738JVM_CFLAGS
739LDFLAGS_HASH_STYLE
740LDFLAGS_CXX_JDK
741JDKEXE_LIBS
742JDKLIB_LIBS
743LDFLAGS_JDKEXE
744LDFLAGS_JDKLIB
745CXXFLAGS_JDKEXE
746CXXFLAGS_JDKLIB
747CFLAGS_JDKEXE
748CFLAGS_JDKLIB
749MACOSX_VERSION_MIN
750CXXSTD_CXXFLAG
751JDK_ARCH_ABI_PROP_NAME
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JIB_JAR
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795BUILD_AS
796BUILD_LDCXX
797BUILD_LD
798BUILD_STRIP
799BUILD_OBJCOPY
800BUILD_AR
801BUILD_NM
802BUILD_CXX
803BUILD_CC
804BUILD_SYSROOT_LDFLAGS
805BUILD_SYSROOT_CFLAGS
806ac_ct_OBJDUMP
807OBJDUMP
808ac_ct_OBJCOPY
809OBJCOPY
810ac_ct_NM
811ac_ct_STRIP
812GNM
813NM
814STRIP
815MSBUILD
816DUMPBIN
817RC
818MT
819LIPO
820ac_ct_AR
821AR
822AS
823LDCXX
824LD
825CXXCPP
826CPP
827CXX_VERSION_NUMBER
828CC_VERSION_NUMBER
829ac_ct_CXX
830CXXFLAGS
831CXX
832TOOLCHAIN_PATH_CXX
833POTENTIAL_CXX
834OBJEXT
835EXEEXT
836ac_ct_CC
837CPPFLAGS
838LDFLAGS
839CFLAGS
840CC
841TOOLCHAIN_PATH_CC
842POTENTIAL_CC
843TOOLCHAIN_VERSION
844VS_LIB
845VS_INCLUDE
846VS_PATH
847CYGWIN_LINK
848SYSROOT_LDFLAGS
849SYSROOT_CFLAGS
850EXTRA_LDFLAGS
851EXTRA_CXXFLAGS
852EXTRA_CFLAGS
853EXE_SUFFIX
854OBJ_SUFFIX
855STATIC_LIBRARY
856SHARED_LIBRARY
857STATIC_LIBRARY_SUFFIX
858SHARED_LIBRARY_SUFFIX
859LIBRARY_PREFIX
860TOOLCHAIN_TYPE
861STATIC_BUILD
862IMPORT_MODULES_MAKE
863IMPORT_MODULES_SRC
864IMPORT_MODULES_MAN
865IMPORT_MODULES_LEGAL
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883JAVAC_FLAGS
884BOOT_JDK_MODULAR
885BOOT_JDK_SOURCETARGET
886JARSIGNER
887JAR
888JAVAH
889JAVAC
890JAVA
891BOOT_JDK
892JAVA_CHECK
893JAVAC_CHECK
894VERSION_IS_GA
895VERSION_SHORT
896VERSION_STRING
897VERSION_NUMBER_FOUR_POSITIONS
898VERSION_NUMBER
899VERSION_OPT
900VERSION_BUILD
901VERSION_PRE
902VERSION_PATCH
903VERSION_SECURITY
904VERSION_MINOR
905VERSION_MAJOR
906MACOSX_BUNDLE_ID_BASE
907MACOSX_BUNDLE_NAME_BASE
908HOTSPOT_VM_DISTRO
909COMPANY_NAME
910JDK_RC_PLATFORM_NAME
911PRODUCT_SUFFIX
912PRODUCT_NAME
913LAUNCHER_NAME
914JLINK_KEEP_PACKAGED_MODULES
915COPYRIGHT_YEAR
916COMPRESS_JARS
917INCLUDE_SA
918UNLIMITED_CRYPTO
919CACERTS_FILE
920ENABLE_FULL_DOCS
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935FLOCK
936TIME
937STAT
938HG
939DOT
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_BUNDLE_PLATFORM
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_OSARCH
983OPENJDK_BUILD_CPU_ISADIR
984OPENJDK_BUILD_CPU_LEGACY_LIB
985OPENJDK_BUILD_CPU_LEGACY
986HOTSPOT_TARGET_CPU_DEFINE
987HOTSPOT_TARGET_CPU_ARCH
988HOTSPOT_TARGET_CPU
989HOTSPOT_TARGET_OS_TYPE
990HOTSPOT_TARGET_OS
991DEFINE_CROSS_COMPILE_ARCH
992OPENJDK_TARGET_BUNDLE_PLATFORM
993OPENJDK_TARGET_OS_EXPORT_DIR
994OPENJDK_TARGET_CPU_OSARCH
995OPENJDK_TARGET_CPU_ISADIR
996OPENJDK_TARGET_CPU_LEGACY_LIB
997OPENJDK_TARGET_CPU_LEGACY
998RELEASE_FILE_OS_ARCH
999RELEASE_FILE_OS_NAME
1000OPENJDK_MODULE_TARGET_PLATFORM
1001COMPILE_TYPE
1002OPENJDK_TARGET_CPU_ENDIAN
1003OPENJDK_TARGET_CPU_BITS
1004OPENJDK_TARGET_CPU_ARCH
1005OPENJDK_TARGET_CPU
1006OPENJDK_TARGET_OS_ENV
1007OPENJDK_TARGET_OS_TYPE
1008OPENJDK_TARGET_OS
1009OPENJDK_BUILD_CPU_ENDIAN
1010OPENJDK_BUILD_CPU_BITS
1011OPENJDK_BUILD_CPU_ARCH
1012OPENJDK_BUILD_CPU
1013OPENJDK_BUILD_OS_ENV
1014OPENJDK_BUILD_OS_TYPE
1015OPENJDK_BUILD_OS
1016OPENJDK_BUILD_AUTOCONF_NAME
1017OPENJDK_TARGET_AUTOCONF_NAME
1018target_os
1019target_vendor
1020target_cpu
1021target
1022host_os
1023host_vendor
1024host_cpu
1025host
1026build_os
1027build_vendor
1028build_cpu
1029build
1030PANDOC
1031NICE
1032CPIO
1033DF
1034READLINK
1035CYGPATH
1036SED
1037FGREP
1038EGREP
1039GREP
1040AWK
1041XARGS
1042WHICH
1043WC
1044UNIQ
1045UNAME
1046TR
1047TOUCH
1048TEE
1049TAR
1050TAIL
1051SORT
1052SH
1053RMDIR
1054RM
1055PRINTF
1056NAWK
1057MV
1058MKTEMP
1059MKDIR
1060LS
1061LN
1062GZIP
1063GUNZIP
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_cpu_port
1132with_devkit
1133with_sys_root
1134with_sysroot
1135with_tools_dir
1136with_toolchain_path
1137with_extra_path
1138with_sdk_name
1139with_conf_name
1140with_output_sync
1141with_default_make_target
1142enable_headless_only
1143enable_full_docs
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182with_jib
1183with_abi_profile
1184enable_warnings_as_errors
1185with_native_debug_symbols
1186enable_debug_symbols
1187enable_zip_debug_info
1188enable_native_coverage
1189enable_dtrace
1190enable_aot
1191enable_hotspot_gtest
1192with_stdc__lib
1193with_msvcr_dll
1194with_msvcp_dll
1195with_x
1196with_cups
1197with_cups_include
1198with_freetype
1199with_freetype_include
1200with_freetype_lib
1201with_freetype_src
1202enable_freetype_bundling
1203with_alsa
1204with_alsa_include
1205with_alsa_lib
1206with_libffi
1207with_libffi_include
1208with_libffi_lib
1209enable_libffi_bundling
1210with_libjpeg
1211with_giflib
1212with_libpng
1213with_zlib
1214with_lcms
1215with_dxsdk
1216with_dxsdk_lib
1217with_dxsdk_include
1218with_jvm_features
1219with_jvm_interpreter
1220enable_jtreg_failure_handler
1221enable_generate_classlist
1222with_num_cores
1223with_memory_size
1224with_jobs
1225with_test_jobs
1226with_boot_jdk_jvmargs
1227with_sjavac_server_java
1228enable_sjavac
1229enable_javac_server
1230enable_icecc
1231enable_precompiled_headers
1232enable_ccache
1233with_ccache_dir
1234'
1235      ac_precious_vars='build_alias
1236host_alias
1237target_alias
1238BASENAME
1239BASH
1240CAT
1241CHMOD
1242CMP
1243COMM
1244CP
1245CUT
1246DATE
1247DIFF
1248DIRNAME
1249ECHO
1250EXPR
1251FILE
1252FIND
1253HEAD
1254GUNZIP
1255GZIP
1256LN
1257LS
1258MKDIR
1259MKTEMP
1260MV
1261NAWK
1262PRINTF
1263RM
1264RMDIR
1265SH
1266SORT
1267TAIL
1268TAR
1269TEE
1270TOUCH
1271TR
1272UNAME
1273UNIQ
1274WC
1275WHICH
1276XARGS
1277AWK
1278GREP
1279EGREP
1280FGREP
1281SED
1282CYGPATH
1283READLINK
1284DF
1285CPIO
1286NICE
1287PANDOC
1288MAKE
1289UNZIP
1290ZIPEXE
1291LDD
1292OTOOL
1293READELF
1294DOT
1295HG
1296STAT
1297TIME
1298FLOCK
1299DTRACE
1300PATCH
1301DSYMUTIL
1302XATTR
1303CODESIGN
1304SETFILE
1305PKG_CONFIG
1306JAVA
1307JAVAC
1308JAVAH
1309JAR
1310JARSIGNER
1311CC
1312CFLAGS
1313LDFLAGS
1314LIBS
1315CPPFLAGS
1316CXX
1317CXXFLAGS
1318CCC
1319CPP
1320CXXCPP
1321AS
1322AR
1323LIPO
1324STRIP
1325NM
1326GNM
1327OBJCOPY
1328OBJDUMP
1329BUILD_CC
1330BUILD_CXX
1331BUILD_NM
1332BUILD_AR
1333BUILD_OBJCOPY
1334BUILD_STRIP
1335JTREGEXE
1336XMKMF
1337FREETYPE_CFLAGS
1338FREETYPE_LIBS
1339ALSA_CFLAGS
1340ALSA_LIBS
1341LIBFFI_CFLAGS
1342LIBFFI_LIBS
1343PNG_CFLAGS
1344PNG_LIBS
1345LCMS_CFLAGS
1346LCMS_LIBS
1347ICECC_CMD
1348ICECC_CREATE_ENV
1349ICECC_WRAPPER
1350CCACHE'
1351
1352
1353# Initialize some variables set by options.
1354ac_init_help=
1355ac_init_version=false
1356ac_unrecognized_opts=
1357ac_unrecognized_sep=
1358# The variables have the same names as the options, with
1359# dashes changed to underlines.
1360cache_file=/dev/null
1361exec_prefix=NONE
1362no_create=
1363no_recursion=
1364prefix=NONE
1365program_prefix=NONE
1366program_suffix=NONE
1367program_transform_name=s,x,x,
1368silent=
1369site=
1370srcdir=
1371verbose=
1372x_includes=NONE
1373x_libraries=NONE
1374
1375# Installation directory options.
1376# These are left unexpanded so users can "make install exec_prefix=/foo"
1377# and all the variables that are supposed to be based on exec_prefix
1378# by default will actually change.
1379# Use braces instead of parens because sh, perl, etc. also accept them.
1380# (The list follows the same order as the GNU Coding Standards.)
1381bindir='${exec_prefix}/bin'
1382sbindir='${exec_prefix}/sbin'
1383libexecdir='${exec_prefix}/libexec'
1384datarootdir='${prefix}/share'
1385datadir='${datarootdir}'
1386sysconfdir='${prefix}/etc'
1387sharedstatedir='${prefix}/com'
1388localstatedir='${prefix}/var'
1389includedir='${prefix}/include'
1390oldincludedir='/usr/include'
1391docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1392infodir='${datarootdir}/info'
1393htmldir='${docdir}'
1394dvidir='${docdir}'
1395pdfdir='${docdir}'
1396psdir='${docdir}'
1397libdir='${exec_prefix}/lib'
1398localedir='${datarootdir}/locale'
1399mandir='${datarootdir}/man'
1400
1401ac_prev=
1402ac_dashdash=
1403for ac_option
1404do
1405  # If the previous option needs an argument, assign it.
1406  if test -n "$ac_prev"; then
1407    eval $ac_prev=\$ac_option
1408    ac_prev=
1409    continue
1410  fi
1411
1412  case $ac_option in
1413  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1414  *=)   ac_optarg= ;;
1415  *)    ac_optarg=yes ;;
1416  esac
1417
1418  # Accept the important Cygnus configure options, so we can diagnose typos.
1419
1420  case $ac_dashdash$ac_option in
1421  --)
1422    ac_dashdash=yes ;;
1423
1424  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1425    ac_prev=bindir ;;
1426  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1427    bindir=$ac_optarg ;;
1428
1429  -build | --build | --buil | --bui | --bu)
1430    ac_prev=build_alias ;;
1431  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1432    build_alias=$ac_optarg ;;
1433
1434  -cache-file | --cache-file | --cache-fil | --cache-fi \
1435  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1436    ac_prev=cache_file ;;
1437  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1438  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1439    cache_file=$ac_optarg ;;
1440
1441  --config-cache | -C)
1442    cache_file=config.cache ;;
1443
1444  -datadir | --datadir | --datadi | --datad)
1445    ac_prev=datadir ;;
1446  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1447    datadir=$ac_optarg ;;
1448
1449  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1450  | --dataroo | --dataro | --datar)
1451    ac_prev=datarootdir ;;
1452  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1453  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1454    datarootdir=$ac_optarg ;;
1455
1456  -disable-* | --disable-*)
1457    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1458    # Reject names that are not valid shell variable names.
1459    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1460      as_fn_error $? "invalid feature name: $ac_useropt"
1461    ac_useropt_orig=$ac_useropt
1462    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1463    case $ac_user_opts in
1464      *"
1465"enable_$ac_useropt"
1466"*) ;;
1467      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1468	 ac_unrecognized_sep=', ';;
1469    esac
1470    eval enable_$ac_useropt=no ;;
1471
1472  -docdir | --docdir | --docdi | --doc | --do)
1473    ac_prev=docdir ;;
1474  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1475    docdir=$ac_optarg ;;
1476
1477  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1478    ac_prev=dvidir ;;
1479  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1480    dvidir=$ac_optarg ;;
1481
1482  -enable-* | --enable-*)
1483    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1484    # Reject names that are not valid shell variable names.
1485    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1486      as_fn_error $? "invalid feature name: $ac_useropt"
1487    ac_useropt_orig=$ac_useropt
1488    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1489    case $ac_user_opts in
1490      *"
1491"enable_$ac_useropt"
1492"*) ;;
1493      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1494	 ac_unrecognized_sep=', ';;
1495    esac
1496    eval enable_$ac_useropt=\$ac_optarg ;;
1497
1498  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1499  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1500  | --exec | --exe | --ex)
1501    ac_prev=exec_prefix ;;
1502  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1503  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1504  | --exec=* | --exe=* | --ex=*)
1505    exec_prefix=$ac_optarg ;;
1506
1507  -gas | --gas | --ga | --g)
1508    # Obsolete; use --with-gas.
1509    with_gas=yes ;;
1510
1511  -help | --help | --hel | --he | -h)
1512    ac_init_help=long ;;
1513  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1514    ac_init_help=recursive ;;
1515  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1516    ac_init_help=short ;;
1517
1518  -host | --host | --hos | --ho)
1519    ac_prev=host_alias ;;
1520  -host=* | --host=* | --hos=* | --ho=*)
1521    host_alias=$ac_optarg ;;
1522
1523  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1524    ac_prev=htmldir ;;
1525  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1526  | --ht=*)
1527    htmldir=$ac_optarg ;;
1528
1529  -includedir | --includedir | --includedi | --included | --include \
1530  | --includ | --inclu | --incl | --inc)
1531    ac_prev=includedir ;;
1532  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1533  | --includ=* | --inclu=* | --incl=* | --inc=*)
1534    includedir=$ac_optarg ;;
1535
1536  -infodir | --infodir | --infodi | --infod | --info | --inf)
1537    ac_prev=infodir ;;
1538  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1539    infodir=$ac_optarg ;;
1540
1541  -libdir | --libdir | --libdi | --libd)
1542    ac_prev=libdir ;;
1543  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1544    libdir=$ac_optarg ;;
1545
1546  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1547  | --libexe | --libex | --libe)
1548    ac_prev=libexecdir ;;
1549  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1550  | --libexe=* | --libex=* | --libe=*)
1551    libexecdir=$ac_optarg ;;
1552
1553  -localedir | --localedir | --localedi | --localed | --locale)
1554    ac_prev=localedir ;;
1555  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1556    localedir=$ac_optarg ;;
1557
1558  -localstatedir | --localstatedir | --localstatedi | --localstated \
1559  | --localstate | --localstat | --localsta | --localst | --locals)
1560    ac_prev=localstatedir ;;
1561  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1562  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1563    localstatedir=$ac_optarg ;;
1564
1565  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1566    ac_prev=mandir ;;
1567  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1568    mandir=$ac_optarg ;;
1569
1570  -nfp | --nfp | --nf)
1571    # Obsolete; use --without-fp.
1572    with_fp=no ;;
1573
1574  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1575  | --no-cr | --no-c | -n)
1576    no_create=yes ;;
1577
1578  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1579  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1580    no_recursion=yes ;;
1581
1582  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1583  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1584  | --oldin | --oldi | --old | --ol | --o)
1585    ac_prev=oldincludedir ;;
1586  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1587  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1588  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1589    oldincludedir=$ac_optarg ;;
1590
1591  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1592    ac_prev=prefix ;;
1593  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1594    prefix=$ac_optarg ;;
1595
1596  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1597  | --program-pre | --program-pr | --program-p)
1598    ac_prev=program_prefix ;;
1599  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1600  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1601    program_prefix=$ac_optarg ;;
1602
1603  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1604  | --program-suf | --program-su | --program-s)
1605    ac_prev=program_suffix ;;
1606  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1607  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1608    program_suffix=$ac_optarg ;;
1609
1610  -program-transform-name | --program-transform-name \
1611  | --program-transform-nam | --program-transform-na \
1612  | --program-transform-n | --program-transform- \
1613  | --program-transform | --program-transfor \
1614  | --program-transfo | --program-transf \
1615  | --program-trans | --program-tran \
1616  | --progr-tra | --program-tr | --program-t)
1617    ac_prev=program_transform_name ;;
1618  -program-transform-name=* | --program-transform-name=* \
1619  | --program-transform-nam=* | --program-transform-na=* \
1620  | --program-transform-n=* | --program-transform-=* \
1621  | --program-transform=* | --program-transfor=* \
1622  | --program-transfo=* | --program-transf=* \
1623  | --program-trans=* | --program-tran=* \
1624  | --progr-tra=* | --program-tr=* | --program-t=*)
1625    program_transform_name=$ac_optarg ;;
1626
1627  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1628    ac_prev=pdfdir ;;
1629  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1630    pdfdir=$ac_optarg ;;
1631
1632  -psdir | --psdir | --psdi | --psd | --ps)
1633    ac_prev=psdir ;;
1634  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1635    psdir=$ac_optarg ;;
1636
1637  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1638  | -silent | --silent | --silen | --sile | --sil)
1639    silent=yes ;;
1640
1641  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1642    ac_prev=sbindir ;;
1643  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1644  | --sbi=* | --sb=*)
1645    sbindir=$ac_optarg ;;
1646
1647  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1648  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1649  | --sharedst | --shareds | --shared | --share | --shar \
1650  | --sha | --sh)
1651    ac_prev=sharedstatedir ;;
1652  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1653  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1654  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1655  | --sha=* | --sh=*)
1656    sharedstatedir=$ac_optarg ;;
1657
1658  -site | --site | --sit)
1659    ac_prev=site ;;
1660  -site=* | --site=* | --sit=*)
1661    site=$ac_optarg ;;
1662
1663  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1664    ac_prev=srcdir ;;
1665  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1666    srcdir=$ac_optarg ;;
1667
1668  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1669  | --syscon | --sysco | --sysc | --sys | --sy)
1670    ac_prev=sysconfdir ;;
1671  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1672  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1673    sysconfdir=$ac_optarg ;;
1674
1675  -target | --target | --targe | --targ | --tar | --ta | --t)
1676    ac_prev=target_alias ;;
1677  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1678    target_alias=$ac_optarg ;;
1679
1680  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1681    verbose=yes ;;
1682
1683  -version | --version | --versio | --versi | --vers | -V)
1684    ac_init_version=: ;;
1685
1686  -with-* | --with-*)
1687    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1688    # Reject names that are not valid shell variable names.
1689    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1690      as_fn_error $? "invalid package name: $ac_useropt"
1691    ac_useropt_orig=$ac_useropt
1692    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1693    case $ac_user_opts in
1694      *"
1695"with_$ac_useropt"
1696"*) ;;
1697      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1698	 ac_unrecognized_sep=', ';;
1699    esac
1700    eval with_$ac_useropt=\$ac_optarg ;;
1701
1702  -without-* | --without-*)
1703    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1704    # Reject names that are not valid shell variable names.
1705    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1706      as_fn_error $? "invalid package name: $ac_useropt"
1707    ac_useropt_orig=$ac_useropt
1708    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1709    case $ac_user_opts in
1710      *"
1711"with_$ac_useropt"
1712"*) ;;
1713      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1714	 ac_unrecognized_sep=', ';;
1715    esac
1716    eval with_$ac_useropt=no ;;
1717
1718  --x)
1719    # Obsolete; use --with-x.
1720    with_x=yes ;;
1721
1722  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1723  | --x-incl | --x-inc | --x-in | --x-i)
1724    ac_prev=x_includes ;;
1725  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1726  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1727    x_includes=$ac_optarg ;;
1728
1729  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1730  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1731    ac_prev=x_libraries ;;
1732  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1733  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1734    x_libraries=$ac_optarg ;;
1735
1736  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1737Try \`$0 --help' for more information"
1738    ;;
1739
1740  *=*)
1741    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1742    # Reject names that are not valid shell variable names.
1743    case $ac_envvar in #(
1744      '' | [0-9]* | *[!_$as_cr_alnum]* )
1745      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1746    esac
1747    eval $ac_envvar=\$ac_optarg
1748    export $ac_envvar ;;
1749
1750  *)
1751    # FIXME: should be removed in autoconf 3.0.
1752    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1753    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1754      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1755    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1756    ;;
1757
1758  esac
1759done
1760
1761if test -n "$ac_prev"; then
1762  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1763  as_fn_error $? "missing argument to $ac_option"
1764fi
1765
1766if test -n "$ac_unrecognized_opts"; then
1767  case $enable_option_checking in
1768    no) ;;
1769    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1770    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1771  esac
1772fi
1773
1774# Check all directory arguments for consistency.
1775for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1776		datadir sysconfdir sharedstatedir localstatedir includedir \
1777		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1778		libdir localedir mandir
1779do
1780  eval ac_val=\$$ac_var
1781  # Remove trailing slashes.
1782  case $ac_val in
1783    */ )
1784      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1785      eval $ac_var=\$ac_val;;
1786  esac
1787  # Be sure to have absolute directory names.
1788  case $ac_val in
1789    [\\/$]* | ?:[\\/]* )  continue;;
1790    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1791  esac
1792  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1793done
1794
1795# There might be people who depend on the old broken behavior: `$host'
1796# used to hold the argument of --host etc.
1797# FIXME: To remove some day.
1798build=$build_alias
1799host=$host_alias
1800target=$target_alias
1801
1802# FIXME: To remove some day.
1803if test "x$host_alias" != x; then
1804  if test "x$build_alias" = x; then
1805    cross_compiling=maybe
1806  elif test "x$build_alias" != "x$host_alias"; then
1807    cross_compiling=yes
1808  fi
1809fi
1810
1811ac_tool_prefix=
1812test -n "$host_alias" && ac_tool_prefix=$host_alias-
1813
1814test "$silent" = yes && exec 6>/dev/null
1815
1816
1817ac_pwd=`pwd` && test -n "$ac_pwd" &&
1818ac_ls_di=`ls -di .` &&
1819ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1820  as_fn_error $? "working directory cannot be determined"
1821test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1822  as_fn_error $? "pwd does not report name of working directory"
1823
1824
1825# Find the source files, if location was not specified.
1826if test -z "$srcdir"; then
1827  ac_srcdir_defaulted=yes
1828  # Try the directory containing this script, then the parent directory.
1829  ac_confdir=`$as_dirname -- "$as_myself" ||
1830$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1831	 X"$as_myself" : 'X\(//\)[^/]' \| \
1832	 X"$as_myself" : 'X\(//\)$' \| \
1833	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1834$as_echo X"$as_myself" |
1835    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)[^/].*/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\).*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  s/.*/./; q'`
1852  srcdir=$ac_confdir
1853  if test ! -r "$srcdir/$ac_unique_file"; then
1854    srcdir=..
1855  fi
1856else
1857  ac_srcdir_defaulted=no
1858fi
1859if test ! -r "$srcdir/$ac_unique_file"; then
1860  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1861  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1862fi
1863ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1864ac_abs_confdir=`(
1865	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1866	pwd)`
1867# When building in place, set srcdir=.
1868if test "$ac_abs_confdir" = "$ac_pwd"; then
1869  srcdir=.
1870fi
1871# Remove unnecessary trailing slashes from srcdir.
1872# Double slashes in file names in object file debugging info
1873# mess up M-x gdb in Emacs.
1874case $srcdir in
1875*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1876esac
1877for ac_var in $ac_precious_vars; do
1878  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_env_${ac_var}_value=\$${ac_var}
1880  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1882done
1883
1884#
1885# Report the --help message.
1886#
1887if test "$ac_init_help" = "long"; then
1888  # Omit some internal or obsolete options to make the list less imposing.
1889  # This message is too long to be a string in the A/UX 3.1 sh.
1890  cat <<_ACEOF
1891\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1892
1893Usage: $0 [OPTION]... [VAR=VALUE]...
1894
1895To assign environment variables (e.g., CC, CFLAGS...), specify them as
1896VAR=VALUE.  See below for descriptions of some of the useful variables.
1897
1898Defaults for the options are specified in brackets.
1899
1900Configuration:
1901  -h, --help              display this help and exit
1902      --help=short        display options specific to this package
1903      --help=recursive    display the short help of all the included packages
1904  -V, --version           display version information and exit
1905  -q, --quiet, --silent   do not print \`checking ...' messages
1906      --cache-file=FILE   cache test results in FILE [disabled]
1907  -C, --config-cache      alias for \`--cache-file=config.cache'
1908  -n, --no-create         do not create output files
1909      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1910
1911Installation directories:
1912  --prefix=PREFIX         install architecture-independent files in PREFIX
1913                          [$ac_default_prefix]
1914  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1915                          [PREFIX]
1916
1917By default, \`make install' will install all the files in
1918\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1919an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1920for instance \`--prefix=\$HOME'.
1921
1922For better control, use the options below.
1923
1924Fine tuning of the installation directories:
1925  --bindir=DIR            user executables [EPREFIX/bin]
1926  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1927  --libexecdir=DIR        program executables [EPREFIX/libexec]
1928  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1929  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1930  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1931  --libdir=DIR            object code libraries [EPREFIX/lib]
1932  --includedir=DIR        C header files [PREFIX/include]
1933  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1934  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1935  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1936  --infodir=DIR           info documentation [DATAROOTDIR/info]
1937  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1938  --mandir=DIR            man documentation [DATAROOTDIR/man]
1939  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1940  --htmldir=DIR           html documentation [DOCDIR]
1941  --dvidir=DIR            dvi documentation [DOCDIR]
1942  --pdfdir=DIR            pdf documentation [DOCDIR]
1943  --psdir=DIR             ps documentation [DOCDIR]
1944_ACEOF
1945
1946  cat <<\_ACEOF
1947
1948X features:
1949  --x-includes=DIR    X include files are in DIR
1950  --x-libraries=DIR   X library files are in DIR
1951
1952System types:
1953  --build=BUILD     configure for building on BUILD [guessed]
1954  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1955  --target=TARGET   configure for building compilers for TARGET [HOST]
1956_ACEOF
1957fi
1958
1959if test -n "$ac_init_help"; then
1960  case $ac_init_help in
1961     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1962   esac
1963  cat <<\_ACEOF
1964
1965Optional Features:
1966  --disable-option-checking  ignore unrecognized --enable/--with options
1967  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1968  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1969  --enable-openjdk-only   suppress building custom source even if present
1970                          [disabled]
1971  --enable-debug          set the debug level to fastdebug (shorthand for
1972                          --with-debug-level=fastdebug) [disabled]
1973  --enable-headless-only  only build headless (no GUI) support [disabled]
1974  --enable-full-docs      build complete documentation [enabled if all tools
1975                          found]
1976  --disable-unlimited-crypto
1977                          Disable unlimited crypto policy [enabled]
1978  --disable-keep-packaged-modules
1979                          Do not keep packaged modules in jdk image [enable]
1980  --enable-static-build   enable static library build [disabled]
1981  --disable-warnings-as-errors
1982                          do not consider native warnings to be an error
1983                          [enabled]
1984  --enable-debug-symbols  Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --enable-zip-debug-info Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-native-coverage
1989                          enable native compilation with code coverage
1990                          data[disabled]
1991  --enable-dtrace[=yes/no/auto]
1992                          enable dtrace. Default is auto, where dtrace is
1993                          enabled if all dependencies are present.
1994  --enable-aot[=yes/no/auto]
1995                          enable ahead of time compilation feature. Default is
1996                          auto, where aot is enabled if all dependencies are
1997                          present.
1998  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1999  --disable-freetype-bundling
2000                          disable bundling of the freetype library with the
2001                          build result [enabled on Windows or when using
2002                          --with-freetype, disabled otherwise]
2003  --enable-libffi-bundling
2004                          enable bundling of libffi.so to make the built JDK
2005                          runnable on more systems
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --disable-generate-classlist
2013                          forces enabling or disabling of the generation of a
2014                          CDS classlist at build time. Default is to generate
2015                          it when either the server or client JVMs are built.
2016  --enable-sjavac         use sjavac to do fast incremental compiles
2017                          [disabled]
2018  --disable-javac-server  disable javac server [enabled]
2019  --enable-icecc          enable distribted compilation of native code using
2020                          icecc/icecream [disabled]
2021  --disable-precompiled-headers
2022                          disable using precompiled headers when compiling C++
2023                          [enabled]
2024  --enable-ccache         enable using ccache to speed up recompilations
2025                          [disabled]
2026
2027Optional Packages:
2028  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031                          support it), e.g. --with-target-bits=32 [guessed]
2032  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-jdk-variant      JDK variant to build (normal) [normal]
2035  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036                          optimized) [release]
2037  --with-jvm-variants     JVM variants (separated by commas) to build
2038                          (server,client,minimal,core,zero,zeroshark,custom)
2039                          [server]
2040  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2041                          (arm64,aarch64) [aarch64]
2042  --with-devkit           use this devkit for compilers, tools and resources
2043  --with-sys-root         alias for --with-sysroot for backwards compatability
2044  --with-sysroot          use this directory as sysroot
2045  --with-tools-dir        alias for --with-toolchain-path for backwards
2046                          compatibility
2047  --with-toolchain-path   prepend these directories when searching for
2048                          toolchain binaries (compilers etc)
2049  --with-extra-path       prepend these directories to the default path
2050  --with-sdk-name         use the platform SDK of the given name. [macosx]
2051  --with-conf-name        use this as the name of the configuration [generated
2052                          from important configuration options]
2053  --with-output-sync      set make output sync type if supported by make.
2054                          [recurse]
2055  --with-default-make-target
2056                          set the default make target [exploded-image]
2057  --with-cacerts-file     specify alternative cacerts file
2058  --with-copyright-year   Set copyright year value for build [current year]
2059  --with-milestone        Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-update-version   Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-user-release-suffix
2064                          Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-build-number     Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-version-string   Set version string [calculated]
2069  --with-version-pre      Set the base part of the version 'PRE' field
2070                          (pre-release identifier) ['internal']
2071  --with-version-opt      Set version 'OPT' field (build metadata)
2072                          [<timestamp>.<user>.<dirname>]
2073  --with-version-build    Set version 'BUILD' field (build number) [not
2074                          specified]
2075  --with-version-major    Set version 'MAJOR' field (first number) [current
2076                          source value]
2077  --with-version-minor    Set version 'MINOR' field (second number) [current
2078                          source value]
2079  --with-version-security Set version 'SECURITY' field (third number) [current
2080                          source value]
2081  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2082                          specified]
2083  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2084  --with-build-jdk        path to JDK of same version as is being built[the
2085                          newly built JDK]
2086  --with-add-source-root  Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-source-root
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-adds-and-overrides
2092                          Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-langtools
2095                          Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-corba   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jaxp    Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jaxws   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-hotspot Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-nashorn Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-jdk     Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-import_hotspot   Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-import-modules   import a set of prebuilt modules either as a zip
2112                          file or an exploded directory
2113  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2114                          to show possible values [platform dependent]
2115  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2116  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2117  --with-extra-ldflags    extra flags to be used when linking jdk
2118  --with-toolchain-version
2119                          the version of the toolchain to look for, use
2120                          '--help' to show possible values [platform
2121                          dependent]
2122  --with-build-devkit     Devkit to use for the build platform toolchain
2123  --with-jtreg            Regression Test Harness [probed]
2124  --with-jib              Jib dependency management tool [not used]
2125  --with-abi-profile      specify ABI profile for ARM builds
2126                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2127                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2128                          [toolchain dependent]
2129  --with-native-debug-symbols
2130                          set the native debug symbol configuration (none,
2131                          internal, external, zipped) [varying]
2132  --with-stdc++lib=<static>,<dynamic>,<default>
2133                          force linking of the C++ runtime on Linux to either
2134                          static or dynamic, default is static with dynamic as
2135                          fallback
2136  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2137                          (Windows only) [probed]
2138  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2139                          (Windows only) [probed]
2140  --with-x                use the X Window System
2141  --with-cups             specify prefix directory for the cups package
2142                          (expecting the headers under PATH/include)
2143  --with-cups-include     specify directory for the cups include files
2144  --with-freetype         specify prefix directory for the freetype package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-freetype-include specify directory for the freetype include files
2148  --with-freetype-lib     specify directory for the freetype library
2149  --with-freetype-src     specify directory with freetype sources to
2150                          automatically build the library (experimental,
2151                          Windows-only)
2152  --with-alsa             specify prefix directory for the alsa package
2153                          (expecting the libraries under PATH/lib and the
2154                          headers under PATH/include)
2155  --with-alsa-include     specify directory for the alsa include files
2156  --with-alsa-lib         specify directory for the alsa library
2157  --with-libffi           specify prefix directory for the libffi package
2158                          (expecting the libraries under PATH/lib and the
2159                          headers under PATH/include)
2160  --with-libffi-include   specify directory for the libffi include files
2161  --with-libffi-lib       specify directory for the libffi library
2162  --with-libjpeg          use libjpeg from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-giflib           use giflib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-libpng           use libpng from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-zlib             use zlib from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-lcms             use lcms2 from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-dxsdk            Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-dxsdk-include    Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-jvm-features     additional JVM features to enable (separated by
2179                          comma), use '--help' to show possible values [none]
2180  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2181                          compatibility and is ignored
2182  --with-num-cores        number of cores in the build system, e.g.
2183                          --with-num-cores=8 [probed]
2184  --with-memory-size      memory (in MB) available in the build system, e.g.
2185                          --with-memory-size=1024 [probed]
2186  --with-jobs             number of parallel jobs to let make run [calculated
2187                          based on cores and memory]
2188  --with-test-jobs        number of parallel tests jobs to run [based on build
2189                          jobs]
2190  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2191                          invocations of boot JDK, overriding the default
2192                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2193                          -enableassertions"
2194  --with-sjavac-server-java
2195                          use this java binary for running the sjavac
2196                          background server [Boot JDK java]
2197  --with-ccache-dir       where to store ccache files [~/.ccache]
2198
2199Some influential environment variables:
2200  BASENAME    Override default value for BASENAME
2201  BASH        Override default value for BASH
2202  CAT         Override default value for CAT
2203  CHMOD       Override default value for CHMOD
2204  CMP         Override default value for CMP
2205  COMM        Override default value for COMM
2206  CP          Override default value for CP
2207  CUT         Override default value for CUT
2208  DATE        Override default value for DATE
2209  DIFF        Override default value for DIFF
2210  DIRNAME     Override default value for DIRNAME
2211  ECHO        Override default value for ECHO
2212  EXPR        Override default value for EXPR
2213  FILE        Override default value for FILE
2214  FIND        Override default value for FIND
2215  HEAD        Override default value for HEAD
2216  GUNZIP      Override default value for GUNZIP
2217  GZIP        Override default value for GZIP
2218  LN          Override default value for LN
2219  LS          Override default value for LS
2220  MKDIR       Override default value for MKDIR
2221  MKTEMP      Override default value for MKTEMP
2222  MV          Override default value for MV
2223  NAWK        Override default value for NAWK
2224  PRINTF      Override default value for PRINTF
2225  RM          Override default value for RM
2226  RMDIR       Override default value for RMDIR
2227  SH          Override default value for SH
2228  SORT        Override default value for SORT
2229  TAIL        Override default value for TAIL
2230  TAR         Override default value for TAR
2231  TEE         Override default value for TEE
2232  TOUCH       Override default value for TOUCH
2233  TR          Override default value for TR
2234  UNAME       Override default value for UNAME
2235  UNIQ        Override default value for UNIQ
2236  WC          Override default value for WC
2237  WHICH       Override default value for WHICH
2238  XARGS       Override default value for XARGS
2239  AWK         Override default value for AWK
2240  GREP        Override default value for GREP
2241  EGREP       Override default value for EGREP
2242  FGREP       Override default value for FGREP
2243  SED         Override default value for SED
2244  CYGPATH     Override default value for CYGPATH
2245  READLINK    Override default value for READLINK
2246  DF          Override default value for DF
2247  CPIO        Override default value for CPIO
2248  NICE        Override default value for NICE
2249  PANDOC      Override default value for PANDOC
2250  MAKE        Override default value for MAKE
2251  UNZIP       Override default value for UNZIP
2252  ZIPEXE      Override default value for ZIPEXE
2253  LDD         Override default value for LDD
2254  OTOOL       Override default value for OTOOL
2255  READELF     Override default value for READELF
2256  DOT         Override default value for DOT
2257  HG          Override default value for HG
2258  STAT        Override default value for STAT
2259  TIME        Override default value for TIME
2260  FLOCK       Override default value for FLOCK
2261  DTRACE      Override default value for DTRACE
2262  PATCH       Override default value for PATCH
2263  DSYMUTIL    Override default value for DSYMUTIL
2264  XATTR       Override default value for XATTR
2265  CODESIGN    Override default value for CODESIGN
2266  SETFILE     Override default value for SETFILE
2267  PKG_CONFIG  path to pkg-config utility
2268  JAVA        Override default value for JAVA
2269  JAVAC       Override default value for JAVAC
2270  JAVAH       Override default value for JAVAH
2271  JAR         Override default value for JAR
2272  JARSIGNER   Override default value for JARSIGNER
2273  CC          C compiler command
2274  CFLAGS      C compiler flags
2275  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2276              nonstandard directory <lib dir>
2277  LIBS        libraries to pass to the linker, e.g. -l<library>
2278  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2279              you have headers in a nonstandard directory <include dir>
2280  CXX         C++ compiler command
2281  CXXFLAGS    C++ compiler flags
2282  CPP         C preprocessor
2283  CXXCPP      C++ preprocessor
2284  AS          Override default value for AS
2285  AR          Override default value for AR
2286  LIPO        Override default value for LIPO
2287  STRIP       Override default value for STRIP
2288  NM          Override default value for NM
2289  GNM         Override default value for GNM
2290  OBJCOPY     Override default value for OBJCOPY
2291  OBJDUMP     Override default value for OBJDUMP
2292  BUILD_CC    Override default value for BUILD_CC
2293  BUILD_CXX   Override default value for BUILD_CXX
2294  BUILD_NM    Override default value for BUILD_NM
2295  BUILD_AR    Override default value for BUILD_AR
2296  BUILD_OBJCOPY
2297              Override default value for BUILD_OBJCOPY
2298  BUILD_STRIP Override default value for BUILD_STRIP
2299  JTREGEXE    Override default value for JTREGEXE
2300  XMKMF       Path to xmkmf, Makefile generator for X Window System
2301  FREETYPE_CFLAGS
2302              C compiler flags for FREETYPE, overriding pkg-config
2303  FREETYPE_LIBS
2304              linker flags for FREETYPE, overriding pkg-config
2305  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2306  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2307  LIBFFI_CFLAGS
2308              C compiler flags for LIBFFI, overriding pkg-config
2309  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2310  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2311  PNG_LIBS    linker flags for PNG, overriding pkg-config
2312  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2313  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2314  ICECC_CMD   Override default value for ICECC_CMD
2315  ICECC_CREATE_ENV
2316              Override default value for ICECC_CREATE_ENV
2317  ICECC_WRAPPER
2318              Override default value for ICECC_WRAPPER
2319  CCACHE      Override default value for CCACHE
2320
2321Use these variables to override the choices made by `configure' or to help
2322it to find libraries and programs with nonstandard names/locations.
2323
2324Report bugs to <build-dev@openjdk.java.net>.
2325OpenJDK home page: <http://openjdk.java.net>.
2326_ACEOF
2327ac_status=$?
2328fi
2329
2330if test "$ac_init_help" = "recursive"; then
2331  # If there are subdirs, report their specific --help.
2332  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2333    test -d "$ac_dir" ||
2334      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2335      continue
2336    ac_builddir=.
2337
2338case "$ac_dir" in
2339.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2340*)
2341  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2342  # A ".." for each directory in $ac_dir_suffix.
2343  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2344  case $ac_top_builddir_sub in
2345  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2346  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2347  esac ;;
2348esac
2349ac_abs_top_builddir=$ac_pwd
2350ac_abs_builddir=$ac_pwd$ac_dir_suffix
2351# for backward compatibility:
2352ac_top_builddir=$ac_top_build_prefix
2353
2354case $srcdir in
2355  .)  # We are building in place.
2356    ac_srcdir=.
2357    ac_top_srcdir=$ac_top_builddir_sub
2358    ac_abs_top_srcdir=$ac_pwd ;;
2359  [\\/]* | ?:[\\/]* )  # Absolute name.
2360    ac_srcdir=$srcdir$ac_dir_suffix;
2361    ac_top_srcdir=$srcdir
2362    ac_abs_top_srcdir=$srcdir ;;
2363  *) # Relative name.
2364    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2365    ac_top_srcdir=$ac_top_build_prefix$srcdir
2366    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2367esac
2368ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2369
2370    cd "$ac_dir" || { ac_status=$?; continue; }
2371    # Check for guested configure.
2372    if test -f "$ac_srcdir/configure.gnu"; then
2373      echo &&
2374      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2375    elif test -f "$ac_srcdir/configure"; then
2376      echo &&
2377      $SHELL "$ac_srcdir/configure" --help=recursive
2378    else
2379      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2380    fi || ac_status=$?
2381    cd "$ac_pwd" || { ac_status=$?; break; }
2382  done
2383fi
2384
2385test -n "$ac_init_help" && exit $ac_status
2386if $ac_init_version; then
2387  cat <<\_ACEOF
2388OpenJDK configure jdk9
2389generated by GNU Autoconf 2.69
2390
2391Copyright (C) 2012 Free Software Foundation, Inc.
2392This configure script is free software; the Free Software Foundation
2393gives unlimited permission to copy, distribute and modify it.
2394_ACEOF
2395  exit
2396fi
2397
2398## ------------------------ ##
2399## Autoconf initialization. ##
2400## ------------------------ ##
2401
2402# ac_fn_c_try_compile LINENO
2403# --------------------------
2404# Try to compile conftest.$ac_ext, and return whether this succeeded.
2405ac_fn_c_try_compile ()
2406{
2407  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408  rm -f conftest.$ac_objext
2409  if { { ac_try="$ac_compile"
2410case "(($ac_try" in
2411  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412  *) ac_try_echo=$ac_try;;
2413esac
2414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415$as_echo "$ac_try_echo"; } >&5
2416  (eval "$ac_compile") 2>conftest.err
2417  ac_status=$?
2418  if test -s conftest.err; then
2419    grep -v '^ *+' conftest.err >conftest.er1
2420    cat conftest.er1 >&5
2421    mv -f conftest.er1 conftest.err
2422  fi
2423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2424  test $ac_status = 0; } && {
2425	 test -z "$ac_c_werror_flag" ||
2426	 test ! -s conftest.err
2427       } && test -s conftest.$ac_objext; then :
2428  ac_retval=0
2429else
2430  $as_echo "$as_me: failed program was:" >&5
2431sed 's/^/| /' conftest.$ac_ext >&5
2432
2433	ac_retval=1
2434fi
2435  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_c_try_compile
2439
2440# ac_fn_cxx_try_compile LINENO
2441# ----------------------------
2442# Try to compile conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_cxx_try_compile ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  rm -f conftest.$ac_objext
2447  if { { ac_try="$ac_compile"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_compile") 2>conftest.err
2455  ac_status=$?
2456  if test -s conftest.err; then
2457    grep -v '^ *+' conftest.err >conftest.er1
2458    cat conftest.er1 >&5
2459    mv -f conftest.er1 conftest.err
2460  fi
2461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462  test $ac_status = 0; } && {
2463	 test -z "$ac_cxx_werror_flag" ||
2464	 test ! -s conftest.err
2465       } && test -s conftest.$ac_objext; then :
2466  ac_retval=0
2467else
2468  $as_echo "$as_me: failed program was:" >&5
2469sed 's/^/| /' conftest.$ac_ext >&5
2470
2471	ac_retval=1
2472fi
2473  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474  as_fn_set_status $ac_retval
2475
2476} # ac_fn_cxx_try_compile
2477
2478# ac_fn_c_try_cpp LINENO
2479# ----------------------
2480# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2481ac_fn_c_try_cpp ()
2482{
2483  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2484  if { { ac_try="$ac_cpp conftest.$ac_ext"
2485case "(($ac_try" in
2486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2487  *) ac_try_echo=$ac_try;;
2488esac
2489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2490$as_echo "$ac_try_echo"; } >&5
2491  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2492  ac_status=$?
2493  if test -s conftest.err; then
2494    grep -v '^ *+' conftest.err >conftest.er1
2495    cat conftest.er1 >&5
2496    mv -f conftest.er1 conftest.err
2497  fi
2498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2499  test $ac_status = 0; } > conftest.i && {
2500	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2501	 test ! -s conftest.err
2502       }; then :
2503  ac_retval=0
2504else
2505  $as_echo "$as_me: failed program was:" >&5
2506sed 's/^/| /' conftest.$ac_ext >&5
2507
2508    ac_retval=1
2509fi
2510  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511  as_fn_set_status $ac_retval
2512
2513} # ac_fn_c_try_cpp
2514
2515# ac_fn_cxx_try_cpp LINENO
2516# ------------------------
2517# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2518ac_fn_cxx_try_cpp ()
2519{
2520  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521  if { { ac_try="$ac_cpp conftest.$ac_ext"
2522case "(($ac_try" in
2523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2524  *) ac_try_echo=$ac_try;;
2525esac
2526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2527$as_echo "$ac_try_echo"; } >&5
2528  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2529  ac_status=$?
2530  if test -s conftest.err; then
2531    grep -v '^ *+' conftest.err >conftest.er1
2532    cat conftest.er1 >&5
2533    mv -f conftest.er1 conftest.err
2534  fi
2535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536  test $ac_status = 0; } > conftest.i && {
2537	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2538	 test ! -s conftest.err
2539       }; then :
2540  ac_retval=0
2541else
2542  $as_echo "$as_me: failed program was:" >&5
2543sed 's/^/| /' conftest.$ac_ext >&5
2544
2545    ac_retval=1
2546fi
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548  as_fn_set_status $ac_retval
2549
2550} # ac_fn_cxx_try_cpp
2551
2552# ac_fn_c_try_link LINENO
2553# -----------------------
2554# Try to link conftest.$ac_ext, and return whether this succeeded.
2555ac_fn_c_try_link ()
2556{
2557  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558  rm -f conftest.$ac_objext conftest$ac_exeext
2559  if { { ac_try="$ac_link"
2560case "(($ac_try" in
2561  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2562  *) ac_try_echo=$ac_try;;
2563esac
2564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2565$as_echo "$ac_try_echo"; } >&5
2566  (eval "$ac_link") 2>conftest.err
2567  ac_status=$?
2568  if test -s conftest.err; then
2569    grep -v '^ *+' conftest.err >conftest.er1
2570    cat conftest.er1 >&5
2571    mv -f conftest.er1 conftest.err
2572  fi
2573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2574  test $ac_status = 0; } && {
2575	 test -z "$ac_c_werror_flag" ||
2576	 test ! -s conftest.err
2577       } && test -s conftest$ac_exeext && {
2578	 test "$cross_compiling" = yes ||
2579	 test -x conftest$ac_exeext
2580       }; then :
2581  ac_retval=0
2582else
2583  $as_echo "$as_me: failed program was:" >&5
2584sed 's/^/| /' conftest.$ac_ext >&5
2585
2586	ac_retval=1
2587fi
2588  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2589  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2590  # interfere with the next link command; also delete a directory that is
2591  # left behind by Apple's compiler.  We do this before executing the actions.
2592  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2593  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594  as_fn_set_status $ac_retval
2595
2596} # ac_fn_c_try_link
2597
2598# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2599# ---------------------------------------------------------
2600# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2601# the include files in INCLUDES and setting the cache variable VAR
2602# accordingly.
2603ac_fn_cxx_check_header_mongrel ()
2604{
2605  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2606  if eval \${$3+:} false; then :
2607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2608$as_echo_n "checking for $2... " >&6; }
2609if eval \${$3+:} false; then :
2610  $as_echo_n "(cached) " >&6
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615else
2616  # Is the header compilable?
2617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2618$as_echo_n "checking $2 usability... " >&6; }
2619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620/* end confdefs.h.  */
2621$4
2622#include <$2>
2623_ACEOF
2624if ac_fn_cxx_try_compile "$LINENO"; then :
2625  ac_header_compiler=yes
2626else
2627  ac_header_compiler=no
2628fi
2629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2631$as_echo "$ac_header_compiler" >&6; }
2632
2633# Is the header present?
2634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2635$as_echo_n "checking $2 presence... " >&6; }
2636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2637/* end confdefs.h.  */
2638#include <$2>
2639_ACEOF
2640if ac_fn_cxx_try_cpp "$LINENO"; then :
2641  ac_header_preproc=yes
2642else
2643  ac_header_preproc=no
2644fi
2645rm -f conftest.err conftest.i conftest.$ac_ext
2646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2647$as_echo "$ac_header_preproc" >&6; }
2648
2649# So?  What about this header?
2650case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2651  yes:no: )
2652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2653$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2654    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2655$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2656    ;;
2657  no:yes:* )
2658    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2659$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2661$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2663$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2665$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668( $as_echo "## ----------------------------------------- ##
2669## Report this to build-dev@openjdk.java.net ##
2670## ----------------------------------------- ##"
2671     ) | sed "s/^/$as_me: WARNING:     /" >&2
2672    ;;
2673esac
2674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2675$as_echo_n "checking for $2... " >&6; }
2676if eval \${$3+:} false; then :
2677  $as_echo_n "(cached) " >&6
2678else
2679  eval "$3=\$ac_header_compiler"
2680fi
2681eval ac_res=\$$3
2682	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683$as_echo "$ac_res" >&6; }
2684fi
2685  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2686
2687} # ac_fn_cxx_check_header_mongrel
2688
2689# ac_fn_cxx_try_run LINENO
2690# ------------------------
2691# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2692# that executables *can* be run.
2693ac_fn_cxx_try_run ()
2694{
2695  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2696  if { { ac_try="$ac_link"
2697case "(($ac_try" in
2698  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2699  *) ac_try_echo=$ac_try;;
2700esac
2701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2702$as_echo "$ac_try_echo"; } >&5
2703  (eval "$ac_link") 2>&5
2704  ac_status=$?
2705  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2706  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2707  { { case "(($ac_try" in
2708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709  *) ac_try_echo=$ac_try;;
2710esac
2711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712$as_echo "$ac_try_echo"; } >&5
2713  (eval "$ac_try") 2>&5
2714  ac_status=$?
2715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716  test $ac_status = 0; }; }; then :
2717  ac_retval=0
2718else
2719  $as_echo "$as_me: program exited with status $ac_status" >&5
2720       $as_echo "$as_me: failed program was:" >&5
2721sed 's/^/| /' conftest.$ac_ext >&5
2722
2723       ac_retval=$ac_status
2724fi
2725  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2726  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2727  as_fn_set_status $ac_retval
2728
2729} # ac_fn_cxx_try_run
2730
2731# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2732# ---------------------------------------------------------
2733# Tests whether HEADER exists and can be compiled using the include files in
2734# INCLUDES, setting the cache variable VAR accordingly.
2735ac_fn_cxx_check_header_compile ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739$as_echo_n "checking for $2... " >&6; }
2740if eval \${$3+:} false; then :
2741  $as_echo_n "(cached) " >&6
2742else
2743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h.  */
2745$4
2746#include <$2>
2747_ACEOF
2748if ac_fn_cxx_try_compile "$LINENO"; then :
2749  eval "$3=yes"
2750else
2751  eval "$3=no"
2752fi
2753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2754fi
2755eval ac_res=\$$3
2756	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2757$as_echo "$ac_res" >&6; }
2758  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759
2760} # ac_fn_cxx_check_header_compile
2761
2762# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2763# ----------------------------------------------
2764# Tries to find the compile-time value of EXPR in a program that includes
2765# INCLUDES, setting VAR accordingly. Returns whether the value could be
2766# computed
2767ac_fn_cxx_compute_int ()
2768{
2769  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2770  if test "$cross_compiling" = yes; then
2771    # Depending upon the size, compute the lo and hi bounds.
2772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2773/* end confdefs.h.  */
2774$4
2775int
2776main ()
2777{
2778static int test_array [1 - 2 * !(($2) >= 0)];
2779test_array [0] = 0;
2780return test_array [0];
2781
2782  ;
2783  return 0;
2784}
2785_ACEOF
2786if ac_fn_cxx_try_compile "$LINENO"; then :
2787  ac_lo=0 ac_mid=0
2788  while :; do
2789    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h.  */
2791$4
2792int
2793main ()
2794{
2795static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2796test_array [0] = 0;
2797return test_array [0];
2798
2799  ;
2800  return 0;
2801}
2802_ACEOF
2803if ac_fn_cxx_try_compile "$LINENO"; then :
2804  ac_hi=$ac_mid; break
2805else
2806  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2807			if test $ac_lo -le $ac_mid; then
2808			  ac_lo= ac_hi=
2809			  break
2810			fi
2811			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2812fi
2813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2814  done
2815else
2816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817/* end confdefs.h.  */
2818$4
2819int
2820main ()
2821{
2822static int test_array [1 - 2 * !(($2) < 0)];
2823test_array [0] = 0;
2824return test_array [0];
2825
2826  ;
2827  return 0;
2828}
2829_ACEOF
2830if ac_fn_cxx_try_compile "$LINENO"; then :
2831  ac_hi=-1 ac_mid=-1
2832  while :; do
2833    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2834/* end confdefs.h.  */
2835$4
2836int
2837main ()
2838{
2839static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2840test_array [0] = 0;
2841return test_array [0];
2842
2843  ;
2844  return 0;
2845}
2846_ACEOF
2847if ac_fn_cxx_try_compile "$LINENO"; then :
2848  ac_lo=$ac_mid; break
2849else
2850  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2851			if test $ac_mid -le $ac_hi; then
2852			  ac_lo= ac_hi=
2853			  break
2854			fi
2855			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2856fi
2857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2858  done
2859else
2860  ac_lo= ac_hi=
2861fi
2862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865# Binary search between lo and hi bounds.
2866while test "x$ac_lo" != "x$ac_hi"; do
2867  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h.  */
2870$4
2871int
2872main ()
2873{
2874static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2875test_array [0] = 0;
2876return test_array [0];
2877
2878  ;
2879  return 0;
2880}
2881_ACEOF
2882if ac_fn_cxx_try_compile "$LINENO"; then :
2883  ac_hi=$ac_mid
2884else
2885  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2886fi
2887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888done
2889case $ac_lo in #((
2890?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2891'') ac_retval=1 ;;
2892esac
2893  else
2894    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2895/* end confdefs.h.  */
2896$4
2897static long int longval () { return $2; }
2898static unsigned long int ulongval () { return $2; }
2899#include <stdio.h>
2900#include <stdlib.h>
2901int
2902main ()
2903{
2904
2905  FILE *f = fopen ("conftest.val", "w");
2906  if (! f)
2907    return 1;
2908  if (($2) < 0)
2909    {
2910      long int i = longval ();
2911      if (i != ($2))
2912	return 1;
2913      fprintf (f, "%ld", i);
2914    }
2915  else
2916    {
2917      unsigned long int i = ulongval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%lu", i);
2921    }
2922  /* Do not output a trailing newline, as this causes \r\n confusion
2923     on some platforms.  */
2924  return ferror (f) || fclose (f) != 0;
2925
2926  ;
2927  return 0;
2928}
2929_ACEOF
2930if ac_fn_cxx_try_run "$LINENO"; then :
2931  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2932else
2933  ac_retval=1
2934fi
2935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2936  conftest.$ac_objext conftest.beam conftest.$ac_ext
2937rm -f conftest.val
2938
2939  fi
2940  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2941  as_fn_set_status $ac_retval
2942
2943} # ac_fn_cxx_compute_int
2944
2945# ac_fn_cxx_try_link LINENO
2946# -------------------------
2947# Try to link conftest.$ac_ext, and return whether this succeeded.
2948ac_fn_cxx_try_link ()
2949{
2950  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2951  rm -f conftest.$ac_objext conftest$ac_exeext
2952  if { { ac_try="$ac_link"
2953case "(($ac_try" in
2954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955  *) ac_try_echo=$ac_try;;
2956esac
2957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2958$as_echo "$ac_try_echo"; } >&5
2959  (eval "$ac_link") 2>conftest.err
2960  ac_status=$?
2961  if test -s conftest.err; then
2962    grep -v '^ *+' conftest.err >conftest.er1
2963    cat conftest.er1 >&5
2964    mv -f conftest.er1 conftest.err
2965  fi
2966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2967  test $ac_status = 0; } && {
2968	 test -z "$ac_cxx_werror_flag" ||
2969	 test ! -s conftest.err
2970       } && test -s conftest$ac_exeext && {
2971	 test "$cross_compiling" = yes ||
2972	 test -x conftest$ac_exeext
2973       }; then :
2974  ac_retval=0
2975else
2976  $as_echo "$as_me: failed program was:" >&5
2977sed 's/^/| /' conftest.$ac_ext >&5
2978
2979	ac_retval=1
2980fi
2981  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2982  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2983  # interfere with the next link command; also delete a directory that is
2984  # left behind by Apple's compiler.  We do this before executing the actions.
2985  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2986  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2987  as_fn_set_status $ac_retval
2988
2989} # ac_fn_cxx_try_link
2990
2991# ac_fn_cxx_check_func LINENO FUNC VAR
2992# ------------------------------------
2993# Tests whether FUNC exists, setting the cache variable VAR accordingly
2994ac_fn_cxx_check_func ()
2995{
2996  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2998$as_echo_n "checking for $2... " >&6; }
2999if eval \${$3+:} false; then :
3000  $as_echo_n "(cached) " >&6
3001else
3002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3003/* end confdefs.h.  */
3004/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3005   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3006#define $2 innocuous_$2
3007
3008/* System header to define __stub macros and hopefully few prototypes,
3009    which can conflict with char $2 (); below.
3010    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3011    <limits.h> exists even on freestanding compilers.  */
3012
3013#ifdef __STDC__
3014# include <limits.h>
3015#else
3016# include <assert.h>
3017#endif
3018
3019#undef $2
3020
3021/* Override any GCC internal prototype to avoid an error.
3022   Use char because int might match the return type of a GCC
3023   builtin and then its argument prototype would still apply.  */
3024#ifdef __cplusplus
3025extern "C"
3026#endif
3027char $2 ();
3028/* The GNU C library defines this for functions which it implements
3029    to always fail with ENOSYS.  Some functions are actually named
3030    something starting with __ and the normal name is an alias.  */
3031#if defined __stub_$2 || defined __stub___$2
3032choke me
3033#endif
3034
3035int
3036main ()
3037{
3038return $2 ();
3039  ;
3040  return 0;
3041}
3042_ACEOF
3043if ac_fn_cxx_try_link "$LINENO"; then :
3044  eval "$3=yes"
3045else
3046  eval "$3=no"
3047fi
3048rm -f core conftest.err conftest.$ac_objext \
3049    conftest$ac_exeext conftest.$ac_ext
3050fi
3051eval ac_res=\$$3
3052	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3053$as_echo "$ac_res" >&6; }
3054  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3055
3056} # ac_fn_cxx_check_func
3057
3058# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3059# -------------------------------------------------------
3060# Tests whether HEADER exists and can be compiled using the include files in
3061# INCLUDES, setting the cache variable VAR accordingly.
3062ac_fn_c_check_header_compile ()
3063{
3064  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3066$as_echo_n "checking for $2... " >&6; }
3067if eval \${$3+:} false; then :
3068  $as_echo_n "(cached) " >&6
3069else
3070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3071/* end confdefs.h.  */
3072$4
3073#include <$2>
3074_ACEOF
3075if ac_fn_c_try_compile "$LINENO"; then :
3076  eval "$3=yes"
3077else
3078  eval "$3=no"
3079fi
3080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3081fi
3082eval ac_res=\$$3
3083	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3084$as_echo "$ac_res" >&6; }
3085  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3086
3087} # ac_fn_c_check_header_compile
3088cat >config.log <<_ACEOF
3089This file contains any messages produced by compilers while
3090running configure, to aid debugging if configure makes a mistake.
3091
3092It was created by OpenJDK $as_me jdk9, which was
3093generated by GNU Autoconf 2.69.  Invocation command line was
3094
3095  $ $0 $@
3096
3097_ACEOF
3098exec 5>>config.log
3099{
3100cat <<_ASUNAME
3101## --------- ##
3102## Platform. ##
3103## --------- ##
3104
3105hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3106uname -m = `(uname -m) 2>/dev/null || echo unknown`
3107uname -r = `(uname -r) 2>/dev/null || echo unknown`
3108uname -s = `(uname -s) 2>/dev/null || echo unknown`
3109uname -v = `(uname -v) 2>/dev/null || echo unknown`
3110
3111/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3112/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3113
3114/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3115/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3116/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3117/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3118/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3119/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3120/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3121
3122_ASUNAME
3123
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127  IFS=$as_save_IFS
3128  test -z "$as_dir" && as_dir=.
3129    $as_echo "PATH: $as_dir"
3130  done
3131IFS=$as_save_IFS
3132
3133} >&5
3134
3135cat >&5 <<_ACEOF
3136
3137
3138## ----------- ##
3139## Core tests. ##
3140## ----------- ##
3141
3142_ACEOF
3143
3144
3145# Keep a trace of the command line.
3146# Strip out --no-create and --no-recursion so they do not pile up.
3147# Strip out --silent because we don't want to record it for future runs.
3148# Also quote any args containing shell meta-characters.
3149# Make two passes to allow for proper duplicate-argument suppression.
3150ac_configure_args=
3151ac_configure_args0=
3152ac_configure_args1=
3153ac_must_keep_next=false
3154for ac_pass in 1 2
3155do
3156  for ac_arg
3157  do
3158    case $ac_arg in
3159    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3160    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3161    | -silent | --silent | --silen | --sile | --sil)
3162      continue ;;
3163    *\'*)
3164      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3165    esac
3166    case $ac_pass in
3167    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3168    2)
3169      as_fn_append ac_configure_args1 " '$ac_arg'"
3170      if test $ac_must_keep_next = true; then
3171	ac_must_keep_next=false # Got value, back to normal.
3172      else
3173	case $ac_arg in
3174	  *=* | --config-cache | -C | -disable-* | --disable-* \
3175	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3176	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3177	  | -with-* | --with-* | -without-* | --without-* | --x)
3178	    case "$ac_configure_args0 " in
3179	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3180	    esac
3181	    ;;
3182	  -* ) ac_must_keep_next=true ;;
3183	esac
3184      fi
3185      as_fn_append ac_configure_args " '$ac_arg'"
3186      ;;
3187    esac
3188  done
3189done
3190{ ac_configure_args0=; unset ac_configure_args0;}
3191{ ac_configure_args1=; unset ac_configure_args1;}
3192
3193# When interrupted or exit'd, cleanup temporary files, and complete
3194# config.log.  We remove comments because anyway the quotes in there
3195# would cause problems or look ugly.
3196# WARNING: Use '\'' to represent an apostrophe within the trap.
3197# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3198trap 'exit_status=$?
3199  # Save into config.log some information that might help in debugging.
3200  {
3201    echo
3202
3203    $as_echo "## ---------------- ##
3204## Cache variables. ##
3205## ---------------- ##"
3206    echo
3207    # The following way of writing the cache mishandles newlines in values,
3208(
3209  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3210    eval ac_val=\$$ac_var
3211    case $ac_val in #(
3212    *${as_nl}*)
3213      case $ac_var in #(
3214      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3215$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3216      esac
3217      case $ac_var in #(
3218      _ | IFS | as_nl) ;; #(
3219      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3220      *) { eval $ac_var=; unset $ac_var;} ;;
3221      esac ;;
3222    esac
3223  done
3224  (set) 2>&1 |
3225    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3226    *${as_nl}ac_space=\ *)
3227      sed -n \
3228	"s/'\''/'\''\\\\'\'''\''/g;
3229	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3230      ;; #(
3231    *)
3232      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3233      ;;
3234    esac |
3235    sort
3236)
3237    echo
3238
3239    $as_echo "## ----------------- ##
3240## Output variables. ##
3241## ----------------- ##"
3242    echo
3243    for ac_var in $ac_subst_vars
3244    do
3245      eval ac_val=\$$ac_var
3246      case $ac_val in
3247      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248      esac
3249      $as_echo "$ac_var='\''$ac_val'\''"
3250    done | sort
3251    echo
3252
3253    if test -n "$ac_subst_files"; then
3254      $as_echo "## ------------------- ##
3255## File substitutions. ##
3256## ------------------- ##"
3257      echo
3258      for ac_var in $ac_subst_files
3259      do
3260	eval ac_val=\$$ac_var
3261	case $ac_val in
3262	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3263	esac
3264	$as_echo "$ac_var='\''$ac_val'\''"
3265      done | sort
3266      echo
3267    fi
3268
3269    if test -s confdefs.h; then
3270      $as_echo "## ----------- ##
3271## confdefs.h. ##
3272## ----------- ##"
3273      echo
3274      cat confdefs.h
3275      echo
3276    fi
3277    test "$ac_signal" != 0 &&
3278      $as_echo "$as_me: caught signal $ac_signal"
3279    $as_echo "$as_me: exit $exit_status"
3280  } >&5
3281  rm -f core *.core core.conftest.* &&
3282    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3283    exit $exit_status
3284' 0
3285for ac_signal in 1 2 13 15; do
3286  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3287done
3288ac_signal=0
3289
3290# confdefs.h avoids OS command line length limits that DEFS can exceed.
3291rm -f -r conftest* confdefs.h
3292
3293$as_echo "/* confdefs.h */" > confdefs.h
3294
3295# Predefined preprocessor variables.
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_NAME "$PACKAGE_NAME"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3303_ACEOF
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_VERSION "$PACKAGE_VERSION"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_STRING "$PACKAGE_STRING"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_URL "$PACKAGE_URL"
3319_ACEOF
3320
3321
3322# Let the site file select an alternate cache file if it wants to.
3323# Prefer an explicitly selected file to automatically selected ones.
3324ac_site_file1=NONE
3325ac_site_file2=NONE
3326if test -n "$CONFIG_SITE"; then
3327  # We do not want a PATH search for config.site.
3328  case $CONFIG_SITE in #((
3329    -*)  ac_site_file1=./$CONFIG_SITE;;
3330    */*) ac_site_file1=$CONFIG_SITE;;
3331    *)   ac_site_file1=./$CONFIG_SITE;;
3332  esac
3333elif test "x$prefix" != xNONE; then
3334  ac_site_file1=$prefix/share/config.site
3335  ac_site_file2=$prefix/etc/config.site
3336else
3337  ac_site_file1=$ac_default_prefix/share/config.site
3338  ac_site_file2=$ac_default_prefix/etc/config.site
3339fi
3340for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3341do
3342  test "x$ac_site_file" = xNONE && continue
3343  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3345$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3346    sed 's/^/| /' "$ac_site_file" >&5
3347    . "$ac_site_file" \
3348      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3350as_fn_error $? "failed to load site script $ac_site_file
3351See \`config.log' for more details" "$LINENO" 5; }
3352  fi
3353done
3354
3355if test -r "$cache_file"; then
3356  # Some versions of bash will fail to source /dev/null (special files
3357  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3358  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3359    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3360$as_echo "$as_me: loading cache $cache_file" >&6;}
3361    case $cache_file in
3362      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3363      *)                      . "./$cache_file";;
3364    esac
3365  fi
3366else
3367  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3368$as_echo "$as_me: creating cache $cache_file" >&6;}
3369  >$cache_file
3370fi
3371
3372# Check that the precious variables saved in the cache have kept the same
3373# value.
3374ac_cache_corrupted=false
3375for ac_var in $ac_precious_vars; do
3376  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3377  eval ac_new_set=\$ac_env_${ac_var}_set
3378  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3379  eval ac_new_val=\$ac_env_${ac_var}_value
3380  case $ac_old_set,$ac_new_set in
3381    set,)
3382      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3383$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3384      ac_cache_corrupted=: ;;
3385    ,set)
3386      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3387$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3388      ac_cache_corrupted=: ;;
3389    ,);;
3390    *)
3391      if test "x$ac_old_val" != "x$ac_new_val"; then
3392	# differences in whitespace do not lead to failure.
3393	ac_old_val_w=`echo x $ac_old_val`
3394	ac_new_val_w=`echo x $ac_new_val`
3395	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3396	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3397$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3398	  ac_cache_corrupted=:
3399	else
3400	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3401$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3402	  eval $ac_var=\$ac_old_val
3403	fi
3404	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3405$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3406	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3407$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3408      fi;;
3409  esac
3410  # Pass precious variables to config.status.
3411  if test "$ac_new_set" = set; then
3412    case $ac_new_val in
3413    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3414    *) ac_arg=$ac_var=$ac_new_val ;;
3415    esac
3416    case " $ac_configure_args " in
3417      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3418      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3419    esac
3420  fi
3421done
3422if $ac_cache_corrupted; then
3423  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3425  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3426$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3427  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3428fi
3429## -------------------- ##
3430## Main body of script. ##
3431## -------------------- ##
3432
3433ac_ext=c
3434ac_cpp='$CPP $CPPFLAGS'
3435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3437ac_compiler_gnu=$ac_cv_c_compiler_gnu
3438
3439
3440
3441ac_aux_dir=
3442for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3443  if test -f "$ac_dir/install-sh"; then
3444    ac_aux_dir=$ac_dir
3445    ac_install_sh="$ac_aux_dir/install-sh -c"
3446    break
3447  elif test -f "$ac_dir/install.sh"; then
3448    ac_aux_dir=$ac_dir
3449    ac_install_sh="$ac_aux_dir/install.sh -c"
3450    break
3451  elif test -f "$ac_dir/shtool"; then
3452    ac_aux_dir=$ac_dir
3453    ac_install_sh="$ac_aux_dir/shtool install -c"
3454    break
3455  fi
3456done
3457if test -z "$ac_aux_dir"; then
3458  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
3459fi
3460
3461# These three variables are undocumented and unsupported,
3462# and are intended to be withdrawn in a future Autoconf release.
3463# They can cause serious problems if a builder's source tree is in a directory
3464# whose full name contains unusual characters.
3465ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3466ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3467ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3468
3469
3470# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3471
3472#
3473# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475#
3476# This code is free software; you can redistribute it and/or modify it
3477# under the terms of the GNU General Public License version 2 only, as
3478# published by the Free Software Foundation.  Oracle designates this
3479# particular file as subject to the "Classpath" exception as provided
3480# by Oracle in the LICENSE file that accompanied this code.
3481#
3482# This code is distributed in the hope that it will be useful, but WITHOUT
3483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485# version 2 for more details (a copy is included in the LICENSE file that
3486# accompanied this code).
3487#
3488# You should have received a copy of the GNU General Public License version
3489# 2 along with this work; if not, write to the Free Software Foundation,
3490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491#
3492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493# or visit www.oracle.com if you need additional information or have any
3494# questions.
3495#
3496
3497#
3498# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3499#
3500# This program is free software; you can redistribute it and/or modify
3501# it under the terms of the GNU General Public License as published by
3502# the Free Software Foundation; either version 2 of the License, or
3503# (at your option) any later version.
3504#
3505# This program is distributed in the hope that it will be useful, but
3506# WITHOUT ANY WARRANTY; without even the implied warranty of
3507# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3508# General Public License for more details.
3509#
3510# You should have received a copy of the GNU General Public License
3511# along with this program; if not, write to the Free Software
3512# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3513#
3514# As a special exception to the GNU General Public License, if you
3515# distribute this file as part of a program that contains a
3516# configuration script generated by Autoconf, you may include it under
3517# the same distribution terms that you use for the rest of that program.
3518
3519# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3520# ----------------------------------
3521# PKG_PROG_PKG_CONFIG
3522
3523# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3524#
3525# Check to see whether a particular set of modules exists.  Similar
3526# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3527#
3528#
3529# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3530# this or PKG_CHECK_MODULES is called, or make sure to call
3531# PKG_CHECK_EXISTS manually
3532# --------------------------------------------------------------
3533
3534
3535
3536# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3537# ---------------------------------------------
3538# _PKG_CONFIG
3539
3540# _PKG_SHORT_ERRORS_SUPPORTED
3541# -----------------------------
3542# _PKG_SHORT_ERRORS_SUPPORTED
3543
3544
3545# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3546# [ACTION-IF-NOT-FOUND])
3547#
3548#
3549# Note that if there is a possibility the first call to
3550# PKG_CHECK_MODULES might not happen, you should be sure to include an
3551# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3552#
3553#
3554# --------------------------------------------------------------
3555# PKG_CHECK_MODULES
3556
3557
3558# Include these first...
3559#
3560# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3562#
3563# This code is free software; you can redistribute it and/or modify it
3564# under the terms of the GNU General Public License version 2 only, as
3565# published by the Free Software Foundation.  Oracle designates this
3566# particular file as subject to the "Classpath" exception as provided
3567# by Oracle in the LICENSE file that accompanied this code.
3568#
3569# This code is distributed in the hope that it will be useful, but WITHOUT
3570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3572# version 2 for more details (a copy is included in the LICENSE file that
3573# accompanied this code).
3574#
3575# You should have received a copy of the GNU General Public License version
3576# 2 along with this work; if not, write to the Free Software Foundation,
3577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3578#
3579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3580# or visit www.oracle.com if you need additional information or have any
3581# questions.
3582#
3583
3584# Create a function/macro that takes a series of named arguments. The call is
3585# similar to AC_DEFUN, but the setup of the function looks like this:
3586# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3587# ... do something
3588#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3589# ])
3590# A star (*) in front of a named argument means that it is required and it's
3591# presence will be verified. To pass e.g. the first value as a normal indexed
3592# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3593# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3594# "ARG_FOO".
3595#
3596# The generated function can be called like this:
3597# MYFUNC(FOO: [foo-val],
3598#     BAR: [
3599#         $ECHO hello world
3600#     ])
3601# Note that the argument value must start on the same line as the argument name.
3602#
3603# Argument 1: Name of the function to define
3604# Argument 2: List of legal named arguments, with a * prefix for required arguments
3605# Argument 3: Argument array to treat as named, typically $@
3606# Argument 4: The main function body
3607
3608
3609# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3610# If so, then append $1 to $2 \
3611# Also set JVM_ARG_OK to true/false depending on outcome.
3612
3613
3614# Appends a string to a path variable, only adding the : when needed.
3615
3616
3617# Prepends a string to a path variable, only adding the : when needed.
3618
3619
3620# This will make sure the given variable points to a full and proper
3621# path. This means:
3622# 1) There will be no spaces in the path. On unix platforms,
3623#    spaces in the path will result in an error. On Windows,
3624#    the path will be rewritten using short-style to be space-free.
3625# 2) The path will be absolute, and it will be in unix-style (on
3626#     cygwin).
3627# $1: The name of the variable to fix
3628
3629
3630# This will make sure the given variable points to a executable
3631# with a full and proper path. This means:
3632# 1) There will be no spaces in the path. On unix platforms,
3633#    spaces in the path will result in an error. On Windows,
3634#    the path will be rewritten using short-style to be space-free.
3635# 2) The path will be absolute, and it will be in unix-style (on
3636#     cygwin).
3637# Any arguments given to the executable is preserved.
3638# If the input variable does not have a directory specification, then
3639# it need to be in the PATH.
3640# $1: The name of the variable to fix
3641
3642
3643
3644
3645# Register a --with argument but mark it as deprecated
3646# $1: The name of the with argument to deprecate, not including --with-
3647
3648
3649# Register a --enable argument but mark it as deprecated
3650# $1: The name of the with argument to deprecate, not including --enable-
3651# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3652# $3: Messages to user.
3653
3654
3655
3656
3657# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3658# $1: variable to check
3659
3660
3661# Check that there are no unprocessed overridden variables left.
3662# If so, they are an incorrect argument and we will exit with an error.
3663
3664
3665# Setup a tool for the given variable. If correctly specified by the user,
3666# use that value, otherwise search for the tool using the supplied code snippet.
3667# $1: variable to set
3668# $2: code snippet to call to look for the tool
3669# $3: code snippet to call if variable was used to find tool
3670
3671
3672# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3673# $1: variable to set
3674# $2: executable name (or list of names) to look for
3675# $3: [path]
3676
3677
3678# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3679# $1: variable to set
3680# $2: executable name (or list of names) to look for
3681
3682
3683# Like BASIC_PATH_PROGS but fails if no tool was found.
3684# $1: variable to set
3685# $2: executable name (or list of names) to look for
3686# $3: [path]
3687
3688
3689# Like BASIC_SETUP_TOOL but fails if no tool was found.
3690# $1: variable to set
3691# $2: autoconf macro to call to look for the special tool
3692
3693
3694# Setup the most fundamental tools that relies on not much else to set up,
3695# but is used by much of the early bootstrap code.
3696
3697
3698# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3699
3700
3701# Evaluates platform specific overrides for devkit variables.
3702# $1: Name of variable
3703
3704
3705
3706
3707
3708
3709#%%% Simple tools %%%
3710
3711# Check if we have found a usable version of make
3712# $1: the path to a potential make binary (or empty)
3713# $2: the description on how we found this
3714
3715
3716
3717
3718# Goes looking for a usable version of GNU make.
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729# Check if build directory is on local disk. If not possible to determine,
3730# we prefer to claim it's local.
3731# Argument 1: directory to test
3732# Argument 2: what to do if it is on local disk
3733# Argument 3: what to do otherwise (remote disk or failure)
3734
3735
3736# Check that source files have basic read permissions set. This might
3737# not be the case in cygwin in certain conditions.
3738
3739
3740
3741
3742# Check for support for specific options in bash
3743
3744
3745################################################################################
3746#
3747# Default make target
3748#
3749
3750
3751# Code to run after AC_OUTPUT
3752
3753
3754#
3755# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3757#
3758# This code is free software; you can redistribute it and/or modify it
3759# under the terms of the GNU General Public License version 2 only, as
3760# published by the Free Software Foundation.  Oracle designates this
3761# particular file as subject to the "Classpath" exception as provided
3762# by Oracle in the LICENSE file that accompanied this code.
3763#
3764# This code is distributed in the hope that it will be useful, but WITHOUT
3765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3767# version 2 for more details (a copy is included in the LICENSE file that
3768# accompanied this code).
3769#
3770# You should have received a copy of the GNU General Public License version
3771# 2 along with this work; if not, write to the Free Software Foundation,
3772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3773#
3774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3775# or visit www.oracle.com if you need additional information or have any
3776# questions.
3777#
3778
3779
3780
3781
3782
3783# Helper function which possibly converts a path using DOS-style short mode.
3784# If so, the updated path is stored in $new_path.
3785# $1: The path to check
3786
3787
3788# Helper function which possibly converts a path using DOS-style short mode.
3789# If so, the updated path is stored in $new_path.
3790# $1: The path to check
3791
3792
3793# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3794# and could probably be heavily simplified. However, all changes in this
3795# area tend to need lot of testing in different scenarios, and in lack of
3796# proper unit testing, cleaning this up has not been deemed worth the effort
3797# at the moment.
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3808
3809
3810
3811
3812# ... then the rest
3813#
3814# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3815# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3816#
3817# This code is free software; you can redistribute it and/or modify it
3818# under the terms of the GNU General Public License version 2 only, as
3819# published by the Free Software Foundation.  Oracle designates this
3820# particular file as subject to the "Classpath" exception as provided
3821# by Oracle in the LICENSE file that accompanied this code.
3822#
3823# This code is distributed in the hope that it will be useful, but WITHOUT
3824# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3825# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3826# version 2 for more details (a copy is included in the LICENSE file that
3827# accompanied this code).
3828#
3829# You should have received a copy of the GNU General Public License version
3830# 2 along with this work; if not, write to the Free Software Foundation,
3831# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3832#
3833# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3834# or visit www.oracle.com if you need additional information or have any
3835# questions.
3836#
3837
3838########################################################################
3839# This file handles detection of the Boot JDK. The Boot JDK detection
3840# process has been developed as a response to solve a complex real-world
3841# problem. Initially, it was simple, but it has grown as platform after
3842# platform, idiosyncracy after idiosyncracy has been supported.
3843#
3844# The basic idea is this:
3845# 1) You need an acceptable *) JDK to use as a Boot JDK
3846# 2) There are several ways to locate a JDK, that are mostly platform
3847#    dependent **)
3848# 3) You can have multiple JDKs installed
3849# 4) If possible, configure should try to dig out an acceptable JDK
3850#    automatically, without having to resort to command-line options
3851#
3852# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3853#     javac) and not a JRE, etc.
3854#
3855# **) On Windows we typically use a well-known path.
3856#     On MacOSX we typically use the tool java_home.
3857#     On Linux we typically find javac in the $PATH, and then follow a
3858#     chain of symlinks that often ends up in a real JDK.
3859#
3860# This leads to the code where we check in different ways to locate a
3861# JDK, and if one is found, check if it is acceptable. If not, we print
3862# our reasons for rejecting it (useful when debugging non-working
3863# configure situations) and continue checking the next one.
3864########################################################################
3865
3866# Execute the check given as argument, and verify the result
3867# If the Boot JDK was previously found, do nothing
3868# $1 A command line (typically autoconf macro) to execute
3869
3870
3871# Test: Is bootjdk explicitly set by command line arguments?
3872
3873
3874# Test: Is $JAVA_HOME set?
3875
3876
3877# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3878
3879
3880# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3881# $1: Argument to the java_home binary (optional)
3882
3883
3884# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3885
3886
3887# Look for a jdk in the given path. If there are multiple, try to select the newest.
3888# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3889# $1 = Path to directory containing jdk installations.
3890# $2 = String to append to the found JDK directory to get the proper JDK home
3891
3892
3893# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3894# environmental variable as base for where to look.
3895# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3896
3897
3898# Test: Is there a JDK installed in default, well-known locations?
3899
3900
3901# Check that a command-line tool in the Boot JDK is correct
3902# $1 = name of variable to assign
3903# $2 = name of binary
3904
3905
3906###############################################################################
3907#
3908# We need a Boot JDK to bootstrap the build.
3909#
3910
3911
3912
3913
3914
3915# BUILD_JDK: the location of the latest JDK that can run
3916#   on the host system and supports the target class file version
3917#   generated in this JDK build.  This variable should only be
3918#   used after the launchers are built.
3919#
3920
3921# Execute the check given as argument, and verify the result.
3922# If the JDK was previously found, do nothing.
3923# $1 A command line (typically autoconf macro) to execute
3924
3925
3926# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3927# is different than the host system doing the build (e.g. cross-compilation),
3928# a special BUILD_JDK is built as part of the build process.  An external
3929# prebuilt BUILD_JDK can also be supplied.
3930
3931
3932#
3933# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973################################################################################
3974#
3975# Runs icecc-create-env once and prints the error if it fails
3976#
3977# $1: arguments to icecc-create-env
3978# $2: log file
3979#
3980
3981
3982################################################################################
3983#
3984# Optionally enable distributed compilation of native code using icecc/icecream
3985#
3986
3987
3988
3989
3990
3991
3992
3993#
3994# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3996#
3997# This code is free software; you can redistribute it and/or modify it
3998# under the terms of the GNU General Public License version 2 only, as
3999# published by the Free Software Foundation.  Oracle designates this
4000# particular file as subject to the "Classpath" exception as provided
4001# by Oracle in the LICENSE file that accompanied this code.
4002#
4003# This code is distributed in the hope that it will be useful, but WITHOUT
4004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4006# version 2 for more details (a copy is included in the LICENSE file that
4007# accompanied this code).
4008#
4009# You should have received a copy of the GNU General Public License version
4010# 2 along with this work; if not, write to the Free Software Foundation,
4011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4012#
4013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4014# or visit www.oracle.com if you need additional information or have any
4015# questions.
4016#
4017
4018################################################################################
4019#
4020# Setup ABI profile (for arm)
4021#
4022
4023
4024# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4025# corresponding configure arguments instead
4026
4027
4028# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4029# that configure can use them while detecting compilers.
4030# TOOLCHAIN_TYPE is available here.
4031# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4032
4033
4034
4035
4036
4037
4038# Documentation on common flags used for solstudio in HIGHEST.
4039#
4040# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4041#          done with care, there are some assumptions below that need to
4042#          be understood about the use of pointers, and IEEE behavior.
4043#
4044# -fns: Use non-standard floating point mode (not IEEE 754)
4045# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4046# -fsingle: Use single precision floating point with 'float'
4047# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4048#   (Source with excessing pointer casting and data access with mixed
4049#    pointer types are not recommended)
4050# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4051#   (If you expect perfect errno behavior, do not use this)
4052# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4053# -xrestrict: Pointer parameters to functions do not overlap
4054#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4055#    If you pass in multiple pointers to the same data, do not use this)
4056# -xlibmil: Inline some library routines
4057#   (If you expect perfect errno behavior, do not use this)
4058# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4059#   (If you expect perfect errno behavior, do not use this)
4060#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4061
4062    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4063    # Bug?
4064    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4065    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4066    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4067    #fi
4068
4069
4070
4071
4072
4073
4074################################################################################
4075# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4076#      conditionals against.
4077# $2 - Optional prefix for each variable defined.
4078
4079
4080# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4081#                                  IF_FALSE: [RUN-IF-FALSE])
4082# ------------------------------------------------------------
4083# Check that the C compiler supports an argument
4084
4085
4086
4087
4088# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4089#                                    IF_FALSE: [RUN-IF-FALSE])
4090# ------------------------------------------------------------
4091# Check that the C++ compiler supports an argument
4092
4093
4094
4095
4096# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C and C++ compilers support an argument
4100
4101
4102
4103
4104# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                   IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the linker support an argument
4108
4109
4110
4111
4112
4113
4114# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4115# Arguments:
4116# $1 - Optional prefix for each variable defined.
4117
4118
4119#
4120# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4121# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4122#
4123# This code is free software; you can redistribute it and/or modify it
4124# under the terms of the GNU General Public License version 2 only, as
4125# published by the Free Software Foundation.  Oracle designates this
4126# particular file as subject to the "Classpath" exception as provided
4127# by Oracle in the LICENSE file that accompanied this code.
4128#
4129# This code is distributed in the hope that it will be useful, but WITHOUT
4130# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4131# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4132# version 2 for more details (a copy is included in the LICENSE file that
4133# accompanied this code).
4134#
4135# You should have received a copy of the GNU General Public License version
4136# 2 along with this work; if not, write to the Free Software Foundation,
4137# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4138#
4139# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4140# or visit www.oracle.com if you need additional information or have any
4141# questions.
4142#
4143
4144
4145
4146
4147
4148cygwin_help() {
4149  case $1 in
4150    unzip)
4151      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4152      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4153      ;;
4154    zip)
4155      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4156      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4157      ;;
4158    make)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    freetype)
4163      HELP_MSG="
4164The freetype library can now be build during the configure process.
4165Download the freetype sources and unpack them into an arbitrary directory:
4166
4167wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4168tar -xzf freetype-2.5.3.tar.gz
4169
4170Then run configure with '--with-freetype-src=<freetype_src>'. This will
4171automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4172builds or into '<freetype_src>/lib32' for 32-bit builds.
4173Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4174and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4175
4176Alternatively you can unpack the sources like this to use the default directory:
4177
4178tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4179      ;;
4180  esac
4181}
4182
4183msys_help() {
4184  PKGHANDLER_COMMAND=""
4185}
4186
4187apt_help() {
4188  case $1 in
4189    reduced)
4190      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4201    ffi)
4202      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4203    x11)
4204      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4205    ccache)
4206      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4207    dtrace)
4208      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4209    elf)
4210      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4211  esac
4212}
4213
4214yum_help() {
4215  case $1 in
4216    devkit)
4217      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4218    openjdk)
4219      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4220    alsa)
4221      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4222    cups)
4223      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4224    freetype)
4225      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4226    x11)
4227      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4228    ccache)
4229      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4230    elf)
4231      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4232  esac
4233}
4234
4235brew_help() {
4236  case $1 in
4237    openjdk)
4238      PKGHANDLER_COMMAND="brew cask install java" ;;
4239    freetype)
4240      PKGHANDLER_COMMAND="brew install freetype" ;;
4241    ccache)
4242      PKGHANDLER_COMMAND="brew install ccache" ;;
4243  esac
4244}
4245
4246port_help() {
4247  PKGHANDLER_COMMAND=""
4248}
4249
4250pkgutil_help() {
4251  PKGHANDLER_COMMAND=""
4252}
4253
4254pkgadd_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258# This function will check if we're called from the "configure" wrapper while
4259# printing --help. If so, we will print out additional information that can
4260# only be extracted within the autoconf script, and then exit. This must be
4261# called at the very beginning in configure.ac.
4262
4263
4264
4265
4266
4267
4268#
4269# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4270# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4271#
4272# This code is free software; you can redistribute it and/or modify it
4273# under the terms of the GNU General Public License version 2 only, as
4274# published by the Free Software Foundation.  Oracle designates this
4275# particular file as subject to the "Classpath" exception as provided
4276# by Oracle in the LICENSE file that accompanied this code.
4277#
4278# This code is distributed in the hope that it will be useful, but WITHOUT
4279# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4280# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4281# version 2 for more details (a copy is included in the LICENSE file that
4282# accompanied this code).
4283#
4284# You should have received a copy of the GNU General Public License version
4285# 2 along with this work; if not, write to the Free Software Foundation,
4286# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4287#
4288# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4289# or visit www.oracle.com if you need additional information or have any
4290# questions.
4291#
4292
4293# All valid JVM features, regardless of platform
4294VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4295    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4296    static-build link-time-opt aot"
4297
4298# All valid JVM variants
4299VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4300
4301###############################################################################
4302# Check if the specified JVM variant should be built. To be used in shell if
4303# constructs, like this:
4304# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4305#
4306# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4307
4308# Definition kept in one line to allow inlining in if statements.
4309# Additional [] needed to keep m4 from mangling shell constructs.
4310
4311
4312###############################################################################
4313# Check if the specified JVM features are explicitly enabled. To be used in
4314# shell if constructs, like this:
4315# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4316#
4317# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4318
4319# Definition kept in one line to allow inlining in if statements.
4320# Additional [] needed to keep m4 from mangling shell constructs.
4321
4322
4323###############################################################################
4324# Check which variants of the JVM that we want to build. Available variants are:
4325#   server: normal interpreter, and a tiered C1/C2 compiler
4326#   client: normal interpreter, and C1 (no C2 compiler)
4327#   minimal: reduced form of client with optional features stripped out
4328#   core: normal interpreter only, no compiler
4329#   zero: C++ based interpreter only, no compiler
4330#   zeroshark: C++ based interpreter, and a llvm-based compiler
4331#   custom: baseline JVM with no default features
4332#
4333
4334
4335###############################################################################
4336# Check if dtrace should be enabled and has all prerequisites present.
4337#
4338
4339
4340################################################################################
4341# Check if AOT should be enabled
4342#
4343
4344
4345###############################################################################
4346# Set up all JVM features for each JVM variant.
4347#
4348
4349
4350###############################################################################
4351# Validate JVM features once all setup is complete, including custom setup.
4352#
4353
4354
4355################################################################################
4356#
4357# Specify which sources will be used to build the 64-bit ARM port
4358#
4359# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4360# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4361#
4362
4363
4364
4365################################################################################
4366# Check if gtest should be built
4367#
4368
4369
4370#
4371# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395###############################################################################
4396# Check which variant of the JDK that we want to build.
4397# Currently we have:
4398#    normal:   standard edition
4399# but the custom make system may add other variants
4400#
4401# Effectively the JDK variant gives a name to a specific set of
4402# modules to compile into the JDK.
4403
4404
4405###############################################################################
4406# Set the debug level
4407#    release: no debug information, all optimizations, no asserts.
4408#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4409#    fastdebug: debug information (-g), all optimizations, all asserts
4410#    slowdebug: debug information (-g), no optimizations, all asserts
4411
4412
4413###############################################################################
4414#
4415# Should we build only OpenJDK even if closed sources are present?
4416#
4417
4418
4419
4420
4421###############################################################################
4422#
4423# Enable or disable the elliptic curve crypto implementation
4424#
4425
4426
4427
4428
4429################################################################################
4430#
4431# Gcov coverage data for hotspot
4432#
4433
4434
4435################################################################################
4436#
4437# Static build support.  When enabled will generate static
4438# libraries instead of shared libraries for all JDK libs.
4439#
4440
4441
4442################################################################################
4443#
4444# jlink options.
4445# We always keep packaged modules in JDK image.
4446#
4447
4448
4449################################################################################
4450#
4451# Check if building of the jtreg failure handler should be enabled.
4452#
4453
4454
4455################################################################################
4456#
4457# Enable or disable generation of the classlist at build time
4458#
4459
4460
4461#
4462# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4464#
4465# This code is free software; you can redistribute it and/or modify it
4466# under the terms of the GNU General Public License version 2 only, as
4467# published by the Free Software Foundation.  Oracle designates this
4468# particular file as subject to the "Classpath" exception as provided
4469# by Oracle in the LICENSE file that accompanied this code.
4470#
4471# This code is distributed in the hope that it will be useful, but WITHOUT
4472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4474# version 2 for more details (a copy is included in the LICENSE file that
4475# accompanied this code).
4476#
4477# You should have received a copy of the GNU General Public License version
4478# 2 along with this work; if not, write to the Free Software Foundation,
4479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4480#
4481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4482# or visit www.oracle.com if you need additional information or have any
4483# questions.
4484#
4485
4486###############################################################################
4487#
4488# Setup version numbers
4489#
4490
4491# Verify that a given string represents a valid version number, and assign it
4492# to a variable.
4493
4494# Argument 1: the variable to assign to
4495# Argument 2: the value given by the user
4496
4497
4498
4499
4500#
4501# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4502# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503#
4504# This code is free software; you can redistribute it and/or modify it
4505# under the terms of the GNU General Public License version 2 only, as
4506# published by the Free Software Foundation.  Oracle designates this
4507# particular file as subject to the "Classpath" exception as provided
4508# by Oracle in the LICENSE file that accompanied this code.
4509#
4510# This code is distributed in the hope that it will be useful, but WITHOUT
4511# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513# version 2 for more details (a copy is included in the LICENSE file that
4514# accompanied this code).
4515#
4516# You should have received a copy of the GNU General Public License version
4517# 2 along with this work; if not, write to the Free Software Foundation,
4518# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519#
4520# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521# or visit www.oracle.com if you need additional information or have any
4522# questions.
4523#
4524
4525# Major library component reside in separate files.
4526#
4527# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4528# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4529#
4530# This code is free software; you can redistribute it and/or modify it
4531# under the terms of the GNU General Public License version 2 only, as
4532# published by the Free Software Foundation.  Oracle designates this
4533# particular file as subject to the "Classpath" exception as provided
4534# by Oracle in the LICENSE file that accompanied this code.
4535#
4536# This code is distributed in the hope that it will be useful, but WITHOUT
4537# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4538# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4539# version 2 for more details (a copy is included in the LICENSE file that
4540# accompanied this code).
4541#
4542# You should have received a copy of the GNU General Public License version
4543# 2 along with this work; if not, write to the Free Software Foundation,
4544# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4545#
4546# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4547# or visit www.oracle.com if you need additional information or have any
4548# questions.
4549#
4550
4551################################################################################
4552# Setup alsa (Advanced Linux Sound Architecture)
4553################################################################################
4554
4555
4556#
4557# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4559#
4560# This code is free software; you can redistribute it and/or modify it
4561# under the terms of the GNU General Public License version 2 only, as
4562# published by the Free Software Foundation.  Oracle designates this
4563# particular file as subject to the "Classpath" exception as provided
4564# by Oracle in the LICENSE file that accompanied this code.
4565#
4566# This code is distributed in the hope that it will be useful, but WITHOUT
4567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4569# version 2 for more details (a copy is included in the LICENSE file that
4570# accompanied this code).
4571#
4572# You should have received a copy of the GNU General Public License version
4573# 2 along with this work; if not, write to the Free Software Foundation,
4574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4575#
4576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4577# or visit www.oracle.com if you need additional information or have any
4578# questions.
4579#
4580
4581################################################################################
4582# Setup bundled libraries.
4583#
4584# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4585# OpenJDK repository. Default is to use these libraries as bundled, but they
4586# might be replaced by en external version by the user.
4587################################################################################
4588
4589
4590################################################################################
4591# Setup libjpeg
4592################################################################################
4593
4594
4595################################################################################
4596# Setup giflib
4597################################################################################
4598
4599
4600################################################################################
4601# Setup libpng
4602################################################################################
4603
4604
4605################################################################################
4606# Setup zlib
4607################################################################################
4608
4609
4610################################################################################
4611# Setup lcms (Little CMS)
4612################################################################################
4613
4614
4615#
4616# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4617# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4618#
4619# This code is free software; you can redistribute it and/or modify it
4620# under the terms of the GNU General Public License version 2 only, as
4621# published by the Free Software Foundation.  Oracle designates this
4622# particular file as subject to the "Classpath" exception as provided
4623# by Oracle in the LICENSE file that accompanied this code.
4624#
4625# This code is distributed in the hope that it will be useful, but WITHOUT
4626# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4627# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4628# version 2 for more details (a copy is included in the LICENSE file that
4629# accompanied this code).
4630#
4631# You should have received a copy of the GNU General Public License version
4632# 2 along with this work; if not, write to the Free Software Foundation,
4633# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4634#
4635# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4636# or visit www.oracle.com if you need additional information or have any
4637# questions.
4638#
4639
4640################################################################################
4641# Setup cups (Common Unix Printing System)
4642################################################################################
4643
4644
4645#
4646# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4647# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4648#
4649# This code is free software; you can redistribute it and/or modify it
4650# under the terms of the GNU General Public License version 2 only, as
4651# published by the Free Software Foundation.  Oracle designates this
4652# particular file as subject to the "Classpath" exception as provided
4653# by Oracle in the LICENSE file that accompanied this code.
4654#
4655# This code is distributed in the hope that it will be useful, but WITHOUT
4656# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4657# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4658# version 2 for more details (a copy is included in the LICENSE file that
4659# accompanied this code).
4660#
4661# You should have received a copy of the GNU General Public License version
4662# 2 along with this work; if not, write to the Free Software Foundation,
4663# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4664#
4665# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4666# or visit www.oracle.com if you need additional information or have any
4667# questions.
4668#
4669
4670################################################################################
4671# Setup libffi (Foreign Function Interface)
4672################################################################################
4673
4674
4675#
4676# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4677# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4678#
4679# This code is free software; you can redistribute it and/or modify it
4680# under the terms of the GNU General Public License version 2 only, as
4681# published by the Free Software Foundation.  Oracle designates this
4682# particular file as subject to the "Classpath" exception as provided
4683# by Oracle in the LICENSE file that accompanied this code.
4684#
4685# This code is distributed in the hope that it will be useful, but WITHOUT
4686# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4687# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4688# version 2 for more details (a copy is included in the LICENSE file that
4689# accompanied this code).
4690#
4691# You should have received a copy of the GNU General Public License version
4692# 2 along with this work; if not, write to the Free Software Foundation,
4693# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4694#
4695# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4696# or visit www.oracle.com if you need additional information or have any
4697# questions.
4698#
4699
4700################################################################################
4701# Build the freetype lib from source
4702################################################################################
4703
4704
4705################################################################################
4706# Check if a potential freeype library match is correct and usable
4707################################################################################
4708
4709
4710################################################################################
4711# Setup freetype (The FreeType2 font rendering library)
4712################################################################################
4713
4714
4715#
4716# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4717# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4718#
4719# This code is free software; you can redistribute it and/or modify it
4720# under the terms of the GNU General Public License version 2 only, as
4721# published by the Free Software Foundation.  Oracle designates this
4722# particular file as subject to the "Classpath" exception as provided
4723# by Oracle in the LICENSE file that accompanied this code.
4724#
4725# This code is distributed in the hope that it will be useful, but WITHOUT
4726# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4727# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4728# version 2 for more details (a copy is included in the LICENSE file that
4729# accompanied this code).
4730#
4731# You should have received a copy of the GNU General Public License version
4732# 2 along with this work; if not, write to the Free Software Foundation,
4733# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4734#
4735# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4736# or visit www.oracle.com if you need additional information or have any
4737# questions.
4738#
4739
4740################################################################################
4741# Setup the standard C/C++ runtime libraries.
4742#
4743# Most importantly, determine if stdc++ should be linked statically or
4744# dynamically.
4745################################################################################
4746
4747
4748#
4749# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4750# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4751#
4752# This code is free software; you can redistribute it and/or modify it
4753# under the terms of the GNU General Public License version 2 only, as
4754# published by the Free Software Foundation.  Oracle designates this
4755# particular file as subject to the "Classpath" exception as provided
4756# by Oracle in the LICENSE file that accompanied this code.
4757#
4758# This code is distributed in the hope that it will be useful, but WITHOUT
4759# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4760# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4761# version 2 for more details (a copy is included in the LICENSE file that
4762# accompanied this code).
4763#
4764# You should have received a copy of the GNU General Public License version
4765# 2 along with this work; if not, write to the Free Software Foundation,
4766# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4767#
4768# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4769# or visit www.oracle.com if you need additional information or have any
4770# questions.
4771#
4772
4773################################################################################
4774# Setup X11 Windows system
4775################################################################################
4776
4777
4778
4779################################################################################
4780# Determine which libraries are needed for this configuration
4781################################################################################
4782
4783
4784################################################################################
4785# Parse library options, and setup needed libraries
4786################################################################################
4787
4788
4789################################################################################
4790# Setup llvm (Low-Level VM)
4791################################################################################
4792
4793
4794################################################################################
4795# Setup various libraries, typically small system libraries
4796################################################################################
4797
4798
4799################################################################################
4800# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4801# redistribute it in the test image.
4802################################################################################
4803
4804
4805
4806#
4807# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4809#
4810# This code is free software; you can redistribute it and/or modify it
4811# under the terms of the GNU General Public License version 2 only, as
4812# published by the Free Software Foundation.  Oracle designates this
4813# particular file as subject to the "Classpath" exception as provided
4814# by Oracle in the LICENSE file that accompanied this code.
4815#
4816# This code is distributed in the hope that it will be useful, but WITHOUT
4817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4819# version 2 for more details (a copy is included in the LICENSE file that
4820# accompanied this code).
4821#
4822# You should have received a copy of the GNU General Public License version
4823# 2 along with this work; if not, write to the Free Software Foundation,
4824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4825#
4826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4827# or visit www.oracle.com if you need additional information or have any
4828# questions.
4829#
4830
4831# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4832# Converts autoconf style CPU name to OpenJDK style, into
4833# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4834
4835
4836# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4837# Converts autoconf style OS name to OpenJDK style, into
4838# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4839
4840
4841# Expects $host_os $host_cpu $build_os and $build_cpu
4842# and $with_target_bits to have been setup!
4843#
4844# Translate the standard triplet(quadruplet) definition
4845# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4846# OPENJDK_BUILD_OS, etc.
4847
4848
4849# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4850# accordingly. Must be done after setting up build and target system, but before
4851# doing anything else with these values.
4852
4853
4854# Setup the legacy variables, for controlling the old makefiles.
4855#
4856
4857
4858# $1 - Either TARGET or BUILD to setup the variables for.
4859
4860
4861
4862
4863
4864
4865#%%% Build and target systems %%%
4866
4867
4868
4869
4870# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4871# Add -mX to various FLAGS variables.
4872
4873
4874
4875
4876
4877
4878#
4879# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4880# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4881#
4882# This code is free software; you can redistribute it and/or modify it
4883# under the terms of the GNU General Public License version 2 only, as
4884# published by the Free Software Foundation.  Oracle designates this
4885# particular file as subject to the "Classpath" exception as provided
4886# by Oracle in the LICENSE file that accompanied this code.
4887#
4888# This code is distributed in the hope that it will be useful, but WITHOUT
4889# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4890# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4891# version 2 for more details (a copy is included in the LICENSE file that
4892# accompanied this code).
4893#
4894# You should have received a copy of the GNU General Public License version
4895# 2 along with this work; if not, write to the Free Software Foundation,
4896# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4897#
4898# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4899# or visit www.oracle.com if you need additional information or have any
4900# questions.
4901#
4902
4903
4904
4905
4906
4907
4908
4909################################################################################
4910# Define a mechanism for importing extra prebuilt modules
4911#
4912
4913
4914
4915#
4916# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4918#
4919# This code is free software; you can redistribute it and/or modify it
4920# under the terms of the GNU General Public License version 2 only, as
4921# published by the Free Software Foundation.  Oracle designates this
4922# particular file as subject to the "Classpath" exception as provided
4923# by Oracle in the LICENSE file that accompanied this code.
4924#
4925# This code is distributed in the hope that it will be useful, but WITHOUT
4926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4928# version 2 for more details (a copy is included in the LICENSE file that
4929# accompanied this code).
4930#
4931# You should have received a copy of the GNU General Public License version
4932# 2 along with this work; if not, write to the Free Software Foundation,
4933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4934#
4935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4936# or visit www.oracle.com if you need additional information or have any
4937# questions.
4938#
4939
4940########################################################################
4941# This file is responsible for detecting, verifying and setting up the
4942# toolchain, i.e. the compiler, linker and related utilities. It will setup
4943# proper paths to the binaries, but it will not setup any flags.
4944#
4945# The binaries used is determined by the toolchain type, which is the family of
4946# compilers and related tools that are used.
4947########################################################################
4948
4949
4950# All valid toolchains, regardless of platform (used by help.m4)
4951VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4952
4953# These toolchains are valid on different platforms
4954VALID_TOOLCHAINS_linux="gcc clang"
4955VALID_TOOLCHAINS_solaris="solstudio"
4956VALID_TOOLCHAINS_macosx="gcc clang"
4957VALID_TOOLCHAINS_aix="xlc"
4958VALID_TOOLCHAINS_windows="microsoft"
4959
4960# Toolchain descriptions
4961TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4962TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4963TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4964TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4965TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4966
4967# Minimum supported versions, empty means unspecified
4968TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4969TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4970TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4971TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4972TOOLCHAIN_MINIMUM_VERSION_xlc=""
4973
4974# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4975# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4976# $1 - optional variable prefix for compiler and version variables (BUILD_)
4977# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4978
4979
4980# Check if the configured compiler (C and C++) is of a specific version or
4981# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4982#
4983# Arguments:
4984#   VERSION:   The version string to check against the found version
4985#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4986#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4987#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4988
4989
4990
4991
4992# Setup a number of variables describing how native output files are
4993# named on this platform/toolchain.
4994
4995
4996# Determine which toolchain type to use, and make sure it is valid for this
4997# platform. Setup various information about the selected toolchain.
4998
4999
5000# Before we start detecting the toolchain executables, we might need some
5001# special setup, e.g. additional paths etc.
5002
5003
5004# Restore path, etc
5005
5006
5007# Check if a compiler is of the toolchain type we expect, and save the version
5008# information from it. If the compiler does not match the expected type,
5009# this function will abort using AC_MSG_ERROR. If it matches, the version will
5010# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5011# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5012#
5013# $1 = compiler to test (CC or CXX)
5014# $2 = human readable name of compiler (C or C++)
5015
5016
5017# Try to locate the given C or C++ compiler in the path, or otherwise.
5018#
5019# $1 = compiler to test (CC or CXX)
5020# $2 = human readable name of compiler (C or C++)
5021# $3 = compiler name to search for
5022
5023
5024# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5025# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5026# archiver (AR). Verify that the compilers are correct according to the
5027# toolchain type.
5028
5029
5030# Setup additional tools that is considered a part of the toolchain, but not the
5031# core part. Many of these are highly platform-specific and do not exist,
5032# and/or are not needed on all platforms.
5033
5034
5035# Setup the build tools (i.e, the compiler and linker used to build programs
5036# that should be run on the build platform, not the target platform, as a build
5037# helper). Since the non-cross-compile case uses the normal, target compilers
5038# for this, we can only do this after these have been setup.
5039
5040
5041# Do some additional checks on the detected tools.
5042
5043
5044# Setup the JTReg Regression Test Harness.
5045
5046
5047# Setup the JIB dependency resolver
5048
5049
5050#
5051# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5052# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5053#
5054# This code is free software; you can redistribute it and/or modify it
5055# under the terms of the GNU General Public License version 2 only, as
5056# published by the Free Software Foundation.  Oracle designates this
5057# particular file as subject to the "Classpath" exception as provided
5058# by Oracle in the LICENSE file that accompanied this code.
5059#
5060# This code is distributed in the hope that it will be useful, but WITHOUT
5061# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5062# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5063# version 2 for more details (a copy is included in the LICENSE file that
5064# accompanied this code).
5065#
5066# You should have received a copy of the GNU General Public License version
5067# 2 along with this work; if not, write to the Free Software Foundation,
5068# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5069#
5070# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5071# or visit www.oracle.com if you need additional information or have any
5072# questions.
5073#
5074
5075################################################################################
5076# The order of these defines the priority by which we try to find them.
5077VALID_VS_VERSIONS="2013 2012 2010"
5078
5079VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5080VS_VERSION_INTERNAL_2010=100
5081VS_MSVCR_2010=msvcr100.dll
5082# We don't use msvcp on Visual Studio 2010
5083#VS_MSVCP_2010=msvcp100.dll
5084VS_ENVVAR_2010="VS100COMNTOOLS"
5085VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5086VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5087VS_VS_PLATFORM_NAME_2010="v100"
5088VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5089
5090VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5091VS_VERSION_INTERNAL_2012=110
5092VS_MSVCR_2012=msvcr110.dll
5093VS_MSVCP_2012=msvcp110.dll
5094VS_ENVVAR_2012="VS110COMNTOOLS"
5095VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5096VS_SDK_INSTALLDIR_2012=
5097VS_VS_PLATFORM_NAME_2012="v110"
5098VS_SDK_PLATFORM_NAME_2012=
5099
5100VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5101VS_VERSION_INTERNAL_2013=120
5102VS_MSVCR_2013=msvcr120.dll
5103VS_MSVCP_2013=msvcp120.dll
5104VS_ENVVAR_2013="VS120COMNTOOLS"
5105VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5106VS_SDK_INSTALLDIR_2013=
5107VS_VS_PLATFORM_NAME_2013="v120"
5108VS_SDK_PLATFORM_NAME_2013=
5109
5110################################################################################
5111
5112
5113
5114################################################################################
5115
5116
5117
5118################################################################################
5119# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5120# build environment and assigns it to VS_ENV_CMD
5121
5122
5123################################################################################
5124
5125
5126
5127################################################################################
5128# Check if the VS env variables were setup prior to running configure.
5129# If not, then find vcvarsall.bat and run it automatically, and integrate
5130# the set env variables into the spec file.
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145# This line needs to be here, verbatim, after all includes and the dummy hook
5146# definitions. It is replaced with custom functionality when building
5147# custom sources.
5148#CUSTOM_AUTOCONF_INCLUDE
5149
5150# Do not change or remove the following line, it is needed for consistency checks:
5151DATE_WHEN_GENERATED=1494636381
5152
5153###############################################################################
5154#
5155# Initialization / Boot-strapping
5156#
5157# The bootstrapping process needs to solve the "chicken or the egg" problem,
5158# thus it jumps back and forth, each time gaining something needed later on.
5159#
5160###############################################################################
5161
5162# If we are requested to print additional help, do that and then exit.
5163# This must be the very first call.
5164
5165  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5166
5167    # Print available toolchains
5168    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5169    $PRINTF "Which are valid to use depends on the build platform.\n"
5170    for toolchain in $VALID_TOOLCHAINS_all; do
5171      # Use indirect variable referencing
5172      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5173      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5174      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5175    done
5176    $PRINTF "\n"
5177
5178    # Print available jvm features
5179    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5180    $PRINTF "Which are valid to use depends on the target platform.\n  "
5181    $PRINTF "%s " $VALID_JVM_FEATURES
5182    $PRINTF "\n"
5183
5184    # And now exit directly
5185    exit 0
5186  fi
5187
5188
5189# Basic initialization that must happen first of all in the normal process.
5190
5191  # Save the original command line. This is passed to us by the wrapper configure script.
5192
5193  # Save the path variable before it gets changed
5194  ORIGINAL_PATH="$PATH"
5195
5196  DATE_WHEN_CONFIGURED=`LANG=C date`
5197
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5199$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5201$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5202
5203
5204  # Start with tools that do not need have cross compilation support
5205  # and can be expected to be found in the default PATH. These tools are
5206  # used by configure.
5207
5208  # First are all the simple required tools.
5209
5210
5211
5212  # Publish this variable in the help.
5213
5214
5215  if [ -z "${BASENAME+x}" ]; then
5216    # The variable is not set by user, try to locate tool using the code snippet
5217    for ac_prog in basename
5218do
5219  # Extract the first word of "$ac_prog", so it can be a program name with args.
5220set dummy $ac_prog; ac_word=$2
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5222$as_echo_n "checking for $ac_word... " >&6; }
5223if ${ac_cv_path_BASENAME+:} false; then :
5224  $as_echo_n "(cached) " >&6
5225else
5226  case $BASENAME in
5227  [\\/]* | ?:[\\/]*)
5228  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5229  ;;
5230  *)
5231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232for as_dir in $PATH
5233do
5234  IFS=$as_save_IFS
5235  test -z "$as_dir" && as_dir=.
5236    for ac_exec_ext in '' $ac_executable_extensions; do
5237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5238    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5240    break 2
5241  fi
5242done
5243  done
5244IFS=$as_save_IFS
5245
5246  ;;
5247esac
5248fi
5249BASENAME=$ac_cv_path_BASENAME
5250if test -n "$BASENAME"; then
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5252$as_echo "$BASENAME" >&6; }
5253else
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
5256fi
5257
5258
5259  test -n "$BASENAME" && break
5260done
5261
5262  else
5263    # The variable is set, but is it from the command line or the environment?
5264
5265    # Try to remove the string !BASENAME! from our list.
5266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5268      # If it failed, the variable was not from the command line. Ignore it,
5269      # but warn the user (except for BASH, which is always set by the calling BASH).
5270      if test "xBASENAME" != xBASH; then
5271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5272$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5273      fi
5274      # Try to locate tool using the code snippet
5275      for ac_prog in basename
5276do
5277  # Extract the first word of "$ac_prog", so it can be a program name with args.
5278set dummy $ac_prog; ac_word=$2
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5280$as_echo_n "checking for $ac_word... " >&6; }
5281if ${ac_cv_path_BASENAME+:} false; then :
5282  $as_echo_n "(cached) " >&6
5283else
5284  case $BASENAME in
5285  [\\/]* | ?:[\\/]*)
5286  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5287  ;;
5288  *)
5289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290for as_dir in $PATH
5291do
5292  IFS=$as_save_IFS
5293  test -z "$as_dir" && as_dir=.
5294    for ac_exec_ext in '' $ac_executable_extensions; do
5295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5296    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5298    break 2
5299  fi
5300done
5301  done
5302IFS=$as_save_IFS
5303
5304  ;;
5305esac
5306fi
5307BASENAME=$ac_cv_path_BASENAME
5308if test -n "$BASENAME"; then
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5310$as_echo "$BASENAME" >&6; }
5311else
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
5314fi
5315
5316
5317  test -n "$BASENAME" && break
5318done
5319
5320    else
5321      # If it succeeded, then it was overridden by the user. We will use it
5322      # for the tool.
5323
5324      # First remove it from the list of overridden variables, so we can test
5325      # for unknown variables in the end.
5326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5327
5328      # Check if we try to supply an empty value
5329      if test "x$BASENAME" = x; then
5330        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5331$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5333$as_echo_n "checking for BASENAME... " >&6; }
5334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5335$as_echo "disabled" >&6; }
5336      else
5337        # Check if the provided tool contains a complete path.
5338        tool_specified="$BASENAME"
5339        tool_basename="${tool_specified##*/}"
5340        if test "x$tool_basename" = "x$tool_specified"; then
5341          # A command without a complete path is provided, search $PATH.
5342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5343$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5344          # Extract the first word of "$tool_basename", so it can be a program name with args.
5345set dummy $tool_basename; ac_word=$2
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347$as_echo_n "checking for $ac_word... " >&6; }
5348if ${ac_cv_path_BASENAME+:} false; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  case $BASENAME in
5352  [\\/]* | ?:[\\/]*)
5353  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5354  ;;
5355  *)
5356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357for as_dir in $PATH
5358do
5359  IFS=$as_save_IFS
5360  test -z "$as_dir" && as_dir=.
5361    for ac_exec_ext in '' $ac_executable_extensions; do
5362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5363    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365    break 2
5366  fi
5367done
5368  done
5369IFS=$as_save_IFS
5370
5371  ;;
5372esac
5373fi
5374BASENAME=$ac_cv_path_BASENAME
5375if test -n "$BASENAME"; then
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5377$as_echo "$BASENAME" >&6; }
5378else
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
5382
5383
5384          if test "x$BASENAME" = x; then
5385            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5386          fi
5387        else
5388          # Otherwise we believe it is a complete path. Use it as it is.
5389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5390$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5391          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5392$as_echo_n "checking for BASENAME... " >&6; }
5393          if test ! -x "$tool_specified"; then
5394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5395$as_echo "not found" >&6; }
5396            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5397          fi
5398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5399$as_echo "$tool_specified" >&6; }
5400        fi
5401      fi
5402    fi
5403
5404  fi
5405
5406
5407
5408  if test "x$BASENAME" = x; then
5409    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5410  fi
5411
5412
5413
5414
5415
5416  # Publish this variable in the help.
5417
5418
5419  if [ -z "${BASH+x}" ]; then
5420    # The variable is not set by user, try to locate tool using the code snippet
5421    for ac_prog in bash
5422do
5423  # Extract the first word of "$ac_prog", so it can be a program name with args.
5424set dummy $ac_prog; ac_word=$2
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426$as_echo_n "checking for $ac_word... " >&6; }
5427if ${ac_cv_path_BASH+:} false; then :
5428  $as_echo_n "(cached) " >&6
5429else
5430  case $BASH in
5431  [\\/]* | ?:[\\/]*)
5432  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5433  ;;
5434  *)
5435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436for as_dir in $PATH
5437do
5438  IFS=$as_save_IFS
5439  test -z "$as_dir" && as_dir=.
5440    for ac_exec_ext in '' $ac_executable_extensions; do
5441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5444    break 2
5445  fi
5446done
5447  done
5448IFS=$as_save_IFS
5449
5450  ;;
5451esac
5452fi
5453BASH=$ac_cv_path_BASH
5454if test -n "$BASH"; then
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5456$as_echo "$BASH" >&6; }
5457else
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459$as_echo "no" >&6; }
5460fi
5461
5462
5463  test -n "$BASH" && break
5464done
5465
5466  else
5467    # The variable is set, but is it from the command line or the environment?
5468
5469    # Try to remove the string !BASH! from our list.
5470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5472      # If it failed, the variable was not from the command line. Ignore it,
5473      # but warn the user (except for BASH, which is always set by the calling BASH).
5474      if test "xBASH" != xBASH; then
5475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5476$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5477      fi
5478      # Try to locate tool using the code snippet
5479      for ac_prog in bash
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if ${ac_cv_path_BASH+:} false; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $BASH in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5500    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511BASH=$ac_cv_path_BASH
5512if test -n "$BASH"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5514$as_echo "$BASH" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$BASH" && break
5522done
5523
5524    else
5525      # If it succeeded, then it was overridden by the user. We will use it
5526      # for the tool.
5527
5528      # First remove it from the list of overridden variables, so we can test
5529      # for unknown variables in the end.
5530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5531
5532      # Check if we try to supply an empty value
5533      if test "x$BASH" = x; then
5534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5535$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5537$as_echo_n "checking for BASH... " >&6; }
5538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5539$as_echo "disabled" >&6; }
5540      else
5541        # Check if the provided tool contains a complete path.
5542        tool_specified="$BASH"
5543        tool_basename="${tool_specified##*/}"
5544        if test "x$tool_basename" = "x$tool_specified"; then
5545          # A command without a complete path is provided, search $PATH.
5546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5547$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5548          # Extract the first word of "$tool_basename", so it can be a program name with args.
5549set dummy $tool_basename; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_BASH+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $BASH in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578BASH=$ac_cv_path_BASH
5579if test -n "$BASH"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5581$as_echo "$BASH" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588          if test "x$BASH" = x; then
5589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5590          fi
5591        else
5592          # Otherwise we believe it is a complete path. Use it as it is.
5593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5594$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5596$as_echo_n "checking for BASH... " >&6; }
5597          if test ! -x "$tool_specified"; then
5598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5599$as_echo "not found" >&6; }
5600            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5601          fi
5602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5603$as_echo "$tool_specified" >&6; }
5604        fi
5605      fi
5606    fi
5607
5608  fi
5609
5610
5611
5612  if test "x$BASH" = x; then
5613    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5614  fi
5615
5616
5617
5618
5619
5620  # Publish this variable in the help.
5621
5622
5623  if [ -z "${CAT+x}" ]; then
5624    # The variable is not set by user, try to locate tool using the code snippet
5625    for ac_prog in cat
5626do
5627  # Extract the first word of "$ac_prog", so it can be a program name with args.
5628set dummy $ac_prog; ac_word=$2
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
5631if ${ac_cv_path_CAT+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  case $CAT in
5635  [\\/]* | ?:[\\/]*)
5636  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5637  ;;
5638  *)
5639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644    for ac_exec_ext in '' $ac_executable_extensions; do
5645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5646    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5648    break 2
5649  fi
5650done
5651  done
5652IFS=$as_save_IFS
5653
5654  ;;
5655esac
5656fi
5657CAT=$ac_cv_path_CAT
5658if test -n "$CAT"; then
5659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5660$as_echo "$CAT" >&6; }
5661else
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667  test -n "$CAT" && break
5668done
5669
5670  else
5671    # The variable is set, but is it from the command line or the environment?
5672
5673    # Try to remove the string !CAT! from our list.
5674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5676      # If it failed, the variable was not from the command line. Ignore it,
5677      # but warn the user (except for BASH, which is always set by the calling BASH).
5678      if test "xCAT" != xBASH; then
5679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5680$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5681      fi
5682      # Try to locate tool using the code snippet
5683      for ac_prog in cat
5684do
5685  # Extract the first word of "$ac_prog", so it can be a program name with args.
5686set dummy $ac_prog; ac_word=$2
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5688$as_echo_n "checking for $ac_word... " >&6; }
5689if ${ac_cv_path_CAT+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692  case $CAT in
5693  [\\/]* | ?:[\\/]*)
5694  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5695  ;;
5696  *)
5697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5698for as_dir in $PATH
5699do
5700  IFS=$as_save_IFS
5701  test -z "$as_dir" && as_dir=.
5702    for ac_exec_ext in '' $ac_executable_extensions; do
5703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5704    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5706    break 2
5707  fi
5708done
5709  done
5710IFS=$as_save_IFS
5711
5712  ;;
5713esac
5714fi
5715CAT=$ac_cv_path_CAT
5716if test -n "$CAT"; then
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5718$as_echo "$CAT" >&6; }
5719else
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5721$as_echo "no" >&6; }
5722fi
5723
5724
5725  test -n "$CAT" && break
5726done
5727
5728    else
5729      # If it succeeded, then it was overridden by the user. We will use it
5730      # for the tool.
5731
5732      # First remove it from the list of overridden variables, so we can test
5733      # for unknown variables in the end.
5734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5735
5736      # Check if we try to supply an empty value
5737      if test "x$CAT" = x; then
5738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5739$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5741$as_echo_n "checking for CAT... " >&6; }
5742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5743$as_echo "disabled" >&6; }
5744      else
5745        # Check if the provided tool contains a complete path.
5746        tool_specified="$CAT"
5747        tool_basename="${tool_specified##*/}"
5748        if test "x$tool_basename" = "x$tool_specified"; then
5749          # A command without a complete path is provided, search $PATH.
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5751$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5752          # Extract the first word of "$tool_basename", so it can be a program name with args.
5753set dummy $tool_basename; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
5756if ${ac_cv_path_CAT+:} false; then :
5757  $as_echo_n "(cached) " >&6
5758else
5759  case $CAT in
5760  [\\/]* | ?:[\\/]*)
5761  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5762  ;;
5763  *)
5764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5765for as_dir in $PATH
5766do
5767  IFS=$as_save_IFS
5768  test -z "$as_dir" && as_dir=.
5769    for ac_exec_ext in '' $ac_executable_extensions; do
5770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5771    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5773    break 2
5774  fi
5775done
5776  done
5777IFS=$as_save_IFS
5778
5779  ;;
5780esac
5781fi
5782CAT=$ac_cv_path_CAT
5783if test -n "$CAT"; then
5784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5785$as_echo "$CAT" >&6; }
5786else
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
5789fi
5790
5791
5792          if test "x$CAT" = x; then
5793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5794          fi
5795        else
5796          # Otherwise we believe it is a complete path. Use it as it is.
5797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5798$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5800$as_echo_n "checking for CAT... " >&6; }
5801          if test ! -x "$tool_specified"; then
5802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5803$as_echo "not found" >&6; }
5804            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5805          fi
5806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5807$as_echo "$tool_specified" >&6; }
5808        fi
5809      fi
5810    fi
5811
5812  fi
5813
5814
5815
5816  if test "x$CAT" = x; then
5817    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5818  fi
5819
5820
5821
5822
5823
5824  # Publish this variable in the help.
5825
5826
5827  if [ -z "${CHMOD+x}" ]; then
5828    # The variable is not set by user, try to locate tool using the code snippet
5829    for ac_prog in chmod
5830do
5831  # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_path_CHMOD+:} false; then :
5836  $as_echo_n "(cached) " >&6
5837else
5838  case $CHMOD in
5839  [\\/]* | ?:[\\/]*)
5840  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5841  ;;
5842  *)
5843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844for as_dir in $PATH
5845do
5846  IFS=$as_save_IFS
5847  test -z "$as_dir" && as_dir=.
5848    for ac_exec_ext in '' $ac_executable_extensions; do
5849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5850    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5852    break 2
5853  fi
5854done
5855  done
5856IFS=$as_save_IFS
5857
5858  ;;
5859esac
5860fi
5861CHMOD=$ac_cv_path_CHMOD
5862if test -n "$CHMOD"; then
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5864$as_echo "$CHMOD" >&6; }
5865else
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871  test -n "$CHMOD" && break
5872done
5873
5874  else
5875    # The variable is set, but is it from the command line or the environment?
5876
5877    # Try to remove the string !CHMOD! from our list.
5878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5880      # If it failed, the variable was not from the command line. Ignore it,
5881      # but warn the user (except for BASH, which is always set by the calling BASH).
5882      if test "xCHMOD" != xBASH; then
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5884$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5885      fi
5886      # Try to locate tool using the code snippet
5887      for ac_prog in chmod
5888do
5889  # Extract the first word of "$ac_prog", so it can be a program name with args.
5890set dummy $ac_prog; ac_word=$2
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5892$as_echo_n "checking for $ac_word... " >&6; }
5893if ${ac_cv_path_CHMOD+:} false; then :
5894  $as_echo_n "(cached) " >&6
5895else
5896  case $CHMOD in
5897  [\\/]* | ?:[\\/]*)
5898  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5899  ;;
5900  *)
5901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904  IFS=$as_save_IFS
5905  test -z "$as_dir" && as_dir=.
5906    for ac_exec_ext in '' $ac_executable_extensions; do
5907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5908    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910    break 2
5911  fi
5912done
5913  done
5914IFS=$as_save_IFS
5915
5916  ;;
5917esac
5918fi
5919CHMOD=$ac_cv_path_CHMOD
5920if test -n "$CHMOD"; then
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5922$as_echo "$CHMOD" >&6; }
5923else
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
5926fi
5927
5928
5929  test -n "$CHMOD" && break
5930done
5931
5932    else
5933      # If it succeeded, then it was overridden by the user. We will use it
5934      # for the tool.
5935
5936      # First remove it from the list of overridden variables, so we can test
5937      # for unknown variables in the end.
5938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5939
5940      # Check if we try to supply an empty value
5941      if test "x$CHMOD" = x; then
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5943$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5945$as_echo_n "checking for CHMOD... " >&6; }
5946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5947$as_echo "disabled" >&6; }
5948      else
5949        # Check if the provided tool contains a complete path.
5950        tool_specified="$CHMOD"
5951        tool_basename="${tool_specified##*/}"
5952        if test "x$tool_basename" = "x$tool_specified"; then
5953          # A command without a complete path is provided, search $PATH.
5954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5955$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5956          # Extract the first word of "$tool_basename", so it can be a program name with args.
5957set dummy $tool_basename; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_path_CHMOD+:} false; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  case $CHMOD in
5964  [\\/]* | ?:[\\/]*)
5965  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5966  ;;
5967  *)
5968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969for as_dir in $PATH
5970do
5971  IFS=$as_save_IFS
5972  test -z "$as_dir" && as_dir=.
5973    for ac_exec_ext in '' $ac_executable_extensions; do
5974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977    break 2
5978  fi
5979done
5980  done
5981IFS=$as_save_IFS
5982
5983  ;;
5984esac
5985fi
5986CHMOD=$ac_cv_path_CHMOD
5987if test -n "$CHMOD"; then
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5989$as_echo "$CHMOD" >&6; }
5990else
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992$as_echo "no" >&6; }
5993fi
5994
5995
5996          if test "x$CHMOD" = x; then
5997            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5998          fi
5999        else
6000          # Otherwise we believe it is a complete path. Use it as it is.
6001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6002$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6004$as_echo_n "checking for CHMOD... " >&6; }
6005          if test ! -x "$tool_specified"; then
6006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6007$as_echo "not found" >&6; }
6008            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6009          fi
6010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6011$as_echo "$tool_specified" >&6; }
6012        fi
6013      fi
6014    fi
6015
6016  fi
6017
6018
6019
6020  if test "x$CHMOD" = x; then
6021    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6022  fi
6023
6024
6025
6026
6027
6028  # Publish this variable in the help.
6029
6030
6031  if [ -z "${CMP+x}" ]; then
6032    # The variable is not set by user, try to locate tool using the code snippet
6033    for ac_prog in cmp
6034do
6035  # Extract the first word of "$ac_prog", so it can be a program name with args.
6036set dummy $ac_prog; ac_word=$2
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
6039if ${ac_cv_path_CMP+:} false; then :
6040  $as_echo_n "(cached) " >&6
6041else
6042  case $CMP in
6043  [\\/]* | ?:[\\/]*)
6044  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6045  ;;
6046  *)
6047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050  IFS=$as_save_IFS
6051  test -z "$as_dir" && as_dir=.
6052    for ac_exec_ext in '' $ac_executable_extensions; do
6053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6054    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056    break 2
6057  fi
6058done
6059  done
6060IFS=$as_save_IFS
6061
6062  ;;
6063esac
6064fi
6065CMP=$ac_cv_path_CMP
6066if test -n "$CMP"; then
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6068$as_echo "$CMP" >&6; }
6069else
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075  test -n "$CMP" && break
6076done
6077
6078  else
6079    # The variable is set, but is it from the command line or the environment?
6080
6081    # Try to remove the string !CMP! from our list.
6082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6084      # If it failed, the variable was not from the command line. Ignore it,
6085      # but warn the user (except for BASH, which is always set by the calling BASH).
6086      if test "xCMP" != xBASH; then
6087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6088$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6089      fi
6090      # Try to locate tool using the code snippet
6091      for ac_prog in cmp
6092do
6093  # Extract the first word of "$ac_prog", so it can be a program name with args.
6094set dummy $ac_prog; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_path_CMP+:} false; then :
6098  $as_echo_n "(cached) " >&6
6099else
6100  case $CMP in
6101  [\\/]* | ?:[\\/]*)
6102  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6103  ;;
6104  *)
6105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108  IFS=$as_save_IFS
6109  test -z "$as_dir" && as_dir=.
6110    for ac_exec_ext in '' $ac_executable_extensions; do
6111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6112    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114    break 2
6115  fi
6116done
6117  done
6118IFS=$as_save_IFS
6119
6120  ;;
6121esac
6122fi
6123CMP=$ac_cv_path_CMP
6124if test -n "$CMP"; then
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6126$as_echo "$CMP" >&6; }
6127else
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133  test -n "$CMP" && break
6134done
6135
6136    else
6137      # If it succeeded, then it was overridden by the user. We will use it
6138      # for the tool.
6139
6140      # First remove it from the list of overridden variables, so we can test
6141      # for unknown variables in the end.
6142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6143
6144      # Check if we try to supply an empty value
6145      if test "x$CMP" = x; then
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6147$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6149$as_echo_n "checking for CMP... " >&6; }
6150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6151$as_echo "disabled" >&6; }
6152      else
6153        # Check if the provided tool contains a complete path.
6154        tool_specified="$CMP"
6155        tool_basename="${tool_specified##*/}"
6156        if test "x$tool_basename" = "x$tool_specified"; then
6157          # A command without a complete path is provided, search $PATH.
6158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6159$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6160          # Extract the first word of "$tool_basename", so it can be a program name with args.
6161set dummy $tool_basename; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_path_CMP+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  case $CMP in
6168  [\\/]* | ?:[\\/]*)
6169  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6170  ;;
6171  *)
6172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175  IFS=$as_save_IFS
6176  test -z "$as_dir" && as_dir=.
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181    break 2
6182  fi
6183done
6184  done
6185IFS=$as_save_IFS
6186
6187  ;;
6188esac
6189fi
6190CMP=$ac_cv_path_CMP
6191if test -n "$CMP"; then
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6193$as_echo "$CMP" >&6; }
6194else
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200          if test "x$CMP" = x; then
6201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6202          fi
6203        else
6204          # Otherwise we believe it is a complete path. Use it as it is.
6205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6206$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6208$as_echo_n "checking for CMP... " >&6; }
6209          if test ! -x "$tool_specified"; then
6210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6211$as_echo "not found" >&6; }
6212            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6213          fi
6214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6215$as_echo "$tool_specified" >&6; }
6216        fi
6217      fi
6218    fi
6219
6220  fi
6221
6222
6223
6224  if test "x$CMP" = x; then
6225    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6226  fi
6227
6228
6229
6230
6231
6232  # Publish this variable in the help.
6233
6234
6235  if [ -z "${COMM+x}" ]; then
6236    # The variable is not set by user, try to locate tool using the code snippet
6237    for ac_prog in comm
6238do
6239  # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_path_COMM+:} false; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246  case $COMM in
6247  [\\/]* | ?:[\\/]*)
6248  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6249  ;;
6250  *)
6251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254  IFS=$as_save_IFS
6255  test -z "$as_dir" && as_dir=.
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260    break 2
6261  fi
6262done
6263  done
6264IFS=$as_save_IFS
6265
6266  ;;
6267esac
6268fi
6269COMM=$ac_cv_path_COMM
6270if test -n "$COMM"; then
6271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6272$as_echo "$COMM" >&6; }
6273else
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279  test -n "$COMM" && break
6280done
6281
6282  else
6283    # The variable is set, but is it from the command line or the environment?
6284
6285    # Try to remove the string !COMM! from our list.
6286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288      # If it failed, the variable was not from the command line. Ignore it,
6289      # but warn the user (except for BASH, which is always set by the calling BASH).
6290      if test "xCOMM" != xBASH; then
6291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6292$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6293      fi
6294      # Try to locate tool using the code snippet
6295      for ac_prog in comm
6296do
6297  # Extract the first word of "$ac_prog", so it can be a program name with args.
6298set dummy $ac_prog; ac_word=$2
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300$as_echo_n "checking for $ac_word... " >&6; }
6301if ${ac_cv_path_COMM+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  case $COMM in
6305  [\\/]* | ?:[\\/]*)
6306  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6307  ;;
6308  *)
6309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312  IFS=$as_save_IFS
6313  test -z "$as_dir" && as_dir=.
6314    for ac_exec_ext in '' $ac_executable_extensions; do
6315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318    break 2
6319  fi
6320done
6321  done
6322IFS=$as_save_IFS
6323
6324  ;;
6325esac
6326fi
6327COMM=$ac_cv_path_COMM
6328if test -n "$COMM"; then
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6330$as_echo "$COMM" >&6; }
6331else
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
6337  test -n "$COMM" && break
6338done
6339
6340    else
6341      # If it succeeded, then it was overridden by the user. We will use it
6342      # for the tool.
6343
6344      # First remove it from the list of overridden variables, so we can test
6345      # for unknown variables in the end.
6346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348      # Check if we try to supply an empty value
6349      if test "x$COMM" = x; then
6350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6351$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6353$as_echo_n "checking for COMM... " >&6; }
6354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6355$as_echo "disabled" >&6; }
6356      else
6357        # Check if the provided tool contains a complete path.
6358        tool_specified="$COMM"
6359        tool_basename="${tool_specified##*/}"
6360        if test "x$tool_basename" = "x$tool_specified"; then
6361          # A command without a complete path is provided, search $PATH.
6362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6363$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6364          # Extract the first word of "$tool_basename", so it can be a program name with args.
6365set dummy $tool_basename; ac_word=$2
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6367$as_echo_n "checking for $ac_word... " >&6; }
6368if ${ac_cv_path_COMM+:} false; then :
6369  $as_echo_n "(cached) " >&6
6370else
6371  case $COMM in
6372  [\\/]* | ?:[\\/]*)
6373  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6374  ;;
6375  *)
6376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379  IFS=$as_save_IFS
6380  test -z "$as_dir" && as_dir=.
6381    for ac_exec_ext in '' $ac_executable_extensions; do
6382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385    break 2
6386  fi
6387done
6388  done
6389IFS=$as_save_IFS
6390
6391  ;;
6392esac
6393fi
6394COMM=$ac_cv_path_COMM
6395if test -n "$COMM"; then
6396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6397$as_echo "$COMM" >&6; }
6398else
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
6403
6404          if test "x$COMM" = x; then
6405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6406          fi
6407        else
6408          # Otherwise we believe it is a complete path. Use it as it is.
6409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6410$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6412$as_echo_n "checking for COMM... " >&6; }
6413          if test ! -x "$tool_specified"; then
6414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6415$as_echo "not found" >&6; }
6416            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6417          fi
6418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6419$as_echo "$tool_specified" >&6; }
6420        fi
6421      fi
6422    fi
6423
6424  fi
6425
6426
6427
6428  if test "x$COMM" = x; then
6429    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6430  fi
6431
6432
6433
6434
6435
6436  # Publish this variable in the help.
6437
6438
6439  if [ -z "${CP+x}" ]; then
6440    # The variable is not set by user, try to locate tool using the code snippet
6441    for ac_prog in cp
6442do
6443  # Extract the first word of "$ac_prog", so it can be a program name with args.
6444set dummy $ac_prog; ac_word=$2
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446$as_echo_n "checking for $ac_word... " >&6; }
6447if ${ac_cv_path_CP+:} false; then :
6448  $as_echo_n "(cached) " >&6
6449else
6450  case $CP in
6451  [\\/]* | ?:[\\/]*)
6452  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6453  ;;
6454  *)
6455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456for as_dir in $PATH
6457do
6458  IFS=$as_save_IFS
6459  test -z "$as_dir" && as_dir=.
6460    for ac_exec_ext in '' $ac_executable_extensions; do
6461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6462    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464    break 2
6465  fi
6466done
6467  done
6468IFS=$as_save_IFS
6469
6470  ;;
6471esac
6472fi
6473CP=$ac_cv_path_CP
6474if test -n "$CP"; then
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6476$as_echo "$CP" >&6; }
6477else
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
6480fi
6481
6482
6483  test -n "$CP" && break
6484done
6485
6486  else
6487    # The variable is set, but is it from the command line or the environment?
6488
6489    # Try to remove the string !CP! from our list.
6490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6492      # If it failed, the variable was not from the command line. Ignore it,
6493      # but warn the user (except for BASH, which is always set by the calling BASH).
6494      if test "xCP" != xBASH; then
6495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6496$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6497      fi
6498      # Try to locate tool using the code snippet
6499      for ac_prog in cp
6500do
6501  # Extract the first word of "$ac_prog", so it can be a program name with args.
6502set dummy $ac_prog; ac_word=$2
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504$as_echo_n "checking for $ac_word... " >&6; }
6505if ${ac_cv_path_CP+:} false; then :
6506  $as_echo_n "(cached) " >&6
6507else
6508  case $CP in
6509  [\\/]* | ?:[\\/]*)
6510  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6511  ;;
6512  *)
6513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6514for as_dir in $PATH
6515do
6516  IFS=$as_save_IFS
6517  test -z "$as_dir" && as_dir=.
6518    for ac_exec_ext in '' $ac_executable_extensions; do
6519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6520    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6522    break 2
6523  fi
6524done
6525  done
6526IFS=$as_save_IFS
6527
6528  ;;
6529esac
6530fi
6531CP=$ac_cv_path_CP
6532if test -n "$CP"; then
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6534$as_echo "$CP" >&6; }
6535else
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6537$as_echo "no" >&6; }
6538fi
6539
6540
6541  test -n "$CP" && break
6542done
6543
6544    else
6545      # If it succeeded, then it was overridden by the user. We will use it
6546      # for the tool.
6547
6548      # First remove it from the list of overridden variables, so we can test
6549      # for unknown variables in the end.
6550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6551
6552      # Check if we try to supply an empty value
6553      if test "x$CP" = x; then
6554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6555$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6557$as_echo_n "checking for CP... " >&6; }
6558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6559$as_echo "disabled" >&6; }
6560      else
6561        # Check if the provided tool contains a complete path.
6562        tool_specified="$CP"
6563        tool_basename="${tool_specified##*/}"
6564        if test "x$tool_basename" = "x$tool_specified"; then
6565          # A command without a complete path is provided, search $PATH.
6566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6567$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6568          # Extract the first word of "$tool_basename", so it can be a program name with args.
6569set dummy $tool_basename; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_CP+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  case $CP in
6576  [\\/]* | ?:[\\/]*)
6577  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6578  ;;
6579  *)
6580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583  IFS=$as_save_IFS
6584  test -z "$as_dir" && as_dir=.
6585    for ac_exec_ext in '' $ac_executable_extensions; do
6586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589    break 2
6590  fi
6591done
6592  done
6593IFS=$as_save_IFS
6594
6595  ;;
6596esac
6597fi
6598CP=$ac_cv_path_CP
6599if test -n "$CP"; then
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6601$as_echo "$CP" >&6; }
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608          if test "x$CP" = x; then
6609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6610          fi
6611        else
6612          # Otherwise we believe it is a complete path. Use it as it is.
6613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6614$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6616$as_echo_n "checking for CP... " >&6; }
6617          if test ! -x "$tool_specified"; then
6618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6619$as_echo "not found" >&6; }
6620            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6621          fi
6622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6623$as_echo "$tool_specified" >&6; }
6624        fi
6625      fi
6626    fi
6627
6628  fi
6629
6630
6631
6632  if test "x$CP" = x; then
6633    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6634  fi
6635
6636
6637
6638
6639
6640  # Publish this variable in the help.
6641
6642
6643  if [ -z "${CUT+x}" ]; then
6644    # The variable is not set by user, try to locate tool using the code snippet
6645    for ac_prog in cut
6646do
6647  # Extract the first word of "$ac_prog", so it can be a program name with args.
6648set dummy $ac_prog; ac_word=$2
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6650$as_echo_n "checking for $ac_word... " >&6; }
6651if ${ac_cv_path_CUT+:} false; then :
6652  $as_echo_n "(cached) " >&6
6653else
6654  case $CUT in
6655  [\\/]* | ?:[\\/]*)
6656  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6657  ;;
6658  *)
6659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6660for as_dir in $PATH
6661do
6662  IFS=$as_save_IFS
6663  test -z "$as_dir" && as_dir=.
6664    for ac_exec_ext in '' $ac_executable_extensions; do
6665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6666    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6668    break 2
6669  fi
6670done
6671  done
6672IFS=$as_save_IFS
6673
6674  ;;
6675esac
6676fi
6677CUT=$ac_cv_path_CUT
6678if test -n "$CUT"; then
6679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6680$as_echo "$CUT" >&6; }
6681else
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683$as_echo "no" >&6; }
6684fi
6685
6686
6687  test -n "$CUT" && break
6688done
6689
6690  else
6691    # The variable is set, but is it from the command line or the environment?
6692
6693    # Try to remove the string !CUT! from our list.
6694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6696      # If it failed, the variable was not from the command line. Ignore it,
6697      # but warn the user (except for BASH, which is always set by the calling BASH).
6698      if test "xCUT" != xBASH; then
6699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6700$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6701      fi
6702      # Try to locate tool using the code snippet
6703      for ac_prog in cut
6704do
6705  # Extract the first word of "$ac_prog", so it can be a program name with args.
6706set dummy $ac_prog; ac_word=$2
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6708$as_echo_n "checking for $ac_word... " >&6; }
6709if ${ac_cv_path_CUT+:} false; then :
6710  $as_echo_n "(cached) " >&6
6711else
6712  case $CUT in
6713  [\\/]* | ?:[\\/]*)
6714  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6715  ;;
6716  *)
6717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718for as_dir in $PATH
6719do
6720  IFS=$as_save_IFS
6721  test -z "$as_dir" && as_dir=.
6722    for ac_exec_ext in '' $ac_executable_extensions; do
6723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6724    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6726    break 2
6727  fi
6728done
6729  done
6730IFS=$as_save_IFS
6731
6732  ;;
6733esac
6734fi
6735CUT=$ac_cv_path_CUT
6736if test -n "$CUT"; then
6737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6738$as_echo "$CUT" >&6; }
6739else
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
6742fi
6743
6744
6745  test -n "$CUT" && break
6746done
6747
6748    else
6749      # If it succeeded, then it was overridden by the user. We will use it
6750      # for the tool.
6751
6752      # First remove it from the list of overridden variables, so we can test
6753      # for unknown variables in the end.
6754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6755
6756      # Check if we try to supply an empty value
6757      if test "x$CUT" = x; then
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6759$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6761$as_echo_n "checking for CUT... " >&6; }
6762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6763$as_echo "disabled" >&6; }
6764      else
6765        # Check if the provided tool contains a complete path.
6766        tool_specified="$CUT"
6767        tool_basename="${tool_specified##*/}"
6768        if test "x$tool_basename" = "x$tool_specified"; then
6769          # A command without a complete path is provided, search $PATH.
6770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6771$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6772          # Extract the first word of "$tool_basename", so it can be a program name with args.
6773set dummy $tool_basename; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_CUT+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $CUT in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802CUT=$ac_cv_path_CUT
6803if test -n "$CUT"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6805$as_echo "$CUT" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812          if test "x$CUT" = x; then
6813            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6814          fi
6815        else
6816          # Otherwise we believe it is a complete path. Use it as it is.
6817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6818$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6819          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6820$as_echo_n "checking for CUT... " >&6; }
6821          if test ! -x "$tool_specified"; then
6822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6823$as_echo "not found" >&6; }
6824            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6825          fi
6826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6827$as_echo "$tool_specified" >&6; }
6828        fi
6829      fi
6830    fi
6831
6832  fi
6833
6834
6835
6836  if test "x$CUT" = x; then
6837    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6838  fi
6839
6840
6841
6842
6843
6844  # Publish this variable in the help.
6845
6846
6847  if [ -z "${DATE+x}" ]; then
6848    # The variable is not set by user, try to locate tool using the code snippet
6849    for ac_prog in date
6850do
6851  # Extract the first word of "$ac_prog", so it can be a program name with args.
6852set dummy $ac_prog; ac_word=$2
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6854$as_echo_n "checking for $ac_word... " >&6; }
6855if ${ac_cv_path_DATE+:} false; then :
6856  $as_echo_n "(cached) " >&6
6857else
6858  case $DATE in
6859  [\\/]* | ?:[\\/]*)
6860  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6861  ;;
6862  *)
6863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6864for as_dir in $PATH
6865do
6866  IFS=$as_save_IFS
6867  test -z "$as_dir" && as_dir=.
6868    for ac_exec_ext in '' $ac_executable_extensions; do
6869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6870    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6872    break 2
6873  fi
6874done
6875  done
6876IFS=$as_save_IFS
6877
6878  ;;
6879esac
6880fi
6881DATE=$ac_cv_path_DATE
6882if test -n "$DATE"; then
6883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6884$as_echo "$DATE" >&6; }
6885else
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6887$as_echo "no" >&6; }
6888fi
6889
6890
6891  test -n "$DATE" && break
6892done
6893
6894  else
6895    # The variable is set, but is it from the command line or the environment?
6896
6897    # Try to remove the string !DATE! from our list.
6898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6900      # If it failed, the variable was not from the command line. Ignore it,
6901      # but warn the user (except for BASH, which is always set by the calling BASH).
6902      if test "xDATE" != xBASH; then
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6904$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6905      fi
6906      # Try to locate tool using the code snippet
6907      for ac_prog in date
6908do
6909  # Extract the first word of "$ac_prog", so it can be a program name with args.
6910set dummy $ac_prog; ac_word=$2
6911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6912$as_echo_n "checking for $ac_word... " >&6; }
6913if ${ac_cv_path_DATE+:} false; then :
6914  $as_echo_n "(cached) " >&6
6915else
6916  case $DATE in
6917  [\\/]* | ?:[\\/]*)
6918  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6919  ;;
6920  *)
6921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6922for as_dir in $PATH
6923do
6924  IFS=$as_save_IFS
6925  test -z "$as_dir" && as_dir=.
6926    for ac_exec_ext in '' $ac_executable_extensions; do
6927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6928    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6930    break 2
6931  fi
6932done
6933  done
6934IFS=$as_save_IFS
6935
6936  ;;
6937esac
6938fi
6939DATE=$ac_cv_path_DATE
6940if test -n "$DATE"; then
6941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6942$as_echo "$DATE" >&6; }
6943else
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6945$as_echo "no" >&6; }
6946fi
6947
6948
6949  test -n "$DATE" && break
6950done
6951
6952    else
6953      # If it succeeded, then it was overridden by the user. We will use it
6954      # for the tool.
6955
6956      # First remove it from the list of overridden variables, so we can test
6957      # for unknown variables in the end.
6958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6959
6960      # Check if we try to supply an empty value
6961      if test "x$DATE" = x; then
6962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6963$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6965$as_echo_n "checking for DATE... " >&6; }
6966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6967$as_echo "disabled" >&6; }
6968      else
6969        # Check if the provided tool contains a complete path.
6970        tool_specified="$DATE"
6971        tool_basename="${tool_specified##*/}"
6972        if test "x$tool_basename" = "x$tool_specified"; then
6973          # A command without a complete path is provided, search $PATH.
6974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6975$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6976          # Extract the first word of "$tool_basename", so it can be a program name with args.
6977set dummy $tool_basename; ac_word=$2
6978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6979$as_echo_n "checking for $ac_word... " >&6; }
6980if ${ac_cv_path_DATE+:} false; then :
6981  $as_echo_n "(cached) " >&6
6982else
6983  case $DATE in
6984  [\\/]* | ?:[\\/]*)
6985  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6986  ;;
6987  *)
6988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6989for as_dir in $PATH
6990do
6991  IFS=$as_save_IFS
6992  test -z "$as_dir" && as_dir=.
6993    for ac_exec_ext in '' $ac_executable_extensions; do
6994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6995    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6997    break 2
6998  fi
6999done
7000  done
7001IFS=$as_save_IFS
7002
7003  ;;
7004esac
7005fi
7006DATE=$ac_cv_path_DATE
7007if test -n "$DATE"; then
7008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7009$as_echo "$DATE" >&6; }
7010else
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7012$as_echo "no" >&6; }
7013fi
7014
7015
7016          if test "x$DATE" = x; then
7017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7018          fi
7019        else
7020          # Otherwise we believe it is a complete path. Use it as it is.
7021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7022$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7024$as_echo_n "checking for DATE... " >&6; }
7025          if test ! -x "$tool_specified"; then
7026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7027$as_echo "not found" >&6; }
7028            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7029          fi
7030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7031$as_echo "$tool_specified" >&6; }
7032        fi
7033      fi
7034    fi
7035
7036  fi
7037
7038
7039
7040  if test "x$DATE" = x; then
7041    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7042  fi
7043
7044
7045
7046
7047
7048  # Publish this variable in the help.
7049
7050
7051  if [ -z "${DIFF+x}" ]; then
7052    # The variable is not set by user, try to locate tool using the code snippet
7053    for ac_prog in gdiff diff
7054do
7055  # Extract the first word of "$ac_prog", so it can be a program name with args.
7056set dummy $ac_prog; ac_word=$2
7057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7058$as_echo_n "checking for $ac_word... " >&6; }
7059if ${ac_cv_path_DIFF+:} false; then :
7060  $as_echo_n "(cached) " >&6
7061else
7062  case $DIFF in
7063  [\\/]* | ?:[\\/]*)
7064  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7065  ;;
7066  *)
7067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068for as_dir in $PATH
7069do
7070  IFS=$as_save_IFS
7071  test -z "$as_dir" && as_dir=.
7072    for ac_exec_ext in '' $ac_executable_extensions; do
7073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7074    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7076    break 2
7077  fi
7078done
7079  done
7080IFS=$as_save_IFS
7081
7082  ;;
7083esac
7084fi
7085DIFF=$ac_cv_path_DIFF
7086if test -n "$DIFF"; then
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7088$as_echo "$DIFF" >&6; }
7089else
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7091$as_echo "no" >&6; }
7092fi
7093
7094
7095  test -n "$DIFF" && break
7096done
7097
7098  else
7099    # The variable is set, but is it from the command line or the environment?
7100
7101    # Try to remove the string !DIFF! from our list.
7102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7104      # If it failed, the variable was not from the command line. Ignore it,
7105      # but warn the user (except for BASH, which is always set by the calling BASH).
7106      if test "xDIFF" != xBASH; then
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7108$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7109      fi
7110      # Try to locate tool using the code snippet
7111      for ac_prog in gdiff diff
7112do
7113  # Extract the first word of "$ac_prog", so it can be a program name with args.
7114set dummy $ac_prog; ac_word=$2
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7116$as_echo_n "checking for $ac_word... " >&6; }
7117if ${ac_cv_path_DIFF+:} false; then :
7118  $as_echo_n "(cached) " >&6
7119else
7120  case $DIFF in
7121  [\\/]* | ?:[\\/]*)
7122  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7123  ;;
7124  *)
7125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126for as_dir in $PATH
7127do
7128  IFS=$as_save_IFS
7129  test -z "$as_dir" && as_dir=.
7130    for ac_exec_ext in '' $ac_executable_extensions; do
7131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7132    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7134    break 2
7135  fi
7136done
7137  done
7138IFS=$as_save_IFS
7139
7140  ;;
7141esac
7142fi
7143DIFF=$ac_cv_path_DIFF
7144if test -n "$DIFF"; then
7145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7146$as_echo "$DIFF" >&6; }
7147else
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7149$as_echo "no" >&6; }
7150fi
7151
7152
7153  test -n "$DIFF" && break
7154done
7155
7156    else
7157      # If it succeeded, then it was overridden by the user. We will use it
7158      # for the tool.
7159
7160      # First remove it from the list of overridden variables, so we can test
7161      # for unknown variables in the end.
7162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7163
7164      # Check if we try to supply an empty value
7165      if test "x$DIFF" = x; then
7166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7167$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7169$as_echo_n "checking for DIFF... " >&6; }
7170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7171$as_echo "disabled" >&6; }
7172      else
7173        # Check if the provided tool contains a complete path.
7174        tool_specified="$DIFF"
7175        tool_basename="${tool_specified##*/}"
7176        if test "x$tool_basename" = "x$tool_specified"; then
7177          # A command without a complete path is provided, search $PATH.
7178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7179$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7180          # Extract the first word of "$tool_basename", so it can be a program name with args.
7181set dummy $tool_basename; ac_word=$2
7182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7183$as_echo_n "checking for $ac_word... " >&6; }
7184if ${ac_cv_path_DIFF+:} false; then :
7185  $as_echo_n "(cached) " >&6
7186else
7187  case $DIFF in
7188  [\\/]* | ?:[\\/]*)
7189  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7190  ;;
7191  *)
7192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193for as_dir in $PATH
7194do
7195  IFS=$as_save_IFS
7196  test -z "$as_dir" && as_dir=.
7197    for ac_exec_ext in '' $ac_executable_extensions; do
7198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7199    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7201    break 2
7202  fi
7203done
7204  done
7205IFS=$as_save_IFS
7206
7207  ;;
7208esac
7209fi
7210DIFF=$ac_cv_path_DIFF
7211if test -n "$DIFF"; then
7212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7213$as_echo "$DIFF" >&6; }
7214else
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216$as_echo "no" >&6; }
7217fi
7218
7219
7220          if test "x$DIFF" = x; then
7221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7222          fi
7223        else
7224          # Otherwise we believe it is a complete path. Use it as it is.
7225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7226$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7228$as_echo_n "checking for DIFF... " >&6; }
7229          if test ! -x "$tool_specified"; then
7230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7231$as_echo "not found" >&6; }
7232            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7233          fi
7234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7235$as_echo "$tool_specified" >&6; }
7236        fi
7237      fi
7238    fi
7239
7240  fi
7241
7242
7243
7244  if test "x$DIFF" = x; then
7245    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7246  fi
7247
7248
7249
7250
7251
7252  # Publish this variable in the help.
7253
7254
7255  if [ -z "${DIRNAME+x}" ]; then
7256    # The variable is not set by user, try to locate tool using the code snippet
7257    for ac_prog in dirname
7258do
7259  # Extract the first word of "$ac_prog", so it can be a program name with args.
7260set dummy $ac_prog; ac_word=$2
7261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7262$as_echo_n "checking for $ac_word... " >&6; }
7263if ${ac_cv_path_DIRNAME+:} false; then :
7264  $as_echo_n "(cached) " >&6
7265else
7266  case $DIRNAME in
7267  [\\/]* | ?:[\\/]*)
7268  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7269  ;;
7270  *)
7271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7272for as_dir in $PATH
7273do
7274  IFS=$as_save_IFS
7275  test -z "$as_dir" && as_dir=.
7276    for ac_exec_ext in '' $ac_executable_extensions; do
7277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7278    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7280    break 2
7281  fi
7282done
7283  done
7284IFS=$as_save_IFS
7285
7286  ;;
7287esac
7288fi
7289DIRNAME=$ac_cv_path_DIRNAME
7290if test -n "$DIRNAME"; then
7291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7292$as_echo "$DIRNAME" >&6; }
7293else
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295$as_echo "no" >&6; }
7296fi
7297
7298
7299  test -n "$DIRNAME" && break
7300done
7301
7302  else
7303    # The variable is set, but is it from the command line or the environment?
7304
7305    # Try to remove the string !DIRNAME! from our list.
7306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7308      # If it failed, the variable was not from the command line. Ignore it,
7309      # but warn the user (except for BASH, which is always set by the calling BASH).
7310      if test "xDIRNAME" != xBASH; then
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7312$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7313      fi
7314      # Try to locate tool using the code snippet
7315      for ac_prog in dirname
7316do
7317  # Extract the first word of "$ac_prog", so it can be a program name with args.
7318set dummy $ac_prog; ac_word=$2
7319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7320$as_echo_n "checking for $ac_word... " >&6; }
7321if ${ac_cv_path_DIRNAME+:} false; then :
7322  $as_echo_n "(cached) " >&6
7323else
7324  case $DIRNAME in
7325  [\\/]* | ?:[\\/]*)
7326  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7327  ;;
7328  *)
7329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330for as_dir in $PATH
7331do
7332  IFS=$as_save_IFS
7333  test -z "$as_dir" && as_dir=.
7334    for ac_exec_ext in '' $ac_executable_extensions; do
7335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7336    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7338    break 2
7339  fi
7340done
7341  done
7342IFS=$as_save_IFS
7343
7344  ;;
7345esac
7346fi
7347DIRNAME=$ac_cv_path_DIRNAME
7348if test -n "$DIRNAME"; then
7349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7350$as_echo "$DIRNAME" >&6; }
7351else
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7353$as_echo "no" >&6; }
7354fi
7355
7356
7357  test -n "$DIRNAME" && break
7358done
7359
7360    else
7361      # If it succeeded, then it was overridden by the user. We will use it
7362      # for the tool.
7363
7364      # First remove it from the list of overridden variables, so we can test
7365      # for unknown variables in the end.
7366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7367
7368      # Check if we try to supply an empty value
7369      if test "x$DIRNAME" = x; then
7370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7371$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7373$as_echo_n "checking for DIRNAME... " >&6; }
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7375$as_echo "disabled" >&6; }
7376      else
7377        # Check if the provided tool contains a complete path.
7378        tool_specified="$DIRNAME"
7379        tool_basename="${tool_specified##*/}"
7380        if test "x$tool_basename" = "x$tool_specified"; then
7381          # A command without a complete path is provided, search $PATH.
7382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7383$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7384          # Extract the first word of "$tool_basename", so it can be a program name with args.
7385set dummy $tool_basename; ac_word=$2
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387$as_echo_n "checking for $ac_word... " >&6; }
7388if ${ac_cv_path_DIRNAME+:} false; then :
7389  $as_echo_n "(cached) " >&6
7390else
7391  case $DIRNAME in
7392  [\\/]* | ?:[\\/]*)
7393  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7394  ;;
7395  *)
7396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397for as_dir in $PATH
7398do
7399  IFS=$as_save_IFS
7400  test -z "$as_dir" && as_dir=.
7401    for ac_exec_ext in '' $ac_executable_extensions; do
7402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7403    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405    break 2
7406  fi
7407done
7408  done
7409IFS=$as_save_IFS
7410
7411  ;;
7412esac
7413fi
7414DIRNAME=$ac_cv_path_DIRNAME
7415if test -n "$DIRNAME"; then
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7417$as_echo "$DIRNAME" >&6; }
7418else
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420$as_echo "no" >&6; }
7421fi
7422
7423
7424          if test "x$DIRNAME" = x; then
7425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7426          fi
7427        else
7428          # Otherwise we believe it is a complete path. Use it as it is.
7429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7430$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7432$as_echo_n "checking for DIRNAME... " >&6; }
7433          if test ! -x "$tool_specified"; then
7434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7435$as_echo "not found" >&6; }
7436            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7437          fi
7438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7439$as_echo "$tool_specified" >&6; }
7440        fi
7441      fi
7442    fi
7443
7444  fi
7445
7446
7447
7448  if test "x$DIRNAME" = x; then
7449    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7450  fi
7451
7452
7453
7454
7455
7456  # Publish this variable in the help.
7457
7458
7459  if [ -z "${ECHO+x}" ]; then
7460    # The variable is not set by user, try to locate tool using the code snippet
7461    for ac_prog in echo
7462do
7463  # Extract the first word of "$ac_prog", so it can be a program name with args.
7464set dummy $ac_prog; ac_word=$2
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7466$as_echo_n "checking for $ac_word... " >&6; }
7467if ${ac_cv_path_ECHO+:} false; then :
7468  $as_echo_n "(cached) " >&6
7469else
7470  case $ECHO in
7471  [\\/]* | ?:[\\/]*)
7472  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7473  ;;
7474  *)
7475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476for as_dir in $PATH
7477do
7478  IFS=$as_save_IFS
7479  test -z "$as_dir" && as_dir=.
7480    for ac_exec_ext in '' $ac_executable_extensions; do
7481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7482    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484    break 2
7485  fi
7486done
7487  done
7488IFS=$as_save_IFS
7489
7490  ;;
7491esac
7492fi
7493ECHO=$ac_cv_path_ECHO
7494if test -n "$ECHO"; then
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7496$as_echo "$ECHO" >&6; }
7497else
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501
7502
7503  test -n "$ECHO" && break
7504done
7505
7506  else
7507    # The variable is set, but is it from the command line or the environment?
7508
7509    # Try to remove the string !ECHO! from our list.
7510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7512      # If it failed, the variable was not from the command line. Ignore it,
7513      # but warn the user (except for BASH, which is always set by the calling BASH).
7514      if test "xECHO" != xBASH; then
7515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7516$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7517      fi
7518      # Try to locate tool using the code snippet
7519      for ac_prog in echo
7520do
7521  # Extract the first word of "$ac_prog", so it can be a program name with args.
7522set dummy $ac_prog; ac_word=$2
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
7525if ${ac_cv_path_ECHO+:} false; then :
7526  $as_echo_n "(cached) " >&6
7527else
7528  case $ECHO in
7529  [\\/]* | ?:[\\/]*)
7530  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7531  ;;
7532  *)
7533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536  IFS=$as_save_IFS
7537  test -z "$as_dir" && as_dir=.
7538    for ac_exec_ext in '' $ac_executable_extensions; do
7539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7540    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7542    break 2
7543  fi
7544done
7545  done
7546IFS=$as_save_IFS
7547
7548  ;;
7549esac
7550fi
7551ECHO=$ac_cv_path_ECHO
7552if test -n "$ECHO"; then
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7554$as_echo "$ECHO" >&6; }
7555else
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7557$as_echo "no" >&6; }
7558fi
7559
7560
7561  test -n "$ECHO" && break
7562done
7563
7564    else
7565      # If it succeeded, then it was overridden by the user. We will use it
7566      # for the tool.
7567
7568      # First remove it from the list of overridden variables, so we can test
7569      # for unknown variables in the end.
7570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7571
7572      # Check if we try to supply an empty value
7573      if test "x$ECHO" = x; then
7574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7575$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7577$as_echo_n "checking for ECHO... " >&6; }
7578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7579$as_echo "disabled" >&6; }
7580      else
7581        # Check if the provided tool contains a complete path.
7582        tool_specified="$ECHO"
7583        tool_basename="${tool_specified##*/}"
7584        if test "x$tool_basename" = "x$tool_specified"; then
7585          # A command without a complete path is provided, search $PATH.
7586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7587$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7588          # Extract the first word of "$tool_basename", so it can be a program name with args.
7589set dummy $tool_basename; ac_word=$2
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591$as_echo_n "checking for $ac_word... " >&6; }
7592if ${ac_cv_path_ECHO+:} false; then :
7593  $as_echo_n "(cached) " >&6
7594else
7595  case $ECHO in
7596  [\\/]* | ?:[\\/]*)
7597  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7598  ;;
7599  *)
7600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601for as_dir in $PATH
7602do
7603  IFS=$as_save_IFS
7604  test -z "$as_dir" && as_dir=.
7605    for ac_exec_ext in '' $ac_executable_extensions; do
7606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609    break 2
7610  fi
7611done
7612  done
7613IFS=$as_save_IFS
7614
7615  ;;
7616esac
7617fi
7618ECHO=$ac_cv_path_ECHO
7619if test -n "$ECHO"; then
7620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7621$as_echo "$ECHO" >&6; }
7622else
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624$as_echo "no" >&6; }
7625fi
7626
7627
7628          if test "x$ECHO" = x; then
7629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7630          fi
7631        else
7632          # Otherwise we believe it is a complete path. Use it as it is.
7633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7634$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7636$as_echo_n "checking for ECHO... " >&6; }
7637          if test ! -x "$tool_specified"; then
7638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7639$as_echo "not found" >&6; }
7640            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7641          fi
7642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7643$as_echo "$tool_specified" >&6; }
7644        fi
7645      fi
7646    fi
7647
7648  fi
7649
7650
7651
7652  if test "x$ECHO" = x; then
7653    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7654  fi
7655
7656
7657
7658
7659
7660  # Publish this variable in the help.
7661
7662
7663  if [ -z "${EXPR+x}" ]; then
7664    # The variable is not set by user, try to locate tool using the code snippet
7665    for ac_prog in expr
7666do
7667  # Extract the first word of "$ac_prog", so it can be a program name with args.
7668set dummy $ac_prog; ac_word=$2
7669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7670$as_echo_n "checking for $ac_word... " >&6; }
7671if ${ac_cv_path_EXPR+:} false; then :
7672  $as_echo_n "(cached) " >&6
7673else
7674  case $EXPR in
7675  [\\/]* | ?:[\\/]*)
7676  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7677  ;;
7678  *)
7679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7680for as_dir in $PATH
7681do
7682  IFS=$as_save_IFS
7683  test -z "$as_dir" && as_dir=.
7684    for ac_exec_ext in '' $ac_executable_extensions; do
7685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7686    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7688    break 2
7689  fi
7690done
7691  done
7692IFS=$as_save_IFS
7693
7694  ;;
7695esac
7696fi
7697EXPR=$ac_cv_path_EXPR
7698if test -n "$EXPR"; then
7699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7700$as_echo "$EXPR" >&6; }
7701else
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
7704fi
7705
7706
7707  test -n "$EXPR" && break
7708done
7709
7710  else
7711    # The variable is set, but is it from the command line or the environment?
7712
7713    # Try to remove the string !EXPR! from our list.
7714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7716      # If it failed, the variable was not from the command line. Ignore it,
7717      # but warn the user (except for BASH, which is always set by the calling BASH).
7718      if test "xEXPR" != xBASH; then
7719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7720$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7721      fi
7722      # Try to locate tool using the code snippet
7723      for ac_prog in expr
7724do
7725  # Extract the first word of "$ac_prog", so it can be a program name with args.
7726set dummy $ac_prog; ac_word=$2
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7728$as_echo_n "checking for $ac_word... " >&6; }
7729if ${ac_cv_path_EXPR+:} false; then :
7730  $as_echo_n "(cached) " >&6
7731else
7732  case $EXPR in
7733  [\\/]* | ?:[\\/]*)
7734  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7735  ;;
7736  *)
7737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7738for as_dir in $PATH
7739do
7740  IFS=$as_save_IFS
7741  test -z "$as_dir" && as_dir=.
7742    for ac_exec_ext in '' $ac_executable_extensions; do
7743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7744    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7746    break 2
7747  fi
7748done
7749  done
7750IFS=$as_save_IFS
7751
7752  ;;
7753esac
7754fi
7755EXPR=$ac_cv_path_EXPR
7756if test -n "$EXPR"; then
7757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7758$as_echo "$EXPR" >&6; }
7759else
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7761$as_echo "no" >&6; }
7762fi
7763
7764
7765  test -n "$EXPR" && break
7766done
7767
7768    else
7769      # If it succeeded, then it was overridden by the user. We will use it
7770      # for the tool.
7771
7772      # First remove it from the list of overridden variables, so we can test
7773      # for unknown variables in the end.
7774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7775
7776      # Check if we try to supply an empty value
7777      if test "x$EXPR" = x; then
7778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7779$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7781$as_echo_n "checking for EXPR... " >&6; }
7782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7783$as_echo "disabled" >&6; }
7784      else
7785        # Check if the provided tool contains a complete path.
7786        tool_specified="$EXPR"
7787        tool_basename="${tool_specified##*/}"
7788        if test "x$tool_basename" = "x$tool_specified"; then
7789          # A command without a complete path is provided, search $PATH.
7790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7791$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7792          # Extract the first word of "$tool_basename", so it can be a program name with args.
7793set dummy $tool_basename; ac_word=$2
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7795$as_echo_n "checking for $ac_word... " >&6; }
7796if ${ac_cv_path_EXPR+:} false; then :
7797  $as_echo_n "(cached) " >&6
7798else
7799  case $EXPR in
7800  [\\/]* | ?:[\\/]*)
7801  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7802  ;;
7803  *)
7804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7805for as_dir in $PATH
7806do
7807  IFS=$as_save_IFS
7808  test -z "$as_dir" && as_dir=.
7809    for ac_exec_ext in '' $ac_executable_extensions; do
7810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7811    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7813    break 2
7814  fi
7815done
7816  done
7817IFS=$as_save_IFS
7818
7819  ;;
7820esac
7821fi
7822EXPR=$ac_cv_path_EXPR
7823if test -n "$EXPR"; then
7824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7825$as_echo "$EXPR" >&6; }
7826else
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7828$as_echo "no" >&6; }
7829fi
7830
7831
7832          if test "x$EXPR" = x; then
7833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7834          fi
7835        else
7836          # Otherwise we believe it is a complete path. Use it as it is.
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7838$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7840$as_echo_n "checking for EXPR... " >&6; }
7841          if test ! -x "$tool_specified"; then
7842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7843$as_echo "not found" >&6; }
7844            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7845          fi
7846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7847$as_echo "$tool_specified" >&6; }
7848        fi
7849      fi
7850    fi
7851
7852  fi
7853
7854
7855
7856  if test "x$EXPR" = x; then
7857    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7858  fi
7859
7860
7861
7862
7863
7864  # Publish this variable in the help.
7865
7866
7867  if [ -z "${FILE+x}" ]; then
7868    # The variable is not set by user, try to locate tool using the code snippet
7869    for ac_prog in file
7870do
7871  # Extract the first word of "$ac_prog", so it can be a program name with args.
7872set dummy $ac_prog; ac_word=$2
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7874$as_echo_n "checking for $ac_word... " >&6; }
7875if ${ac_cv_path_FILE+:} false; then :
7876  $as_echo_n "(cached) " >&6
7877else
7878  case $FILE in
7879  [\\/]* | ?:[\\/]*)
7880  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7881  ;;
7882  *)
7883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886  IFS=$as_save_IFS
7887  test -z "$as_dir" && as_dir=.
7888    for ac_exec_ext in '' $ac_executable_extensions; do
7889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7890    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7892    break 2
7893  fi
7894done
7895  done
7896IFS=$as_save_IFS
7897
7898  ;;
7899esac
7900fi
7901FILE=$ac_cv_path_FILE
7902if test -n "$FILE"; then
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7904$as_echo "$FILE" >&6; }
7905else
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
7908fi
7909
7910
7911  test -n "$FILE" && break
7912done
7913
7914  else
7915    # The variable is set, but is it from the command line or the environment?
7916
7917    # Try to remove the string !FILE! from our list.
7918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7920      # If it failed, the variable was not from the command line. Ignore it,
7921      # but warn the user (except for BASH, which is always set by the calling BASH).
7922      if test "xFILE" != xBASH; then
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7924$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7925      fi
7926      # Try to locate tool using the code snippet
7927      for ac_prog in file
7928do
7929  # Extract the first word of "$ac_prog", so it can be a program name with args.
7930set dummy $ac_prog; ac_word=$2
7931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7932$as_echo_n "checking for $ac_word... " >&6; }
7933if ${ac_cv_path_FILE+:} false; then :
7934  $as_echo_n "(cached) " >&6
7935else
7936  case $FILE in
7937  [\\/]* | ?:[\\/]*)
7938  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7939  ;;
7940  *)
7941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942for as_dir in $PATH
7943do
7944  IFS=$as_save_IFS
7945  test -z "$as_dir" && as_dir=.
7946    for ac_exec_ext in '' $ac_executable_extensions; do
7947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7948    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7950    break 2
7951  fi
7952done
7953  done
7954IFS=$as_save_IFS
7955
7956  ;;
7957esac
7958fi
7959FILE=$ac_cv_path_FILE
7960if test -n "$FILE"; then
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7962$as_echo "$FILE" >&6; }
7963else
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7965$as_echo "no" >&6; }
7966fi
7967
7968
7969  test -n "$FILE" && break
7970done
7971
7972    else
7973      # If it succeeded, then it was overridden by the user. We will use it
7974      # for the tool.
7975
7976      # First remove it from the list of overridden variables, so we can test
7977      # for unknown variables in the end.
7978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7979
7980      # Check if we try to supply an empty value
7981      if test "x$FILE" = x; then
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7983$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7985$as_echo_n "checking for FILE... " >&6; }
7986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7987$as_echo "disabled" >&6; }
7988      else
7989        # Check if the provided tool contains a complete path.
7990        tool_specified="$FILE"
7991        tool_basename="${tool_specified##*/}"
7992        if test "x$tool_basename" = "x$tool_specified"; then
7993          # A command without a complete path is provided, search $PATH.
7994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7995$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7996          # Extract the first word of "$tool_basename", so it can be a program name with args.
7997set dummy $tool_basename; ac_word=$2
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999$as_echo_n "checking for $ac_word... " >&6; }
8000if ${ac_cv_path_FILE+:} false; then :
8001  $as_echo_n "(cached) " >&6
8002else
8003  case $FILE in
8004  [\\/]* | ?:[\\/]*)
8005  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8006  ;;
8007  *)
8008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8009for as_dir in $PATH
8010do
8011  IFS=$as_save_IFS
8012  test -z "$as_dir" && as_dir=.
8013    for ac_exec_ext in '' $ac_executable_extensions; do
8014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8015    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8017    break 2
8018  fi
8019done
8020  done
8021IFS=$as_save_IFS
8022
8023  ;;
8024esac
8025fi
8026FILE=$ac_cv_path_FILE
8027if test -n "$FILE"; then
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8029$as_echo "$FILE" >&6; }
8030else
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
8033fi
8034
8035
8036          if test "x$FILE" = x; then
8037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8038          fi
8039        else
8040          # Otherwise we believe it is a complete path. Use it as it is.
8041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8042$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8044$as_echo_n "checking for FILE... " >&6; }
8045          if test ! -x "$tool_specified"; then
8046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8047$as_echo "not found" >&6; }
8048            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8049          fi
8050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8051$as_echo "$tool_specified" >&6; }
8052        fi
8053      fi
8054    fi
8055
8056  fi
8057
8058
8059
8060  if test "x$FILE" = x; then
8061    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8062  fi
8063
8064
8065
8066
8067
8068  # Publish this variable in the help.
8069
8070
8071  if [ -z "${FIND+x}" ]; then
8072    # The variable is not set by user, try to locate tool using the code snippet
8073    for ac_prog in find
8074do
8075  # Extract the first word of "$ac_prog", so it can be a program name with args.
8076set dummy $ac_prog; ac_word=$2
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8078$as_echo_n "checking for $ac_word... " >&6; }
8079if ${ac_cv_path_FIND+:} false; then :
8080  $as_echo_n "(cached) " >&6
8081else
8082  case $FIND in
8083  [\\/]* | ?:[\\/]*)
8084  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8085  ;;
8086  *)
8087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8088for as_dir in $PATH
8089do
8090  IFS=$as_save_IFS
8091  test -z "$as_dir" && as_dir=.
8092    for ac_exec_ext in '' $ac_executable_extensions; do
8093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8094    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8096    break 2
8097  fi
8098done
8099  done
8100IFS=$as_save_IFS
8101
8102  ;;
8103esac
8104fi
8105FIND=$ac_cv_path_FIND
8106if test -n "$FIND"; then
8107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8108$as_echo "$FIND" >&6; }
8109else
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8111$as_echo "no" >&6; }
8112fi
8113
8114
8115  test -n "$FIND" && break
8116done
8117
8118  else
8119    # The variable is set, but is it from the command line or the environment?
8120
8121    # Try to remove the string !FIND! from our list.
8122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8124      # If it failed, the variable was not from the command line. Ignore it,
8125      # but warn the user (except for BASH, which is always set by the calling BASH).
8126      if test "xFIND" != xBASH; then
8127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8128$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8129      fi
8130      # Try to locate tool using the code snippet
8131      for ac_prog in find
8132do
8133  # Extract the first word of "$ac_prog", so it can be a program name with args.
8134set dummy $ac_prog; ac_word=$2
8135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8136$as_echo_n "checking for $ac_word... " >&6; }
8137if ${ac_cv_path_FIND+:} false; then :
8138  $as_echo_n "(cached) " >&6
8139else
8140  case $FIND in
8141  [\\/]* | ?:[\\/]*)
8142  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8143  ;;
8144  *)
8145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8146for as_dir in $PATH
8147do
8148  IFS=$as_save_IFS
8149  test -z "$as_dir" && as_dir=.
8150    for ac_exec_ext in '' $ac_executable_extensions; do
8151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8152    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8154    break 2
8155  fi
8156done
8157  done
8158IFS=$as_save_IFS
8159
8160  ;;
8161esac
8162fi
8163FIND=$ac_cv_path_FIND
8164if test -n "$FIND"; then
8165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8166$as_echo "$FIND" >&6; }
8167else
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169$as_echo "no" >&6; }
8170fi
8171
8172
8173  test -n "$FIND" && break
8174done
8175
8176    else
8177      # If it succeeded, then it was overridden by the user. We will use it
8178      # for the tool.
8179
8180      # First remove it from the list of overridden variables, so we can test
8181      # for unknown variables in the end.
8182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8183
8184      # Check if we try to supply an empty value
8185      if test "x$FIND" = x; then
8186        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8187$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8189$as_echo_n "checking for FIND... " >&6; }
8190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8191$as_echo "disabled" >&6; }
8192      else
8193        # Check if the provided tool contains a complete path.
8194        tool_specified="$FIND"
8195        tool_basename="${tool_specified##*/}"
8196        if test "x$tool_basename" = "x$tool_specified"; then
8197          # A command without a complete path is provided, search $PATH.
8198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8199$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8200          # Extract the first word of "$tool_basename", so it can be a program name with args.
8201set dummy $tool_basename; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
8204if ${ac_cv_path_FIND+:} false; then :
8205  $as_echo_n "(cached) " >&6
8206else
8207  case $FIND in
8208  [\\/]* | ?:[\\/]*)
8209  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8210  ;;
8211  *)
8212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  test -z "$as_dir" && as_dir=.
8217    for ac_exec_ext in '' $ac_executable_extensions; do
8218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221    break 2
8222  fi
8223done
8224  done
8225IFS=$as_save_IFS
8226
8227  ;;
8228esac
8229fi
8230FIND=$ac_cv_path_FIND
8231if test -n "$FIND"; then
8232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8233$as_echo "$FIND" >&6; }
8234else
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
8237fi
8238
8239
8240          if test "x$FIND" = x; then
8241            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8242          fi
8243        else
8244          # Otherwise we believe it is a complete path. Use it as it is.
8245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8246$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8247          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8248$as_echo_n "checking for FIND... " >&6; }
8249          if test ! -x "$tool_specified"; then
8250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8251$as_echo "not found" >&6; }
8252            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8253          fi
8254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8255$as_echo "$tool_specified" >&6; }
8256        fi
8257      fi
8258    fi
8259
8260  fi
8261
8262
8263
8264  if test "x$FIND" = x; then
8265    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8266  fi
8267
8268
8269
8270
8271
8272  # Publish this variable in the help.
8273
8274
8275  if [ -z "${HEAD+x}" ]; then
8276    # The variable is not set by user, try to locate tool using the code snippet
8277    for ac_prog in head
8278do
8279  # Extract the first word of "$ac_prog", so it can be a program name with args.
8280set dummy $ac_prog; ac_word=$2
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8282$as_echo_n "checking for $ac_word... " >&6; }
8283if ${ac_cv_path_HEAD+:} false; then :
8284  $as_echo_n "(cached) " >&6
8285else
8286  case $HEAD in
8287  [\\/]* | ?:[\\/]*)
8288  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8289  ;;
8290  *)
8291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8292for as_dir in $PATH
8293do
8294  IFS=$as_save_IFS
8295  test -z "$as_dir" && as_dir=.
8296    for ac_exec_ext in '' $ac_executable_extensions; do
8297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8298    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8300    break 2
8301  fi
8302done
8303  done
8304IFS=$as_save_IFS
8305
8306  ;;
8307esac
8308fi
8309HEAD=$ac_cv_path_HEAD
8310if test -n "$HEAD"; then
8311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8312$as_echo "$HEAD" >&6; }
8313else
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8315$as_echo "no" >&6; }
8316fi
8317
8318
8319  test -n "$HEAD" && break
8320done
8321
8322  else
8323    # The variable is set, but is it from the command line or the environment?
8324
8325    # Try to remove the string !HEAD! from our list.
8326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8328      # If it failed, the variable was not from the command line. Ignore it,
8329      # but warn the user (except for BASH, which is always set by the calling BASH).
8330      if test "xHEAD" != xBASH; then
8331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8332$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8333      fi
8334      # Try to locate tool using the code snippet
8335      for ac_prog in head
8336do
8337  # Extract the first word of "$ac_prog", so it can be a program name with args.
8338set dummy $ac_prog; ac_word=$2
8339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8340$as_echo_n "checking for $ac_word... " >&6; }
8341if ${ac_cv_path_HEAD+:} false; then :
8342  $as_echo_n "(cached) " >&6
8343else
8344  case $HEAD in
8345  [\\/]* | ?:[\\/]*)
8346  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8347  ;;
8348  *)
8349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8350for as_dir in $PATH
8351do
8352  IFS=$as_save_IFS
8353  test -z "$as_dir" && as_dir=.
8354    for ac_exec_ext in '' $ac_executable_extensions; do
8355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8356    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8358    break 2
8359  fi
8360done
8361  done
8362IFS=$as_save_IFS
8363
8364  ;;
8365esac
8366fi
8367HEAD=$ac_cv_path_HEAD
8368if test -n "$HEAD"; then
8369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8370$as_echo "$HEAD" >&6; }
8371else
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8373$as_echo "no" >&6; }
8374fi
8375
8376
8377  test -n "$HEAD" && break
8378done
8379
8380    else
8381      # If it succeeded, then it was overridden by the user. We will use it
8382      # for the tool.
8383
8384      # First remove it from the list of overridden variables, so we can test
8385      # for unknown variables in the end.
8386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8387
8388      # Check if we try to supply an empty value
8389      if test "x$HEAD" = x; then
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8391$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8393$as_echo_n "checking for HEAD... " >&6; }
8394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8395$as_echo "disabled" >&6; }
8396      else
8397        # Check if the provided tool contains a complete path.
8398        tool_specified="$HEAD"
8399        tool_basename="${tool_specified##*/}"
8400        if test "x$tool_basename" = "x$tool_specified"; then
8401          # A command without a complete path is provided, search $PATH.
8402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8403$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8404          # Extract the first word of "$tool_basename", so it can be a program name with args.
8405set dummy $tool_basename; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_HEAD+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $HEAD in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434HEAD=$ac_cv_path_HEAD
8435if test -n "$HEAD"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8437$as_echo "$HEAD" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444          if test "x$HEAD" = x; then
8445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8446          fi
8447        else
8448          # Otherwise we believe it is a complete path. Use it as it is.
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8450$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8452$as_echo_n "checking for HEAD... " >&6; }
8453          if test ! -x "$tool_specified"; then
8454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8455$as_echo "not found" >&6; }
8456            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8457          fi
8458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8459$as_echo "$tool_specified" >&6; }
8460        fi
8461      fi
8462    fi
8463
8464  fi
8465
8466
8467
8468  if test "x$HEAD" = x; then
8469    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8470  fi
8471
8472
8473
8474
8475
8476  # Publish this variable in the help.
8477
8478
8479  if [ -z "${GUNZIP+x}" ]; then
8480    # The variable is not set by user, try to locate tool using the code snippet
8481    for ac_prog in gunzip
8482do
8483  # Extract the first word of "$ac_prog", so it can be a program name with args.
8484set dummy $ac_prog; ac_word=$2
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
8487if ${ac_cv_path_GUNZIP+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  case $GUNZIP in
8491  [\\/]* | ?:[\\/]*)
8492  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8493  ;;
8494  *)
8495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498  IFS=$as_save_IFS
8499  test -z "$as_dir" && as_dir=.
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510  ;;
8511esac
8512fi
8513GUNZIP=$ac_cv_path_GUNZIP
8514if test -n "$GUNZIP"; then
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8516$as_echo "$GUNZIP" >&6; }
8517else
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
8520fi
8521
8522
8523  test -n "$GUNZIP" && break
8524done
8525
8526  else
8527    # The variable is set, but is it from the command line or the environment?
8528
8529    # Try to remove the string !GUNZIP! from our list.
8530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8532      # If it failed, the variable was not from the command line. Ignore it,
8533      # but warn the user (except for BASH, which is always set by the calling BASH).
8534      if test "xGUNZIP" != xBASH; then
8535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8536$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8537      fi
8538      # Try to locate tool using the code snippet
8539      for ac_prog in gunzip
8540do
8541  # Extract the first word of "$ac_prog", so it can be a program name with args.
8542set dummy $ac_prog; ac_word=$2
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544$as_echo_n "checking for $ac_word... " >&6; }
8545if ${ac_cv_path_GUNZIP+:} false; then :
8546  $as_echo_n "(cached) " >&6
8547else
8548  case $GUNZIP in
8549  [\\/]* | ?:[\\/]*)
8550  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8551  ;;
8552  *)
8553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8554for as_dir in $PATH
8555do
8556  IFS=$as_save_IFS
8557  test -z "$as_dir" && as_dir=.
8558    for ac_exec_ext in '' $ac_executable_extensions; do
8559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8560    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8562    break 2
8563  fi
8564done
8565  done
8566IFS=$as_save_IFS
8567
8568  ;;
8569esac
8570fi
8571GUNZIP=$ac_cv_path_GUNZIP
8572if test -n "$GUNZIP"; then
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8574$as_echo "$GUNZIP" >&6; }
8575else
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578fi
8579
8580
8581  test -n "$GUNZIP" && break
8582done
8583
8584    else
8585      # If it succeeded, then it was overridden by the user. We will use it
8586      # for the tool.
8587
8588      # First remove it from the list of overridden variables, so we can test
8589      # for unknown variables in the end.
8590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8591
8592      # Check if we try to supply an empty value
8593      if test "x$GUNZIP" = x; then
8594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8595$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8597$as_echo_n "checking for GUNZIP... " >&6; }
8598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8599$as_echo "disabled" >&6; }
8600      else
8601        # Check if the provided tool contains a complete path.
8602        tool_specified="$GUNZIP"
8603        tool_basename="${tool_specified##*/}"
8604        if test "x$tool_basename" = "x$tool_specified"; then
8605          # A command without a complete path is provided, search $PATH.
8606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8607$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8608          # Extract the first word of "$tool_basename", so it can be a program name with args.
8609set dummy $tool_basename; ac_word=$2
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611$as_echo_n "checking for $ac_word... " >&6; }
8612if ${ac_cv_path_GUNZIP+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  case $GUNZIP in
8616  [\\/]* | ?:[\\/]*)
8617  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8618  ;;
8619  *)
8620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621for as_dir in $PATH
8622do
8623  IFS=$as_save_IFS
8624  test -z "$as_dir" && as_dir=.
8625    for ac_exec_ext in '' $ac_executable_extensions; do
8626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629    break 2
8630  fi
8631done
8632  done
8633IFS=$as_save_IFS
8634
8635  ;;
8636esac
8637fi
8638GUNZIP=$ac_cv_path_GUNZIP
8639if test -n "$GUNZIP"; then
8640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8641$as_echo "$GUNZIP" >&6; }
8642else
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644$as_echo "no" >&6; }
8645fi
8646
8647
8648          if test "x$GUNZIP" = x; then
8649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8650          fi
8651        else
8652          # Otherwise we believe it is a complete path. Use it as it is.
8653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8654$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8656$as_echo_n "checking for GUNZIP... " >&6; }
8657          if test ! -x "$tool_specified"; then
8658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8659$as_echo "not found" >&6; }
8660            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8661          fi
8662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8663$as_echo "$tool_specified" >&6; }
8664        fi
8665      fi
8666    fi
8667
8668  fi
8669
8670
8671
8672  if test "x$GUNZIP" = x; then
8673    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8674  fi
8675
8676
8677
8678
8679
8680  # Publish this variable in the help.
8681
8682
8683  if [ -z "${GZIP+x}" ]; then
8684    # The variable is not set by user, try to locate tool using the code snippet
8685    for ac_prog in pigz gzip
8686do
8687  # Extract the first word of "$ac_prog", so it can be a program name with args.
8688set dummy $ac_prog; ac_word=$2
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8690$as_echo_n "checking for $ac_word... " >&6; }
8691if ${ac_cv_path_GZIP+:} false; then :
8692  $as_echo_n "(cached) " >&6
8693else
8694  case $GZIP in
8695  [\\/]* | ?:[\\/]*)
8696  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8697  ;;
8698  *)
8699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8700for as_dir in $PATH
8701do
8702  IFS=$as_save_IFS
8703  test -z "$as_dir" && as_dir=.
8704    for ac_exec_ext in '' $ac_executable_extensions; do
8705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8706    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8708    break 2
8709  fi
8710done
8711  done
8712IFS=$as_save_IFS
8713
8714  ;;
8715esac
8716fi
8717GZIP=$ac_cv_path_GZIP
8718if test -n "$GZIP"; then
8719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8720$as_echo "$GZIP" >&6; }
8721else
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723$as_echo "no" >&6; }
8724fi
8725
8726
8727  test -n "$GZIP" && break
8728done
8729
8730  else
8731    # The variable is set, but is it from the command line or the environment?
8732
8733    # Try to remove the string !GZIP! from our list.
8734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8736      # If it failed, the variable was not from the command line. Ignore it,
8737      # but warn the user (except for BASH, which is always set by the calling BASH).
8738      if test "xGZIP" != xBASH; then
8739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8740$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8741      fi
8742      # Try to locate tool using the code snippet
8743      for ac_prog in pigz gzip
8744do
8745  # Extract the first word of "$ac_prog", so it can be a program name with args.
8746set dummy $ac_prog; ac_word=$2
8747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8748$as_echo_n "checking for $ac_word... " >&6; }
8749if ${ac_cv_path_GZIP+:} false; then :
8750  $as_echo_n "(cached) " >&6
8751else
8752  case $GZIP in
8753  [\\/]* | ?:[\\/]*)
8754  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8755  ;;
8756  *)
8757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8758for as_dir in $PATH
8759do
8760  IFS=$as_save_IFS
8761  test -z "$as_dir" && as_dir=.
8762    for ac_exec_ext in '' $ac_executable_extensions; do
8763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8764    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8766    break 2
8767  fi
8768done
8769  done
8770IFS=$as_save_IFS
8771
8772  ;;
8773esac
8774fi
8775GZIP=$ac_cv_path_GZIP
8776if test -n "$GZIP"; then
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8778$as_echo "$GZIP" >&6; }
8779else
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781$as_echo "no" >&6; }
8782fi
8783
8784
8785  test -n "$GZIP" && break
8786done
8787
8788    else
8789      # If it succeeded, then it was overridden by the user. We will use it
8790      # for the tool.
8791
8792      # First remove it from the list of overridden variables, so we can test
8793      # for unknown variables in the end.
8794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8795
8796      # Check if we try to supply an empty value
8797      if test "x$GZIP" = x; then
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8799$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8801$as_echo_n "checking for GZIP... " >&6; }
8802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8803$as_echo "disabled" >&6; }
8804      else
8805        # Check if the provided tool contains a complete path.
8806        tool_specified="$GZIP"
8807        tool_basename="${tool_specified##*/}"
8808        if test "x$tool_basename" = "x$tool_specified"; then
8809          # A command without a complete path is provided, search $PATH.
8810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8811$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8812          # Extract the first word of "$tool_basename", so it can be a program name with args.
8813set dummy $tool_basename; ac_word=$2
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815$as_echo_n "checking for $ac_word... " >&6; }
8816if ${ac_cv_path_GZIP+:} false; then :
8817  $as_echo_n "(cached) " >&6
8818else
8819  case $GZIP in
8820  [\\/]* | ?:[\\/]*)
8821  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8822  ;;
8823  *)
8824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827  IFS=$as_save_IFS
8828  test -z "$as_dir" && as_dir=.
8829    for ac_exec_ext in '' $ac_executable_extensions; do
8830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8831    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833    break 2
8834  fi
8835done
8836  done
8837IFS=$as_save_IFS
8838
8839  ;;
8840esac
8841fi
8842GZIP=$ac_cv_path_GZIP
8843if test -n "$GZIP"; then
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8845$as_echo "$GZIP" >&6; }
8846else
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
8849fi
8850
8851
8852          if test "x$GZIP" = x; then
8853            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8854          fi
8855        else
8856          # Otherwise we believe it is a complete path. Use it as it is.
8857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8858$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8860$as_echo_n "checking for GZIP... " >&6; }
8861          if test ! -x "$tool_specified"; then
8862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8863$as_echo "not found" >&6; }
8864            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8865          fi
8866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8867$as_echo "$tool_specified" >&6; }
8868        fi
8869      fi
8870    fi
8871
8872  fi
8873
8874
8875
8876  if test "x$GZIP" = x; then
8877    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8878  fi
8879
8880
8881
8882
8883
8884  # Publish this variable in the help.
8885
8886
8887  if [ -z "${LN+x}" ]; then
8888    # The variable is not set by user, try to locate tool using the code snippet
8889    for ac_prog in ln
8890do
8891  # Extract the first word of "$ac_prog", so it can be a program name with args.
8892set dummy $ac_prog; ac_word=$2
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894$as_echo_n "checking for $ac_word... " >&6; }
8895if ${ac_cv_path_LN+:} false; then :
8896  $as_echo_n "(cached) " >&6
8897else
8898  case $LN in
8899  [\\/]* | ?:[\\/]*)
8900  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8901  ;;
8902  *)
8903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906  IFS=$as_save_IFS
8907  test -z "$as_dir" && as_dir=.
8908    for ac_exec_ext in '' $ac_executable_extensions; do
8909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8910    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8912    break 2
8913  fi
8914done
8915  done
8916IFS=$as_save_IFS
8917
8918  ;;
8919esac
8920fi
8921LN=$ac_cv_path_LN
8922if test -n "$LN"; then
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8924$as_echo "$LN" >&6; }
8925else
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8927$as_echo "no" >&6; }
8928fi
8929
8930
8931  test -n "$LN" && break
8932done
8933
8934  else
8935    # The variable is set, but is it from the command line or the environment?
8936
8937    # Try to remove the string !LN! from our list.
8938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8940      # If it failed, the variable was not from the command line. Ignore it,
8941      # but warn the user (except for BASH, which is always set by the calling BASH).
8942      if test "xLN" != xBASH; then
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8944$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8945      fi
8946      # Try to locate tool using the code snippet
8947      for ac_prog in ln
8948do
8949  # Extract the first word of "$ac_prog", so it can be a program name with args.
8950set dummy $ac_prog; ac_word=$2
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952$as_echo_n "checking for $ac_word... " >&6; }
8953if ${ac_cv_path_LN+:} false; then :
8954  $as_echo_n "(cached) " >&6
8955else
8956  case $LN in
8957  [\\/]* | ?:[\\/]*)
8958  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8959  ;;
8960  *)
8961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  test -z "$as_dir" && as_dir=.
8966    for ac_exec_ext in '' $ac_executable_extensions; do
8967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970    break 2
8971  fi
8972done
8973  done
8974IFS=$as_save_IFS
8975
8976  ;;
8977esac
8978fi
8979LN=$ac_cv_path_LN
8980if test -n "$LN"; then
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8982$as_echo "$LN" >&6; }
8983else
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
8987
8988
8989  test -n "$LN" && break
8990done
8991
8992    else
8993      # If it succeeded, then it was overridden by the user. We will use it
8994      # for the tool.
8995
8996      # First remove it from the list of overridden variables, so we can test
8997      # for unknown variables in the end.
8998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8999
9000      # Check if we try to supply an empty value
9001      if test "x$LN" = x; then
9002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9003$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9005$as_echo_n "checking for LN... " >&6; }
9006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9007$as_echo "disabled" >&6; }
9008      else
9009        # Check if the provided tool contains a complete path.
9010        tool_specified="$LN"
9011        tool_basename="${tool_specified##*/}"
9012        if test "x$tool_basename" = "x$tool_specified"; then
9013          # A command without a complete path is provided, search $PATH.
9014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9015$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9016          # Extract the first word of "$tool_basename", so it can be a program name with args.
9017set dummy $tool_basename; ac_word=$2
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9019$as_echo_n "checking for $ac_word... " >&6; }
9020if ${ac_cv_path_LN+:} false; then :
9021  $as_echo_n "(cached) " >&6
9022else
9023  case $LN in
9024  [\\/]* | ?:[\\/]*)
9025  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9026  ;;
9027  *)
9028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029for as_dir in $PATH
9030do
9031  IFS=$as_save_IFS
9032  test -z "$as_dir" && as_dir=.
9033    for ac_exec_ext in '' $ac_executable_extensions; do
9034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037    break 2
9038  fi
9039done
9040  done
9041IFS=$as_save_IFS
9042
9043  ;;
9044esac
9045fi
9046LN=$ac_cv_path_LN
9047if test -n "$LN"; then
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9049$as_echo "$LN" >&6; }
9050else
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052$as_echo "no" >&6; }
9053fi
9054
9055
9056          if test "x$LN" = x; then
9057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9058          fi
9059        else
9060          # Otherwise we believe it is a complete path. Use it as it is.
9061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9062$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9064$as_echo_n "checking for LN... " >&6; }
9065          if test ! -x "$tool_specified"; then
9066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9067$as_echo "not found" >&6; }
9068            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9069          fi
9070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9071$as_echo "$tool_specified" >&6; }
9072        fi
9073      fi
9074    fi
9075
9076  fi
9077
9078
9079
9080  if test "x$LN" = x; then
9081    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9082  fi
9083
9084
9085
9086
9087
9088  # Publish this variable in the help.
9089
9090
9091  if [ -z "${LS+x}" ]; then
9092    # The variable is not set by user, try to locate tool using the code snippet
9093    for ac_prog in ls
9094do
9095  # Extract the first word of "$ac_prog", so it can be a program name with args.
9096set dummy $ac_prog; ac_word=$2
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9098$as_echo_n "checking for $ac_word... " >&6; }
9099if ${ac_cv_path_LS+:} false; then :
9100  $as_echo_n "(cached) " >&6
9101else
9102  case $LS in
9103  [\\/]* | ?:[\\/]*)
9104  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9105  ;;
9106  *)
9107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9108for as_dir in $PATH
9109do
9110  IFS=$as_save_IFS
9111  test -z "$as_dir" && as_dir=.
9112    for ac_exec_ext in '' $ac_executable_extensions; do
9113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9114    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9116    break 2
9117  fi
9118done
9119  done
9120IFS=$as_save_IFS
9121
9122  ;;
9123esac
9124fi
9125LS=$ac_cv_path_LS
9126if test -n "$LS"; then
9127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9128$as_echo "$LS" >&6; }
9129else
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
9132fi
9133
9134
9135  test -n "$LS" && break
9136done
9137
9138  else
9139    # The variable is set, but is it from the command line or the environment?
9140
9141    # Try to remove the string !LS! from our list.
9142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9144      # If it failed, the variable was not from the command line. Ignore it,
9145      # but warn the user (except for BASH, which is always set by the calling BASH).
9146      if test "xLS" != xBASH; then
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9148$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9149      fi
9150      # Try to locate tool using the code snippet
9151      for ac_prog in ls
9152do
9153  # Extract the first word of "$ac_prog", so it can be a program name with args.
9154set dummy $ac_prog; ac_word=$2
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9156$as_echo_n "checking for $ac_word... " >&6; }
9157if ${ac_cv_path_LS+:} false; then :
9158  $as_echo_n "(cached) " >&6
9159else
9160  case $LS in
9161  [\\/]* | ?:[\\/]*)
9162  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9163  ;;
9164  *)
9165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9166for as_dir in $PATH
9167do
9168  IFS=$as_save_IFS
9169  test -z "$as_dir" && as_dir=.
9170    for ac_exec_ext in '' $ac_executable_extensions; do
9171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9172    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9174    break 2
9175  fi
9176done
9177  done
9178IFS=$as_save_IFS
9179
9180  ;;
9181esac
9182fi
9183LS=$ac_cv_path_LS
9184if test -n "$LS"; then
9185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9186$as_echo "$LS" >&6; }
9187else
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9189$as_echo "no" >&6; }
9190fi
9191
9192
9193  test -n "$LS" && break
9194done
9195
9196    else
9197      # If it succeeded, then it was overridden by the user. We will use it
9198      # for the tool.
9199
9200      # First remove it from the list of overridden variables, so we can test
9201      # for unknown variables in the end.
9202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9203
9204      # Check if we try to supply an empty value
9205      if test "x$LS" = x; then
9206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9207$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9209$as_echo_n "checking for LS... " >&6; }
9210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9211$as_echo "disabled" >&6; }
9212      else
9213        # Check if the provided tool contains a complete path.
9214        tool_specified="$LS"
9215        tool_basename="${tool_specified##*/}"
9216        if test "x$tool_basename" = "x$tool_specified"; then
9217          # A command without a complete path is provided, search $PATH.
9218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9219$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9220          # Extract the first word of "$tool_basename", so it can be a program name with args.
9221set dummy $tool_basename; ac_word=$2
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9223$as_echo_n "checking for $ac_word... " >&6; }
9224if ${ac_cv_path_LS+:} false; then :
9225  $as_echo_n "(cached) " >&6
9226else
9227  case $LS in
9228  [\\/]* | ?:[\\/]*)
9229  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9230  ;;
9231  *)
9232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9233for as_dir in $PATH
9234do
9235  IFS=$as_save_IFS
9236  test -z "$as_dir" && as_dir=.
9237    for ac_exec_ext in '' $ac_executable_extensions; do
9238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9239    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9241    break 2
9242  fi
9243done
9244  done
9245IFS=$as_save_IFS
9246
9247  ;;
9248esac
9249fi
9250LS=$ac_cv_path_LS
9251if test -n "$LS"; then
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9253$as_echo "$LS" >&6; }
9254else
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256$as_echo "no" >&6; }
9257fi
9258
9259
9260          if test "x$LS" = x; then
9261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9262          fi
9263        else
9264          # Otherwise we believe it is a complete path. Use it as it is.
9265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9266$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9268$as_echo_n "checking for LS... " >&6; }
9269          if test ! -x "$tool_specified"; then
9270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9271$as_echo "not found" >&6; }
9272            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9273          fi
9274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9275$as_echo "$tool_specified" >&6; }
9276        fi
9277      fi
9278    fi
9279
9280  fi
9281
9282
9283
9284  if test "x$LS" = x; then
9285    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9286  fi
9287
9288
9289
9290
9291
9292  # Publish this variable in the help.
9293
9294
9295  if [ -z "${MKDIR+x}" ]; then
9296    # The variable is not set by user, try to locate tool using the code snippet
9297    for ac_prog in mkdir
9298do
9299  # Extract the first word of "$ac_prog", so it can be a program name with args.
9300set dummy $ac_prog; ac_word=$2
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9302$as_echo_n "checking for $ac_word... " >&6; }
9303if ${ac_cv_path_MKDIR+:} false; then :
9304  $as_echo_n "(cached) " >&6
9305else
9306  case $MKDIR in
9307  [\\/]* | ?:[\\/]*)
9308  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9309  ;;
9310  *)
9311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312for as_dir in $PATH
9313do
9314  IFS=$as_save_IFS
9315  test -z "$as_dir" && as_dir=.
9316    for ac_exec_ext in '' $ac_executable_extensions; do
9317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9318    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9320    break 2
9321  fi
9322done
9323  done
9324IFS=$as_save_IFS
9325
9326  ;;
9327esac
9328fi
9329MKDIR=$ac_cv_path_MKDIR
9330if test -n "$MKDIR"; then
9331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9332$as_echo "$MKDIR" >&6; }
9333else
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
9336fi
9337
9338
9339  test -n "$MKDIR" && break
9340done
9341
9342  else
9343    # The variable is set, but is it from the command line or the environment?
9344
9345    # Try to remove the string !MKDIR! from our list.
9346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9348      # If it failed, the variable was not from the command line. Ignore it,
9349      # but warn the user (except for BASH, which is always set by the calling BASH).
9350      if test "xMKDIR" != xBASH; then
9351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9352$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9353      fi
9354      # Try to locate tool using the code snippet
9355      for ac_prog in mkdir
9356do
9357  # Extract the first word of "$ac_prog", so it can be a program name with args.
9358set dummy $ac_prog; ac_word=$2
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360$as_echo_n "checking for $ac_word... " >&6; }
9361if ${ac_cv_path_MKDIR+:} false; then :
9362  $as_echo_n "(cached) " >&6
9363else
9364  case $MKDIR in
9365  [\\/]* | ?:[\\/]*)
9366  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9367  ;;
9368  *)
9369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9370for as_dir in $PATH
9371do
9372  IFS=$as_save_IFS
9373  test -z "$as_dir" && as_dir=.
9374    for ac_exec_ext in '' $ac_executable_extensions; do
9375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9376    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9378    break 2
9379  fi
9380done
9381  done
9382IFS=$as_save_IFS
9383
9384  ;;
9385esac
9386fi
9387MKDIR=$ac_cv_path_MKDIR
9388if test -n "$MKDIR"; then
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9390$as_echo "$MKDIR" >&6; }
9391else
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
9394fi
9395
9396
9397  test -n "$MKDIR" && break
9398done
9399
9400    else
9401      # If it succeeded, then it was overridden by the user. We will use it
9402      # for the tool.
9403
9404      # First remove it from the list of overridden variables, so we can test
9405      # for unknown variables in the end.
9406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9407
9408      # Check if we try to supply an empty value
9409      if test "x$MKDIR" = x; then
9410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9411$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9413$as_echo_n "checking for MKDIR... " >&6; }
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9415$as_echo "disabled" >&6; }
9416      else
9417        # Check if the provided tool contains a complete path.
9418        tool_specified="$MKDIR"
9419        tool_basename="${tool_specified##*/}"
9420        if test "x$tool_basename" = "x$tool_specified"; then
9421          # A command without a complete path is provided, search $PATH.
9422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9423$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9424          # Extract the first word of "$tool_basename", so it can be a program name with args.
9425set dummy $tool_basename; ac_word=$2
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427$as_echo_n "checking for $ac_word... " >&6; }
9428if ${ac_cv_path_MKDIR+:} false; then :
9429  $as_echo_n "(cached) " >&6
9430else
9431  case $MKDIR in
9432  [\\/]* | ?:[\\/]*)
9433  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9434  ;;
9435  *)
9436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437for as_dir in $PATH
9438do
9439  IFS=$as_save_IFS
9440  test -z "$as_dir" && as_dir=.
9441    for ac_exec_ext in '' $ac_executable_extensions; do
9442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9443    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445    break 2
9446  fi
9447done
9448  done
9449IFS=$as_save_IFS
9450
9451  ;;
9452esac
9453fi
9454MKDIR=$ac_cv_path_MKDIR
9455if test -n "$MKDIR"; then
9456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9457$as_echo "$MKDIR" >&6; }
9458else
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
9461fi
9462
9463
9464          if test "x$MKDIR" = x; then
9465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9466          fi
9467        else
9468          # Otherwise we believe it is a complete path. Use it as it is.
9469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9470$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9472$as_echo_n "checking for MKDIR... " >&6; }
9473          if test ! -x "$tool_specified"; then
9474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9475$as_echo "not found" >&6; }
9476            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9477          fi
9478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9479$as_echo "$tool_specified" >&6; }
9480        fi
9481      fi
9482    fi
9483
9484  fi
9485
9486
9487
9488  if test "x$MKDIR" = x; then
9489    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9490  fi
9491
9492
9493
9494
9495
9496  # Publish this variable in the help.
9497
9498
9499  if [ -z "${MKTEMP+x}" ]; then
9500    # The variable is not set by user, try to locate tool using the code snippet
9501    for ac_prog in mktemp
9502do
9503  # Extract the first word of "$ac_prog", so it can be a program name with args.
9504set dummy $ac_prog; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_MKTEMP+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $MKTEMP in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533MKTEMP=$ac_cv_path_MKTEMP
9534if test -n "$MKTEMP"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9536$as_echo "$MKTEMP" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543  test -n "$MKTEMP" && break
9544done
9545
9546  else
9547    # The variable is set, but is it from the command line or the environment?
9548
9549    # Try to remove the string !MKTEMP! from our list.
9550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9552      # If it failed, the variable was not from the command line. Ignore it,
9553      # but warn the user (except for BASH, which is always set by the calling BASH).
9554      if test "xMKTEMP" != xBASH; then
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9556$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9557      fi
9558      # Try to locate tool using the code snippet
9559      for ac_prog in mktemp
9560do
9561  # Extract the first word of "$ac_prog", so it can be a program name with args.
9562set dummy $ac_prog; ac_word=$2
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564$as_echo_n "checking for $ac_word... " >&6; }
9565if ${ac_cv_path_MKTEMP+:} false; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  case $MKTEMP in
9569  [\\/]* | ?:[\\/]*)
9570  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9571  ;;
9572  *)
9573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574for as_dir in $PATH
9575do
9576  IFS=$as_save_IFS
9577  test -z "$as_dir" && as_dir=.
9578    for ac_exec_ext in '' $ac_executable_extensions; do
9579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582    break 2
9583  fi
9584done
9585  done
9586IFS=$as_save_IFS
9587
9588  ;;
9589esac
9590fi
9591MKTEMP=$ac_cv_path_MKTEMP
9592if test -n "$MKTEMP"; then
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9594$as_echo "$MKTEMP" >&6; }
9595else
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
9598fi
9599
9600
9601  test -n "$MKTEMP" && break
9602done
9603
9604    else
9605      # If it succeeded, then it was overridden by the user. We will use it
9606      # for the tool.
9607
9608      # First remove it from the list of overridden variables, so we can test
9609      # for unknown variables in the end.
9610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9611
9612      # Check if we try to supply an empty value
9613      if test "x$MKTEMP" = x; then
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9615$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9617$as_echo_n "checking for MKTEMP... " >&6; }
9618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9619$as_echo "disabled" >&6; }
9620      else
9621        # Check if the provided tool contains a complete path.
9622        tool_specified="$MKTEMP"
9623        tool_basename="${tool_specified##*/}"
9624        if test "x$tool_basename" = "x$tool_specified"; then
9625          # A command without a complete path is provided, search $PATH.
9626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9627$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9628          # Extract the first word of "$tool_basename", so it can be a program name with args.
9629set dummy $tool_basename; ac_word=$2
9630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631$as_echo_n "checking for $ac_word... " >&6; }
9632if ${ac_cv_path_MKTEMP+:} false; then :
9633  $as_echo_n "(cached) " >&6
9634else
9635  case $MKTEMP in
9636  [\\/]* | ?:[\\/]*)
9637  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9638  ;;
9639  *)
9640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641for as_dir in $PATH
9642do
9643  IFS=$as_save_IFS
9644  test -z "$as_dir" && as_dir=.
9645    for ac_exec_ext in '' $ac_executable_extensions; do
9646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9647    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9649    break 2
9650  fi
9651done
9652  done
9653IFS=$as_save_IFS
9654
9655  ;;
9656esac
9657fi
9658MKTEMP=$ac_cv_path_MKTEMP
9659if test -n "$MKTEMP"; then
9660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9661$as_echo "$MKTEMP" >&6; }
9662else
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
9665fi
9666
9667
9668          if test "x$MKTEMP" = x; then
9669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9670          fi
9671        else
9672          # Otherwise we believe it is a complete path. Use it as it is.
9673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9674$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9676$as_echo_n "checking for MKTEMP... " >&6; }
9677          if test ! -x "$tool_specified"; then
9678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9679$as_echo "not found" >&6; }
9680            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9681          fi
9682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9683$as_echo "$tool_specified" >&6; }
9684        fi
9685      fi
9686    fi
9687
9688  fi
9689
9690
9691
9692  if test "x$MKTEMP" = x; then
9693    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9694  fi
9695
9696
9697
9698
9699
9700  # Publish this variable in the help.
9701
9702
9703  if [ -z "${MV+x}" ]; then
9704    # The variable is not set by user, try to locate tool using the code snippet
9705    for ac_prog in mv
9706do
9707  # Extract the first word of "$ac_prog", so it can be a program name with args.
9708set dummy $ac_prog; ac_word=$2
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9710$as_echo_n "checking for $ac_word... " >&6; }
9711if ${ac_cv_path_MV+:} false; then :
9712  $as_echo_n "(cached) " >&6
9713else
9714  case $MV in
9715  [\\/]* | ?:[\\/]*)
9716  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9717  ;;
9718  *)
9719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9720for as_dir in $PATH
9721do
9722  IFS=$as_save_IFS
9723  test -z "$as_dir" && as_dir=.
9724    for ac_exec_ext in '' $ac_executable_extensions; do
9725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9726    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9728    break 2
9729  fi
9730done
9731  done
9732IFS=$as_save_IFS
9733
9734  ;;
9735esac
9736fi
9737MV=$ac_cv_path_MV
9738if test -n "$MV"; then
9739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9740$as_echo "$MV" >&6; }
9741else
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9743$as_echo "no" >&6; }
9744fi
9745
9746
9747  test -n "$MV" && break
9748done
9749
9750  else
9751    # The variable is set, but is it from the command line or the environment?
9752
9753    # Try to remove the string !MV! from our list.
9754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9756      # If it failed, the variable was not from the command line. Ignore it,
9757      # but warn the user (except for BASH, which is always set by the calling BASH).
9758      if test "xMV" != xBASH; then
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9760$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9761      fi
9762      # Try to locate tool using the code snippet
9763      for ac_prog in mv
9764do
9765  # Extract the first word of "$ac_prog", so it can be a program name with args.
9766set dummy $ac_prog; ac_word=$2
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9768$as_echo_n "checking for $ac_word... " >&6; }
9769if ${ac_cv_path_MV+:} false; then :
9770  $as_echo_n "(cached) " >&6
9771else
9772  case $MV in
9773  [\\/]* | ?:[\\/]*)
9774  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9775  ;;
9776  *)
9777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9778for as_dir in $PATH
9779do
9780  IFS=$as_save_IFS
9781  test -z "$as_dir" && as_dir=.
9782    for ac_exec_ext in '' $ac_executable_extensions; do
9783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9784    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9786    break 2
9787  fi
9788done
9789  done
9790IFS=$as_save_IFS
9791
9792  ;;
9793esac
9794fi
9795MV=$ac_cv_path_MV
9796if test -n "$MV"; then
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9798$as_echo "$MV" >&6; }
9799else
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
9802fi
9803
9804
9805  test -n "$MV" && break
9806done
9807
9808    else
9809      # If it succeeded, then it was overridden by the user. We will use it
9810      # for the tool.
9811
9812      # First remove it from the list of overridden variables, so we can test
9813      # for unknown variables in the end.
9814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9815
9816      # Check if we try to supply an empty value
9817      if test "x$MV" = x; then
9818        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9819$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9821$as_echo_n "checking for MV... " >&6; }
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9823$as_echo "disabled" >&6; }
9824      else
9825        # Check if the provided tool contains a complete path.
9826        tool_specified="$MV"
9827        tool_basename="${tool_specified##*/}"
9828        if test "x$tool_basename" = "x$tool_specified"; then
9829          # A command without a complete path is provided, search $PATH.
9830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9831$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9832          # Extract the first word of "$tool_basename", so it can be a program name with args.
9833set dummy $tool_basename; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_MV+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $MV in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862MV=$ac_cv_path_MV
9863if test -n "$MV"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9865$as_echo "$MV" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872          if test "x$MV" = x; then
9873            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9874          fi
9875        else
9876          # Otherwise we believe it is a complete path. Use it as it is.
9877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9878$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9879          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9880$as_echo_n "checking for MV... " >&6; }
9881          if test ! -x "$tool_specified"; then
9882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9883$as_echo "not found" >&6; }
9884            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9885          fi
9886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9887$as_echo "$tool_specified" >&6; }
9888        fi
9889      fi
9890    fi
9891
9892  fi
9893
9894
9895
9896  if test "x$MV" = x; then
9897    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9898  fi
9899
9900
9901
9902
9903
9904  # Publish this variable in the help.
9905
9906
9907  if [ -z "${NAWK+x}" ]; then
9908    # The variable is not set by user, try to locate tool using the code snippet
9909    for ac_prog in nawk gawk awk
9910do
9911  # Extract the first word of "$ac_prog", so it can be a program name with args.
9912set dummy $ac_prog; ac_word=$2
9913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914$as_echo_n "checking for $ac_word... " >&6; }
9915if ${ac_cv_path_NAWK+:} false; then :
9916  $as_echo_n "(cached) " >&6
9917else
9918  case $NAWK in
9919  [\\/]* | ?:[\\/]*)
9920  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9921  ;;
9922  *)
9923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924for as_dir in $PATH
9925do
9926  IFS=$as_save_IFS
9927  test -z "$as_dir" && as_dir=.
9928    for ac_exec_ext in '' $ac_executable_extensions; do
9929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932    break 2
9933  fi
9934done
9935  done
9936IFS=$as_save_IFS
9937
9938  ;;
9939esac
9940fi
9941NAWK=$ac_cv_path_NAWK
9942if test -n "$NAWK"; then
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9944$as_echo "$NAWK" >&6; }
9945else
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
9948fi
9949
9950
9951  test -n "$NAWK" && break
9952done
9953
9954  else
9955    # The variable is set, but is it from the command line or the environment?
9956
9957    # Try to remove the string !NAWK! from our list.
9958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9960      # If it failed, the variable was not from the command line. Ignore it,
9961      # but warn the user (except for BASH, which is always set by the calling BASH).
9962      if test "xNAWK" != xBASH; then
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9964$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9965      fi
9966      # Try to locate tool using the code snippet
9967      for ac_prog in nawk gawk awk
9968do
9969  # Extract the first word of "$ac_prog", so it can be a program name with args.
9970set dummy $ac_prog; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if ${ac_cv_path_NAWK+:} false; then :
9974  $as_echo_n "(cached) " >&6
9975else
9976  case $NAWK in
9977  [\\/]* | ?:[\\/]*)
9978  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9979  ;;
9980  *)
9981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982for as_dir in $PATH
9983do
9984  IFS=$as_save_IFS
9985  test -z "$as_dir" && as_dir=.
9986    for ac_exec_ext in '' $ac_executable_extensions; do
9987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990    break 2
9991  fi
9992done
9993  done
9994IFS=$as_save_IFS
9995
9996  ;;
9997esac
9998fi
9999NAWK=$ac_cv_path_NAWK
10000if test -n "$NAWK"; then
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10002$as_echo "$NAWK" >&6; }
10003else
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
10006fi
10007
10008
10009  test -n "$NAWK" && break
10010done
10011
10012    else
10013      # If it succeeded, then it was overridden by the user. We will use it
10014      # for the tool.
10015
10016      # First remove it from the list of overridden variables, so we can test
10017      # for unknown variables in the end.
10018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10019
10020      # Check if we try to supply an empty value
10021      if test "x$NAWK" = x; then
10022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10023$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10025$as_echo_n "checking for NAWK... " >&6; }
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10027$as_echo "disabled" >&6; }
10028      else
10029        # Check if the provided tool contains a complete path.
10030        tool_specified="$NAWK"
10031        tool_basename="${tool_specified##*/}"
10032        if test "x$tool_basename" = "x$tool_specified"; then
10033          # A command without a complete path is provided, search $PATH.
10034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10035$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10036          # Extract the first word of "$tool_basename", so it can be a program name with args.
10037set dummy $tool_basename; ac_word=$2
10038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039$as_echo_n "checking for $ac_word... " >&6; }
10040if ${ac_cv_path_NAWK+:} false; then :
10041  $as_echo_n "(cached) " >&6
10042else
10043  case $NAWK in
10044  [\\/]* | ?:[\\/]*)
10045  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10046  ;;
10047  *)
10048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049for as_dir in $PATH
10050do
10051  IFS=$as_save_IFS
10052  test -z "$as_dir" && as_dir=.
10053    for ac_exec_ext in '' $ac_executable_extensions; do
10054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057    break 2
10058  fi
10059done
10060  done
10061IFS=$as_save_IFS
10062
10063  ;;
10064esac
10065fi
10066NAWK=$ac_cv_path_NAWK
10067if test -n "$NAWK"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10069$as_echo "$NAWK" >&6; }
10070else
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076          if test "x$NAWK" = x; then
10077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10078          fi
10079        else
10080          # Otherwise we believe it is a complete path. Use it as it is.
10081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10082$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10084$as_echo_n "checking for NAWK... " >&6; }
10085          if test ! -x "$tool_specified"; then
10086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10087$as_echo "not found" >&6; }
10088            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10089          fi
10090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10091$as_echo "$tool_specified" >&6; }
10092        fi
10093      fi
10094    fi
10095
10096  fi
10097
10098
10099
10100  if test "x$NAWK" = x; then
10101    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10102  fi
10103
10104
10105
10106
10107
10108  # Publish this variable in the help.
10109
10110
10111  if [ -z "${PRINTF+x}" ]; then
10112    # The variable is not set by user, try to locate tool using the code snippet
10113    for ac_prog in printf
10114do
10115  # Extract the first word of "$ac_prog", so it can be a program name with args.
10116set dummy $ac_prog; ac_word=$2
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10118$as_echo_n "checking for $ac_word... " >&6; }
10119if ${ac_cv_path_PRINTF+:} false; then :
10120  $as_echo_n "(cached) " >&6
10121else
10122  case $PRINTF in
10123  [\\/]* | ?:[\\/]*)
10124  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10125  ;;
10126  *)
10127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10128for as_dir in $PATH
10129do
10130  IFS=$as_save_IFS
10131  test -z "$as_dir" && as_dir=.
10132    for ac_exec_ext in '' $ac_executable_extensions; do
10133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10134    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10136    break 2
10137  fi
10138done
10139  done
10140IFS=$as_save_IFS
10141
10142  ;;
10143esac
10144fi
10145PRINTF=$ac_cv_path_PRINTF
10146if test -n "$PRINTF"; then
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10148$as_echo "$PRINTF" >&6; }
10149else
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152fi
10153
10154
10155  test -n "$PRINTF" && break
10156done
10157
10158  else
10159    # The variable is set, but is it from the command line or the environment?
10160
10161    # Try to remove the string !PRINTF! from our list.
10162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10164      # If it failed, the variable was not from the command line. Ignore it,
10165      # but warn the user (except for BASH, which is always set by the calling BASH).
10166      if test "xPRINTF" != xBASH; then
10167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10168$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10169      fi
10170      # Try to locate tool using the code snippet
10171      for ac_prog in printf
10172do
10173  # Extract the first word of "$ac_prog", so it can be a program name with args.
10174set dummy $ac_prog; ac_word=$2
10175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10176$as_echo_n "checking for $ac_word... " >&6; }
10177if ${ac_cv_path_PRINTF+:} false; then :
10178  $as_echo_n "(cached) " >&6
10179else
10180  case $PRINTF in
10181  [\\/]* | ?:[\\/]*)
10182  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10183  ;;
10184  *)
10185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10186for as_dir in $PATH
10187do
10188  IFS=$as_save_IFS
10189  test -z "$as_dir" && as_dir=.
10190    for ac_exec_ext in '' $ac_executable_extensions; do
10191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10192    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10194    break 2
10195  fi
10196done
10197  done
10198IFS=$as_save_IFS
10199
10200  ;;
10201esac
10202fi
10203PRINTF=$ac_cv_path_PRINTF
10204if test -n "$PRINTF"; then
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10206$as_echo "$PRINTF" >&6; }
10207else
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
10210fi
10211
10212
10213  test -n "$PRINTF" && break
10214done
10215
10216    else
10217      # If it succeeded, then it was overridden by the user. We will use it
10218      # for the tool.
10219
10220      # First remove it from the list of overridden variables, so we can test
10221      # for unknown variables in the end.
10222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10223
10224      # Check if we try to supply an empty value
10225      if test "x$PRINTF" = x; then
10226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10227$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10229$as_echo_n "checking for PRINTF... " >&6; }
10230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10231$as_echo "disabled" >&6; }
10232      else
10233        # Check if the provided tool contains a complete path.
10234        tool_specified="$PRINTF"
10235        tool_basename="${tool_specified##*/}"
10236        if test "x$tool_basename" = "x$tool_specified"; then
10237          # A command without a complete path is provided, search $PATH.
10238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10239$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10240          # Extract the first word of "$tool_basename", so it can be a program name with args.
10241set dummy $tool_basename; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if ${ac_cv_path_PRINTF+:} false; then :
10245  $as_echo_n "(cached) " >&6
10246else
10247  case $PRINTF in
10248  [\\/]* | ?:[\\/]*)
10249  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10250  ;;
10251  *)
10252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255  IFS=$as_save_IFS
10256  test -z "$as_dir" && as_dir=.
10257    for ac_exec_ext in '' $ac_executable_extensions; do
10258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261    break 2
10262  fi
10263done
10264  done
10265IFS=$as_save_IFS
10266
10267  ;;
10268esac
10269fi
10270PRINTF=$ac_cv_path_PRINTF
10271if test -n "$PRINTF"; then
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10273$as_echo "$PRINTF" >&6; }
10274else
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280          if test "x$PRINTF" = x; then
10281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10282          fi
10283        else
10284          # Otherwise we believe it is a complete path. Use it as it is.
10285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10286$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10288$as_echo_n "checking for PRINTF... " >&6; }
10289          if test ! -x "$tool_specified"; then
10290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10291$as_echo "not found" >&6; }
10292            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10293          fi
10294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10295$as_echo "$tool_specified" >&6; }
10296        fi
10297      fi
10298    fi
10299
10300  fi
10301
10302
10303
10304  if test "x$PRINTF" = x; then
10305    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10306  fi
10307
10308
10309
10310
10311
10312  # Publish this variable in the help.
10313
10314
10315  if [ -z "${RM+x}" ]; then
10316    # The variable is not set by user, try to locate tool using the code snippet
10317    for ac_prog in rm
10318do
10319  # Extract the first word of "$ac_prog", so it can be a program name with args.
10320set dummy $ac_prog; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if ${ac_cv_path_RM+:} false; then :
10324  $as_echo_n "(cached) " >&6
10325else
10326  case $RM in
10327  [\\/]* | ?:[\\/]*)
10328  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10329  ;;
10330  *)
10331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334  IFS=$as_save_IFS
10335  test -z "$as_dir" && as_dir=.
10336    for ac_exec_ext in '' $ac_executable_extensions; do
10337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10338    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340    break 2
10341  fi
10342done
10343  done
10344IFS=$as_save_IFS
10345
10346  ;;
10347esac
10348fi
10349RM=$ac_cv_path_RM
10350if test -n "$RM"; then
10351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10352$as_echo "$RM" >&6; }
10353else
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356fi
10357
10358
10359  test -n "$RM" && break
10360done
10361
10362  else
10363    # The variable is set, but is it from the command line or the environment?
10364
10365    # Try to remove the string !RM! from our list.
10366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10368      # If it failed, the variable was not from the command line. Ignore it,
10369      # but warn the user (except for BASH, which is always set by the calling BASH).
10370      if test "xRM" != xBASH; then
10371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10372$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10373      fi
10374      # Try to locate tool using the code snippet
10375      for ac_prog in rm
10376do
10377  # Extract the first word of "$ac_prog", so it can be a program name with args.
10378set dummy $ac_prog; ac_word=$2
10379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10380$as_echo_n "checking for $ac_word... " >&6; }
10381if ${ac_cv_path_RM+:} false; then :
10382  $as_echo_n "(cached) " >&6
10383else
10384  case $RM in
10385  [\\/]* | ?:[\\/]*)
10386  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10387  ;;
10388  *)
10389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10390for as_dir in $PATH
10391do
10392  IFS=$as_save_IFS
10393  test -z "$as_dir" && as_dir=.
10394    for ac_exec_ext in '' $ac_executable_extensions; do
10395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10396    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10398    break 2
10399  fi
10400done
10401  done
10402IFS=$as_save_IFS
10403
10404  ;;
10405esac
10406fi
10407RM=$ac_cv_path_RM
10408if test -n "$RM"; then
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10410$as_echo "$RM" >&6; }
10411else
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415
10416
10417  test -n "$RM" && break
10418done
10419
10420    else
10421      # If it succeeded, then it was overridden by the user. We will use it
10422      # for the tool.
10423
10424      # First remove it from the list of overridden variables, so we can test
10425      # for unknown variables in the end.
10426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10427
10428      # Check if we try to supply an empty value
10429      if test "x$RM" = x; then
10430        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10431$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10433$as_echo_n "checking for RM... " >&6; }
10434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10435$as_echo "disabled" >&6; }
10436      else
10437        # Check if the provided tool contains a complete path.
10438        tool_specified="$RM"
10439        tool_basename="${tool_specified##*/}"
10440        if test "x$tool_basename" = "x$tool_specified"; then
10441          # A command without a complete path is provided, search $PATH.
10442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10443$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10444          # Extract the first word of "$tool_basename", so it can be a program name with args.
10445set dummy $tool_basename; ac_word=$2
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10447$as_echo_n "checking for $ac_word... " >&6; }
10448if ${ac_cv_path_RM+:} false; then :
10449  $as_echo_n "(cached) " >&6
10450else
10451  case $RM in
10452  [\\/]* | ?:[\\/]*)
10453  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10454  ;;
10455  *)
10456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10457for as_dir in $PATH
10458do
10459  IFS=$as_save_IFS
10460  test -z "$as_dir" && as_dir=.
10461    for ac_exec_ext in '' $ac_executable_extensions; do
10462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10463    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10465    break 2
10466  fi
10467done
10468  done
10469IFS=$as_save_IFS
10470
10471  ;;
10472esac
10473fi
10474RM=$ac_cv_path_RM
10475if test -n "$RM"; then
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10477$as_echo "$RM" >&6; }
10478else
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480$as_echo "no" >&6; }
10481fi
10482
10483
10484          if test "x$RM" = x; then
10485            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10486          fi
10487        else
10488          # Otherwise we believe it is a complete path. Use it as it is.
10489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10490$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10491          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10492$as_echo_n "checking for RM... " >&6; }
10493          if test ! -x "$tool_specified"; then
10494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10495$as_echo "not found" >&6; }
10496            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10497          fi
10498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10499$as_echo "$tool_specified" >&6; }
10500        fi
10501      fi
10502    fi
10503
10504  fi
10505
10506
10507
10508  if test "x$RM" = x; then
10509    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10510  fi
10511
10512
10513
10514
10515
10516  # Publish this variable in the help.
10517
10518
10519  if [ -z "${RMDIR+x}" ]; then
10520    # The variable is not set by user, try to locate tool using the code snippet
10521    for ac_prog in rmdir
10522do
10523  # Extract the first word of "$ac_prog", so it can be a program name with args.
10524set dummy $ac_prog; ac_word=$2
10525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10526$as_echo_n "checking for $ac_word... " >&6; }
10527if ${ac_cv_path_RMDIR+:} false; then :
10528  $as_echo_n "(cached) " >&6
10529else
10530  case $RMDIR in
10531  [\\/]* | ?:[\\/]*)
10532  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10533  ;;
10534  *)
10535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10536for as_dir in $PATH
10537do
10538  IFS=$as_save_IFS
10539  test -z "$as_dir" && as_dir=.
10540    for ac_exec_ext in '' $ac_executable_extensions; do
10541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10542    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10544    break 2
10545  fi
10546done
10547  done
10548IFS=$as_save_IFS
10549
10550  ;;
10551esac
10552fi
10553RMDIR=$ac_cv_path_RMDIR
10554if test -n "$RMDIR"; then
10555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10556$as_echo "$RMDIR" >&6; }
10557else
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10559$as_echo "no" >&6; }
10560fi
10561
10562
10563  test -n "$RMDIR" && break
10564done
10565
10566  else
10567    # The variable is set, but is it from the command line or the environment?
10568
10569    # Try to remove the string !RMDIR! from our list.
10570    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10571    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10572      # If it failed, the variable was not from the command line. Ignore it,
10573      # but warn the user (except for BASH, which is always set by the calling BASH).
10574      if test "xRMDIR" != xBASH; then
10575        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10576$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10577      fi
10578      # Try to locate tool using the code snippet
10579      for ac_prog in rmdir
10580do
10581  # Extract the first word of "$ac_prog", so it can be a program name with args.
10582set dummy $ac_prog; ac_word=$2
10583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10584$as_echo_n "checking for $ac_word... " >&6; }
10585if ${ac_cv_path_RMDIR+:} false; then :
10586  $as_echo_n "(cached) " >&6
10587else
10588  case $RMDIR in
10589  [\\/]* | ?:[\\/]*)
10590  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10591  ;;
10592  *)
10593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10594for as_dir in $PATH
10595do
10596  IFS=$as_save_IFS
10597  test -z "$as_dir" && as_dir=.
10598    for ac_exec_ext in '' $ac_executable_extensions; do
10599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10600    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10602    break 2
10603  fi
10604done
10605  done
10606IFS=$as_save_IFS
10607
10608  ;;
10609esac
10610fi
10611RMDIR=$ac_cv_path_RMDIR
10612if test -n "$RMDIR"; then
10613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10614$as_echo "$RMDIR" >&6; }
10615else
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
10618fi
10619
10620
10621  test -n "$RMDIR" && break
10622done
10623
10624    else
10625      # If it succeeded, then it was overridden by the user. We will use it
10626      # for the tool.
10627
10628      # First remove it from the list of overridden variables, so we can test
10629      # for unknown variables in the end.
10630      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10631
10632      # Check if we try to supply an empty value
10633      if test "x$RMDIR" = x; then
10634        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10635$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10637$as_echo_n "checking for RMDIR... " >&6; }
10638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10639$as_echo "disabled" >&6; }
10640      else
10641        # Check if the provided tool contains a complete path.
10642        tool_specified="$RMDIR"
10643        tool_basename="${tool_specified##*/}"
10644        if test "x$tool_basename" = "x$tool_specified"; then
10645          # A command without a complete path is provided, search $PATH.
10646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10647$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10648          # Extract the first word of "$tool_basename", so it can be a program name with args.
10649set dummy $tool_basename; ac_word=$2
10650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651$as_echo_n "checking for $ac_word... " >&6; }
10652if ${ac_cv_path_RMDIR+:} false; then :
10653  $as_echo_n "(cached) " >&6
10654else
10655  case $RMDIR in
10656  [\\/]* | ?:[\\/]*)
10657  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10658  ;;
10659  *)
10660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675  ;;
10676esac
10677fi
10678RMDIR=$ac_cv_path_RMDIR
10679if test -n "$RMDIR"; then
10680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10681$as_echo "$RMDIR" >&6; }
10682else
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685fi
10686
10687
10688          if test "x$RMDIR" = x; then
10689            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10690          fi
10691        else
10692          # Otherwise we believe it is a complete path. Use it as it is.
10693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10694$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10695          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10696$as_echo_n "checking for RMDIR... " >&6; }
10697          if test ! -x "$tool_specified"; then
10698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10699$as_echo "not found" >&6; }
10700            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10701          fi
10702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10703$as_echo "$tool_specified" >&6; }
10704        fi
10705      fi
10706    fi
10707
10708  fi
10709
10710
10711
10712  if test "x$RMDIR" = x; then
10713    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10714  fi
10715
10716
10717
10718
10719
10720  # Publish this variable in the help.
10721
10722
10723  if [ -z "${SH+x}" ]; then
10724    # The variable is not set by user, try to locate tool using the code snippet
10725    for ac_prog in sh
10726do
10727  # Extract the first word of "$ac_prog", so it can be a program name with args.
10728set dummy $ac_prog; ac_word=$2
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10730$as_echo_n "checking for $ac_word... " >&6; }
10731if ${ac_cv_path_SH+:} false; then :
10732  $as_echo_n "(cached) " >&6
10733else
10734  case $SH in
10735  [\\/]* | ?:[\\/]*)
10736  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10737  ;;
10738  *)
10739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10740for as_dir in $PATH
10741do
10742  IFS=$as_save_IFS
10743  test -z "$as_dir" && as_dir=.
10744    for ac_exec_ext in '' $ac_executable_extensions; do
10745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10746    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10748    break 2
10749  fi
10750done
10751  done
10752IFS=$as_save_IFS
10753
10754  ;;
10755esac
10756fi
10757SH=$ac_cv_path_SH
10758if test -n "$SH"; then
10759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10760$as_echo "$SH" >&6; }
10761else
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
10764fi
10765
10766
10767  test -n "$SH" && break
10768done
10769
10770  else
10771    # The variable is set, but is it from the command line or the environment?
10772
10773    # Try to remove the string !SH! from our list.
10774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10776      # If it failed, the variable was not from the command line. Ignore it,
10777      # but warn the user (except for BASH, which is always set by the calling BASH).
10778      if test "xSH" != xBASH; then
10779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10780$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10781      fi
10782      # Try to locate tool using the code snippet
10783      for ac_prog in sh
10784do
10785  # Extract the first word of "$ac_prog", so it can be a program name with args.
10786set dummy $ac_prog; ac_word=$2
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10788$as_echo_n "checking for $ac_word... " >&6; }
10789if ${ac_cv_path_SH+:} false; then :
10790  $as_echo_n "(cached) " >&6
10791else
10792  case $SH in
10793  [\\/]* | ?:[\\/]*)
10794  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10795  ;;
10796  *)
10797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10798for as_dir in $PATH
10799do
10800  IFS=$as_save_IFS
10801  test -z "$as_dir" && as_dir=.
10802    for ac_exec_ext in '' $ac_executable_extensions; do
10803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10804    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10806    break 2
10807  fi
10808done
10809  done
10810IFS=$as_save_IFS
10811
10812  ;;
10813esac
10814fi
10815SH=$ac_cv_path_SH
10816if test -n "$SH"; then
10817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10818$as_echo "$SH" >&6; }
10819else
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10821$as_echo "no" >&6; }
10822fi
10823
10824
10825  test -n "$SH" && break
10826done
10827
10828    else
10829      # If it succeeded, then it was overridden by the user. We will use it
10830      # for the tool.
10831
10832      # First remove it from the list of overridden variables, so we can test
10833      # for unknown variables in the end.
10834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10835
10836      # Check if we try to supply an empty value
10837      if test "x$SH" = x; then
10838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10839$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10841$as_echo_n "checking for SH... " >&6; }
10842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10843$as_echo "disabled" >&6; }
10844      else
10845        # Check if the provided tool contains a complete path.
10846        tool_specified="$SH"
10847        tool_basename="${tool_specified##*/}"
10848        if test "x$tool_basename" = "x$tool_specified"; then
10849          # A command without a complete path is provided, search $PATH.
10850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10851$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10852          # Extract the first word of "$tool_basename", so it can be a program name with args.
10853set dummy $tool_basename; ac_word=$2
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10855$as_echo_n "checking for $ac_word... " >&6; }
10856if ${ac_cv_path_SH+:} false; then :
10857  $as_echo_n "(cached) " >&6
10858else
10859  case $SH in
10860  [\\/]* | ?:[\\/]*)
10861  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10862  ;;
10863  *)
10864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865for as_dir in $PATH
10866do
10867  IFS=$as_save_IFS
10868  test -z "$as_dir" && as_dir=.
10869    for ac_exec_ext in '' $ac_executable_extensions; do
10870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873    break 2
10874  fi
10875done
10876  done
10877IFS=$as_save_IFS
10878
10879  ;;
10880esac
10881fi
10882SH=$ac_cv_path_SH
10883if test -n "$SH"; then
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10885$as_echo "$SH" >&6; }
10886else
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
10889fi
10890
10891
10892          if test "x$SH" = x; then
10893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10894          fi
10895        else
10896          # Otherwise we believe it is a complete path. Use it as it is.
10897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10898$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10900$as_echo_n "checking for SH... " >&6; }
10901          if test ! -x "$tool_specified"; then
10902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10903$as_echo "not found" >&6; }
10904            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10905          fi
10906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10907$as_echo "$tool_specified" >&6; }
10908        fi
10909      fi
10910    fi
10911
10912  fi
10913
10914
10915
10916  if test "x$SH" = x; then
10917    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10918  fi
10919
10920
10921
10922
10923
10924  # Publish this variable in the help.
10925
10926
10927  if [ -z "${SORT+x}" ]; then
10928    # The variable is not set by user, try to locate tool using the code snippet
10929    for ac_prog in sort
10930do
10931  # Extract the first word of "$ac_prog", so it can be a program name with args.
10932set dummy $ac_prog; ac_word=$2
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10934$as_echo_n "checking for $ac_word... " >&6; }
10935if ${ac_cv_path_SORT+:} false; then :
10936  $as_echo_n "(cached) " >&6
10937else
10938  case $SORT in
10939  [\\/]* | ?:[\\/]*)
10940  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10941  ;;
10942  *)
10943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946  IFS=$as_save_IFS
10947  test -z "$as_dir" && as_dir=.
10948    for ac_exec_ext in '' $ac_executable_extensions; do
10949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10950    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10952    break 2
10953  fi
10954done
10955  done
10956IFS=$as_save_IFS
10957
10958  ;;
10959esac
10960fi
10961SORT=$ac_cv_path_SORT
10962if test -n "$SORT"; then
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10964$as_echo "$SORT" >&6; }
10965else
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
10968fi
10969
10970
10971  test -n "$SORT" && break
10972done
10973
10974  else
10975    # The variable is set, but is it from the command line or the environment?
10976
10977    # Try to remove the string !SORT! from our list.
10978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10980      # If it failed, the variable was not from the command line. Ignore it,
10981      # but warn the user (except for BASH, which is always set by the calling BASH).
10982      if test "xSORT" != xBASH; then
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10984$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10985      fi
10986      # Try to locate tool using the code snippet
10987      for ac_prog in sort
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_SORT+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $SORT in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019SORT=$ac_cv_path_SORT
11020if test -n "$SORT"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11022$as_echo "$SORT" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$SORT" && break
11030done
11031
11032    else
11033      # If it succeeded, then it was overridden by the user. We will use it
11034      # for the tool.
11035
11036      # First remove it from the list of overridden variables, so we can test
11037      # for unknown variables in the end.
11038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11039
11040      # Check if we try to supply an empty value
11041      if test "x$SORT" = x; then
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11043$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11045$as_echo_n "checking for SORT... " >&6; }
11046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11047$as_echo "disabled" >&6; }
11048      else
11049        # Check if the provided tool contains a complete path.
11050        tool_specified="$SORT"
11051        tool_basename="${tool_specified##*/}"
11052        if test "x$tool_basename" = "x$tool_specified"; then
11053          # A command without a complete path is provided, search $PATH.
11054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11055$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11056          # Extract the first word of "$tool_basename", so it can be a program name with args.
11057set dummy $tool_basename; ac_word=$2
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11059$as_echo_n "checking for $ac_word... " >&6; }
11060if ${ac_cv_path_SORT+:} false; then :
11061  $as_echo_n "(cached) " >&6
11062else
11063  case $SORT in
11064  [\\/]* | ?:[\\/]*)
11065  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11066  ;;
11067  *)
11068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11069for as_dir in $PATH
11070do
11071  IFS=$as_save_IFS
11072  test -z "$as_dir" && as_dir=.
11073    for ac_exec_ext in '' $ac_executable_extensions; do
11074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11075    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11077    break 2
11078  fi
11079done
11080  done
11081IFS=$as_save_IFS
11082
11083  ;;
11084esac
11085fi
11086SORT=$ac_cv_path_SORT
11087if test -n "$SORT"; then
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11089$as_echo "$SORT" >&6; }
11090else
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
11093fi
11094
11095
11096          if test "x$SORT" = x; then
11097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11098          fi
11099        else
11100          # Otherwise we believe it is a complete path. Use it as it is.
11101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11102$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11104$as_echo_n "checking for SORT... " >&6; }
11105          if test ! -x "$tool_specified"; then
11106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11107$as_echo "not found" >&6; }
11108            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11109          fi
11110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11111$as_echo "$tool_specified" >&6; }
11112        fi
11113      fi
11114    fi
11115
11116  fi
11117
11118
11119
11120  if test "x$SORT" = x; then
11121    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11122  fi
11123
11124
11125
11126
11127
11128  # Publish this variable in the help.
11129
11130
11131  if [ -z "${TAIL+x}" ]; then
11132    # The variable is not set by user, try to locate tool using the code snippet
11133    for ac_prog in tail
11134do
11135  # Extract the first word of "$ac_prog", so it can be a program name with args.
11136set dummy $ac_prog; ac_word=$2
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138$as_echo_n "checking for $ac_word... " >&6; }
11139if ${ac_cv_path_TAIL+:} false; then :
11140  $as_echo_n "(cached) " >&6
11141else
11142  case $TAIL in
11143  [\\/]* | ?:[\\/]*)
11144  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11145  ;;
11146  *)
11147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148for as_dir in $PATH
11149do
11150  IFS=$as_save_IFS
11151  test -z "$as_dir" && as_dir=.
11152    for ac_exec_ext in '' $ac_executable_extensions; do
11153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156    break 2
11157  fi
11158done
11159  done
11160IFS=$as_save_IFS
11161
11162  ;;
11163esac
11164fi
11165TAIL=$ac_cv_path_TAIL
11166if test -n "$TAIL"; then
11167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11168$as_echo "$TAIL" >&6; }
11169else
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
11172fi
11173
11174
11175  test -n "$TAIL" && break
11176done
11177
11178  else
11179    # The variable is set, but is it from the command line or the environment?
11180
11181    # Try to remove the string !TAIL! from our list.
11182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11184      # If it failed, the variable was not from the command line. Ignore it,
11185      # but warn the user (except for BASH, which is always set by the calling BASH).
11186      if test "xTAIL" != xBASH; then
11187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11188$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11189      fi
11190      # Try to locate tool using the code snippet
11191      for ac_prog in tail
11192do
11193  # Extract the first word of "$ac_prog", so it can be a program name with args.
11194set dummy $ac_prog; ac_word=$2
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11196$as_echo_n "checking for $ac_word... " >&6; }
11197if ${ac_cv_path_TAIL+:} false; then :
11198  $as_echo_n "(cached) " >&6
11199else
11200  case $TAIL in
11201  [\\/]* | ?:[\\/]*)
11202  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11203  ;;
11204  *)
11205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11206for as_dir in $PATH
11207do
11208  IFS=$as_save_IFS
11209  test -z "$as_dir" && as_dir=.
11210    for ac_exec_ext in '' $ac_executable_extensions; do
11211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11212    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11214    break 2
11215  fi
11216done
11217  done
11218IFS=$as_save_IFS
11219
11220  ;;
11221esac
11222fi
11223TAIL=$ac_cv_path_TAIL
11224if test -n "$TAIL"; then
11225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11226$as_echo "$TAIL" >&6; }
11227else
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
11230fi
11231
11232
11233  test -n "$TAIL" && break
11234done
11235
11236    else
11237      # If it succeeded, then it was overridden by the user. We will use it
11238      # for the tool.
11239
11240      # First remove it from the list of overridden variables, so we can test
11241      # for unknown variables in the end.
11242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11243
11244      # Check if we try to supply an empty value
11245      if test "x$TAIL" = x; then
11246        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11247$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11249$as_echo_n "checking for TAIL... " >&6; }
11250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11251$as_echo "disabled" >&6; }
11252      else
11253        # Check if the provided tool contains a complete path.
11254        tool_specified="$TAIL"
11255        tool_basename="${tool_specified##*/}"
11256        if test "x$tool_basename" = "x$tool_specified"; then
11257          # A command without a complete path is provided, search $PATH.
11258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11259$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11260          # Extract the first word of "$tool_basename", so it can be a program name with args.
11261set dummy $tool_basename; ac_word=$2
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263$as_echo_n "checking for $ac_word... " >&6; }
11264if ${ac_cv_path_TAIL+:} false; then :
11265  $as_echo_n "(cached) " >&6
11266else
11267  case $TAIL in
11268  [\\/]* | ?:[\\/]*)
11269  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11270  ;;
11271  *)
11272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11273for as_dir in $PATH
11274do
11275  IFS=$as_save_IFS
11276  test -z "$as_dir" && as_dir=.
11277    for ac_exec_ext in '' $ac_executable_extensions; do
11278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11279    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11281    break 2
11282  fi
11283done
11284  done
11285IFS=$as_save_IFS
11286
11287  ;;
11288esac
11289fi
11290TAIL=$ac_cv_path_TAIL
11291if test -n "$TAIL"; then
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11293$as_echo "$TAIL" >&6; }
11294else
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
11297fi
11298
11299
11300          if test "x$TAIL" = x; then
11301            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11302          fi
11303        else
11304          # Otherwise we believe it is a complete path. Use it as it is.
11305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11306$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11307          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11308$as_echo_n "checking for TAIL... " >&6; }
11309          if test ! -x "$tool_specified"; then
11310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11311$as_echo "not found" >&6; }
11312            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11313          fi
11314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11315$as_echo "$tool_specified" >&6; }
11316        fi
11317      fi
11318    fi
11319
11320  fi
11321
11322
11323
11324  if test "x$TAIL" = x; then
11325    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11326  fi
11327
11328
11329
11330
11331
11332  # Publish this variable in the help.
11333
11334
11335  if [ -z "${TAR+x}" ]; then
11336    # The variable is not set by user, try to locate tool using the code snippet
11337    for ac_prog in gtar tar
11338do
11339  # Extract the first word of "$ac_prog", so it can be a program name with args.
11340set dummy $ac_prog; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_path_TAR+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  case $TAR in
11347  [\\/]* | ?:[\\/]*)
11348  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11349  ;;
11350  *)
11351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11352for as_dir in $PATH
11353do
11354  IFS=$as_save_IFS
11355  test -z "$as_dir" && as_dir=.
11356    for ac_exec_ext in '' $ac_executable_extensions; do
11357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11358    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11360    break 2
11361  fi
11362done
11363  done
11364IFS=$as_save_IFS
11365
11366  ;;
11367esac
11368fi
11369TAR=$ac_cv_path_TAR
11370if test -n "$TAR"; then
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11372$as_echo "$TAR" >&6; }
11373else
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
11376fi
11377
11378
11379  test -n "$TAR" && break
11380done
11381
11382  else
11383    # The variable is set, but is it from the command line or the environment?
11384
11385    # Try to remove the string !TAR! from our list.
11386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11388      # If it failed, the variable was not from the command line. Ignore it,
11389      # but warn the user (except for BASH, which is always set by the calling BASH).
11390      if test "xTAR" != xBASH; then
11391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11392$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11393      fi
11394      # Try to locate tool using the code snippet
11395      for ac_prog in gtar tar
11396do
11397  # Extract the first word of "$ac_prog", so it can be a program name with args.
11398set dummy $ac_prog; ac_word=$2
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11400$as_echo_n "checking for $ac_word... " >&6; }
11401if ${ac_cv_path_TAR+:} false; then :
11402  $as_echo_n "(cached) " >&6
11403else
11404  case $TAR in
11405  [\\/]* | ?:[\\/]*)
11406  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11407  ;;
11408  *)
11409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11410for as_dir in $PATH
11411do
11412  IFS=$as_save_IFS
11413  test -z "$as_dir" && as_dir=.
11414    for ac_exec_ext in '' $ac_executable_extensions; do
11415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11416    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11418    break 2
11419  fi
11420done
11421  done
11422IFS=$as_save_IFS
11423
11424  ;;
11425esac
11426fi
11427TAR=$ac_cv_path_TAR
11428if test -n "$TAR"; then
11429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11430$as_echo "$TAR" >&6; }
11431else
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11433$as_echo "no" >&6; }
11434fi
11435
11436
11437  test -n "$TAR" && break
11438done
11439
11440    else
11441      # If it succeeded, then it was overridden by the user. We will use it
11442      # for the tool.
11443
11444      # First remove it from the list of overridden variables, so we can test
11445      # for unknown variables in the end.
11446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11447
11448      # Check if we try to supply an empty value
11449      if test "x$TAR" = x; then
11450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11451$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11453$as_echo_n "checking for TAR... " >&6; }
11454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11455$as_echo "disabled" >&6; }
11456      else
11457        # Check if the provided tool contains a complete path.
11458        tool_specified="$TAR"
11459        tool_basename="${tool_specified##*/}"
11460        if test "x$tool_basename" = "x$tool_specified"; then
11461          # A command without a complete path is provided, search $PATH.
11462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11463$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11464          # Extract the first word of "$tool_basename", so it can be a program name with args.
11465set dummy $tool_basename; ac_word=$2
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11467$as_echo_n "checking for $ac_word... " >&6; }
11468if ${ac_cv_path_TAR+:} false; then :
11469  $as_echo_n "(cached) " >&6
11470else
11471  case $TAR in
11472  [\\/]* | ?:[\\/]*)
11473  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11474  ;;
11475  *)
11476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11477for as_dir in $PATH
11478do
11479  IFS=$as_save_IFS
11480  test -z "$as_dir" && as_dir=.
11481    for ac_exec_ext in '' $ac_executable_extensions; do
11482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11483    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11485    break 2
11486  fi
11487done
11488  done
11489IFS=$as_save_IFS
11490
11491  ;;
11492esac
11493fi
11494TAR=$ac_cv_path_TAR
11495if test -n "$TAR"; then
11496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11497$as_echo "$TAR" >&6; }
11498else
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
11501fi
11502
11503
11504          if test "x$TAR" = x; then
11505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11506          fi
11507        else
11508          # Otherwise we believe it is a complete path. Use it as it is.
11509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11510$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11512$as_echo_n "checking for TAR... " >&6; }
11513          if test ! -x "$tool_specified"; then
11514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11515$as_echo "not found" >&6; }
11516            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11517          fi
11518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11519$as_echo "$tool_specified" >&6; }
11520        fi
11521      fi
11522    fi
11523
11524  fi
11525
11526
11527
11528  if test "x$TAR" = x; then
11529    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11530  fi
11531
11532
11533
11534
11535
11536  # Publish this variable in the help.
11537
11538
11539  if [ -z "${TEE+x}" ]; then
11540    # The variable is not set by user, try to locate tool using the code snippet
11541    for ac_prog in tee
11542do
11543  # Extract the first word of "$ac_prog", so it can be a program name with args.
11544set dummy $ac_prog; ac_word=$2
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11546$as_echo_n "checking for $ac_word... " >&6; }
11547if ${ac_cv_path_TEE+:} false; then :
11548  $as_echo_n "(cached) " >&6
11549else
11550  case $TEE in
11551  [\\/]* | ?:[\\/]*)
11552  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11553  ;;
11554  *)
11555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11556for as_dir in $PATH
11557do
11558  IFS=$as_save_IFS
11559  test -z "$as_dir" && as_dir=.
11560    for ac_exec_ext in '' $ac_executable_extensions; do
11561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11562    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11564    break 2
11565  fi
11566done
11567  done
11568IFS=$as_save_IFS
11569
11570  ;;
11571esac
11572fi
11573TEE=$ac_cv_path_TEE
11574if test -n "$TEE"; then
11575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11576$as_echo "$TEE" >&6; }
11577else
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
11580fi
11581
11582
11583  test -n "$TEE" && break
11584done
11585
11586  else
11587    # The variable is set, but is it from the command line or the environment?
11588
11589    # Try to remove the string !TEE! from our list.
11590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11592      # If it failed, the variable was not from the command line. Ignore it,
11593      # but warn the user (except for BASH, which is always set by the calling BASH).
11594      if test "xTEE" != xBASH; then
11595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11596$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11597      fi
11598      # Try to locate tool using the code snippet
11599      for ac_prog in tee
11600do
11601  # Extract the first word of "$ac_prog", so it can be a program name with args.
11602set dummy $ac_prog; ac_word=$2
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11604$as_echo_n "checking for $ac_word... " >&6; }
11605if ${ac_cv_path_TEE+:} false; then :
11606  $as_echo_n "(cached) " >&6
11607else
11608  case $TEE in
11609  [\\/]* | ?:[\\/]*)
11610  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11611  ;;
11612  *)
11613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11614for as_dir in $PATH
11615do
11616  IFS=$as_save_IFS
11617  test -z "$as_dir" && as_dir=.
11618    for ac_exec_ext in '' $ac_executable_extensions; do
11619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11620    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11622    break 2
11623  fi
11624done
11625  done
11626IFS=$as_save_IFS
11627
11628  ;;
11629esac
11630fi
11631TEE=$ac_cv_path_TEE
11632if test -n "$TEE"; then
11633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11634$as_echo "$TEE" >&6; }
11635else
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11637$as_echo "no" >&6; }
11638fi
11639
11640
11641  test -n "$TEE" && break
11642done
11643
11644    else
11645      # If it succeeded, then it was overridden by the user. We will use it
11646      # for the tool.
11647
11648      # First remove it from the list of overridden variables, so we can test
11649      # for unknown variables in the end.
11650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11651
11652      # Check if we try to supply an empty value
11653      if test "x$TEE" = x; then
11654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11655$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11657$as_echo_n "checking for TEE... " >&6; }
11658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11659$as_echo "disabled" >&6; }
11660      else
11661        # Check if the provided tool contains a complete path.
11662        tool_specified="$TEE"
11663        tool_basename="${tool_specified##*/}"
11664        if test "x$tool_basename" = "x$tool_specified"; then
11665          # A command without a complete path is provided, search $PATH.
11666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11667$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11668          # Extract the first word of "$tool_basename", so it can be a program name with args.
11669set dummy $tool_basename; ac_word=$2
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671$as_echo_n "checking for $ac_word... " >&6; }
11672if ${ac_cv_path_TEE+:} false; then :
11673  $as_echo_n "(cached) " >&6
11674else
11675  case $TEE in
11676  [\\/]* | ?:[\\/]*)
11677  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11678  ;;
11679  *)
11680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683  IFS=$as_save_IFS
11684  test -z "$as_dir" && as_dir=.
11685    for ac_exec_ext in '' $ac_executable_extensions; do
11686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689    break 2
11690  fi
11691done
11692  done
11693IFS=$as_save_IFS
11694
11695  ;;
11696esac
11697fi
11698TEE=$ac_cv_path_TEE
11699if test -n "$TEE"; then
11700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11701$as_echo "$TEE" >&6; }
11702else
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705fi
11706
11707
11708          if test "x$TEE" = x; then
11709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11710          fi
11711        else
11712          # Otherwise we believe it is a complete path. Use it as it is.
11713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11714$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11716$as_echo_n "checking for TEE... " >&6; }
11717          if test ! -x "$tool_specified"; then
11718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11719$as_echo "not found" >&6; }
11720            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11721          fi
11722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11723$as_echo "$tool_specified" >&6; }
11724        fi
11725      fi
11726    fi
11727
11728  fi
11729
11730
11731
11732  if test "x$TEE" = x; then
11733    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11734  fi
11735
11736
11737
11738
11739
11740  # Publish this variable in the help.
11741
11742
11743  if [ -z "${TOUCH+x}" ]; then
11744    # The variable is not set by user, try to locate tool using the code snippet
11745    for ac_prog in touch
11746do
11747  # Extract the first word of "$ac_prog", so it can be a program name with args.
11748set dummy $ac_prog; ac_word=$2
11749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11750$as_echo_n "checking for $ac_word... " >&6; }
11751if ${ac_cv_path_TOUCH+:} false; then :
11752  $as_echo_n "(cached) " >&6
11753else
11754  case $TOUCH in
11755  [\\/]* | ?:[\\/]*)
11756  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11757  ;;
11758  *)
11759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11760for as_dir in $PATH
11761do
11762  IFS=$as_save_IFS
11763  test -z "$as_dir" && as_dir=.
11764    for ac_exec_ext in '' $ac_executable_extensions; do
11765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11766    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11768    break 2
11769  fi
11770done
11771  done
11772IFS=$as_save_IFS
11773
11774  ;;
11775esac
11776fi
11777TOUCH=$ac_cv_path_TOUCH
11778if test -n "$TOUCH"; then
11779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11780$as_echo "$TOUCH" >&6; }
11781else
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11783$as_echo "no" >&6; }
11784fi
11785
11786
11787  test -n "$TOUCH" && break
11788done
11789
11790  else
11791    # The variable is set, but is it from the command line or the environment?
11792
11793    # Try to remove the string !TOUCH! from our list.
11794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11796      # If it failed, the variable was not from the command line. Ignore it,
11797      # but warn the user (except for BASH, which is always set by the calling BASH).
11798      if test "xTOUCH" != xBASH; then
11799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11800$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11801      fi
11802      # Try to locate tool using the code snippet
11803      for ac_prog in touch
11804do
11805  # Extract the first word of "$ac_prog", so it can be a program name with args.
11806set dummy $ac_prog; ac_word=$2
11807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11808$as_echo_n "checking for $ac_word... " >&6; }
11809if ${ac_cv_path_TOUCH+:} false; then :
11810  $as_echo_n "(cached) " >&6
11811else
11812  case $TOUCH in
11813  [\\/]* | ?:[\\/]*)
11814  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11815  ;;
11816  *)
11817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11818for as_dir in $PATH
11819do
11820  IFS=$as_save_IFS
11821  test -z "$as_dir" && as_dir=.
11822    for ac_exec_ext in '' $ac_executable_extensions; do
11823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11824    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11826    break 2
11827  fi
11828done
11829  done
11830IFS=$as_save_IFS
11831
11832  ;;
11833esac
11834fi
11835TOUCH=$ac_cv_path_TOUCH
11836if test -n "$TOUCH"; then
11837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11838$as_echo "$TOUCH" >&6; }
11839else
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11841$as_echo "no" >&6; }
11842fi
11843
11844
11845  test -n "$TOUCH" && break
11846done
11847
11848    else
11849      # If it succeeded, then it was overridden by the user. We will use it
11850      # for the tool.
11851
11852      # First remove it from the list of overridden variables, so we can test
11853      # for unknown variables in the end.
11854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11855
11856      # Check if we try to supply an empty value
11857      if test "x$TOUCH" = x; then
11858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11859$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11861$as_echo_n "checking for TOUCH... " >&6; }
11862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11863$as_echo "disabled" >&6; }
11864      else
11865        # Check if the provided tool contains a complete path.
11866        tool_specified="$TOUCH"
11867        tool_basename="${tool_specified##*/}"
11868        if test "x$tool_basename" = "x$tool_specified"; then
11869          # A command without a complete path is provided, search $PATH.
11870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11871$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11872          # Extract the first word of "$tool_basename", so it can be a program name with args.
11873set dummy $tool_basename; ac_word=$2
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11875$as_echo_n "checking for $ac_word... " >&6; }
11876if ${ac_cv_path_TOUCH+:} false; then :
11877  $as_echo_n "(cached) " >&6
11878else
11879  case $TOUCH in
11880  [\\/]* | ?:[\\/]*)
11881  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11882  ;;
11883  *)
11884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11885for as_dir in $PATH
11886do
11887  IFS=$as_save_IFS
11888  test -z "$as_dir" && as_dir=.
11889    for ac_exec_ext in '' $ac_executable_extensions; do
11890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11891    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11893    break 2
11894  fi
11895done
11896  done
11897IFS=$as_save_IFS
11898
11899  ;;
11900esac
11901fi
11902TOUCH=$ac_cv_path_TOUCH
11903if test -n "$TOUCH"; then
11904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11905$as_echo "$TOUCH" >&6; }
11906else
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11908$as_echo "no" >&6; }
11909fi
11910
11911
11912          if test "x$TOUCH" = x; then
11913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11914          fi
11915        else
11916          # Otherwise we believe it is a complete path. Use it as it is.
11917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11918$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11920$as_echo_n "checking for TOUCH... " >&6; }
11921          if test ! -x "$tool_specified"; then
11922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11923$as_echo "not found" >&6; }
11924            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11925          fi
11926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11927$as_echo "$tool_specified" >&6; }
11928        fi
11929      fi
11930    fi
11931
11932  fi
11933
11934
11935
11936  if test "x$TOUCH" = x; then
11937    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11938  fi
11939
11940
11941
11942
11943
11944  # Publish this variable in the help.
11945
11946
11947  if [ -z "${TR+x}" ]; then
11948    # The variable is not set by user, try to locate tool using the code snippet
11949    for ac_prog in tr
11950do
11951  # Extract the first word of "$ac_prog", so it can be a program name with args.
11952set dummy $ac_prog; ac_word=$2
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11954$as_echo_n "checking for $ac_word... " >&6; }
11955if ${ac_cv_path_TR+:} false; then :
11956  $as_echo_n "(cached) " >&6
11957else
11958  case $TR in
11959  [\\/]* | ?:[\\/]*)
11960  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11961  ;;
11962  *)
11963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11964for as_dir in $PATH
11965do
11966  IFS=$as_save_IFS
11967  test -z "$as_dir" && as_dir=.
11968    for ac_exec_ext in '' $ac_executable_extensions; do
11969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11970    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11972    break 2
11973  fi
11974done
11975  done
11976IFS=$as_save_IFS
11977
11978  ;;
11979esac
11980fi
11981TR=$ac_cv_path_TR
11982if test -n "$TR"; then
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11984$as_echo "$TR" >&6; }
11985else
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11987$as_echo "no" >&6; }
11988fi
11989
11990
11991  test -n "$TR" && break
11992done
11993
11994  else
11995    # The variable is set, but is it from the command line or the environment?
11996
11997    # Try to remove the string !TR! from our list.
11998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12000      # If it failed, the variable was not from the command line. Ignore it,
12001      # but warn the user (except for BASH, which is always set by the calling BASH).
12002      if test "xTR" != xBASH; then
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12004$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12005      fi
12006      # Try to locate tool using the code snippet
12007      for ac_prog in tr
12008do
12009  # Extract the first word of "$ac_prog", so it can be a program name with args.
12010set dummy $ac_prog; ac_word=$2
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12012$as_echo_n "checking for $ac_word... " >&6; }
12013if ${ac_cv_path_TR+:} false; then :
12014  $as_echo_n "(cached) " >&6
12015else
12016  case $TR in
12017  [\\/]* | ?:[\\/]*)
12018  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12019  ;;
12020  *)
12021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12022for as_dir in $PATH
12023do
12024  IFS=$as_save_IFS
12025  test -z "$as_dir" && as_dir=.
12026    for ac_exec_ext in '' $ac_executable_extensions; do
12027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12028    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12030    break 2
12031  fi
12032done
12033  done
12034IFS=$as_save_IFS
12035
12036  ;;
12037esac
12038fi
12039TR=$ac_cv_path_TR
12040if test -n "$TR"; then
12041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12042$as_echo "$TR" >&6; }
12043else
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12045$as_echo "no" >&6; }
12046fi
12047
12048
12049  test -n "$TR" && break
12050done
12051
12052    else
12053      # If it succeeded, then it was overridden by the user. We will use it
12054      # for the tool.
12055
12056      # First remove it from the list of overridden variables, so we can test
12057      # for unknown variables in the end.
12058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12059
12060      # Check if we try to supply an empty value
12061      if test "x$TR" = x; then
12062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12063$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12065$as_echo_n "checking for TR... " >&6; }
12066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12067$as_echo "disabled" >&6; }
12068      else
12069        # Check if the provided tool contains a complete path.
12070        tool_specified="$TR"
12071        tool_basename="${tool_specified##*/}"
12072        if test "x$tool_basename" = "x$tool_specified"; then
12073          # A command without a complete path is provided, search $PATH.
12074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12075$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12076          # Extract the first word of "$tool_basename", so it can be a program name with args.
12077set dummy $tool_basename; ac_word=$2
12078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12079$as_echo_n "checking for $ac_word... " >&6; }
12080if ${ac_cv_path_TR+:} false; then :
12081  $as_echo_n "(cached) " >&6
12082else
12083  case $TR in
12084  [\\/]* | ?:[\\/]*)
12085  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12086  ;;
12087  *)
12088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12089for as_dir in $PATH
12090do
12091  IFS=$as_save_IFS
12092  test -z "$as_dir" && as_dir=.
12093    for ac_exec_ext in '' $ac_executable_extensions; do
12094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12095    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12097    break 2
12098  fi
12099done
12100  done
12101IFS=$as_save_IFS
12102
12103  ;;
12104esac
12105fi
12106TR=$ac_cv_path_TR
12107if test -n "$TR"; then
12108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12109$as_echo "$TR" >&6; }
12110else
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12112$as_echo "no" >&6; }
12113fi
12114
12115
12116          if test "x$TR" = x; then
12117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12118          fi
12119        else
12120          # Otherwise we believe it is a complete path. Use it as it is.
12121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12122$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12124$as_echo_n "checking for TR... " >&6; }
12125          if test ! -x "$tool_specified"; then
12126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12127$as_echo "not found" >&6; }
12128            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12129          fi
12130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12131$as_echo "$tool_specified" >&6; }
12132        fi
12133      fi
12134    fi
12135
12136  fi
12137
12138
12139
12140  if test "x$TR" = x; then
12141    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12142  fi
12143
12144
12145
12146
12147
12148  # Publish this variable in the help.
12149
12150
12151  if [ -z "${UNAME+x}" ]; then
12152    # The variable is not set by user, try to locate tool using the code snippet
12153    for ac_prog in uname
12154do
12155  # Extract the first word of "$ac_prog", so it can be a program name with args.
12156set dummy $ac_prog; ac_word=$2
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12158$as_echo_n "checking for $ac_word... " >&6; }
12159if ${ac_cv_path_UNAME+:} false; then :
12160  $as_echo_n "(cached) " >&6
12161else
12162  case $UNAME in
12163  [\\/]* | ?:[\\/]*)
12164  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12165  ;;
12166  *)
12167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12168for as_dir in $PATH
12169do
12170  IFS=$as_save_IFS
12171  test -z "$as_dir" && as_dir=.
12172    for ac_exec_ext in '' $ac_executable_extensions; do
12173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12174    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12176    break 2
12177  fi
12178done
12179  done
12180IFS=$as_save_IFS
12181
12182  ;;
12183esac
12184fi
12185UNAME=$ac_cv_path_UNAME
12186if test -n "$UNAME"; then
12187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12188$as_echo "$UNAME" >&6; }
12189else
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12191$as_echo "no" >&6; }
12192fi
12193
12194
12195  test -n "$UNAME" && break
12196done
12197
12198  else
12199    # The variable is set, but is it from the command line or the environment?
12200
12201    # Try to remove the string !UNAME! from our list.
12202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12204      # If it failed, the variable was not from the command line. Ignore it,
12205      # but warn the user (except for BASH, which is always set by the calling BASH).
12206      if test "xUNAME" != xBASH; then
12207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12208$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12209      fi
12210      # Try to locate tool using the code snippet
12211      for ac_prog in uname
12212do
12213  # Extract the first word of "$ac_prog", so it can be a program name with args.
12214set dummy $ac_prog; ac_word=$2
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216$as_echo_n "checking for $ac_word... " >&6; }
12217if ${ac_cv_path_UNAME+:} false; then :
12218  $as_echo_n "(cached) " >&6
12219else
12220  case $UNAME in
12221  [\\/]* | ?:[\\/]*)
12222  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12223  ;;
12224  *)
12225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226for as_dir in $PATH
12227do
12228  IFS=$as_save_IFS
12229  test -z "$as_dir" && as_dir=.
12230    for ac_exec_ext in '' $ac_executable_extensions; do
12231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12232    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12234    break 2
12235  fi
12236done
12237  done
12238IFS=$as_save_IFS
12239
12240  ;;
12241esac
12242fi
12243UNAME=$ac_cv_path_UNAME
12244if test -n "$UNAME"; then
12245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12246$as_echo "$UNAME" >&6; }
12247else
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12249$as_echo "no" >&6; }
12250fi
12251
12252
12253  test -n "$UNAME" && break
12254done
12255
12256    else
12257      # If it succeeded, then it was overridden by the user. We will use it
12258      # for the tool.
12259
12260      # First remove it from the list of overridden variables, so we can test
12261      # for unknown variables in the end.
12262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12263
12264      # Check if we try to supply an empty value
12265      if test "x$UNAME" = x; then
12266        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12267$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12269$as_echo_n "checking for UNAME... " >&6; }
12270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12271$as_echo "disabled" >&6; }
12272      else
12273        # Check if the provided tool contains a complete path.
12274        tool_specified="$UNAME"
12275        tool_basename="${tool_specified##*/}"
12276        if test "x$tool_basename" = "x$tool_specified"; then
12277          # A command without a complete path is provided, search $PATH.
12278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12279$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12280          # Extract the first word of "$tool_basename", so it can be a program name with args.
12281set dummy $tool_basename; ac_word=$2
12282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12283$as_echo_n "checking for $ac_word... " >&6; }
12284if ${ac_cv_path_UNAME+:} false; then :
12285  $as_echo_n "(cached) " >&6
12286else
12287  case $UNAME in
12288  [\\/]* | ?:[\\/]*)
12289  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12290  ;;
12291  *)
12292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12293for as_dir in $PATH
12294do
12295  IFS=$as_save_IFS
12296  test -z "$as_dir" && as_dir=.
12297    for ac_exec_ext in '' $ac_executable_extensions; do
12298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12299    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12301    break 2
12302  fi
12303done
12304  done
12305IFS=$as_save_IFS
12306
12307  ;;
12308esac
12309fi
12310UNAME=$ac_cv_path_UNAME
12311if test -n "$UNAME"; then
12312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12313$as_echo "$UNAME" >&6; }
12314else
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12316$as_echo "no" >&6; }
12317fi
12318
12319
12320          if test "x$UNAME" = x; then
12321            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12322          fi
12323        else
12324          # Otherwise we believe it is a complete path. Use it as it is.
12325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12326$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12328$as_echo_n "checking for UNAME... " >&6; }
12329          if test ! -x "$tool_specified"; then
12330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12331$as_echo "not found" >&6; }
12332            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12333          fi
12334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12335$as_echo "$tool_specified" >&6; }
12336        fi
12337      fi
12338    fi
12339
12340  fi
12341
12342
12343
12344  if test "x$UNAME" = x; then
12345    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12346  fi
12347
12348
12349
12350
12351
12352  # Publish this variable in the help.
12353
12354
12355  if [ -z "${UNIQ+x}" ]; then
12356    # The variable is not set by user, try to locate tool using the code snippet
12357    for ac_prog in uniq
12358do
12359  # Extract the first word of "$ac_prog", so it can be a program name with args.
12360set dummy $ac_prog; ac_word=$2
12361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12362$as_echo_n "checking for $ac_word... " >&6; }
12363if ${ac_cv_path_UNIQ+:} false; then :
12364  $as_echo_n "(cached) " >&6
12365else
12366  case $UNIQ in
12367  [\\/]* | ?:[\\/]*)
12368  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12369  ;;
12370  *)
12371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12372for as_dir in $PATH
12373do
12374  IFS=$as_save_IFS
12375  test -z "$as_dir" && as_dir=.
12376    for ac_exec_ext in '' $ac_executable_extensions; do
12377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12378    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12380    break 2
12381  fi
12382done
12383  done
12384IFS=$as_save_IFS
12385
12386  ;;
12387esac
12388fi
12389UNIQ=$ac_cv_path_UNIQ
12390if test -n "$UNIQ"; then
12391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12392$as_echo "$UNIQ" >&6; }
12393else
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395$as_echo "no" >&6; }
12396fi
12397
12398
12399  test -n "$UNIQ" && break
12400done
12401
12402  else
12403    # The variable is set, but is it from the command line or the environment?
12404
12405    # Try to remove the string !UNIQ! from our list.
12406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12408      # If it failed, the variable was not from the command line. Ignore it,
12409      # but warn the user (except for BASH, which is always set by the calling BASH).
12410      if test "xUNIQ" != xBASH; then
12411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12412$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12413      fi
12414      # Try to locate tool using the code snippet
12415      for ac_prog in uniq
12416do
12417  # Extract the first word of "$ac_prog", so it can be a program name with args.
12418set dummy $ac_prog; ac_word=$2
12419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12420$as_echo_n "checking for $ac_word... " >&6; }
12421if ${ac_cv_path_UNIQ+:} false; then :
12422  $as_echo_n "(cached) " >&6
12423else
12424  case $UNIQ in
12425  [\\/]* | ?:[\\/]*)
12426  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12427  ;;
12428  *)
12429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12430for as_dir in $PATH
12431do
12432  IFS=$as_save_IFS
12433  test -z "$as_dir" && as_dir=.
12434    for ac_exec_ext in '' $ac_executable_extensions; do
12435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12436    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12438    break 2
12439  fi
12440done
12441  done
12442IFS=$as_save_IFS
12443
12444  ;;
12445esac
12446fi
12447UNIQ=$ac_cv_path_UNIQ
12448if test -n "$UNIQ"; then
12449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12450$as_echo "$UNIQ" >&6; }
12451else
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12453$as_echo "no" >&6; }
12454fi
12455
12456
12457  test -n "$UNIQ" && break
12458done
12459
12460    else
12461      # If it succeeded, then it was overridden by the user. We will use it
12462      # for the tool.
12463
12464      # First remove it from the list of overridden variables, so we can test
12465      # for unknown variables in the end.
12466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12467
12468      # Check if we try to supply an empty value
12469      if test "x$UNIQ" = x; then
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12471$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12473$as_echo_n "checking for UNIQ... " >&6; }
12474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12475$as_echo "disabled" >&6; }
12476      else
12477        # Check if the provided tool contains a complete path.
12478        tool_specified="$UNIQ"
12479        tool_basename="${tool_specified##*/}"
12480        if test "x$tool_basename" = "x$tool_specified"; then
12481          # A command without a complete path is provided, search $PATH.
12482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12483$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12484          # Extract the first word of "$tool_basename", so it can be a program name with args.
12485set dummy $tool_basename; ac_word=$2
12486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12487$as_echo_n "checking for $ac_word... " >&6; }
12488if ${ac_cv_path_UNIQ+:} false; then :
12489  $as_echo_n "(cached) " >&6
12490else
12491  case $UNIQ in
12492  [\\/]* | ?:[\\/]*)
12493  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12494  ;;
12495  *)
12496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12497for as_dir in $PATH
12498do
12499  IFS=$as_save_IFS
12500  test -z "$as_dir" && as_dir=.
12501    for ac_exec_ext in '' $ac_executable_extensions; do
12502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12503    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12505    break 2
12506  fi
12507done
12508  done
12509IFS=$as_save_IFS
12510
12511  ;;
12512esac
12513fi
12514UNIQ=$ac_cv_path_UNIQ
12515if test -n "$UNIQ"; then
12516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12517$as_echo "$UNIQ" >&6; }
12518else
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520$as_echo "no" >&6; }
12521fi
12522
12523
12524          if test "x$UNIQ" = x; then
12525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12526          fi
12527        else
12528          # Otherwise we believe it is a complete path. Use it as it is.
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12530$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12532$as_echo_n "checking for UNIQ... " >&6; }
12533          if test ! -x "$tool_specified"; then
12534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12535$as_echo "not found" >&6; }
12536            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12537          fi
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12539$as_echo "$tool_specified" >&6; }
12540        fi
12541      fi
12542    fi
12543
12544  fi
12545
12546
12547
12548  if test "x$UNIQ" = x; then
12549    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12550  fi
12551
12552
12553
12554
12555
12556  # Publish this variable in the help.
12557
12558
12559  if [ -z "${WC+x}" ]; then
12560    # The variable is not set by user, try to locate tool using the code snippet
12561    for ac_prog in wc
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_WC+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $WC in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593WC=$ac_cv_path_WC
12594if test -n "$WC"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12596$as_echo "$WC" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$WC" && break
12604done
12605
12606  else
12607    # The variable is set, but is it from the command line or the environment?
12608
12609    # Try to remove the string !WC! from our list.
12610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12612      # If it failed, the variable was not from the command line. Ignore it,
12613      # but warn the user (except for BASH, which is always set by the calling BASH).
12614      if test "xWC" != xBASH; then
12615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12616$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12617      fi
12618      # Try to locate tool using the code snippet
12619      for ac_prog in wc
12620do
12621  # Extract the first word of "$ac_prog", so it can be a program name with args.
12622set dummy $ac_prog; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_WC+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $WC in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651WC=$ac_cv_path_WC
12652if test -n "$WC"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12654$as_echo "$WC" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661  test -n "$WC" && break
12662done
12663
12664    else
12665      # If it succeeded, then it was overridden by the user. We will use it
12666      # for the tool.
12667
12668      # First remove it from the list of overridden variables, so we can test
12669      # for unknown variables in the end.
12670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12671
12672      # Check if we try to supply an empty value
12673      if test "x$WC" = x; then
12674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12675$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12677$as_echo_n "checking for WC... " >&6; }
12678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12679$as_echo "disabled" >&6; }
12680      else
12681        # Check if the provided tool contains a complete path.
12682        tool_specified="$WC"
12683        tool_basename="${tool_specified##*/}"
12684        if test "x$tool_basename" = "x$tool_specified"; then
12685          # A command without a complete path is provided, search $PATH.
12686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12687$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12688          # Extract the first word of "$tool_basename", so it can be a program name with args.
12689set dummy $tool_basename; ac_word=$2
12690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12691$as_echo_n "checking for $ac_word... " >&6; }
12692if ${ac_cv_path_WC+:} false; then :
12693  $as_echo_n "(cached) " >&6
12694else
12695  case $WC in
12696  [\\/]* | ?:[\\/]*)
12697  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12698  ;;
12699  *)
12700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715  ;;
12716esac
12717fi
12718WC=$ac_cv_path_WC
12719if test -n "$WC"; then
12720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12721$as_echo "$WC" >&6; }
12722else
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
12725fi
12726
12727
12728          if test "x$WC" = x; then
12729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12730          fi
12731        else
12732          # Otherwise we believe it is a complete path. Use it as it is.
12733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12734$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12736$as_echo_n "checking for WC... " >&6; }
12737          if test ! -x "$tool_specified"; then
12738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12739$as_echo "not found" >&6; }
12740            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12741          fi
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12743$as_echo "$tool_specified" >&6; }
12744        fi
12745      fi
12746    fi
12747
12748  fi
12749
12750
12751
12752  if test "x$WC" = x; then
12753    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12754  fi
12755
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if [ -z "${WHICH+x}" ]; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in which
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_WHICH+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $WHICH in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797WHICH=$ac_cv_path_WHICH
12798if test -n "$WHICH"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12800$as_echo "$WHICH" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$WHICH" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !WHICH! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xWHICH" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in which
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_WHICH+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $WHICH in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855WHICH=$ac_cv_path_WHICH
12856if test -n "$WHICH"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12858$as_echo "$WHICH" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$WHICH" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if we try to supply an empty value
12877      if test "x$WHICH" = x; then
12878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12879$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12881$as_echo_n "checking for WHICH... " >&6; }
12882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12883$as_echo "disabled" >&6; }
12884      else
12885        # Check if the provided tool contains a complete path.
12886        tool_specified="$WHICH"
12887        tool_basename="${tool_specified##*/}"
12888        if test "x$tool_basename" = "x$tool_specified"; then
12889          # A command without a complete path is provided, search $PATH.
12890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12891$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12892          # Extract the first word of "$tool_basename", so it can be a program name with args.
12893set dummy $tool_basename; ac_word=$2
12894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12895$as_echo_n "checking for $ac_word... " >&6; }
12896if ${ac_cv_path_WHICH+:} false; then :
12897  $as_echo_n "(cached) " >&6
12898else
12899  case $WHICH in
12900  [\\/]* | ?:[\\/]*)
12901  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12902  ;;
12903  *)
12904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12905for as_dir in $PATH
12906do
12907  IFS=$as_save_IFS
12908  test -z "$as_dir" && as_dir=.
12909    for ac_exec_ext in '' $ac_executable_extensions; do
12910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12911    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12913    break 2
12914  fi
12915done
12916  done
12917IFS=$as_save_IFS
12918
12919  ;;
12920esac
12921fi
12922WHICH=$ac_cv_path_WHICH
12923if test -n "$WHICH"; then
12924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12925$as_echo "$WHICH" >&6; }
12926else
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12928$as_echo "no" >&6; }
12929fi
12930
12931
12932          if test "x$WHICH" = x; then
12933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12934          fi
12935        else
12936          # Otherwise we believe it is a complete path. Use it as it is.
12937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12938$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12940$as_echo_n "checking for WHICH... " >&6; }
12941          if test ! -x "$tool_specified"; then
12942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12943$as_echo "not found" >&6; }
12944            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12945          fi
12946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12947$as_echo "$tool_specified" >&6; }
12948        fi
12949      fi
12950    fi
12951
12952  fi
12953
12954
12955
12956  if test "x$WHICH" = x; then
12957    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12958  fi
12959
12960
12961
12962
12963
12964  # Publish this variable in the help.
12965
12966
12967  if [ -z "${XARGS+x}" ]; then
12968    # The variable is not set by user, try to locate tool using the code snippet
12969    for ac_prog in xargs
12970do
12971  # Extract the first word of "$ac_prog", so it can be a program name with args.
12972set dummy $ac_prog; ac_word=$2
12973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12974$as_echo_n "checking for $ac_word... " >&6; }
12975if ${ac_cv_path_XARGS+:} false; then :
12976  $as_echo_n "(cached) " >&6
12977else
12978  case $XARGS in
12979  [\\/]* | ?:[\\/]*)
12980  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12981  ;;
12982  *)
12983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12984for as_dir in $PATH
12985do
12986  IFS=$as_save_IFS
12987  test -z "$as_dir" && as_dir=.
12988    for ac_exec_ext in '' $ac_executable_extensions; do
12989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12990    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12992    break 2
12993  fi
12994done
12995  done
12996IFS=$as_save_IFS
12997
12998  ;;
12999esac
13000fi
13001XARGS=$ac_cv_path_XARGS
13002if test -n "$XARGS"; then
13003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13004$as_echo "$XARGS" >&6; }
13005else
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13007$as_echo "no" >&6; }
13008fi
13009
13010
13011  test -n "$XARGS" && break
13012done
13013
13014  else
13015    # The variable is set, but is it from the command line or the environment?
13016
13017    # Try to remove the string !XARGS! from our list.
13018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13020      # If it failed, the variable was not from the command line. Ignore it,
13021      # but warn the user (except for BASH, which is always set by the calling BASH).
13022      if test "xXARGS" != xBASH; then
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13024$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13025      fi
13026      # Try to locate tool using the code snippet
13027      for ac_prog in xargs
13028do
13029  # Extract the first word of "$ac_prog", so it can be a program name with args.
13030set dummy $ac_prog; ac_word=$2
13031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13032$as_echo_n "checking for $ac_word... " >&6; }
13033if ${ac_cv_path_XARGS+:} false; then :
13034  $as_echo_n "(cached) " >&6
13035else
13036  case $XARGS in
13037  [\\/]* | ?:[\\/]*)
13038  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13039  ;;
13040  *)
13041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13042for as_dir in $PATH
13043do
13044  IFS=$as_save_IFS
13045  test -z "$as_dir" && as_dir=.
13046    for ac_exec_ext in '' $ac_executable_extensions; do
13047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13048    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13050    break 2
13051  fi
13052done
13053  done
13054IFS=$as_save_IFS
13055
13056  ;;
13057esac
13058fi
13059XARGS=$ac_cv_path_XARGS
13060if test -n "$XARGS"; then
13061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13062$as_echo "$XARGS" >&6; }
13063else
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13065$as_echo "no" >&6; }
13066fi
13067
13068
13069  test -n "$XARGS" && break
13070done
13071
13072    else
13073      # If it succeeded, then it was overridden by the user. We will use it
13074      # for the tool.
13075
13076      # First remove it from the list of overridden variables, so we can test
13077      # for unknown variables in the end.
13078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13079
13080      # Check if we try to supply an empty value
13081      if test "x$XARGS" = x; then
13082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13083$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13085$as_echo_n "checking for XARGS... " >&6; }
13086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13087$as_echo "disabled" >&6; }
13088      else
13089        # Check if the provided tool contains a complete path.
13090        tool_specified="$XARGS"
13091        tool_basename="${tool_specified##*/}"
13092        if test "x$tool_basename" = "x$tool_specified"; then
13093          # A command without a complete path is provided, search $PATH.
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13095$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13096          # Extract the first word of "$tool_basename", so it can be a program name with args.
13097set dummy $tool_basename; ac_word=$2
13098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13099$as_echo_n "checking for $ac_word... " >&6; }
13100if ${ac_cv_path_XARGS+:} false; then :
13101  $as_echo_n "(cached) " >&6
13102else
13103  case $XARGS in
13104  [\\/]* | ?:[\\/]*)
13105  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13106  ;;
13107  *)
13108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13109for as_dir in $PATH
13110do
13111  IFS=$as_save_IFS
13112  test -z "$as_dir" && as_dir=.
13113    for ac_exec_ext in '' $ac_executable_extensions; do
13114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13115    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13117    break 2
13118  fi
13119done
13120  done
13121IFS=$as_save_IFS
13122
13123  ;;
13124esac
13125fi
13126XARGS=$ac_cv_path_XARGS
13127if test -n "$XARGS"; then
13128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13129$as_echo "$XARGS" >&6; }
13130else
13131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13132$as_echo "no" >&6; }
13133fi
13134
13135
13136          if test "x$XARGS" = x; then
13137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13138          fi
13139        else
13140          # Otherwise we believe it is a complete path. Use it as it is.
13141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13142$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13144$as_echo_n "checking for XARGS... " >&6; }
13145          if test ! -x "$tool_specified"; then
13146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13147$as_echo "not found" >&6; }
13148            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13149          fi
13150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13151$as_echo "$tool_specified" >&6; }
13152        fi
13153      fi
13154    fi
13155
13156  fi
13157
13158
13159
13160  if test "x$XARGS" = x; then
13161    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13162  fi
13163
13164
13165
13166  # Then required tools that require some special treatment.
13167
13168
13169  # Publish this variable in the help.
13170
13171
13172  if [ -z "${AWK+x}" ]; then
13173    # The variable is not set by user, try to locate tool using the code snippet
13174    for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216  else
13217    # The variable is set, but is it from the command line or the environment?
13218
13219    # Try to remove the string !AWK! from our list.
13220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13222      # If it failed, the variable was not from the command line. Ignore it,
13223      # but warn the user (except for BASH, which is always set by the calling BASH).
13224      if test "xAWK" != xBASH; then
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13226$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13227      fi
13228      # Try to locate tool using the code snippet
13229      for ac_prog in gawk mawk nawk awk
13230do
13231  # Extract the first word of "$ac_prog", so it can be a program name with args.
13232set dummy $ac_prog; ac_word=$2
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13234$as_echo_n "checking for $ac_word... " >&6; }
13235if ${ac_cv_prog_AWK+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  if test -n "$AWK"; then
13239  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13240else
13241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242for as_dir in $PATH
13243do
13244  IFS=$as_save_IFS
13245  test -z "$as_dir" && as_dir=.
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13248    ac_cv_prog_AWK="$ac_prog"
13249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13250    break 2
13251  fi
13252done
13253  done
13254IFS=$as_save_IFS
13255
13256fi
13257fi
13258AWK=$ac_cv_prog_AWK
13259if test -n "$AWK"; then
13260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13261$as_echo "$AWK" >&6; }
13262else
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
13265fi
13266
13267
13268  test -n "$AWK" && break
13269done
13270
13271    else
13272      # If it succeeded, then it was overridden by the user. We will use it
13273      # for the tool.
13274
13275      # First remove it from the list of overridden variables, so we can test
13276      # for unknown variables in the end.
13277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13278
13279      # Check if we try to supply an empty value
13280      if test "x$AWK" = x; then
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13282$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13284$as_echo_n "checking for AWK... " >&6; }
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13286$as_echo "disabled" >&6; }
13287      else
13288        # Check if the provided tool contains a complete path.
13289        tool_specified="$AWK"
13290        tool_basename="${tool_specified##*/}"
13291        if test "x$tool_basename" = "x$tool_specified"; then
13292          # A command without a complete path is provided, search $PATH.
13293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13294$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13295          # Extract the first word of "$tool_basename", so it can be a program name with args.
13296set dummy $tool_basename; ac_word=$2
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13298$as_echo_n "checking for $ac_word... " >&6; }
13299if ${ac_cv_path_AWK+:} false; then :
13300  $as_echo_n "(cached) " >&6
13301else
13302  case $AWK in
13303  [\\/]* | ?:[\\/]*)
13304  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13305  ;;
13306  *)
13307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13308for as_dir in $PATH
13309do
13310  IFS=$as_save_IFS
13311  test -z "$as_dir" && as_dir=.
13312    for ac_exec_ext in '' $ac_executable_extensions; do
13313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13314    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13316    break 2
13317  fi
13318done
13319  done
13320IFS=$as_save_IFS
13321
13322  ;;
13323esac
13324fi
13325AWK=$ac_cv_path_AWK
13326if test -n "$AWK"; then
13327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13328$as_echo "$AWK" >&6; }
13329else
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13331$as_echo "no" >&6; }
13332fi
13333
13334
13335          if test "x$AWK" = x; then
13336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13337          fi
13338        else
13339          # Otherwise we believe it is a complete path. Use it as it is.
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13341$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13343$as_echo_n "checking for AWK... " >&6; }
13344          if test ! -x "$tool_specified"; then
13345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13346$as_echo "not found" >&6; }
13347            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13348          fi
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13350$as_echo "$tool_specified" >&6; }
13351        fi
13352      fi
13353    fi
13354
13355  fi
13356
13357
13358  if test "x$AWK" = x; then
13359    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13360  fi
13361
13362
13363
13364
13365  # Publish this variable in the help.
13366
13367
13368  if [ -z "${GREP+x}" ]; then
13369    # The variable is not set by user, try to locate tool using the code snippet
13370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13371$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13372if ${ac_cv_path_GREP+:} false; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  if test -z "$GREP"; then
13376  ac_path_GREP_found=false
13377  # Loop through the user's path and test for each of PROGNAME-LIST
13378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13380do
13381  IFS=$as_save_IFS
13382  test -z "$as_dir" && as_dir=.
13383    for ac_prog in grep ggrep; do
13384    for ac_exec_ext in '' $ac_executable_extensions; do
13385      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13386      as_fn_executable_p "$ac_path_GREP" || continue
13387# Check for GNU ac_path_GREP and select it if it is found.
13388  # Check for GNU $ac_path_GREP
13389case `"$ac_path_GREP" --version 2>&1` in
13390*GNU*)
13391  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13392*)
13393  ac_count=0
13394  $as_echo_n 0123456789 >"conftest.in"
13395  while :
13396  do
13397    cat "conftest.in" "conftest.in" >"conftest.tmp"
13398    mv "conftest.tmp" "conftest.in"
13399    cp "conftest.in" "conftest.nl"
13400    $as_echo 'GREP' >> "conftest.nl"
13401    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13402    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13403    as_fn_arith $ac_count + 1 && ac_count=$as_val
13404    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13405      # Best one so far, save it but keep looking for a better one
13406      ac_cv_path_GREP="$ac_path_GREP"
13407      ac_path_GREP_max=$ac_count
13408    fi
13409    # 10*(2^10) chars as input seems more than enough
13410    test $ac_count -gt 10 && break
13411  done
13412  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13413esac
13414
13415      $ac_path_GREP_found && break 3
13416    done
13417  done
13418  done
13419IFS=$as_save_IFS
13420  if test -z "$ac_cv_path_GREP"; then
13421    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13422  fi
13423else
13424  ac_cv_path_GREP=$GREP
13425fi
13426
13427fi
13428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13429$as_echo "$ac_cv_path_GREP" >&6; }
13430 GREP="$ac_cv_path_GREP"
13431
13432
13433  else
13434    # The variable is set, but is it from the command line or the environment?
13435
13436    # Try to remove the string !GREP! from our list.
13437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13439      # If it failed, the variable was not from the command line. Ignore it,
13440      # but warn the user (except for BASH, which is always set by the calling BASH).
13441      if test "xGREP" != xBASH; then
13442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13443$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13444      fi
13445      # Try to locate tool using the code snippet
13446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13447$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13448if ${ac_cv_path_GREP+:} false; then :
13449  $as_echo_n "(cached) " >&6
13450else
13451  if test -z "$GREP"; then
13452  ac_path_GREP_found=false
13453  # Loop through the user's path and test for each of PROGNAME-LIST
13454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13455for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13456do
13457  IFS=$as_save_IFS
13458  test -z "$as_dir" && as_dir=.
13459    for ac_prog in grep ggrep; do
13460    for ac_exec_ext in '' $ac_executable_extensions; do
13461      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13462      as_fn_executable_p "$ac_path_GREP" || continue
13463# Check for GNU ac_path_GREP and select it if it is found.
13464  # Check for GNU $ac_path_GREP
13465case `"$ac_path_GREP" --version 2>&1` in
13466*GNU*)
13467  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13468*)
13469  ac_count=0
13470  $as_echo_n 0123456789 >"conftest.in"
13471  while :
13472  do
13473    cat "conftest.in" "conftest.in" >"conftest.tmp"
13474    mv "conftest.tmp" "conftest.in"
13475    cp "conftest.in" "conftest.nl"
13476    $as_echo 'GREP' >> "conftest.nl"
13477    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13478    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13479    as_fn_arith $ac_count + 1 && ac_count=$as_val
13480    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13481      # Best one so far, save it but keep looking for a better one
13482      ac_cv_path_GREP="$ac_path_GREP"
13483      ac_path_GREP_max=$ac_count
13484    fi
13485    # 10*(2^10) chars as input seems more than enough
13486    test $ac_count -gt 10 && break
13487  done
13488  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13489esac
13490
13491      $ac_path_GREP_found && break 3
13492    done
13493  done
13494  done
13495IFS=$as_save_IFS
13496  if test -z "$ac_cv_path_GREP"; then
13497    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13498  fi
13499else
13500  ac_cv_path_GREP=$GREP
13501fi
13502
13503fi
13504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13505$as_echo "$ac_cv_path_GREP" >&6; }
13506 GREP="$ac_cv_path_GREP"
13507
13508
13509    else
13510      # If it succeeded, then it was overridden by the user. We will use it
13511      # for the tool.
13512
13513      # First remove it from the list of overridden variables, so we can test
13514      # for unknown variables in the end.
13515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13516
13517      # Check if we try to supply an empty value
13518      if test "x$GREP" = x; then
13519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13520$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13522$as_echo_n "checking for GREP... " >&6; }
13523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13524$as_echo "disabled" >&6; }
13525      else
13526        # Check if the provided tool contains a complete path.
13527        tool_specified="$GREP"
13528        tool_basename="${tool_specified##*/}"
13529        if test "x$tool_basename" = "x$tool_specified"; then
13530          # A command without a complete path is provided, search $PATH.
13531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13532$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13533          # Extract the first word of "$tool_basename", so it can be a program name with args.
13534set dummy $tool_basename; ac_word=$2
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13536$as_echo_n "checking for $ac_word... " >&6; }
13537if ${ac_cv_path_GREP+:} false; then :
13538  $as_echo_n "(cached) " >&6
13539else
13540  case $GREP in
13541  [\\/]* | ?:[\\/]*)
13542  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13543  ;;
13544  *)
13545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13546for as_dir in $PATH
13547do
13548  IFS=$as_save_IFS
13549  test -z "$as_dir" && as_dir=.
13550    for ac_exec_ext in '' $ac_executable_extensions; do
13551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13552    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13554    break 2
13555  fi
13556done
13557  done
13558IFS=$as_save_IFS
13559
13560  ;;
13561esac
13562fi
13563GREP=$ac_cv_path_GREP
13564if test -n "$GREP"; then
13565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13566$as_echo "$GREP" >&6; }
13567else
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
13570fi
13571
13572
13573          if test "x$GREP" = x; then
13574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13575          fi
13576        else
13577          # Otherwise we believe it is a complete path. Use it as it is.
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13579$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13581$as_echo_n "checking for GREP... " >&6; }
13582          if test ! -x "$tool_specified"; then
13583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13584$as_echo "not found" >&6; }
13585            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13586          fi
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13588$as_echo "$tool_specified" >&6; }
13589        fi
13590      fi
13591    fi
13592
13593  fi
13594
13595
13596  if test "x$GREP" = x; then
13597    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13598  fi
13599
13600
13601
13602
13603  # Publish this variable in the help.
13604
13605
13606  if [ -z "${EGREP+x}" ]; then
13607    # The variable is not set by user, try to locate tool using the code snippet
13608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13609$as_echo_n "checking for egrep... " >&6; }
13610if ${ac_cv_path_EGREP+:} false; then :
13611  $as_echo_n "(cached) " >&6
13612else
13613  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13614   then ac_cv_path_EGREP="$GREP -E"
13615   else
13616     if test -z "$EGREP"; then
13617  ac_path_EGREP_found=false
13618  # Loop through the user's path and test for each of PROGNAME-LIST
13619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13620for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13621do
13622  IFS=$as_save_IFS
13623  test -z "$as_dir" && as_dir=.
13624    for ac_prog in egrep; do
13625    for ac_exec_ext in '' $ac_executable_extensions; do
13626      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13627      as_fn_executable_p "$ac_path_EGREP" || continue
13628# Check for GNU ac_path_EGREP and select it if it is found.
13629  # Check for GNU $ac_path_EGREP
13630case `"$ac_path_EGREP" --version 2>&1` in
13631*GNU*)
13632  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13633*)
13634  ac_count=0
13635  $as_echo_n 0123456789 >"conftest.in"
13636  while :
13637  do
13638    cat "conftest.in" "conftest.in" >"conftest.tmp"
13639    mv "conftest.tmp" "conftest.in"
13640    cp "conftest.in" "conftest.nl"
13641    $as_echo 'EGREP' >> "conftest.nl"
13642    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13643    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13644    as_fn_arith $ac_count + 1 && ac_count=$as_val
13645    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13646      # Best one so far, save it but keep looking for a better one
13647      ac_cv_path_EGREP="$ac_path_EGREP"
13648      ac_path_EGREP_max=$ac_count
13649    fi
13650    # 10*(2^10) chars as input seems more than enough
13651    test $ac_count -gt 10 && break
13652  done
13653  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13654esac
13655
13656      $ac_path_EGREP_found && break 3
13657    done
13658  done
13659  done
13660IFS=$as_save_IFS
13661  if test -z "$ac_cv_path_EGREP"; then
13662    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13663  fi
13664else
13665  ac_cv_path_EGREP=$EGREP
13666fi
13667
13668   fi
13669fi
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13671$as_echo "$ac_cv_path_EGREP" >&6; }
13672 EGREP="$ac_cv_path_EGREP"
13673
13674
13675  else
13676    # The variable is set, but is it from the command line or the environment?
13677
13678    # Try to remove the string !EGREP! from our list.
13679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13681      # If it failed, the variable was not from the command line. Ignore it,
13682      # but warn the user (except for BASH, which is always set by the calling BASH).
13683      if test "xEGREP" != xBASH; then
13684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13685$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13686      fi
13687      # Try to locate tool using the code snippet
13688      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13689$as_echo_n "checking for egrep... " >&6; }
13690if ${ac_cv_path_EGREP+:} false; then :
13691  $as_echo_n "(cached) " >&6
13692else
13693  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13694   then ac_cv_path_EGREP="$GREP -E"
13695   else
13696     if test -z "$EGREP"; then
13697  ac_path_EGREP_found=false
13698  # Loop through the user's path and test for each of PROGNAME-LIST
13699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13700for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13701do
13702  IFS=$as_save_IFS
13703  test -z "$as_dir" && as_dir=.
13704    for ac_prog in egrep; do
13705    for ac_exec_ext in '' $ac_executable_extensions; do
13706      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13707      as_fn_executable_p "$ac_path_EGREP" || continue
13708# Check for GNU ac_path_EGREP and select it if it is found.
13709  # Check for GNU $ac_path_EGREP
13710case `"$ac_path_EGREP" --version 2>&1` in
13711*GNU*)
13712  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13713*)
13714  ac_count=0
13715  $as_echo_n 0123456789 >"conftest.in"
13716  while :
13717  do
13718    cat "conftest.in" "conftest.in" >"conftest.tmp"
13719    mv "conftest.tmp" "conftest.in"
13720    cp "conftest.in" "conftest.nl"
13721    $as_echo 'EGREP' >> "conftest.nl"
13722    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13723    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13724    as_fn_arith $ac_count + 1 && ac_count=$as_val
13725    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13726      # Best one so far, save it but keep looking for a better one
13727      ac_cv_path_EGREP="$ac_path_EGREP"
13728      ac_path_EGREP_max=$ac_count
13729    fi
13730    # 10*(2^10) chars as input seems more than enough
13731    test $ac_count -gt 10 && break
13732  done
13733  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13734esac
13735
13736      $ac_path_EGREP_found && break 3
13737    done
13738  done
13739  done
13740IFS=$as_save_IFS
13741  if test -z "$ac_cv_path_EGREP"; then
13742    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13743  fi
13744else
13745  ac_cv_path_EGREP=$EGREP
13746fi
13747
13748   fi
13749fi
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13751$as_echo "$ac_cv_path_EGREP" >&6; }
13752 EGREP="$ac_cv_path_EGREP"
13753
13754
13755    else
13756      # If it succeeded, then it was overridden by the user. We will use it
13757      # for the tool.
13758
13759      # First remove it from the list of overridden variables, so we can test
13760      # for unknown variables in the end.
13761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13762
13763      # Check if we try to supply an empty value
13764      if test "x$EGREP" = x; then
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13766$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13768$as_echo_n "checking for EGREP... " >&6; }
13769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13770$as_echo "disabled" >&6; }
13771      else
13772        # Check if the provided tool contains a complete path.
13773        tool_specified="$EGREP"
13774        tool_basename="${tool_specified##*/}"
13775        if test "x$tool_basename" = "x$tool_specified"; then
13776          # A command without a complete path is provided, search $PATH.
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13778$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13779          # Extract the first word of "$tool_basename", so it can be a program name with args.
13780set dummy $tool_basename; ac_word=$2
13781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13782$as_echo_n "checking for $ac_word... " >&6; }
13783if ${ac_cv_path_EGREP+:} false; then :
13784  $as_echo_n "(cached) " >&6
13785else
13786  case $EGREP in
13787  [\\/]* | ?:[\\/]*)
13788  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13789  ;;
13790  *)
13791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13792for as_dir in $PATH
13793do
13794  IFS=$as_save_IFS
13795  test -z "$as_dir" && as_dir=.
13796    for ac_exec_ext in '' $ac_executable_extensions; do
13797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13798    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13800    break 2
13801  fi
13802done
13803  done
13804IFS=$as_save_IFS
13805
13806  ;;
13807esac
13808fi
13809EGREP=$ac_cv_path_EGREP
13810if test -n "$EGREP"; then
13811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13812$as_echo "$EGREP" >&6; }
13813else
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13815$as_echo "no" >&6; }
13816fi
13817
13818
13819          if test "x$EGREP" = x; then
13820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13821          fi
13822        else
13823          # Otherwise we believe it is a complete path. Use it as it is.
13824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13825$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13827$as_echo_n "checking for EGREP... " >&6; }
13828          if test ! -x "$tool_specified"; then
13829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13830$as_echo "not found" >&6; }
13831            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13832          fi
13833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13834$as_echo "$tool_specified" >&6; }
13835        fi
13836      fi
13837    fi
13838
13839  fi
13840
13841
13842  if test "x$EGREP" = x; then
13843    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13844  fi
13845
13846
13847
13848
13849  # Publish this variable in the help.
13850
13851
13852  if [ -z "${FGREP+x}" ]; then
13853    # The variable is not set by user, try to locate tool using the code snippet
13854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13855$as_echo_n "checking for fgrep... " >&6; }
13856if ${ac_cv_path_FGREP+:} false; then :
13857  $as_echo_n "(cached) " >&6
13858else
13859  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13860   then ac_cv_path_FGREP="$GREP -F"
13861   else
13862     if test -z "$FGREP"; then
13863  ac_path_FGREP_found=false
13864  # Loop through the user's path and test for each of PROGNAME-LIST
13865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13866for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13867do
13868  IFS=$as_save_IFS
13869  test -z "$as_dir" && as_dir=.
13870    for ac_prog in fgrep; do
13871    for ac_exec_ext in '' $ac_executable_extensions; do
13872      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13873      as_fn_executable_p "$ac_path_FGREP" || continue
13874# Check for GNU ac_path_FGREP and select it if it is found.
13875  # Check for GNU $ac_path_FGREP
13876case `"$ac_path_FGREP" --version 2>&1` in
13877*GNU*)
13878  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13879*)
13880  ac_count=0
13881  $as_echo_n 0123456789 >"conftest.in"
13882  while :
13883  do
13884    cat "conftest.in" "conftest.in" >"conftest.tmp"
13885    mv "conftest.tmp" "conftest.in"
13886    cp "conftest.in" "conftest.nl"
13887    $as_echo 'FGREP' >> "conftest.nl"
13888    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13889    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13890    as_fn_arith $ac_count + 1 && ac_count=$as_val
13891    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13892      # Best one so far, save it but keep looking for a better one
13893      ac_cv_path_FGREP="$ac_path_FGREP"
13894      ac_path_FGREP_max=$ac_count
13895    fi
13896    # 10*(2^10) chars as input seems more than enough
13897    test $ac_count -gt 10 && break
13898  done
13899  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13900esac
13901
13902      $ac_path_FGREP_found && break 3
13903    done
13904  done
13905  done
13906IFS=$as_save_IFS
13907  if test -z "$ac_cv_path_FGREP"; then
13908    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13909  fi
13910else
13911  ac_cv_path_FGREP=$FGREP
13912fi
13913
13914   fi
13915fi
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13917$as_echo "$ac_cv_path_FGREP" >&6; }
13918 FGREP="$ac_cv_path_FGREP"
13919
13920
13921  else
13922    # The variable is set, but is it from the command line or the environment?
13923
13924    # Try to remove the string !FGREP! from our list.
13925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13927      # If it failed, the variable was not from the command line. Ignore it,
13928      # but warn the user (except for BASH, which is always set by the calling BASH).
13929      if test "xFGREP" != xBASH; then
13930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13931$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13932      fi
13933      # Try to locate tool using the code snippet
13934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13935$as_echo_n "checking for fgrep... " >&6; }
13936if ${ac_cv_path_FGREP+:} false; then :
13937  $as_echo_n "(cached) " >&6
13938else
13939  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13940   then ac_cv_path_FGREP="$GREP -F"
13941   else
13942     if test -z "$FGREP"; then
13943  ac_path_FGREP_found=false
13944  # Loop through the user's path and test for each of PROGNAME-LIST
13945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13946for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13947do
13948  IFS=$as_save_IFS
13949  test -z "$as_dir" && as_dir=.
13950    for ac_prog in fgrep; do
13951    for ac_exec_ext in '' $ac_executable_extensions; do
13952      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13953      as_fn_executable_p "$ac_path_FGREP" || continue
13954# Check for GNU ac_path_FGREP and select it if it is found.
13955  # Check for GNU $ac_path_FGREP
13956case `"$ac_path_FGREP" --version 2>&1` in
13957*GNU*)
13958  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13959*)
13960  ac_count=0
13961  $as_echo_n 0123456789 >"conftest.in"
13962  while :
13963  do
13964    cat "conftest.in" "conftest.in" >"conftest.tmp"
13965    mv "conftest.tmp" "conftest.in"
13966    cp "conftest.in" "conftest.nl"
13967    $as_echo 'FGREP' >> "conftest.nl"
13968    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13969    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13970    as_fn_arith $ac_count + 1 && ac_count=$as_val
13971    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13972      # Best one so far, save it but keep looking for a better one
13973      ac_cv_path_FGREP="$ac_path_FGREP"
13974      ac_path_FGREP_max=$ac_count
13975    fi
13976    # 10*(2^10) chars as input seems more than enough
13977    test $ac_count -gt 10 && break
13978  done
13979  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13980esac
13981
13982      $ac_path_FGREP_found && break 3
13983    done
13984  done
13985  done
13986IFS=$as_save_IFS
13987  if test -z "$ac_cv_path_FGREP"; then
13988    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13989  fi
13990else
13991  ac_cv_path_FGREP=$FGREP
13992fi
13993
13994   fi
13995fi
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13997$as_echo "$ac_cv_path_FGREP" >&6; }
13998 FGREP="$ac_cv_path_FGREP"
13999
14000
14001    else
14002      # If it succeeded, then it was overridden by the user. We will use it
14003      # for the tool.
14004
14005      # First remove it from the list of overridden variables, so we can test
14006      # for unknown variables in the end.
14007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14008
14009      # Check if we try to supply an empty value
14010      if test "x$FGREP" = x; then
14011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14012$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14014$as_echo_n "checking for FGREP... " >&6; }
14015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14016$as_echo "disabled" >&6; }
14017      else
14018        # Check if the provided tool contains a complete path.
14019        tool_specified="$FGREP"
14020        tool_basename="${tool_specified##*/}"
14021        if test "x$tool_basename" = "x$tool_specified"; then
14022          # A command without a complete path is provided, search $PATH.
14023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14024$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14025          # Extract the first word of "$tool_basename", so it can be a program name with args.
14026set dummy $tool_basename; ac_word=$2
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14028$as_echo_n "checking for $ac_word... " >&6; }
14029if ${ac_cv_path_FGREP+:} false; then :
14030  $as_echo_n "(cached) " >&6
14031else
14032  case $FGREP in
14033  [\\/]* | ?:[\\/]*)
14034  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14035  ;;
14036  *)
14037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14038for as_dir in $PATH
14039do
14040  IFS=$as_save_IFS
14041  test -z "$as_dir" && as_dir=.
14042    for ac_exec_ext in '' $ac_executable_extensions; do
14043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14044    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14046    break 2
14047  fi
14048done
14049  done
14050IFS=$as_save_IFS
14051
14052  ;;
14053esac
14054fi
14055FGREP=$ac_cv_path_FGREP
14056if test -n "$FGREP"; then
14057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14058$as_echo "$FGREP" >&6; }
14059else
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061$as_echo "no" >&6; }
14062fi
14063
14064
14065          if test "x$FGREP" = x; then
14066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14067          fi
14068        else
14069          # Otherwise we believe it is a complete path. Use it as it is.
14070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14071$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14073$as_echo_n "checking for FGREP... " >&6; }
14074          if test ! -x "$tool_specified"; then
14075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14076$as_echo "not found" >&6; }
14077            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14078          fi
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14080$as_echo "$tool_specified" >&6; }
14081        fi
14082      fi
14083    fi
14084
14085  fi
14086
14087
14088  if test "x$FGREP" = x; then
14089    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14090  fi
14091
14092
14093
14094
14095  # Publish this variable in the help.
14096
14097
14098  if [ -z "${SED+x}" ]; then
14099    # The variable is not set by user, try to locate tool using the code snippet
14100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14101$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14102if ${ac_cv_path_SED+:} false; then :
14103  $as_echo_n "(cached) " >&6
14104else
14105            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14106     for ac_i in 1 2 3 4 5 6 7; do
14107       ac_script="$ac_script$as_nl$ac_script"
14108     done
14109     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14110     { ac_script=; unset ac_script;}
14111     if test -z "$SED"; then
14112  ac_path_SED_found=false
14113  # Loop through the user's path and test for each of PROGNAME-LIST
14114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14115for as_dir in $PATH
14116do
14117  IFS=$as_save_IFS
14118  test -z "$as_dir" && as_dir=.
14119    for ac_prog in sed gsed; do
14120    for ac_exec_ext in '' $ac_executable_extensions; do
14121      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14122      as_fn_executable_p "$ac_path_SED" || continue
14123# Check for GNU ac_path_SED and select it if it is found.
14124  # Check for GNU $ac_path_SED
14125case `"$ac_path_SED" --version 2>&1` in
14126*GNU*)
14127  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14128*)
14129  ac_count=0
14130  $as_echo_n 0123456789 >"conftest.in"
14131  while :
14132  do
14133    cat "conftest.in" "conftest.in" >"conftest.tmp"
14134    mv "conftest.tmp" "conftest.in"
14135    cp "conftest.in" "conftest.nl"
14136    $as_echo '' >> "conftest.nl"
14137    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14138    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14139    as_fn_arith $ac_count + 1 && ac_count=$as_val
14140    if test $ac_count -gt ${ac_path_SED_max-0}; then
14141      # Best one so far, save it but keep looking for a better one
14142      ac_cv_path_SED="$ac_path_SED"
14143      ac_path_SED_max=$ac_count
14144    fi
14145    # 10*(2^10) chars as input seems more than enough
14146    test $ac_count -gt 10 && break
14147  done
14148  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14149esac
14150
14151      $ac_path_SED_found && break 3
14152    done
14153  done
14154  done
14155IFS=$as_save_IFS
14156  if test -z "$ac_cv_path_SED"; then
14157    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14158  fi
14159else
14160  ac_cv_path_SED=$SED
14161fi
14162
14163fi
14164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14165$as_echo "$ac_cv_path_SED" >&6; }
14166 SED="$ac_cv_path_SED"
14167  rm -f conftest.sed
14168
14169  else
14170    # The variable is set, but is it from the command line or the environment?
14171
14172    # Try to remove the string !SED! from our list.
14173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14175      # If it failed, the variable was not from the command line. Ignore it,
14176      # but warn the user (except for BASH, which is always set by the calling BASH).
14177      if test "xSED" != xBASH; then
14178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14179$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14180      fi
14181      # Try to locate tool using the code snippet
14182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14183$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14184if ${ac_cv_path_SED+:} false; then :
14185  $as_echo_n "(cached) " >&6
14186else
14187            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14188     for ac_i in 1 2 3 4 5 6 7; do
14189       ac_script="$ac_script$as_nl$ac_script"
14190     done
14191     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14192     { ac_script=; unset ac_script;}
14193     if test -z "$SED"; then
14194  ac_path_SED_found=false
14195  # Loop through the user's path and test for each of PROGNAME-LIST
14196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14197for as_dir in $PATH
14198do
14199  IFS=$as_save_IFS
14200  test -z "$as_dir" && as_dir=.
14201    for ac_prog in sed gsed; do
14202    for ac_exec_ext in '' $ac_executable_extensions; do
14203      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14204      as_fn_executable_p "$ac_path_SED" || continue
14205# Check for GNU ac_path_SED and select it if it is found.
14206  # Check for GNU $ac_path_SED
14207case `"$ac_path_SED" --version 2>&1` in
14208*GNU*)
14209  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14210*)
14211  ac_count=0
14212  $as_echo_n 0123456789 >"conftest.in"
14213  while :
14214  do
14215    cat "conftest.in" "conftest.in" >"conftest.tmp"
14216    mv "conftest.tmp" "conftest.in"
14217    cp "conftest.in" "conftest.nl"
14218    $as_echo '' >> "conftest.nl"
14219    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14220    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14221    as_fn_arith $ac_count + 1 && ac_count=$as_val
14222    if test $ac_count -gt ${ac_path_SED_max-0}; then
14223      # Best one so far, save it but keep looking for a better one
14224      ac_cv_path_SED="$ac_path_SED"
14225      ac_path_SED_max=$ac_count
14226    fi
14227    # 10*(2^10) chars as input seems more than enough
14228    test $ac_count -gt 10 && break
14229  done
14230  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14231esac
14232
14233      $ac_path_SED_found && break 3
14234    done
14235  done
14236  done
14237IFS=$as_save_IFS
14238  if test -z "$ac_cv_path_SED"; then
14239    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14240  fi
14241else
14242  ac_cv_path_SED=$SED
14243fi
14244
14245fi
14246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14247$as_echo "$ac_cv_path_SED" >&6; }
14248 SED="$ac_cv_path_SED"
14249  rm -f conftest.sed
14250
14251    else
14252      # If it succeeded, then it was overridden by the user. We will use it
14253      # for the tool.
14254
14255      # First remove it from the list of overridden variables, so we can test
14256      # for unknown variables in the end.
14257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14258
14259      # Check if we try to supply an empty value
14260      if test "x$SED" = x; then
14261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14262$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14264$as_echo_n "checking for SED... " >&6; }
14265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14266$as_echo "disabled" >&6; }
14267      else
14268        # Check if the provided tool contains a complete path.
14269        tool_specified="$SED"
14270        tool_basename="${tool_specified##*/}"
14271        if test "x$tool_basename" = "x$tool_specified"; then
14272          # A command without a complete path is provided, search $PATH.
14273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14274$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14275          # Extract the first word of "$tool_basename", so it can be a program name with args.
14276set dummy $tool_basename; ac_word=$2
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14278$as_echo_n "checking for $ac_word... " >&6; }
14279if ${ac_cv_path_SED+:} false; then :
14280  $as_echo_n "(cached) " >&6
14281else
14282  case $SED in
14283  [\\/]* | ?:[\\/]*)
14284  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14285  ;;
14286  *)
14287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14288for as_dir in $PATH
14289do
14290  IFS=$as_save_IFS
14291  test -z "$as_dir" && as_dir=.
14292    for ac_exec_ext in '' $ac_executable_extensions; do
14293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14294    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14296    break 2
14297  fi
14298done
14299  done
14300IFS=$as_save_IFS
14301
14302  ;;
14303esac
14304fi
14305SED=$ac_cv_path_SED
14306if test -n "$SED"; then
14307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14308$as_echo "$SED" >&6; }
14309else
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14311$as_echo "no" >&6; }
14312fi
14313
14314
14315          if test "x$SED" = x; then
14316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14317          fi
14318        else
14319          # Otherwise we believe it is a complete path. Use it as it is.
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14321$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14323$as_echo_n "checking for SED... " >&6; }
14324          if test ! -x "$tool_specified"; then
14325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14326$as_echo "not found" >&6; }
14327            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14328          fi
14329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14330$as_echo "$tool_specified" >&6; }
14331        fi
14332      fi
14333    fi
14334
14335  fi
14336
14337
14338  if test "x$SED" = x; then
14339    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14340  fi
14341
14342
14343
14344  # Always force rm.
14345  RM="$RM -f"
14346
14347  # pwd behaves differently on various platforms and some don't support the -L flag.
14348  # Always use the bash builtin pwd to get uniform behavior.
14349  THEPWDCMD=pwd
14350
14351  # These are not required on all platforms
14352
14353
14354  # Publish this variable in the help.
14355
14356
14357  if [ -z "${CYGPATH+x}" ]; then
14358    # The variable is not set by user, try to locate tool using the code snippet
14359    for ac_prog in cygpath
14360do
14361  # Extract the first word of "$ac_prog", so it can be a program name with args.
14362set dummy $ac_prog; ac_word=$2
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14364$as_echo_n "checking for $ac_word... " >&6; }
14365if ${ac_cv_path_CYGPATH+:} false; then :
14366  $as_echo_n "(cached) " >&6
14367else
14368  case $CYGPATH in
14369  [\\/]* | ?:[\\/]*)
14370  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14371  ;;
14372  *)
14373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14374for as_dir in $PATH
14375do
14376  IFS=$as_save_IFS
14377  test -z "$as_dir" && as_dir=.
14378    for ac_exec_ext in '' $ac_executable_extensions; do
14379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14380    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14382    break 2
14383  fi
14384done
14385  done
14386IFS=$as_save_IFS
14387
14388  ;;
14389esac
14390fi
14391CYGPATH=$ac_cv_path_CYGPATH
14392if test -n "$CYGPATH"; then
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14394$as_echo "$CYGPATH" >&6; }
14395else
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397$as_echo "no" >&6; }
14398fi
14399
14400
14401  test -n "$CYGPATH" && break
14402done
14403
14404  else
14405    # The variable is set, but is it from the command line or the environment?
14406
14407    # Try to remove the string !CYGPATH! from our list.
14408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14410      # If it failed, the variable was not from the command line. Ignore it,
14411      # but warn the user (except for BASH, which is always set by the calling BASH).
14412      if test "xCYGPATH" != xBASH; then
14413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14414$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14415      fi
14416      # Try to locate tool using the code snippet
14417      for ac_prog in cygpath
14418do
14419  # Extract the first word of "$ac_prog", so it can be a program name with args.
14420set dummy $ac_prog; ac_word=$2
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14422$as_echo_n "checking for $ac_word... " >&6; }
14423if ${ac_cv_path_CYGPATH+:} false; then :
14424  $as_echo_n "(cached) " >&6
14425else
14426  case $CYGPATH in
14427  [\\/]* | ?:[\\/]*)
14428  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14429  ;;
14430  *)
14431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14432for as_dir in $PATH
14433do
14434  IFS=$as_save_IFS
14435  test -z "$as_dir" && as_dir=.
14436    for ac_exec_ext in '' $ac_executable_extensions; do
14437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14438    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14440    break 2
14441  fi
14442done
14443  done
14444IFS=$as_save_IFS
14445
14446  ;;
14447esac
14448fi
14449CYGPATH=$ac_cv_path_CYGPATH
14450if test -n "$CYGPATH"; then
14451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14452$as_echo "$CYGPATH" >&6; }
14453else
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14455$as_echo "no" >&6; }
14456fi
14457
14458
14459  test -n "$CYGPATH" && break
14460done
14461
14462    else
14463      # If it succeeded, then it was overridden by the user. We will use it
14464      # for the tool.
14465
14466      # First remove it from the list of overridden variables, so we can test
14467      # for unknown variables in the end.
14468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14469
14470      # Check if we try to supply an empty value
14471      if test "x$CYGPATH" = x; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14473$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14475$as_echo_n "checking for CYGPATH... " >&6; }
14476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14477$as_echo "disabled" >&6; }
14478      else
14479        # Check if the provided tool contains a complete path.
14480        tool_specified="$CYGPATH"
14481        tool_basename="${tool_specified##*/}"
14482        if test "x$tool_basename" = "x$tool_specified"; then
14483          # A command without a complete path is provided, search $PATH.
14484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14485$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14486          # Extract the first word of "$tool_basename", so it can be a program name with args.
14487set dummy $tool_basename; ac_word=$2
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14489$as_echo_n "checking for $ac_word... " >&6; }
14490if ${ac_cv_path_CYGPATH+:} false; then :
14491  $as_echo_n "(cached) " >&6
14492else
14493  case $CYGPATH in
14494  [\\/]* | ?:[\\/]*)
14495  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14496  ;;
14497  *)
14498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14499for as_dir in $PATH
14500do
14501  IFS=$as_save_IFS
14502  test -z "$as_dir" && as_dir=.
14503    for ac_exec_ext in '' $ac_executable_extensions; do
14504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14505    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14507    break 2
14508  fi
14509done
14510  done
14511IFS=$as_save_IFS
14512
14513  ;;
14514esac
14515fi
14516CYGPATH=$ac_cv_path_CYGPATH
14517if test -n "$CYGPATH"; then
14518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14519$as_echo "$CYGPATH" >&6; }
14520else
14521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14522$as_echo "no" >&6; }
14523fi
14524
14525
14526          if test "x$CYGPATH" = x; then
14527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14528          fi
14529        else
14530          # Otherwise we believe it is a complete path. Use it as it is.
14531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14532$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14534$as_echo_n "checking for CYGPATH... " >&6; }
14535          if test ! -x "$tool_specified"; then
14536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14537$as_echo "not found" >&6; }
14538            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14539          fi
14540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14541$as_echo "$tool_specified" >&6; }
14542        fi
14543      fi
14544    fi
14545
14546  fi
14547
14548
14549
14550
14551  # Publish this variable in the help.
14552
14553
14554  if [ -z "${READLINK+x}" ]; then
14555    # The variable is not set by user, try to locate tool using the code snippet
14556    for ac_prog in greadlink readlink
14557do
14558  # Extract the first word of "$ac_prog", so it can be a program name with args.
14559set dummy $ac_prog; ac_word=$2
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14561$as_echo_n "checking for $ac_word... " >&6; }
14562if ${ac_cv_path_READLINK+:} false; then :
14563  $as_echo_n "(cached) " >&6
14564else
14565  case $READLINK in
14566  [\\/]* | ?:[\\/]*)
14567  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14568  ;;
14569  *)
14570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14571for as_dir in $PATH
14572do
14573  IFS=$as_save_IFS
14574  test -z "$as_dir" && as_dir=.
14575    for ac_exec_ext in '' $ac_executable_extensions; do
14576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14577    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14579    break 2
14580  fi
14581done
14582  done
14583IFS=$as_save_IFS
14584
14585  ;;
14586esac
14587fi
14588READLINK=$ac_cv_path_READLINK
14589if test -n "$READLINK"; then
14590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14591$as_echo "$READLINK" >&6; }
14592else
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14594$as_echo "no" >&6; }
14595fi
14596
14597
14598  test -n "$READLINK" && break
14599done
14600
14601  else
14602    # The variable is set, but is it from the command line or the environment?
14603
14604    # Try to remove the string !READLINK! from our list.
14605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14607      # If it failed, the variable was not from the command line. Ignore it,
14608      # but warn the user (except for BASH, which is always set by the calling BASH).
14609      if test "xREADLINK" != xBASH; then
14610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14611$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14612      fi
14613      # Try to locate tool using the code snippet
14614      for ac_prog in greadlink readlink
14615do
14616  # Extract the first word of "$ac_prog", so it can be a program name with args.
14617set dummy $ac_prog; ac_word=$2
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14619$as_echo_n "checking for $ac_word... " >&6; }
14620if ${ac_cv_path_READLINK+:} false; then :
14621  $as_echo_n "(cached) " >&6
14622else
14623  case $READLINK in
14624  [\\/]* | ?:[\\/]*)
14625  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14626  ;;
14627  *)
14628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14629for as_dir in $PATH
14630do
14631  IFS=$as_save_IFS
14632  test -z "$as_dir" && as_dir=.
14633    for ac_exec_ext in '' $ac_executable_extensions; do
14634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14635    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14637    break 2
14638  fi
14639done
14640  done
14641IFS=$as_save_IFS
14642
14643  ;;
14644esac
14645fi
14646READLINK=$ac_cv_path_READLINK
14647if test -n "$READLINK"; then
14648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14649$as_echo "$READLINK" >&6; }
14650else
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14652$as_echo "no" >&6; }
14653fi
14654
14655
14656  test -n "$READLINK" && break
14657done
14658
14659    else
14660      # If it succeeded, then it was overridden by the user. We will use it
14661      # for the tool.
14662
14663      # First remove it from the list of overridden variables, so we can test
14664      # for unknown variables in the end.
14665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14666
14667      # Check if we try to supply an empty value
14668      if test "x$READLINK" = x; then
14669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14670$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14672$as_echo_n "checking for READLINK... " >&6; }
14673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14674$as_echo "disabled" >&6; }
14675      else
14676        # Check if the provided tool contains a complete path.
14677        tool_specified="$READLINK"
14678        tool_basename="${tool_specified##*/}"
14679        if test "x$tool_basename" = "x$tool_specified"; then
14680          # A command without a complete path is provided, search $PATH.
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14682$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14683          # Extract the first word of "$tool_basename", so it can be a program name with args.
14684set dummy $tool_basename; ac_word=$2
14685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14686$as_echo_n "checking for $ac_word... " >&6; }
14687if ${ac_cv_path_READLINK+:} false; then :
14688  $as_echo_n "(cached) " >&6
14689else
14690  case $READLINK in
14691  [\\/]* | ?:[\\/]*)
14692  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14693  ;;
14694  *)
14695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14696for as_dir in $PATH
14697do
14698  IFS=$as_save_IFS
14699  test -z "$as_dir" && as_dir=.
14700    for ac_exec_ext in '' $ac_executable_extensions; do
14701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14702    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14704    break 2
14705  fi
14706done
14707  done
14708IFS=$as_save_IFS
14709
14710  ;;
14711esac
14712fi
14713READLINK=$ac_cv_path_READLINK
14714if test -n "$READLINK"; then
14715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14716$as_echo "$READLINK" >&6; }
14717else
14718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14719$as_echo "no" >&6; }
14720fi
14721
14722
14723          if test "x$READLINK" = x; then
14724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14725          fi
14726        else
14727          # Otherwise we believe it is a complete path. Use it as it is.
14728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14729$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14731$as_echo_n "checking for READLINK... " >&6; }
14732          if test ! -x "$tool_specified"; then
14733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14734$as_echo "not found" >&6; }
14735            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14736          fi
14737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14738$as_echo "$tool_specified" >&6; }
14739        fi
14740      fi
14741    fi
14742
14743  fi
14744
14745
14746
14747
14748  # Publish this variable in the help.
14749
14750
14751  if [ -z "${DF+x}" ]; then
14752    # The variable is not set by user, try to locate tool using the code snippet
14753    for ac_prog in df
14754do
14755  # Extract the first word of "$ac_prog", so it can be a program name with args.
14756set dummy $ac_prog; ac_word=$2
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14758$as_echo_n "checking for $ac_word... " >&6; }
14759if ${ac_cv_path_DF+:} false; then :
14760  $as_echo_n "(cached) " >&6
14761else
14762  case $DF in
14763  [\\/]* | ?:[\\/]*)
14764  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14765  ;;
14766  *)
14767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14768for as_dir in $PATH
14769do
14770  IFS=$as_save_IFS
14771  test -z "$as_dir" && as_dir=.
14772    for ac_exec_ext in '' $ac_executable_extensions; do
14773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14774    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14776    break 2
14777  fi
14778done
14779  done
14780IFS=$as_save_IFS
14781
14782  ;;
14783esac
14784fi
14785DF=$ac_cv_path_DF
14786if test -n "$DF"; then
14787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14788$as_echo "$DF" >&6; }
14789else
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14791$as_echo "no" >&6; }
14792fi
14793
14794
14795  test -n "$DF" && break
14796done
14797
14798  else
14799    # The variable is set, but is it from the command line or the environment?
14800
14801    # Try to remove the string !DF! from our list.
14802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14804      # If it failed, the variable was not from the command line. Ignore it,
14805      # but warn the user (except for BASH, which is always set by the calling BASH).
14806      if test "xDF" != xBASH; then
14807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14808$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14809      fi
14810      # Try to locate tool using the code snippet
14811      for ac_prog in df
14812do
14813  # Extract the first word of "$ac_prog", so it can be a program name with args.
14814set dummy $ac_prog; ac_word=$2
14815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14816$as_echo_n "checking for $ac_word... " >&6; }
14817if ${ac_cv_path_DF+:} false; then :
14818  $as_echo_n "(cached) " >&6
14819else
14820  case $DF in
14821  [\\/]* | ?:[\\/]*)
14822  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14823  ;;
14824  *)
14825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14826for as_dir in $PATH
14827do
14828  IFS=$as_save_IFS
14829  test -z "$as_dir" && as_dir=.
14830    for ac_exec_ext in '' $ac_executable_extensions; do
14831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14832    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14834    break 2
14835  fi
14836done
14837  done
14838IFS=$as_save_IFS
14839
14840  ;;
14841esac
14842fi
14843DF=$ac_cv_path_DF
14844if test -n "$DF"; then
14845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14846$as_echo "$DF" >&6; }
14847else
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14849$as_echo "no" >&6; }
14850fi
14851
14852
14853  test -n "$DF" && break
14854done
14855
14856    else
14857      # If it succeeded, then it was overridden by the user. We will use it
14858      # for the tool.
14859
14860      # First remove it from the list of overridden variables, so we can test
14861      # for unknown variables in the end.
14862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14863
14864      # Check if we try to supply an empty value
14865      if test "x$DF" = x; then
14866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14867$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14869$as_echo_n "checking for DF... " >&6; }
14870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14871$as_echo "disabled" >&6; }
14872      else
14873        # Check if the provided tool contains a complete path.
14874        tool_specified="$DF"
14875        tool_basename="${tool_specified##*/}"
14876        if test "x$tool_basename" = "x$tool_specified"; then
14877          # A command without a complete path is provided, search $PATH.
14878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14879$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14880          # Extract the first word of "$tool_basename", so it can be a program name with args.
14881set dummy $tool_basename; ac_word=$2
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14883$as_echo_n "checking for $ac_word... " >&6; }
14884if ${ac_cv_path_DF+:} false; then :
14885  $as_echo_n "(cached) " >&6
14886else
14887  case $DF in
14888  [\\/]* | ?:[\\/]*)
14889  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14890  ;;
14891  *)
14892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14893for as_dir in $PATH
14894do
14895  IFS=$as_save_IFS
14896  test -z "$as_dir" && as_dir=.
14897    for ac_exec_ext in '' $ac_executable_extensions; do
14898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14899    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14901    break 2
14902  fi
14903done
14904  done
14905IFS=$as_save_IFS
14906
14907  ;;
14908esac
14909fi
14910DF=$ac_cv_path_DF
14911if test -n "$DF"; then
14912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14913$as_echo "$DF" >&6; }
14914else
14915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14916$as_echo "no" >&6; }
14917fi
14918
14919
14920          if test "x$DF" = x; then
14921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14922          fi
14923        else
14924          # Otherwise we believe it is a complete path. Use it as it is.
14925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14926$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14928$as_echo_n "checking for DF... " >&6; }
14929          if test ! -x "$tool_specified"; then
14930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14931$as_echo "not found" >&6; }
14932            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14933          fi
14934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14935$as_echo "$tool_specified" >&6; }
14936        fi
14937      fi
14938    fi
14939
14940  fi
14941
14942
14943
14944
14945  # Publish this variable in the help.
14946
14947
14948  if [ -z "${CPIO+x}" ]; then
14949    # The variable is not set by user, try to locate tool using the code snippet
14950    for ac_prog in cpio bsdcpio
14951do
14952  # Extract the first word of "$ac_prog", so it can be a program name with args.
14953set dummy $ac_prog; ac_word=$2
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14955$as_echo_n "checking for $ac_word... " >&6; }
14956if ${ac_cv_path_CPIO+:} false; then :
14957  $as_echo_n "(cached) " >&6
14958else
14959  case $CPIO in
14960  [\\/]* | ?:[\\/]*)
14961  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14962  ;;
14963  *)
14964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14965for as_dir in $PATH
14966do
14967  IFS=$as_save_IFS
14968  test -z "$as_dir" && as_dir=.
14969    for ac_exec_ext in '' $ac_executable_extensions; do
14970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14971    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14973    break 2
14974  fi
14975done
14976  done
14977IFS=$as_save_IFS
14978
14979  ;;
14980esac
14981fi
14982CPIO=$ac_cv_path_CPIO
14983if test -n "$CPIO"; then
14984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14985$as_echo "$CPIO" >&6; }
14986else
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14988$as_echo "no" >&6; }
14989fi
14990
14991
14992  test -n "$CPIO" && break
14993done
14994
14995  else
14996    # The variable is set, but is it from the command line or the environment?
14997
14998    # Try to remove the string !CPIO! from our list.
14999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15001      # If it failed, the variable was not from the command line. Ignore it,
15002      # but warn the user (except for BASH, which is always set by the calling BASH).
15003      if test "xCPIO" != xBASH; then
15004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15005$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15006      fi
15007      # Try to locate tool using the code snippet
15008      for ac_prog in cpio bsdcpio
15009do
15010  # Extract the first word of "$ac_prog", so it can be a program name with args.
15011set dummy $ac_prog; ac_word=$2
15012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15013$as_echo_n "checking for $ac_word... " >&6; }
15014if ${ac_cv_path_CPIO+:} false; then :
15015  $as_echo_n "(cached) " >&6
15016else
15017  case $CPIO in
15018  [\\/]* | ?:[\\/]*)
15019  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15020  ;;
15021  *)
15022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15023for as_dir in $PATH
15024do
15025  IFS=$as_save_IFS
15026  test -z "$as_dir" && as_dir=.
15027    for ac_exec_ext in '' $ac_executable_extensions; do
15028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15029    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15031    break 2
15032  fi
15033done
15034  done
15035IFS=$as_save_IFS
15036
15037  ;;
15038esac
15039fi
15040CPIO=$ac_cv_path_CPIO
15041if test -n "$CPIO"; then
15042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15043$as_echo "$CPIO" >&6; }
15044else
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15046$as_echo "no" >&6; }
15047fi
15048
15049
15050  test -n "$CPIO" && break
15051done
15052
15053    else
15054      # If it succeeded, then it was overridden by the user. We will use it
15055      # for the tool.
15056
15057      # First remove it from the list of overridden variables, so we can test
15058      # for unknown variables in the end.
15059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15060
15061      # Check if we try to supply an empty value
15062      if test "x$CPIO" = x; then
15063        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15064$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15066$as_echo_n "checking for CPIO... " >&6; }
15067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15068$as_echo "disabled" >&6; }
15069      else
15070        # Check if the provided tool contains a complete path.
15071        tool_specified="$CPIO"
15072        tool_basename="${tool_specified##*/}"
15073        if test "x$tool_basename" = "x$tool_specified"; then
15074          # A command without a complete path is provided, search $PATH.
15075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15076$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15077          # Extract the first word of "$tool_basename", so it can be a program name with args.
15078set dummy $tool_basename; ac_word=$2
15079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15080$as_echo_n "checking for $ac_word... " >&6; }
15081if ${ac_cv_path_CPIO+:} false; then :
15082  $as_echo_n "(cached) " >&6
15083else
15084  case $CPIO in
15085  [\\/]* | ?:[\\/]*)
15086  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15087  ;;
15088  *)
15089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15090for as_dir in $PATH
15091do
15092  IFS=$as_save_IFS
15093  test -z "$as_dir" && as_dir=.
15094    for ac_exec_ext in '' $ac_executable_extensions; do
15095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15096    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15098    break 2
15099  fi
15100done
15101  done
15102IFS=$as_save_IFS
15103
15104  ;;
15105esac
15106fi
15107CPIO=$ac_cv_path_CPIO
15108if test -n "$CPIO"; then
15109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15110$as_echo "$CPIO" >&6; }
15111else
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15113$as_echo "no" >&6; }
15114fi
15115
15116
15117          if test "x$CPIO" = x; then
15118            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15119          fi
15120        else
15121          # Otherwise we believe it is a complete path. Use it as it is.
15122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15123$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15124          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15125$as_echo_n "checking for CPIO... " >&6; }
15126          if test ! -x "$tool_specified"; then
15127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15128$as_echo "not found" >&6; }
15129            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15130          fi
15131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15132$as_echo "$tool_specified" >&6; }
15133        fi
15134      fi
15135    fi
15136
15137  fi
15138
15139
15140
15141
15142  # Publish this variable in the help.
15143
15144
15145  if [ -z "${NICE+x}" ]; then
15146    # The variable is not set by user, try to locate tool using the code snippet
15147    for ac_prog in nice
15148do
15149  # Extract the first word of "$ac_prog", so it can be a program name with args.
15150set dummy $ac_prog; ac_word=$2
15151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15152$as_echo_n "checking for $ac_word... " >&6; }
15153if ${ac_cv_path_NICE+:} false; then :
15154  $as_echo_n "(cached) " >&6
15155else
15156  case $NICE in
15157  [\\/]* | ?:[\\/]*)
15158  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15159  ;;
15160  *)
15161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15162for as_dir in $PATH
15163do
15164  IFS=$as_save_IFS
15165  test -z "$as_dir" && as_dir=.
15166    for ac_exec_ext in '' $ac_executable_extensions; do
15167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15168    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15170    break 2
15171  fi
15172done
15173  done
15174IFS=$as_save_IFS
15175
15176  ;;
15177esac
15178fi
15179NICE=$ac_cv_path_NICE
15180if test -n "$NICE"; then
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15182$as_echo "$NICE" >&6; }
15183else
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15185$as_echo "no" >&6; }
15186fi
15187
15188
15189  test -n "$NICE" && break
15190done
15191
15192  else
15193    # The variable is set, but is it from the command line or the environment?
15194
15195    # Try to remove the string !NICE! from our list.
15196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15198      # If it failed, the variable was not from the command line. Ignore it,
15199      # but warn the user (except for BASH, which is always set by the calling BASH).
15200      if test "xNICE" != xBASH; then
15201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15202$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15203      fi
15204      # Try to locate tool using the code snippet
15205      for ac_prog in nice
15206do
15207  # Extract the first word of "$ac_prog", so it can be a program name with args.
15208set dummy $ac_prog; ac_word=$2
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15210$as_echo_n "checking for $ac_word... " >&6; }
15211if ${ac_cv_path_NICE+:} false; then :
15212  $as_echo_n "(cached) " >&6
15213else
15214  case $NICE in
15215  [\\/]* | ?:[\\/]*)
15216  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15217  ;;
15218  *)
15219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15220for as_dir in $PATH
15221do
15222  IFS=$as_save_IFS
15223  test -z "$as_dir" && as_dir=.
15224    for ac_exec_ext in '' $ac_executable_extensions; do
15225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15226    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15228    break 2
15229  fi
15230done
15231  done
15232IFS=$as_save_IFS
15233
15234  ;;
15235esac
15236fi
15237NICE=$ac_cv_path_NICE
15238if test -n "$NICE"; then
15239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15240$as_echo "$NICE" >&6; }
15241else
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15243$as_echo "no" >&6; }
15244fi
15245
15246
15247  test -n "$NICE" && break
15248done
15249
15250    else
15251      # If it succeeded, then it was overridden by the user. We will use it
15252      # for the tool.
15253
15254      # First remove it from the list of overridden variables, so we can test
15255      # for unknown variables in the end.
15256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15257
15258      # Check if we try to supply an empty value
15259      if test "x$NICE" = x; then
15260        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15261$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15263$as_echo_n "checking for NICE... " >&6; }
15264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15265$as_echo "disabled" >&6; }
15266      else
15267        # Check if the provided tool contains a complete path.
15268        tool_specified="$NICE"
15269        tool_basename="${tool_specified##*/}"
15270        if test "x$tool_basename" = "x$tool_specified"; then
15271          # A command without a complete path is provided, search $PATH.
15272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15273$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15274          # Extract the first word of "$tool_basename", so it can be a program name with args.
15275set dummy $tool_basename; ac_word=$2
15276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15277$as_echo_n "checking for $ac_word... " >&6; }
15278if ${ac_cv_path_NICE+:} false; then :
15279  $as_echo_n "(cached) " >&6
15280else
15281  case $NICE in
15282  [\\/]* | ?:[\\/]*)
15283  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15284  ;;
15285  *)
15286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15287for as_dir in $PATH
15288do
15289  IFS=$as_save_IFS
15290  test -z "$as_dir" && as_dir=.
15291    for ac_exec_ext in '' $ac_executable_extensions; do
15292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15293    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15295    break 2
15296  fi
15297done
15298  done
15299IFS=$as_save_IFS
15300
15301  ;;
15302esac
15303fi
15304NICE=$ac_cv_path_NICE
15305if test -n "$NICE"; then
15306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15307$as_echo "$NICE" >&6; }
15308else
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15310$as_echo "no" >&6; }
15311fi
15312
15313
15314          if test "x$NICE" = x; then
15315            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15316          fi
15317        else
15318          # Otherwise we believe it is a complete path. Use it as it is.
15319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15320$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15321          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15322$as_echo_n "checking for NICE... " >&6; }
15323          if test ! -x "$tool_specified"; then
15324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15325$as_echo "not found" >&6; }
15326            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15327          fi
15328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15329$as_echo "$tool_specified" >&6; }
15330        fi
15331      fi
15332    fi
15333
15334  fi
15335
15336
15337
15338
15339  # Publish this variable in the help.
15340
15341
15342  if [ -z "${PANDOC+x}" ]; then
15343    # The variable is not set by user, try to locate tool using the code snippet
15344    for ac_prog in pandoc
15345do
15346  # Extract the first word of "$ac_prog", so it can be a program name with args.
15347set dummy $ac_prog; ac_word=$2
15348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15349$as_echo_n "checking for $ac_word... " >&6; }
15350if ${ac_cv_path_PANDOC+:} false; then :
15351  $as_echo_n "(cached) " >&6
15352else
15353  case $PANDOC in
15354  [\\/]* | ?:[\\/]*)
15355  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15356  ;;
15357  *)
15358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15359for as_dir in $PATH
15360do
15361  IFS=$as_save_IFS
15362  test -z "$as_dir" && as_dir=.
15363    for ac_exec_ext in '' $ac_executable_extensions; do
15364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15365    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15367    break 2
15368  fi
15369done
15370  done
15371IFS=$as_save_IFS
15372
15373  ;;
15374esac
15375fi
15376PANDOC=$ac_cv_path_PANDOC
15377if test -n "$PANDOC"; then
15378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15379$as_echo "$PANDOC" >&6; }
15380else
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15382$as_echo "no" >&6; }
15383fi
15384
15385
15386  test -n "$PANDOC" && break
15387done
15388
15389  else
15390    # The variable is set, but is it from the command line or the environment?
15391
15392    # Try to remove the string !PANDOC! from our list.
15393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15395      # If it failed, the variable was not from the command line. Ignore it,
15396      # but warn the user (except for BASH, which is always set by the calling BASH).
15397      if test "xPANDOC" != xBASH; then
15398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15399$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15400      fi
15401      # Try to locate tool using the code snippet
15402      for ac_prog in pandoc
15403do
15404  # Extract the first word of "$ac_prog", so it can be a program name with args.
15405set dummy $ac_prog; ac_word=$2
15406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15407$as_echo_n "checking for $ac_word... " >&6; }
15408if ${ac_cv_path_PANDOC+:} false; then :
15409  $as_echo_n "(cached) " >&6
15410else
15411  case $PANDOC in
15412  [\\/]* | ?:[\\/]*)
15413  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15414  ;;
15415  *)
15416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15417for as_dir in $PATH
15418do
15419  IFS=$as_save_IFS
15420  test -z "$as_dir" && as_dir=.
15421    for ac_exec_ext in '' $ac_executable_extensions; do
15422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15423    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15425    break 2
15426  fi
15427done
15428  done
15429IFS=$as_save_IFS
15430
15431  ;;
15432esac
15433fi
15434PANDOC=$ac_cv_path_PANDOC
15435if test -n "$PANDOC"; then
15436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15437$as_echo "$PANDOC" >&6; }
15438else
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15440$as_echo "no" >&6; }
15441fi
15442
15443
15444  test -n "$PANDOC" && break
15445done
15446
15447    else
15448      # If it succeeded, then it was overridden by the user. We will use it
15449      # for the tool.
15450
15451      # First remove it from the list of overridden variables, so we can test
15452      # for unknown variables in the end.
15453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15454
15455      # Check if we try to supply an empty value
15456      if test "x$PANDOC" = x; then
15457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15458$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15460$as_echo_n "checking for PANDOC... " >&6; }
15461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15462$as_echo "disabled" >&6; }
15463      else
15464        # Check if the provided tool contains a complete path.
15465        tool_specified="$PANDOC"
15466        tool_basename="${tool_specified##*/}"
15467        if test "x$tool_basename" = "x$tool_specified"; then
15468          # A command without a complete path is provided, search $PATH.
15469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15470$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15471          # Extract the first word of "$tool_basename", so it can be a program name with args.
15472set dummy $tool_basename; ac_word=$2
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15474$as_echo_n "checking for $ac_word... " >&6; }
15475if ${ac_cv_path_PANDOC+:} false; then :
15476  $as_echo_n "(cached) " >&6
15477else
15478  case $PANDOC in
15479  [\\/]* | ?:[\\/]*)
15480  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15481  ;;
15482  *)
15483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15484for as_dir in $PATH
15485do
15486  IFS=$as_save_IFS
15487  test -z "$as_dir" && as_dir=.
15488    for ac_exec_ext in '' $ac_executable_extensions; do
15489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15490    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15492    break 2
15493  fi
15494done
15495  done
15496IFS=$as_save_IFS
15497
15498  ;;
15499esac
15500fi
15501PANDOC=$ac_cv_path_PANDOC
15502if test -n "$PANDOC"; then
15503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15504$as_echo "$PANDOC" >&6; }
15505else
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15507$as_echo "no" >&6; }
15508fi
15509
15510
15511          if test "x$PANDOC" = x; then
15512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15513          fi
15514        else
15515          # Otherwise we believe it is a complete path. Use it as it is.
15516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15517$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15519$as_echo_n "checking for PANDOC... " >&6; }
15520          if test ! -x "$tool_specified"; then
15521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15522$as_echo "not found" >&6; }
15523            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15524          fi
15525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15526$as_echo "$tool_specified" >&6; }
15527        fi
15528      fi
15529    fi
15530
15531  fi
15532
15533
15534
15535
15536# Now we can determine OpenJDK build and target platforms. This is required to
15537# have early on.
15538# Make sure we can run config.sub.
15539$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15540  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15541
15542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15543$as_echo_n "checking build system type... " >&6; }
15544if ${ac_cv_build+:} false; then :
15545  $as_echo_n "(cached) " >&6
15546else
15547  ac_build_alias=$build_alias
15548test "x$ac_build_alias" = x &&
15549  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15550test "x$ac_build_alias" = x &&
15551  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15552ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15553  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15554
15555fi
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15557$as_echo "$ac_cv_build" >&6; }
15558case $ac_cv_build in
15559*-*-*) ;;
15560*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15561esac
15562build=$ac_cv_build
15563ac_save_IFS=$IFS; IFS='-'
15564set x $ac_cv_build
15565shift
15566build_cpu=$1
15567build_vendor=$2
15568shift; shift
15569# Remember, the first character of IFS is used to create $*,
15570# except with old shells:
15571build_os=$*
15572IFS=$ac_save_IFS
15573case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15574
15575
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15577$as_echo_n "checking host system type... " >&6; }
15578if ${ac_cv_host+:} false; then :
15579  $as_echo_n "(cached) " >&6
15580else
15581  if test "x$host_alias" = x; then
15582  ac_cv_host=$ac_cv_build
15583else
15584  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15585    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15586fi
15587
15588fi
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15590$as_echo "$ac_cv_host" >&6; }
15591case $ac_cv_host in
15592*-*-*) ;;
15593*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15594esac
15595host=$ac_cv_host
15596ac_save_IFS=$IFS; IFS='-'
15597set x $ac_cv_host
15598shift
15599host_cpu=$1
15600host_vendor=$2
15601shift; shift
15602# Remember, the first character of IFS is used to create $*,
15603# except with old shells:
15604host_os=$*
15605IFS=$ac_save_IFS
15606case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15607
15608
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15610$as_echo_n "checking target system type... " >&6; }
15611if ${ac_cv_target+:} false; then :
15612  $as_echo_n "(cached) " >&6
15613else
15614  if test "x$target_alias" = x; then
15615  ac_cv_target=$ac_cv_host
15616else
15617  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15618    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15619fi
15620
15621fi
15622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15623$as_echo "$ac_cv_target" >&6; }
15624case $ac_cv_target in
15625*-*-*) ;;
15626*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15627esac
15628target=$ac_cv_target
15629ac_save_IFS=$IFS; IFS='-'
15630set x $ac_cv_target
15631shift
15632target_cpu=$1
15633target_vendor=$2
15634shift; shift
15635# Remember, the first character of IFS is used to create $*,
15636# except with old shells:
15637target_os=$*
15638IFS=$ac_save_IFS
15639case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15640
15641
15642# The aliases save the names the user supplied, while $host etc.
15643# will get canonicalized.
15644test -n "$target_alias" &&
15645  test "$program_prefix$program_suffix$program_transform_name" = \
15646    NONENONEs,x,x, &&
15647  program_prefix=${target_alias}-
15648
15649  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15650  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15651  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15652  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15653  # to use the configure naming style.
15654
15655
15656
15657
15658
15659  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15660  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15661  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15662  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15663  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15664  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15665
15666
15667
15668  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15669
15670  case "$build_os" in
15671    *linux*)
15672      VAR_OS=linux
15673      VAR_OS_TYPE=unix
15674      ;;
15675    *solaris*)
15676      VAR_OS=solaris
15677      VAR_OS_TYPE=unix
15678      ;;
15679    *darwin*)
15680      VAR_OS=macosx
15681      VAR_OS_TYPE=unix
15682      ;;
15683    *bsd*)
15684      VAR_OS=bsd
15685      VAR_OS_TYPE=unix
15686      ;;
15687    *cygwin*)
15688      VAR_OS=windows
15689      VAR_OS_ENV=windows.cygwin
15690      ;;
15691    *mingw*)
15692      VAR_OS=windows
15693      VAR_OS_ENV=windows.msys
15694      ;;
15695    *aix*)
15696      VAR_OS=aix
15697      VAR_OS_TYPE=unix
15698      ;;
15699    *)
15700      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15701      ;;
15702  esac
15703
15704
15705  # First argument is the cpu name from the trip/quad
15706  case "$build_cpu" in
15707    x86_64)
15708      VAR_CPU=x86_64
15709      VAR_CPU_ARCH=x86
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    i?86)
15714      VAR_CPU=x86
15715      VAR_CPU_ARCH=x86
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=little
15718      ;;
15719    arm*)
15720      VAR_CPU=arm
15721      VAR_CPU_ARCH=arm
15722      VAR_CPU_BITS=32
15723      VAR_CPU_ENDIAN=little
15724      ;;
15725    aarch64)
15726      VAR_CPU=aarch64
15727      VAR_CPU_ARCH=aarch64
15728      VAR_CPU_BITS=64
15729      VAR_CPU_ENDIAN=little
15730      ;;
15731    powerpc)
15732      VAR_CPU=ppc
15733      VAR_CPU_ARCH=ppc
15734      VAR_CPU_BITS=32
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    powerpc64)
15738      VAR_CPU=ppc64
15739      VAR_CPU_ARCH=ppc
15740      VAR_CPU_BITS=64
15741      VAR_CPU_ENDIAN=big
15742      ;;
15743    powerpc64le)
15744      VAR_CPU=ppc64le
15745      VAR_CPU_ARCH=ppc
15746      VAR_CPU_BITS=64
15747      VAR_CPU_ENDIAN=little
15748      ;;
15749    s390)
15750      VAR_CPU=s390
15751      VAR_CPU_ARCH=s390
15752      VAR_CPU_BITS=32
15753      VAR_CPU_ENDIAN=big
15754      ;;
15755    s390x)
15756      VAR_CPU=s390x
15757      VAR_CPU_ARCH=s390
15758      VAR_CPU_BITS=64
15759      VAR_CPU_ENDIAN=big
15760      ;;
15761    sparc)
15762      VAR_CPU=sparc
15763      VAR_CPU_ARCH=sparc
15764      VAR_CPU_BITS=32
15765      VAR_CPU_ENDIAN=big
15766      ;;
15767    sparcv9|sparc64)
15768      VAR_CPU=sparcv9
15769      VAR_CPU_ARCH=sparc
15770      VAR_CPU_BITS=64
15771      VAR_CPU_ENDIAN=big
15772      ;;
15773    *)
15774      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15775      ;;
15776  esac
15777
15778  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15779  OPENJDK_BUILD_OS="$VAR_OS"
15780  if test "x$VAR_OS_TYPE" != x; then
15781    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15782  else
15783    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15784  fi
15785  if test "x$VAR_OS_ENV" != x; then
15786    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15787  else
15788    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15789  fi
15790  OPENJDK_BUILD_CPU="$VAR_CPU"
15791  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15792  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15793  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15794
15795
15796
15797
15798
15799
15800
15801
15802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15803$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15805$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15806
15807  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15808
15809  case "$host_os" in
15810    *linux*)
15811      VAR_OS=linux
15812      VAR_OS_TYPE=unix
15813      ;;
15814    *solaris*)
15815      VAR_OS=solaris
15816      VAR_OS_TYPE=unix
15817      ;;
15818    *darwin*)
15819      VAR_OS=macosx
15820      VAR_OS_TYPE=unix
15821      ;;
15822    *bsd*)
15823      VAR_OS=bsd
15824      VAR_OS_TYPE=unix
15825      ;;
15826    *cygwin*)
15827      VAR_OS=windows
15828      VAR_OS_ENV=windows.cygwin
15829      ;;
15830    *mingw*)
15831      VAR_OS=windows
15832      VAR_OS_ENV=windows.msys
15833      ;;
15834    *aix*)
15835      VAR_OS=aix
15836      VAR_OS_TYPE=unix
15837      ;;
15838    *)
15839      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15840      ;;
15841  esac
15842
15843
15844  # First argument is the cpu name from the trip/quad
15845  case "$host_cpu" in
15846    x86_64)
15847      VAR_CPU=x86_64
15848      VAR_CPU_ARCH=x86
15849      VAR_CPU_BITS=64
15850      VAR_CPU_ENDIAN=little
15851      ;;
15852    i?86)
15853      VAR_CPU=x86
15854      VAR_CPU_ARCH=x86
15855      VAR_CPU_BITS=32
15856      VAR_CPU_ENDIAN=little
15857      ;;
15858    arm*)
15859      VAR_CPU=arm
15860      VAR_CPU_ARCH=arm
15861      VAR_CPU_BITS=32
15862      VAR_CPU_ENDIAN=little
15863      ;;
15864    aarch64)
15865      VAR_CPU=aarch64
15866      VAR_CPU_ARCH=aarch64
15867      VAR_CPU_BITS=64
15868      VAR_CPU_ENDIAN=little
15869      ;;
15870    powerpc)
15871      VAR_CPU=ppc
15872      VAR_CPU_ARCH=ppc
15873      VAR_CPU_BITS=32
15874      VAR_CPU_ENDIAN=big
15875      ;;
15876    powerpc64)
15877      VAR_CPU=ppc64
15878      VAR_CPU_ARCH=ppc
15879      VAR_CPU_BITS=64
15880      VAR_CPU_ENDIAN=big
15881      ;;
15882    powerpc64le)
15883      VAR_CPU=ppc64le
15884      VAR_CPU_ARCH=ppc
15885      VAR_CPU_BITS=64
15886      VAR_CPU_ENDIAN=little
15887      ;;
15888    s390)
15889      VAR_CPU=s390
15890      VAR_CPU_ARCH=s390
15891      VAR_CPU_BITS=32
15892      VAR_CPU_ENDIAN=big
15893      ;;
15894    s390x)
15895      VAR_CPU=s390x
15896      VAR_CPU_ARCH=s390
15897      VAR_CPU_BITS=64
15898      VAR_CPU_ENDIAN=big
15899      ;;
15900    sparc)
15901      VAR_CPU=sparc
15902      VAR_CPU_ARCH=sparc
15903      VAR_CPU_BITS=32
15904      VAR_CPU_ENDIAN=big
15905      ;;
15906    sparcv9|sparc64)
15907      VAR_CPU=sparcv9
15908      VAR_CPU_ARCH=sparc
15909      VAR_CPU_BITS=64
15910      VAR_CPU_ENDIAN=big
15911      ;;
15912    *)
15913      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15914      ;;
15915  esac
15916
15917  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15918  OPENJDK_TARGET_OS="$VAR_OS"
15919  if test "x$VAR_OS_TYPE" != x; then
15920    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15921  else
15922    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15923  fi
15924  if test "x$VAR_OS_ENV" != x; then
15925    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15926  else
15927    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15928  fi
15929  OPENJDK_TARGET_CPU="$VAR_CPU"
15930  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15931  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15932  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15933
15934
15935
15936
15937
15938
15939
15940
15941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15942$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15944$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15945
15946
15947
15948# Check whether --with-target-bits was given.
15949if test "${with_target_bits+set}" = set; then :
15950  withval=$with_target_bits;
15951fi
15952
15953
15954  # We have three types of compiles:
15955  # native  == normal compilation, target system == build system
15956  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15957  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15958  #
15959  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15960    # We're doing a proper cross-compilation
15961    COMPILE_TYPE="cross"
15962  else
15963    COMPILE_TYPE="native"
15964  fi
15965
15966  if test "x$with_target_bits" != x; then
15967    if test "x$COMPILE_TYPE" = "xcross"; then
15968      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15969    fi
15970
15971    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15972      # A reduced build is requested
15973      COMPILE_TYPE="reduced"
15974      OPENJDK_TARGET_CPU_BITS=32
15975      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15976        OPENJDK_TARGET_CPU=x86
15977      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15978        OPENJDK_TARGET_CPU=sparc
15979      else
15980        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15981      fi
15982    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15983      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
15984    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15985      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15986$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15987    else
15988      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15989    fi
15990  fi
15991
15992
15993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15994$as_echo_n "checking compilation type... " >&6; }
15995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15996$as_echo "$COMPILE_TYPE" >&6; }
15997
15998
15999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16000    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16001  else
16002    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16003  fi
16004
16005  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16006    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16007  else
16008    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16009  fi
16010
16011  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16012
16013
16014
16015  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16016    RELEASE_FILE_OS_NAME=SunOS
16017  fi
16018  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16019    RELEASE_FILE_OS_NAME=Linux
16020  fi
16021  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16022    RELEASE_FILE_OS_NAME=Windows
16023  fi
16024  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16025    RELEASE_FILE_OS_NAME="Darwin"
16026  fi
16027  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16028    RELEASE_FILE_OS_NAME="AIX"
16029  fi
16030  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16031
16032
16033
16034
16035
16036
16037  # Also store the legacy naming of the cpu.
16038  # Ie i586 and amd64 instead of x86 and x86_64
16039  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16040  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16041    OPENJDK_TARGET_CPU_LEGACY="i586"
16042  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16043    # On all platforms except MacOSX replace x86_64 with amd64.
16044    OPENJDK_TARGET_CPU_LEGACY="amd64"
16045  fi
16046
16047
16048  # And the second legacy naming of the cpu.
16049  # Ie i386 and amd64 instead of x86 and x86_64.
16050  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16051  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16052    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16053  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16054    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16055  fi
16056
16057
16058  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16059  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16060  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16061  OPENJDK_TARGET_CPU_ISADIR=""
16062  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16063    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16064      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16065    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16066      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16067    fi
16068  fi
16069
16070
16071  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16072  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16073  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16074    # On linux only, we replace x86 with i386.
16075    OPENJDK_TARGET_CPU_OSARCH="i386"
16076  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16077    # On all platforms except macosx, we replace x86_64 with amd64.
16078    OPENJDK_TARGET_CPU_OSARCH="amd64"
16079  fi
16080
16081
16082  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16083  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16084    OPENJDK_TARGET_CPU_JLI="i386"
16085  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16086    # On all platforms except macosx, we replace x86_64 with amd64.
16087    OPENJDK_TARGET_CPU_JLI="amd64"
16088  fi
16089
16090  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16091      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16092  else
16093      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16094  fi
16095
16096
16097  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16098  # Macosx is osx and x86_64 is x64
16099  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16100    OPENJDK_TARGET_OS_BUNDLE="osx"
16101  else
16102    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16103  fi
16104  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16105    OPENJDK_TARGET_CPU_BUNDLE="x64"
16106  else
16107    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16108  fi
16109  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16110
16111
16112  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16113    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16114    # unpack200.exe. This variable is used in
16115    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16116    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16117      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16118    fi
16119  fi
16120
16121  if test "x$COMPILE_TYPE" = "xcross"; then
16122    # FIXME: ... or should this include reduced builds..?
16123    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16124  else
16125    DEFINE_CROSS_COMPILE_ARCH=""
16126  fi
16127
16128
16129  # Convert openjdk platform names to hotspot names
16130
16131  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16132  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16133    HOTSPOT_TARGET_OS=bsd
16134  fi
16135
16136
16137  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16138  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16139    HOTSPOT_TARGET_OS_TYPE=posix
16140  fi
16141
16142
16143  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16144  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16145    HOTSPOT_TARGET_CPU=x86_32
16146  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16147    HOTSPOT_TARGET_CPU=sparc
16148  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16149    HOTSPOT_TARGET_CPU=ppc_64
16150  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16151    HOTSPOT_TARGET_CPU=ppc_64
16152  fi
16153
16154
16155  # This is identical with OPENJDK_*, but define anyway for consistency.
16156  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16157
16158
16159  # Setup HOTSPOT_TARGET_CPU_DEFINE
16160  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16161    HOTSPOT_TARGET_CPU_DEFINE=IA32
16162  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16163    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16164  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16165    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16166  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16167    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16168  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16169    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16170  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16171    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16172
16173  # The cpu defines below are for zero, we don't support them directly.
16174  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16175    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16176  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16177    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16178  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16179    HOTSPOT_TARGET_CPU_DEFINE=S390
16180  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16181    HOTSPOT_TARGET_CPU_DEFINE=S390
16182  elif test "x$OPENJDK_TARGET_CPU" != x; then
16183    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16184  fi
16185
16186
16187
16188
16189  # Also store the legacy naming of the cpu.
16190  # Ie i586 and amd64 instead of x86 and x86_64
16191  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16192  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16193    OPENJDK_BUILD_CPU_LEGACY="i586"
16194  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16195    # On all platforms except MacOSX replace x86_64 with amd64.
16196    OPENJDK_BUILD_CPU_LEGACY="amd64"
16197  fi
16198
16199
16200  # And the second legacy naming of the cpu.
16201  # Ie i386 and amd64 instead of x86 and x86_64.
16202  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16203  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16204    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16205  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16206    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16207  fi
16208
16209
16210  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16211  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16212  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16213  OPENJDK_BUILD_CPU_ISADIR=""
16214  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16215    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16216      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16217    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16218      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16219    fi
16220  fi
16221
16222
16223  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16224  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16225  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16226    # On linux only, we replace x86 with i386.
16227    OPENJDK_BUILD_CPU_OSARCH="i386"
16228  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16229    # On all platforms except macosx, we replace x86_64 with amd64.
16230    OPENJDK_BUILD_CPU_OSARCH="amd64"
16231  fi
16232
16233
16234  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16235  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16236    OPENJDK_BUILD_CPU_JLI="i386"
16237  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16238    # On all platforms except macosx, we replace x86_64 with amd64.
16239    OPENJDK_BUILD_CPU_JLI="amd64"
16240  fi
16241
16242  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16243      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16244  else
16245      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16246  fi
16247
16248
16249  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16250  # Macosx is osx and x86_64 is x64
16251  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16252    OPENJDK_BUILD_OS_BUNDLE="osx"
16253  else
16254    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16255  fi
16256  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16257    OPENJDK_BUILD_CPU_BUNDLE="x64"
16258  else
16259    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16260  fi
16261  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16262
16263
16264  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16265    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16266    # unpack200.exe. This variable is used in
16267    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16268    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16269      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16270    fi
16271  fi
16272
16273  if test "x$COMPILE_TYPE" = "xcross"; then
16274    # FIXME: ... or should this include reduced builds..?
16275    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16276  else
16277    DEFINE_CROSS_COMPILE_ARCH=""
16278  fi
16279
16280
16281  # Convert openjdk platform names to hotspot names
16282
16283  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16284  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16285    HOTSPOT_BUILD_OS=bsd
16286  fi
16287
16288
16289  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16290  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16291    HOTSPOT_BUILD_OS_TYPE=posix
16292  fi
16293
16294
16295  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16296  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16297    HOTSPOT_BUILD_CPU=x86_32
16298  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16299    HOTSPOT_BUILD_CPU=sparc
16300  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16301    HOTSPOT_BUILD_CPU=ppc_64
16302  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16303    HOTSPOT_BUILD_CPU=ppc_64
16304  fi
16305
16306
16307  # This is identical with OPENJDK_*, but define anyway for consistency.
16308  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16309
16310
16311  # Setup HOTSPOT_BUILD_CPU_DEFINE
16312  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16313    HOTSPOT_BUILD_CPU_DEFINE=IA32
16314  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16315    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16316  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16317    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16318  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16319    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16320  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16321    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16322  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16323    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16324
16325  # The cpu defines below are for zero, we don't support them directly.
16326  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16327    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16328  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16329    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16330  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16331    HOTSPOT_BUILD_CPU_DEFINE=S390
16332  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16333    HOTSPOT_BUILD_CPU_DEFINE=S390
16334  elif test "x$OPENJDK_BUILD_CPU" != x; then
16335    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16336  fi
16337
16338
16339
16340
16341
16342
16343# Continue setting up basic stuff. Most remaining code require fundamental tools.
16344
16345  # Save the current directory this script was started from
16346  CURDIR="$PWD"
16347
16348  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16349  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16350  # was not available at that time.
16351  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16352  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16353    ORIGINAL_PATH="$REWRITTEN_PATH"
16354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16355$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16356  fi
16357
16358  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16359    PATH_SEP=";"
16360
16361  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16362  if test $SRC_ROOT_LENGTH -gt 100; then
16363    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16364  fi
16365
16366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16368$as_echo_n "checking cygwin release... " >&6; }
16369    CYGWIN_VERSION=`$UNAME -r`
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16371$as_echo "$CYGWIN_VERSION" >&6; }
16372    WINDOWS_ENV_VENDOR='cygwin'
16373    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16374
16375    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16376    if test "x$CYGWIN_VERSION_OLD" != x; then
16377      { $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
16378$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;}
16379      as_fn_error $? "Cannot continue" "$LINENO" 5
16380    fi
16381    if test "x$CYGPATH" = x; then
16382      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16383    fi
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16385$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16386    # The cmd output ends with Windows line endings (CR/LF)
16387    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16388    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16389    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16391$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16392    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16393    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16394    if test "x$test_cygdrive_prefix" = x; then
16395      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16396    fi
16397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16399$as_echo_n "checking msys release... " >&6; }
16400    MSYS_VERSION=`$UNAME -r`
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16402$as_echo "$MSYS_VERSION" >&6; }
16403
16404    WINDOWS_ENV_VENDOR='msys'
16405    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16406
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16408$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16409    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16410    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16411
16412  windows_path="$MSYS_ROOT_PATH"
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414    unix_path=`$CYGPATH -u "$windows_path"`
16415    MSYS_ROOT_PATH="$unix_path"
16416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16418    MSYS_ROOT_PATH="$unix_path"
16419  fi
16420
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16422$as_echo "$MSYS_ROOT_PATH" >&6; }
16423    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16424  else
16425    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16426  fi
16427
16428  # Test if windows or unix (cygwin/msys) find is first in path.
16429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16430$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16431  FIND_BINARY_OUTPUT=`find --version 2>&1`
16432  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16434$as_echo "unix style" >&6; }
16435  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16437$as_echo "Windows" >&6; }
16438    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16439$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16440    { $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
16441$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16442    as_fn_error $? "Cannot continue" "$LINENO" 5
16443  else
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16445$as_echo "unknown" >&6; }
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16447$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16448  fi
16449
16450  else
16451    PATH_SEP=":"
16452  fi
16453
16454
16455  # We get the top-level directory from the supporting wrappers.
16456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16457$as_echo_n "checking for top-level directory... " >&6; }
16458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16459$as_echo "$TOPDIR" >&6; }
16460
16461
16462  # Save the original version of TOPDIR for string comparisons
16463  ORIGINAL_TOPDIR="$TOPDIR"
16464
16465
16466  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16467
16468  # Only process if variable expands to non-empty
16469
16470  if test "x$CURDIR" != x; then
16471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16472
16473  # Input might be given as Windows format, start by converting to
16474  # unix format.
16475  path="$CURDIR"
16476  new_path=`$CYGPATH -u "$path"`
16477
16478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16481  # "foo.exe" is OK but "foo" is an error.
16482  #
16483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16484  # It is also a way to make sure we got the proper file name for the real test later on.
16485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16486  if test "x$test_shortpath" = x; then
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16488$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16489    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16490  fi
16491
16492  # Call helper function which possibly converts this using DOS-style short mode.
16493  # If so, the updated path is stored in $new_path.
16494
16495  input_path="$new_path"
16496  # Check if we need to convert this using DOS-style short mode. If the path
16497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16498  # take no chances and rewrite it.
16499  # Note: m4 eats our [], so we need to use [ and ] instead.
16500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16501  if test "x$has_forbidden_chars" != x; then
16502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16506      # Going to short mode and back again did indeed matter. Since short mode is
16507      # case insensitive, let's make it lowercase to improve readability.
16508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16509      # Now convert it back to Unix-style (cygpath)
16510      input_path=`$CYGPATH -u "$shortmode_path"`
16511      new_path="$input_path"
16512    fi
16513  fi
16514
16515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16516  if test "x$test_cygdrive_prefix" = x; then
16517    # As a simple fix, exclude /usr/bin since it's not a real path.
16518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16520      # a path prefixed by /cygdrive for fixpath to work.
16521      new_path="$CYGWIN_ROOT_PATH$input_path"
16522    fi
16523  fi
16524
16525
16526  if test "x$path" != "x$new_path"; then
16527    CURDIR="$new_path"
16528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16529$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16530  fi
16531
16532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16533
16534  path="$CURDIR"
16535  has_colon=`$ECHO $path | $GREP ^.:`
16536  new_path="$path"
16537  if test "x$has_colon" = x; then
16538    # Not in mixed or Windows style, start by that.
16539    new_path=`cmd //c echo $path`
16540  fi
16541
16542
16543  input_path="$new_path"
16544  # Check if we need to convert this using DOS-style short mode. If the path
16545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16546  # take no chances and rewrite it.
16547  # Note: m4 eats our [], so we need to use [ and ] instead.
16548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16549  if test "x$has_forbidden_chars" != x; then
16550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16552  fi
16553
16554
16555  windows_path="$new_path"
16556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16557    unix_path=`$CYGPATH -u "$windows_path"`
16558    new_path="$unix_path"
16559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16561    new_path="$unix_path"
16562  fi
16563
16564  if test "x$path" != "x$new_path"; then
16565    CURDIR="$new_path"
16566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16567$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16568  fi
16569
16570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16572
16573    else
16574      # We're on a unix platform. Hooray! :)
16575      path="$CURDIR"
16576      has_space=`$ECHO "$path" | $GREP " "`
16577      if test "x$has_space" != x; then
16578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16579$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16581      fi
16582
16583      # Use eval to expand a potential ~
16584      eval path="$path"
16585      if test ! -f "$path" && test ! -d "$path"; then
16586        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16587      fi
16588
16589      if test -d "$path"; then
16590        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16591      else
16592        dir="`$DIRNAME "$path"`"
16593        base="`$BASENAME "$path"`"
16594        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16595      fi
16596    fi
16597  fi
16598
16599
16600  # Only process if variable expands to non-empty
16601
16602  if test "x$TOPDIR" != x; then
16603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16604
16605  # Input might be given as Windows format, start by converting to
16606  # unix format.
16607  path="$TOPDIR"
16608  new_path=`$CYGPATH -u "$path"`
16609
16610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16613  # "foo.exe" is OK but "foo" is an error.
16614  #
16615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16616  # It is also a way to make sure we got the proper file name for the real test later on.
16617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16618  if test "x$test_shortpath" = x; then
16619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16620$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16621    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16622  fi
16623
16624  # Call helper function which possibly converts this using DOS-style short mode.
16625  # If so, the updated path is stored in $new_path.
16626
16627  input_path="$new_path"
16628  # Check if we need to convert this using DOS-style short mode. If the path
16629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16630  # take no chances and rewrite it.
16631  # Note: m4 eats our [], so we need to use [ and ] instead.
16632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16633  if test "x$has_forbidden_chars" != x; then
16634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16638      # Going to short mode and back again did indeed matter. Since short mode is
16639      # case insensitive, let's make it lowercase to improve readability.
16640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16641      # Now convert it back to Unix-style (cygpath)
16642      input_path=`$CYGPATH -u "$shortmode_path"`
16643      new_path="$input_path"
16644    fi
16645  fi
16646
16647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16648  if test "x$test_cygdrive_prefix" = x; then
16649    # As a simple fix, exclude /usr/bin since it's not a real path.
16650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16652      # a path prefixed by /cygdrive for fixpath to work.
16653      new_path="$CYGWIN_ROOT_PATH$input_path"
16654    fi
16655  fi
16656
16657
16658  if test "x$path" != "x$new_path"; then
16659    TOPDIR="$new_path"
16660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16661$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16662  fi
16663
16664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665
16666  path="$TOPDIR"
16667  has_colon=`$ECHO $path | $GREP ^.:`
16668  new_path="$path"
16669  if test "x$has_colon" = x; then
16670    # Not in mixed or Windows style, start by that.
16671    new_path=`cmd //c echo $path`
16672  fi
16673
16674
16675  input_path="$new_path"
16676  # Check if we need to convert this using DOS-style short mode. If the path
16677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16678  # take no chances and rewrite it.
16679  # Note: m4 eats our [], so we need to use [ and ] instead.
16680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16681  if test "x$has_forbidden_chars" != x; then
16682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16684  fi
16685
16686
16687  windows_path="$new_path"
16688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16689    unix_path=`$CYGPATH -u "$windows_path"`
16690    new_path="$unix_path"
16691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16693    new_path="$unix_path"
16694  fi
16695
16696  if test "x$path" != "x$new_path"; then
16697    TOPDIR="$new_path"
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16699$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16700  fi
16701
16702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16704
16705    else
16706      # We're on a unix platform. Hooray! :)
16707      path="$TOPDIR"
16708      has_space=`$ECHO "$path" | $GREP " "`
16709      if test "x$has_space" != x; then
16710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16711$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16713      fi
16714
16715      # Use eval to expand a potential ~
16716      eval path="$path"
16717      if test ! -f "$path" && test ! -d "$path"; then
16718        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16719      fi
16720
16721      if test -d "$path"; then
16722        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16723      else
16724        dir="`$DIRNAME "$path"`"
16725        base="`$BASENAME "$path"`"
16726        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16727      fi
16728    fi
16729  fi
16730
16731  # SRC_ROOT is a traditional alias for TOPDIR.
16732  SRC_ROOT=$TOPDIR
16733
16734  # Calculate a canonical version of TOPDIR for string comparisons
16735  CANONICAL_TOPDIR=$TOPDIR
16736
16737  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16738    # Follow a chain of symbolic links. Use readlink
16739    # where it exists, else fall back to horribly
16740    # complicated shell code.
16741    if test "x$READLINK_TESTED" != yes; then
16742      # On MacOSX there is a readlink tool with a different
16743      # purpose than the GNU readlink tool. Check the found readlink.
16744      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16745      if test "x$ISGNU" = x; then
16746        # A readlink that we do not know how to use.
16747        # Are there other non-GNU readlinks out there?
16748        READLINK_TESTED=yes
16749        READLINK=
16750      fi
16751    fi
16752
16753    if test "x$READLINK" != x; then
16754      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16755    else
16756      # Save the current directory for restoring afterwards
16757      STARTDIR=$PWD
16758      COUNTER=0
16759      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16760      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16761      cd $sym_link_dir
16762      # Use -P flag to resolve symlinks in directories.
16763      cd `$THEPWDCMD -P`
16764      sym_link_dir=`$THEPWDCMD -P`
16765      # Resolve file symlinks
16766      while test $COUNTER -lt 20; do
16767        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16768        if test "x$ISLINK" == x; then
16769          # This is not a symbolic link! We are done!
16770          break
16771        fi
16772        # Again resolve directory symlinks since the target of the just found
16773        # link could be in a different directory
16774        cd `$DIRNAME $ISLINK`
16775        sym_link_dir=`$THEPWDCMD -P`
16776        sym_link_file=`$BASENAME $ISLINK`
16777        let COUNTER=COUNTER+1
16778      done
16779      cd $STARTDIR
16780      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16781    fi
16782  fi
16783
16784
16785
16786  # Locate the directory of this script.
16787  AUTOCONF_DIR=$TOPDIR/common/autoconf
16788
16789  # Setup username (for use in adhoc version strings etc)
16790  # Outer [ ] to quote m4.
16791   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16792
16793
16794
16795# Check if it's a pure open build or if custom sources are to be used.
16796
16797  # Check whether --enable-openjdk-only was given.
16798if test "${enable_openjdk_only+set}" = set; then :
16799  enableval=$enable_openjdk_only;
16800else
16801  enable_openjdk_only="no"
16802fi
16803
16804
16805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16806$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16808$as_echo "$enable_openjdk_only" >&6; }
16809  if test "x$enable_openjdk_only" = "xyes"; then
16810    SUPPRESS_CUSTOM_EXTENSIONS="true"
16811  elif test "x$enable_openjdk_only" = "xno"; then
16812    SUPPRESS_CUSTOM_EXTENSIONS="false"
16813  else
16814    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16815  fi
16816
16817  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16818  # the IncludeCustomExtension macro.
16819
16820
16821# Check whether --with-custom-make-dir was given.
16822if test "${with_custom_make_dir+set}" = set; then :
16823  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
16824$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16825fi
16826
16827
16828
16829
16830# These are needed to be able to create a configuration name (and thus the output directory)
16831
16832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16833$as_echo_n "checking which variant of the JDK to build... " >&6; }
16834
16835# Check whether --with-jdk-variant was given.
16836if test "${with_jdk_variant+set}" = set; then :
16837  withval=$with_jdk_variant;
16838fi
16839
16840
16841  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16842    JDK_VARIANT="normal"
16843  else
16844    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16845  fi
16846
16847
16848
16849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16850$as_echo "$JDK_VARIANT" >&6; }
16851
16852
16853  DEBUG_LEVEL="release"
16854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16855$as_echo_n "checking which debug level to use... " >&6; }
16856  # Check whether --enable-debug was given.
16857if test "${enable_debug+set}" = set; then :
16858  enableval=$enable_debug;
16859        ENABLE_DEBUG="${enableval}"
16860        DEBUG_LEVEL="fastdebug"
16861
16862else
16863  ENABLE_DEBUG="no"
16864fi
16865
16866
16867
16868# Check whether --with-debug-level was given.
16869if test "${with_debug_level+set}" = set; then :
16870  withval=$with_debug_level;
16871        DEBUG_LEVEL="${withval}"
16872        if test "x$ENABLE_DEBUG" = xyes; then
16873          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16874        fi
16875
16876fi
16877
16878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16879$as_echo "$DEBUG_LEVEL" >&6; }
16880
16881  if test "x$DEBUG_LEVEL" != xrelease && \
16882      test "x$DEBUG_LEVEL" != xoptimized && \
16883      test "x$DEBUG_LEVEL" != xfastdebug && \
16884      test "x$DEBUG_LEVEL" != xslowdebug; then
16885    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16886  fi
16887
16888  # Translate DEBUG_LEVEL to debug level used by Hotspot
16889  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16890  if test "x$DEBUG_LEVEL" = xrelease; then
16891    HOTSPOT_DEBUG_LEVEL="product"
16892  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16893    HOTSPOT_DEBUG_LEVEL="debug"
16894  fi
16895
16896  if test "x$DEBUG_LEVEL" = xoptimized; then
16897    # The debug level 'optimized' is a little special because it is currently only
16898    # applicable to the HotSpot build where it means to build a completely
16899    # optimized version of the VM without any debugging code (like for the
16900    # 'release' debug level which is called 'product' in the HotSpot build) but
16901    # with the exception that it can contain additional code which is otherwise
16902    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16903    # test new and/or experimental features which are not intended for customer
16904    # shipment. Because these new features need to be tested and benchmarked in
16905    # real world scenarios, we want to build the containing JDK at the 'release'
16906    # debug level.
16907    DEBUG_LEVEL="release"
16908  fi
16909
16910
16911
16912
16913
16914
16915# Check whether --with-jvm-variants was given.
16916if test "${with_jvm_variants+set}" = set; then :
16917  withval=$with_jvm_variants;
16918fi
16919
16920
16921
16922
16923# Check whether --with-cpu-port was given.
16924if test "${with_cpu_port+set}" = set; then :
16925  withval=$with_cpu_port;
16926fi
16927
16928
16929  if test "x$with_cpu_port" != x; then
16930    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16931      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16932    fi
16933    if test "x$with_cpu_port" != xarm64 && \
16934        test "x$with_cpu_port" != xaarch64; then
16935      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16936    fi
16937    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16938  fi
16939
16940
16941  if test "x$with_jvm_variants" = x; then
16942    with_jvm_variants="server"
16943  fi
16944  JVM_VARIANTS_OPT="$with_jvm_variants"
16945
16946  # Has the user listed more than one variant?
16947  # Additional [] needed to keep m4 from mangling shell constructs.
16948  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16949    BUILDING_MULTIPLE_JVM_VARIANTS=true
16950  else
16951    BUILDING_MULTIPLE_JVM_VARIANTS=false
16952  fi
16953  # Replace the commas with AND for use in the build directory name.
16954  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16955
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16957$as_echo_n "checking which variants of the JVM to build... " >&6; }
16958  # JVM_VARIANTS is a space-separated list.
16959  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16960  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16962$as_echo "$JVM_VARIANTS" >&6; }
16963
16964  # Check that the selected variants are valid
16965
16966  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16967  # Notice that the original variant failes on SLES 10 and 11
16968  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16969  STACK=${JVM_VARIANTS// /$'\n'}
16970  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16971  if test "x$INVALID_VARIANTS" != x; then
16972    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16973$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16974    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16975  fi
16976
16977  # All "special" variants share the same output directory ("server")
16978  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16979  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16980  STACK=${JVM_VARIANTS// /$'\n'}
16981  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16982  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16983    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16984  fi
16985
16986  # The "main" variant is the one used by other libs to link against during the
16987  # build.
16988  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16989    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16990    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16991      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16992        JVM_VARIANT_MAIN="$variant"
16993        break
16994      fi
16995    done
16996  else
16997    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16998  fi
16999
17000
17001
17002
17003
17004  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17005    # zero behaves as a platform and rewrites these values. This is really weird. :(
17006    # We are guaranteed that we do not build any other variants when building zero.
17007    HOTSPOT_TARGET_CPU=zero
17008    HOTSPOT_TARGET_CPU_ARCH=zero
17009  fi
17010
17011
17012# With basic setup done, call the custom early hook.
17013
17014
17015# Check if we have devkits, extra paths or sysroot set.
17016
17017
17018# Check whether --with-devkit was given.
17019if test "${with_devkit+set}" = set; then :
17020  withval=$with_devkit;
17021
17022  # Only process if variable expands to non-empty
17023
17024  if test "x$with_devkit" != x; then
17025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17026
17027  # Input might be given as Windows format, start by converting to
17028  # unix format.
17029  path="$with_devkit"
17030  new_path=`$CYGPATH -u "$path"`
17031
17032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17035  # "foo.exe" is OK but "foo" is an error.
17036  #
17037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17038  # It is also a way to make sure we got the proper file name for the real test later on.
17039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17040  if test "x$test_shortpath" = x; then
17041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17042$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17043    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17044  fi
17045
17046  # Call helper function which possibly converts this using DOS-style short mode.
17047  # If so, the updated path is stored in $new_path.
17048
17049  input_path="$new_path"
17050  # Check if we need to convert this using DOS-style short mode. If the path
17051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17052  # take no chances and rewrite it.
17053  # Note: m4 eats our [], so we need to use [ and ] instead.
17054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17055  if test "x$has_forbidden_chars" != x; then
17056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17060      # Going to short mode and back again did indeed matter. Since short mode is
17061      # case insensitive, let's make it lowercase to improve readability.
17062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17063      # Now convert it back to Unix-style (cygpath)
17064      input_path=`$CYGPATH -u "$shortmode_path"`
17065      new_path="$input_path"
17066    fi
17067  fi
17068
17069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17070  if test "x$test_cygdrive_prefix" = x; then
17071    # As a simple fix, exclude /usr/bin since it's not a real path.
17072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17074      # a path prefixed by /cygdrive for fixpath to work.
17075      new_path="$CYGWIN_ROOT_PATH$input_path"
17076    fi
17077  fi
17078
17079
17080  if test "x$path" != "x$new_path"; then
17081    with_devkit="$new_path"
17082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17083$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17084  fi
17085
17086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17087
17088  path="$with_devkit"
17089  has_colon=`$ECHO $path | $GREP ^.:`
17090  new_path="$path"
17091  if test "x$has_colon" = x; then
17092    # Not in mixed or Windows style, start by that.
17093    new_path=`cmd //c echo $path`
17094  fi
17095
17096
17097  input_path="$new_path"
17098  # Check if we need to convert this using DOS-style short mode. If the path
17099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17100  # take no chances and rewrite it.
17101  # Note: m4 eats our [], so we need to use [ and ] instead.
17102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17103  if test "x$has_forbidden_chars" != x; then
17104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17106  fi
17107
17108
17109  windows_path="$new_path"
17110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17111    unix_path=`$CYGPATH -u "$windows_path"`
17112    new_path="$unix_path"
17113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17115    new_path="$unix_path"
17116  fi
17117
17118  if test "x$path" != "x$new_path"; then
17119    with_devkit="$new_path"
17120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17121$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17122  fi
17123
17124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17126
17127    else
17128      # We're on a unix platform. Hooray! :)
17129      path="$with_devkit"
17130      has_space=`$ECHO "$path" | $GREP " "`
17131      if test "x$has_space" != x; then
17132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17133$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17135      fi
17136
17137      # Use eval to expand a potential ~
17138      eval path="$path"
17139      if test ! -f "$path" && test ! -d "$path"; then
17140        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17141      fi
17142
17143      if test -d "$path"; then
17144        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17145      else
17146        dir="`$DIRNAME "$path"`"
17147        base="`$BASENAME "$path"`"
17148        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17149      fi
17150    fi
17151  fi
17152
17153        DEVKIT_ROOT="$with_devkit"
17154        # Check for a meta data info file in the root of the devkit
17155        if test -f "$DEVKIT_ROOT/devkit.info"; then
17156          . $DEVKIT_ROOT/devkit.info
17157          # This potentially sets the following:
17158          # A descriptive name of the devkit
17159
17160  if test "x$DEVKIT_NAME" = x; then
17161    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17162  fi
17163
17164          # Corresponds to --with-extra-path
17165
17166  if test "x$DEVKIT_EXTRA_PATH" = x; then
17167    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17168  fi
17169
17170          # Corresponds to --with-toolchain-path
17171
17172  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17173    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17174  fi
17175
17176          # Corresponds to --with-sysroot
17177
17178  if test "x$DEVKIT_SYSROOT" = x; then
17179    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17180  fi
17181
17182
17183          # Identifies the Visual Studio version in the devkit
17184
17185  if test "x$DEVKIT_VS_VERSION" = x; then
17186    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17187  fi
17188
17189          # The Visual Studio include environment variable
17190
17191  if test "x$DEVKIT_VS_INCLUDE" = x; then
17192    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17193  fi
17194
17195          # The Visual Studio lib environment variable
17196
17197  if test "x$DEVKIT_VS_LIB" = x; then
17198    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17199  fi
17200
17201          # Corresponds to --with-msvcr-dll
17202
17203  if test "x$DEVKIT_MSVCR_DLL" = x; then
17204    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17205  fi
17206
17207          # Corresponds to --with-msvcp-dll
17208
17209  if test "x$DEVKIT_MSVCP_DLL" = x; then
17210    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17211  fi
17212
17213        fi
17214
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17216$as_echo_n "checking for devkit... " >&6; }
17217        if test "x$DEVKIT_NAME" != x; then
17218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17219$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17220        else
17221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17222$as_echo "$DEVKIT_ROOT" >&6; }
17223        fi
17224
17225
17226  if test "x$DEVKIT_EXTRA_PATH" != x; then
17227    if test "x$EXTRA_PATH" = x; then
17228      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17229    else
17230      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17231    fi
17232  fi
17233
17234
17235        # Fallback default of just /bin if DEVKIT_PATH is not defined
17236        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17237          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17238        fi
17239
17240  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17241    if test "x$TOOLCHAIN_PATH" = x; then
17242      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17243    else
17244      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17245    fi
17246  fi
17247
17248
17249        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17250        # places for backwards compatiblity.
17251        if test "x$DEVKIT_SYSROOT" != x; then
17252          SYSROOT="$DEVKIT_SYSROOT"
17253        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17254          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17255        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17256          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17257        fi
17258
17259
17260fi
17261
17262
17263  # You can force the sysroot if the sysroot encoded into the compiler tools
17264  # is not correct.
17265
17266# Check whether --with-sys-root was given.
17267if test "${with_sys_root+set}" = set; then :
17268  withval=$with_sys_root; SYSROOT=$with_sys_root
17269
17270fi
17271
17272
17273
17274# Check whether --with-sysroot was given.
17275if test "${with_sysroot+set}" = set; then :
17276  withval=$with_sysroot; SYSROOT=$with_sysroot
17277
17278fi
17279
17280
17281
17282# Check whether --with-tools-dir was given.
17283if test "${with_tools_dir+set}" = set; then :
17284  withval=$with_tools_dir;
17285  if test "x$with_tools_dir" != x; then
17286    if test "x$TOOLCHAIN_PATH" = x; then
17287      TOOLCHAIN_PATH="$with_tools_dir"
17288    else
17289      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17290    fi
17291  fi
17292
17293
17294fi
17295
17296
17297
17298# Check whether --with-toolchain-path was given.
17299if test "${with_toolchain_path+set}" = set; then :
17300  withval=$with_toolchain_path;
17301  if test "x$with_toolchain_path" != x; then
17302    if test "x$TOOLCHAIN_PATH" = x; then
17303      TOOLCHAIN_PATH="$with_toolchain_path"
17304    else
17305      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17306    fi
17307  fi
17308
17309
17310fi
17311
17312
17313
17314# Check whether --with-extra-path was given.
17315if test "${with_extra_path+set}" = set; then :
17316  withval=$with_extra_path;
17317  if test "x$with_extra_path" != x; then
17318    if test "x$EXTRA_PATH" = x; then
17319      EXTRA_PATH="$with_extra_path"
17320    else
17321      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17322    fi
17323  fi
17324
17325
17326fi
17327
17328
17329  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17330    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17331    # If not, detect if Xcode is installed by running xcodebuild -version
17332    # if no Xcode installed, xcodebuild exits with 1
17333    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17334    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17335      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17336      # fall back on the stub binary in /usr/bin/xcodebuild
17337      # Extract the first word of "xcodebuild", so it can be a program name with args.
17338set dummy xcodebuild; ac_word=$2
17339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17340$as_echo_n "checking for $ac_word... " >&6; }
17341if ${ac_cv_path_XCODEBUILD+:} false; then :
17342  $as_echo_n "(cached) " >&6
17343else
17344  case $XCODEBUILD in
17345  [\\/]* | ?:[\\/]*)
17346  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17347  ;;
17348  *)
17349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17350for as_dir in $TOOLCHAIN_PATH
17351do
17352  IFS=$as_save_IFS
17353  test -z "$as_dir" && as_dir=.
17354    for ac_exec_ext in '' $ac_executable_extensions; do
17355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17356    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17358    break 2
17359  fi
17360done
17361  done
17362IFS=$as_save_IFS
17363
17364  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17365  ;;
17366esac
17367fi
17368XCODEBUILD=$ac_cv_path_XCODEBUILD
17369if test -n "$XCODEBUILD"; then
17370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17371$as_echo "$XCODEBUILD" >&6; }
17372else
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17374$as_echo "no" >&6; }
17375fi
17376
17377
17378    else
17379      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17380      # when only the command line tools are installed there are no SDKs, so headers
17381      # are copied into the system frameworks
17382      XCODEBUILD=
17383
17384    fi
17385
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17387$as_echo_n "checking for sdk name... " >&6; }
17388
17389# Check whether --with-sdk-name was given.
17390if test "${with_sdk_name+set}" = set; then :
17391  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17392
17393fi
17394
17395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17396$as_echo "$SDKNAME" >&6; }
17397
17398    # if toolchain path is specified then don't rely on system headers, they may not compile
17399    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17400    test -z "$TOOLCHAIN_PATH" && \
17401      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17402
17403    if test -z "$SYSROOT"; then
17404      if test -n "$XCODEBUILD"; then
17405        # if we don't have system headers, use default SDK name (last resort)
17406        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17407          SDKNAME=${SDKNAME:-macosx}
17408        fi
17409
17410        if test -n "$SDKNAME"; then
17411          # Call xcodebuild to determine SYSROOT
17412          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17413        fi
17414      else
17415        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17416          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
17417        fi
17418      fi
17419    else
17420      # warn user if --with-sdk-name was also set
17421      if test -n "$with_sdk_name"; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17423$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17424      fi
17425    fi
17426
17427    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17428      # If no system framework headers, then SYSROOT must be set, or we won't build
17429      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
17430    fi
17431
17432    # Perform a basic sanity test
17433    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17434      if test -z "$SYSROOT"; then
17435        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
17436      else
17437        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17438      fi
17439    fi
17440
17441    # set SDKROOT too, Xcode tools will pick it up
17442    SDKROOT="$SYSROOT"
17443
17444  fi
17445
17446  # Prepend the extra path to the global path
17447
17448  if test "x$EXTRA_PATH" != x; then
17449    if test "x$PATH" = x; then
17450      PATH="$EXTRA_PATH"
17451    else
17452      PATH="$EXTRA_PATH:$PATH"
17453    fi
17454  fi
17455
17456
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17458$as_echo_n "checking for sysroot... " >&6; }
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17460$as_echo "$SYSROOT" >&6; }
17461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17462$as_echo_n "checking for toolchain path... " >&6; }
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17464$as_echo "$TOOLCHAIN_PATH" >&6; }
17465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17466$as_echo_n "checking for extra path... " >&6; }
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17468$as_echo "$EXTRA_PATH" >&6; }
17469
17470
17471# To properly create a configuration name, we need to have the OpenJDK target
17472# and options (variants and debug level) parsed.
17473
17474
17475
17476# Check whether --with-conf-name was given.
17477if test "${with_conf_name+set}" = set; then :
17478  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17479fi
17480
17481
17482  # Test from where we are running configure, in or outside of src root.
17483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17484$as_echo_n "checking where to store configuration... " >&6; }
17485  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17486      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17487      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17488    # We are running configure from the src root.
17489    # Create a default ./build/target-variant-debuglevel output root.
17490    if test "x${CONF_NAME}" = x; then
17491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17492$as_echo "in default location" >&6; }
17493      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17494    else
17495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17496$as_echo "in build directory with custom name" >&6; }
17497    fi
17498    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17499    $MKDIR -p "$OUTPUT_ROOT"
17500    if test ! -d "$OUTPUT_ROOT"; then
17501      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17502    fi
17503  else
17504    # We are running configure from outside of the src dir.
17505    # Then use the current directory as output dir!
17506    # If configuration is situated in normal build directory, just use the build
17507    # directory name as configuration name, otherwise use the complete path.
17508    if test "x${CONF_NAME}" = x; then
17509      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17510    fi
17511    OUTPUT_ROOT="$CURDIR"
17512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17513$as_echo "in current directory" >&6; }
17514
17515    # WARNING: This might be a bad thing to do. You need to be sure you want to
17516    # have a configuration in this directory. Do some sanity checks!
17517
17518    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17519      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17520      # other files
17521      files_present=`$LS $OUTPUT_ROOT`
17522      # Configure has already touched config.log and confdefs.h in the current dir when this check
17523      # is performed.
17524      filtered_files=`$ECHO "$files_present" \
17525          | $SED -e 's/config.log//g' \
17526              -e 's/configure.log//g' \
17527              -e 's/confdefs.h//g' \
17528              -e 's/ //g' \
17529          | $TR -d '\n'`
17530      if test "x$filtered_files" != x; then
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17532$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17533        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17534$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17535        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17536$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17537        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17538$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17540$as_echo "$as_me: seriously mess up just about everything." >&6;}
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17542$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17544$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17545        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17546      fi
17547    fi
17548  fi
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17550$as_echo_n "checking what configuration name to use... " >&6; }
17551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17552$as_echo "$CONF_NAME" >&6; }
17553
17554
17555  # Only process if variable expands to non-empty
17556
17557  if test "x$OUTPUT_ROOT" != x; then
17558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17559
17560  # Input might be given as Windows format, start by converting to
17561  # unix format.
17562  path="$OUTPUT_ROOT"
17563  new_path=`$CYGPATH -u "$path"`
17564
17565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17568  # "foo.exe" is OK but "foo" is an error.
17569  #
17570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17571  # It is also a way to make sure we got the proper file name for the real test later on.
17572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17573  if test "x$test_shortpath" = x; then
17574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17575$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17576    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17577  fi
17578
17579  # Call helper function which possibly converts this using DOS-style short mode.
17580  # If so, the updated path is stored in $new_path.
17581
17582  input_path="$new_path"
17583  # Check if we need to convert this using DOS-style short mode. If the path
17584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17585  # take no chances and rewrite it.
17586  # Note: m4 eats our [], so we need to use [ and ] instead.
17587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17588  if test "x$has_forbidden_chars" != x; then
17589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17593      # Going to short mode and back again did indeed matter. Since short mode is
17594      # case insensitive, let's make it lowercase to improve readability.
17595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17596      # Now convert it back to Unix-style (cygpath)
17597      input_path=`$CYGPATH -u "$shortmode_path"`
17598      new_path="$input_path"
17599    fi
17600  fi
17601
17602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17603  if test "x$test_cygdrive_prefix" = x; then
17604    # As a simple fix, exclude /usr/bin since it's not a real path.
17605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17607      # a path prefixed by /cygdrive for fixpath to work.
17608      new_path="$CYGWIN_ROOT_PATH$input_path"
17609    fi
17610  fi
17611
17612
17613  if test "x$path" != "x$new_path"; then
17614    OUTPUT_ROOT="$new_path"
17615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17616$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17617  fi
17618
17619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17620
17621  path="$OUTPUT_ROOT"
17622  has_colon=`$ECHO $path | $GREP ^.:`
17623  new_path="$path"
17624  if test "x$has_colon" = x; then
17625    # Not in mixed or Windows style, start by that.
17626    new_path=`cmd //c echo $path`
17627  fi
17628
17629
17630  input_path="$new_path"
17631  # Check if we need to convert this using DOS-style short mode. If the path
17632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17633  # take no chances and rewrite it.
17634  # Note: m4 eats our [], so we need to use [ and ] instead.
17635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17636  if test "x$has_forbidden_chars" != x; then
17637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17639  fi
17640
17641
17642  windows_path="$new_path"
17643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644    unix_path=`$CYGPATH -u "$windows_path"`
17645    new_path="$unix_path"
17646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648    new_path="$unix_path"
17649  fi
17650
17651  if test "x$path" != "x$new_path"; then
17652    OUTPUT_ROOT="$new_path"
17653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17654$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17655  fi
17656
17657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17659
17660    else
17661      # We're on a unix platform. Hooray! :)
17662      path="$OUTPUT_ROOT"
17663      has_space=`$ECHO "$path" | $GREP " "`
17664      if test "x$has_space" != x; then
17665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17666$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17668      fi
17669
17670      # Use eval to expand a potential ~
17671      eval path="$path"
17672      if test ! -f "$path" && test ! -d "$path"; then
17673        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17674      fi
17675
17676      if test -d "$path"; then
17677        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17678      else
17679        dir="`$DIRNAME "$path"`"
17680        base="`$BASENAME "$path"`"
17681        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17682      fi
17683    fi
17684  fi
17685
17686
17687  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17688  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17689
17690  SPEC="$OUTPUT_ROOT/spec.gmk"
17691
17692
17693
17694
17695
17696  # The spec.gmk file contains all variables for the make system.
17697  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17698
17699  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17700  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17701
17702  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17703  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17704
17705  # The compare.sh is used to compare the build output to other builds.
17706  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17707
17708  # The generated Makefile knows where the spec.gmk is and where the source is.
17709  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17710  # which will look for generated configurations
17711  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17712
17713
17714
17715# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17716
17717  for ac_prog in apt-get yum brew port pkgutil pkgadd
17718do
17719  # Extract the first word of "$ac_prog", so it can be a program name with args.
17720set dummy $ac_prog; ac_word=$2
17721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17722$as_echo_n "checking for $ac_word... " >&6; }
17723if ${ac_cv_prog_PKGHANDLER+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726  if test -n "$PKGHANDLER"; then
17727  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17728else
17729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17730for as_dir in $PATH
17731do
17732  IFS=$as_save_IFS
17733  test -z "$as_dir" && as_dir=.
17734    for ac_exec_ext in '' $ac_executable_extensions; do
17735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17736    ac_cv_prog_PKGHANDLER="$ac_prog"
17737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17738    break 2
17739  fi
17740done
17741  done
17742IFS=$as_save_IFS
17743
17744fi
17745fi
17746PKGHANDLER=$ac_cv_prog_PKGHANDLER
17747if test -n "$PKGHANDLER"; then
17748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17749$as_echo "$PKGHANDLER" >&6; }
17750else
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17752$as_echo "no" >&6; }
17753fi
17754
17755
17756  test -n "$PKGHANDLER" && break
17757done
17758
17759
17760
17761# Setup tools that requires more complex handling, or that is not needed by the configure script.
17762
17763
17764
17765  # Publish this variable in the help.
17766
17767
17768  if [ -z "${MAKE+x}" ]; then
17769    # The variable is not set by user, try to locate tool using the code snippet
17770
17771    # Try our hardest to locate a correct version of GNU make
17772    for ac_prog in gmake
17773do
17774  # Extract the first word of "$ac_prog", so it can be a program name with args.
17775set dummy $ac_prog; ac_word=$2
17776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17777$as_echo_n "checking for $ac_word... " >&6; }
17778if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17779  $as_echo_n "(cached) " >&6
17780else
17781  case $CHECK_GMAKE in
17782  [\\/]* | ?:[\\/]*)
17783  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17784  ;;
17785  *)
17786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17787for as_dir in $PATH
17788do
17789  IFS=$as_save_IFS
17790  test -z "$as_dir" && as_dir=.
17791    for ac_exec_ext in '' $ac_executable_extensions; do
17792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17793    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17795    break 2
17796  fi
17797done
17798  done
17799IFS=$as_save_IFS
17800
17801  ;;
17802esac
17803fi
17804CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17805if test -n "$CHECK_GMAKE"; then
17806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17807$as_echo "$CHECK_GMAKE" >&6; }
17808else
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17810$as_echo "no" >&6; }
17811fi
17812
17813
17814  test -n "$CHECK_GMAKE" && break
17815done
17816
17817
17818  MAKE_CANDIDATE=""$CHECK_GMAKE""
17819  DESCRIPTION="gmake in PATH"
17820
17821  # On Cygwin, we require a newer version of make than on other platforms
17822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823    MAKE_VERSION_EXPR="-e 4\."
17824    MAKE_REQUIRED_VERSION="4.0"
17825   else
17826    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17827    MAKE_REQUIRED_VERSION="3.81"
17828  fi
17829
17830  if test "x$MAKE_CANDIDATE" != x; then
17831    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17832$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17833    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17834    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17835    if test "x$IS_GNU_MAKE" = x; then
17836      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17837$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17838    else
17839      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17840      if test "x$IS_MODERN_MAKE" = x; then
17841        { $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
17842$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;}
17843      else
17844        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17845          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17846            MAKE_EXPECTED_ENV='cygwin'
17847          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848            MAKE_EXPECTED_ENV='msys'
17849          else
17850            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17851          fi
17852          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17853          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17854        else
17855          # Not relevant for non-Windows
17856          IS_MAKE_CORRECT_ENV=true
17857        fi
17858        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17859          { $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
17860$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;}
17861        else
17862          FOUND_MAKE=$MAKE_CANDIDATE
17863
17864  # Only process if variable expands to non-empty
17865
17866  if test "x$FOUND_MAKE" != x; then
17867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17868
17869  # First separate the path from the arguments. This will split at the first
17870  # space.
17871  complete="$FOUND_MAKE"
17872  path="${complete%% *}"
17873  tmp="$complete EOL"
17874  arguments="${tmp#* }"
17875
17876  # Input might be given as Windows format, start by converting to
17877  # unix format.
17878  new_path=`$CYGPATH -u "$path"`
17879
17880  # Now try to locate executable using which
17881  new_path=`$WHICH "$new_path" 2> /dev/null`
17882  # bat and cmd files are not always considered executable in cygwin causing which
17883  # to not find them
17884  if test "x$new_path" = x \
17885      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17886      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17887    new_path=`$CYGPATH -u "$path"`
17888  fi
17889  if test "x$new_path" = x; then
17890    # Oops. Which didn't find the executable.
17891    # The splitting of arguments from the executable at a space might have been incorrect,
17892    # since paths with space are more likely in Windows. Give it another try with the whole
17893    # argument.
17894    path="$complete"
17895    arguments="EOL"
17896    new_path=`$CYGPATH -u "$path"`
17897    new_path=`$WHICH "$new_path" 2> /dev/null`
17898    # bat and cmd files are not always considered executable in cygwin causing which
17899    # to not find them
17900    if test "x$new_path" = x \
17901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17903      new_path=`$CYGPATH -u "$path"`
17904    fi
17905    if test "x$new_path" = x; then
17906      # It's still not found. Now this is an unrecoverable error.
17907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17909      has_space=`$ECHO "$complete" | $GREP " "`
17910      if test "x$has_space" != x; then
17911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17913      fi
17914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17915    fi
17916  fi
17917
17918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17921  # "foo.exe" is OK but "foo" is an error.
17922  #
17923  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17924  # It is also a way to make sure we got the proper file name for the real test later on.
17925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17926  if test "x$test_shortpath" = x; then
17927    # Short path failed, file does not exist as specified.
17928    # Try adding .exe or .cmd
17929    if test -f "${new_path}.exe"; then
17930      input_to_shortpath="${new_path}.exe"
17931    elif test -f "${new_path}.cmd"; then
17932      input_to_shortpath="${new_path}.cmd"
17933    else
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17935$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17936      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17937$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17938      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17939    fi
17940  else
17941    input_to_shortpath="$new_path"
17942  fi
17943
17944  # Call helper function which possibly converts this using DOS-style short mode.
17945  # If so, the updated path is stored in $new_path.
17946  new_path="$input_to_shortpath"
17947
17948  input_path="$input_to_shortpath"
17949  # Check if we need to convert this using DOS-style short mode. If the path
17950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17951  # take no chances and rewrite it.
17952  # Note: m4 eats our [], so we need to use [ and ] instead.
17953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17954  if test "x$has_forbidden_chars" != x; then
17955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17959      # Going to short mode and back again did indeed matter. Since short mode is
17960      # case insensitive, let's make it lowercase to improve readability.
17961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17962      # Now convert it back to Unix-style (cygpath)
17963      input_path=`$CYGPATH -u "$shortmode_path"`
17964      new_path="$input_path"
17965    fi
17966  fi
17967
17968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17969  if test "x$test_cygdrive_prefix" = x; then
17970    # As a simple fix, exclude /usr/bin since it's not a real path.
17971    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17973      # a path prefixed by /cygdrive for fixpath to work.
17974      new_path="$CYGWIN_ROOT_PATH$input_path"
17975    fi
17976  fi
17977
17978  # remove trailing .exe if any
17979  new_path="${new_path/%.exe/}"
17980
17981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17982
17983  # First separate the path from the arguments. This will split at the first
17984  # space.
17985  complete="$FOUND_MAKE"
17986  path="${complete%% *}"
17987  tmp="$complete EOL"
17988  arguments="${tmp#* }"
17989
17990  # Input might be given as Windows format, start by converting to
17991  # unix format.
17992  new_path="$path"
17993
17994  windows_path="$new_path"
17995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17996    unix_path=`$CYGPATH -u "$windows_path"`
17997    new_path="$unix_path"
17998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18000    new_path="$unix_path"
18001  fi
18002
18003
18004  # Now try to locate executable using which
18005  new_path=`$WHICH "$new_path" 2> /dev/null`
18006
18007  if test "x$new_path" = x; then
18008    # Oops. Which didn't find the executable.
18009    # The splitting of arguments from the executable at a space might have been incorrect,
18010    # since paths with space are more likely in Windows. Give it another try with the whole
18011    # argument.
18012    path="$complete"
18013    arguments="EOL"
18014    new_path="$path"
18015
18016  windows_path="$new_path"
18017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18018    unix_path=`$CYGPATH -u "$windows_path"`
18019    new_path="$unix_path"
18020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18022    new_path="$unix_path"
18023  fi
18024
18025
18026    new_path=`$WHICH "$new_path" 2> /dev/null`
18027    # bat and cmd files are not always considered executable in MSYS causing which
18028    # to not find them
18029    if test "x$new_path" = x \
18030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18032      new_path="$path"
18033
18034  windows_path="$new_path"
18035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18036    unix_path=`$CYGPATH -u "$windows_path"`
18037    new_path="$unix_path"
18038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18040    new_path="$unix_path"
18041  fi
18042
18043    fi
18044
18045    if test "x$new_path" = x; then
18046      # It's still not found. Now this is an unrecoverable error.
18047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18048$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18049      has_space=`$ECHO "$complete" | $GREP " "`
18050      if test "x$has_space" != x; then
18051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18053      fi
18054      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18055    fi
18056  fi
18057
18058  # Now new_path has a complete unix path to the binary
18059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18060    # Keep paths in /bin as-is, but remove trailing .exe if any
18061    new_path="${new_path/%.exe/}"
18062    # Do not save /bin paths to all_fixpath_prefixes!
18063  else
18064    # Not in mixed or Windows style, start by that.
18065    new_path=`cmd //c echo $new_path`
18066
18067  input_path="$new_path"
18068  # Check if we need to convert this using DOS-style short mode. If the path
18069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18070  # take no chances and rewrite it.
18071  # Note: m4 eats our [], so we need to use [ and ] instead.
18072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18073  if test "x$has_forbidden_chars" != x; then
18074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18076  fi
18077
18078    # Output is in $new_path
18079
18080  windows_path="$new_path"
18081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18082    unix_path=`$CYGPATH -u "$windows_path"`
18083    new_path="$unix_path"
18084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18086    new_path="$unix_path"
18087  fi
18088
18089    # remove trailing .exe if any
18090    new_path="${new_path/%.exe/}"
18091
18092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18094  fi
18095
18096    else
18097      # We're on a unix platform. Hooray! :)
18098      # First separate the path from the arguments. This will split at the first
18099      # space.
18100      complete="$FOUND_MAKE"
18101      path="${complete%% *}"
18102      tmp="$complete EOL"
18103      arguments="${tmp#* }"
18104
18105      # Cannot rely on the command "which" here since it doesn't always work.
18106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18107      if test -z "$is_absolute_path"; then
18108        # Path to executable is not absolute. Find it.
18109        IFS_save="$IFS"
18110        IFS=:
18111        for p in $PATH; do
18112          if test -f "$p/$path" && test -x "$p/$path"; then
18113            new_path="$p/$path"
18114            break
18115          fi
18116        done
18117        IFS="$IFS_save"
18118      else
18119        # This is an absolute path, we can use it without further modifications.
18120        new_path="$path"
18121      fi
18122
18123      if test "x$new_path" = x; then
18124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18125$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18126        has_space=`$ECHO "$complete" | $GREP " "`
18127        if test "x$has_space" != x; then
18128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18130        fi
18131        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18132      fi
18133    fi
18134
18135    # Now join together the path and the arguments once again
18136    if test "x$arguments" != xEOL; then
18137      new_complete="$new_path ${arguments% *}"
18138    else
18139      new_complete="$new_path"
18140    fi
18141
18142    if test "x$complete" != "x$new_complete"; then
18143      FOUND_MAKE="$new_complete"
18144      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18145$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18146    fi
18147  fi
18148
18149        fi
18150      fi
18151    fi
18152  fi
18153
18154
18155    if test "x$FOUND_MAKE" = x; then
18156      for ac_prog in make
18157do
18158  # Extract the first word of "$ac_prog", so it can be a program name with args.
18159set dummy $ac_prog; ac_word=$2
18160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18161$as_echo_n "checking for $ac_word... " >&6; }
18162if ${ac_cv_path_CHECK_MAKE+:} false; then :
18163  $as_echo_n "(cached) " >&6
18164else
18165  case $CHECK_MAKE in
18166  [\\/]* | ?:[\\/]*)
18167  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18168  ;;
18169  *)
18170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171for as_dir in $PATH
18172do
18173  IFS=$as_save_IFS
18174  test -z "$as_dir" && as_dir=.
18175    for ac_exec_ext in '' $ac_executable_extensions; do
18176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18177    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179    break 2
18180  fi
18181done
18182  done
18183IFS=$as_save_IFS
18184
18185  ;;
18186esac
18187fi
18188CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18189if test -n "$CHECK_MAKE"; then
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18191$as_echo "$CHECK_MAKE" >&6; }
18192else
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18194$as_echo "no" >&6; }
18195fi
18196
18197
18198  test -n "$CHECK_MAKE" && break
18199done
18200
18201
18202  MAKE_CANDIDATE=""$CHECK_MAKE""
18203  DESCRIPTION="make in PATH"
18204
18205  # On Cygwin, we require a newer version of make than on other platforms
18206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18207    MAKE_VERSION_EXPR="-e 4\."
18208    MAKE_REQUIRED_VERSION="4.0"
18209   else
18210    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18211    MAKE_REQUIRED_VERSION="3.81"
18212  fi
18213
18214  if test "x$MAKE_CANDIDATE" != x; then
18215    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18216$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18217    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18218    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18219    if test "x$IS_GNU_MAKE" = x; then
18220      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18221$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18222    else
18223      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18224      if test "x$IS_MODERN_MAKE" = x; then
18225        { $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
18226$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;}
18227      else
18228        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18229          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18230            MAKE_EXPECTED_ENV='cygwin'
18231          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18232            MAKE_EXPECTED_ENV='msys'
18233          else
18234            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18235          fi
18236          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18237          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18238        else
18239          # Not relevant for non-Windows
18240          IS_MAKE_CORRECT_ENV=true
18241        fi
18242        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18243          { $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
18244$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;}
18245        else
18246          FOUND_MAKE=$MAKE_CANDIDATE
18247
18248  # Only process if variable expands to non-empty
18249
18250  if test "x$FOUND_MAKE" != x; then
18251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18252
18253  # First separate the path from the arguments. This will split at the first
18254  # space.
18255  complete="$FOUND_MAKE"
18256  path="${complete%% *}"
18257  tmp="$complete EOL"
18258  arguments="${tmp#* }"
18259
18260  # Input might be given as Windows format, start by converting to
18261  # unix format.
18262  new_path=`$CYGPATH -u "$path"`
18263
18264  # Now try to locate executable using which
18265  new_path=`$WHICH "$new_path" 2> /dev/null`
18266  # bat and cmd files are not always considered executable in cygwin causing which
18267  # to not find them
18268  if test "x$new_path" = x \
18269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18271    new_path=`$CYGPATH -u "$path"`
18272  fi
18273  if test "x$new_path" = x; then
18274    # Oops. Which didn't find the executable.
18275    # The splitting of arguments from the executable at a space might have been incorrect,
18276    # since paths with space are more likely in Windows. Give it another try with the whole
18277    # argument.
18278    path="$complete"
18279    arguments="EOL"
18280    new_path=`$CYGPATH -u "$path"`
18281    new_path=`$WHICH "$new_path" 2> /dev/null`
18282    # bat and cmd files are not always considered executable in cygwin causing which
18283    # to not find them
18284    if test "x$new_path" = x \
18285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18287      new_path=`$CYGPATH -u "$path"`
18288    fi
18289    if test "x$new_path" = x; then
18290      # It's still not found. Now this is an unrecoverable error.
18291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18293      has_space=`$ECHO "$complete" | $GREP " "`
18294      if test "x$has_space" != x; then
18295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18297      fi
18298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18299    fi
18300  fi
18301
18302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18305  # "foo.exe" is OK but "foo" is an error.
18306  #
18307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18308  # It is also a way to make sure we got the proper file name for the real test later on.
18309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18310  if test "x$test_shortpath" = x; then
18311    # Short path failed, file does not exist as specified.
18312    # Try adding .exe or .cmd
18313    if test -f "${new_path}.exe"; then
18314      input_to_shortpath="${new_path}.exe"
18315    elif test -f "${new_path}.cmd"; then
18316      input_to_shortpath="${new_path}.cmd"
18317    else
18318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18323    fi
18324  else
18325    input_to_shortpath="$new_path"
18326  fi
18327
18328  # Call helper function which possibly converts this using DOS-style short mode.
18329  # If so, the updated path is stored in $new_path.
18330  new_path="$input_to_shortpath"
18331
18332  input_path="$input_to_shortpath"
18333  # Check if we need to convert this using DOS-style short mode. If the path
18334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18335  # take no chances and rewrite it.
18336  # Note: m4 eats our [], so we need to use [ and ] instead.
18337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18338  if test "x$has_forbidden_chars" != x; then
18339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18343      # Going to short mode and back again did indeed matter. Since short mode is
18344      # case insensitive, let's make it lowercase to improve readability.
18345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18346      # Now convert it back to Unix-style (cygpath)
18347      input_path=`$CYGPATH -u "$shortmode_path"`
18348      new_path="$input_path"
18349    fi
18350  fi
18351
18352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18353  if test "x$test_cygdrive_prefix" = x; then
18354    # As a simple fix, exclude /usr/bin since it's not a real path.
18355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18357      # a path prefixed by /cygdrive for fixpath to work.
18358      new_path="$CYGWIN_ROOT_PATH$input_path"
18359    fi
18360  fi
18361
18362  # remove trailing .exe if any
18363  new_path="${new_path/%.exe/}"
18364
18365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366
18367  # First separate the path from the arguments. This will split at the first
18368  # space.
18369  complete="$FOUND_MAKE"
18370  path="${complete%% *}"
18371  tmp="$complete EOL"
18372  arguments="${tmp#* }"
18373
18374  # Input might be given as Windows format, start by converting to
18375  # unix format.
18376  new_path="$path"
18377
18378  windows_path="$new_path"
18379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380    unix_path=`$CYGPATH -u "$windows_path"`
18381    new_path="$unix_path"
18382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18384    new_path="$unix_path"
18385  fi
18386
18387
18388  # Now try to locate executable using which
18389  new_path=`$WHICH "$new_path" 2> /dev/null`
18390
18391  if test "x$new_path" = x; then
18392    # Oops. Which didn't find the executable.
18393    # The splitting of arguments from the executable at a space might have been incorrect,
18394    # since paths with space are more likely in Windows. Give it another try with the whole
18395    # argument.
18396    path="$complete"
18397    arguments="EOL"
18398    new_path="$path"
18399
18400  windows_path="$new_path"
18401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402    unix_path=`$CYGPATH -u "$windows_path"`
18403    new_path="$unix_path"
18404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18406    new_path="$unix_path"
18407  fi
18408
18409
18410    new_path=`$WHICH "$new_path" 2> /dev/null`
18411    # bat and cmd files are not always considered executable in MSYS causing which
18412    # to not find them
18413    if test "x$new_path" = x \
18414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18416      new_path="$path"
18417
18418  windows_path="$new_path"
18419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18420    unix_path=`$CYGPATH -u "$windows_path"`
18421    new_path="$unix_path"
18422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18424    new_path="$unix_path"
18425  fi
18426
18427    fi
18428
18429    if test "x$new_path" = x; then
18430      # It's still not found. Now this is an unrecoverable error.
18431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18432$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18433      has_space=`$ECHO "$complete" | $GREP " "`
18434      if test "x$has_space" != x; then
18435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18437      fi
18438      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18439    fi
18440  fi
18441
18442  # Now new_path has a complete unix path to the binary
18443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18444    # Keep paths in /bin as-is, but remove trailing .exe if any
18445    new_path="${new_path/%.exe/}"
18446    # Do not save /bin paths to all_fixpath_prefixes!
18447  else
18448    # Not in mixed or Windows style, start by that.
18449    new_path=`cmd //c echo $new_path`
18450
18451  input_path="$new_path"
18452  # Check if we need to convert this using DOS-style short mode. If the path
18453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18454  # take no chances and rewrite it.
18455  # Note: m4 eats our [], so we need to use [ and ] instead.
18456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18457  if test "x$has_forbidden_chars" != x; then
18458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18460  fi
18461
18462    # Output is in $new_path
18463
18464  windows_path="$new_path"
18465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18466    unix_path=`$CYGPATH -u "$windows_path"`
18467    new_path="$unix_path"
18468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18470    new_path="$unix_path"
18471  fi
18472
18473    # remove trailing .exe if any
18474    new_path="${new_path/%.exe/}"
18475
18476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18478  fi
18479
18480    else
18481      # We're on a unix platform. Hooray! :)
18482      # First separate the path from the arguments. This will split at the first
18483      # space.
18484      complete="$FOUND_MAKE"
18485      path="${complete%% *}"
18486      tmp="$complete EOL"
18487      arguments="${tmp#* }"
18488
18489      # Cannot rely on the command "which" here since it doesn't always work.
18490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18491      if test -z "$is_absolute_path"; then
18492        # Path to executable is not absolute. Find it.
18493        IFS_save="$IFS"
18494        IFS=:
18495        for p in $PATH; do
18496          if test -f "$p/$path" && test -x "$p/$path"; then
18497            new_path="$p/$path"
18498            break
18499          fi
18500        done
18501        IFS="$IFS_save"
18502      else
18503        # This is an absolute path, we can use it without further modifications.
18504        new_path="$path"
18505      fi
18506
18507      if test "x$new_path" = x; then
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18509$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18510        has_space=`$ECHO "$complete" | $GREP " "`
18511        if test "x$has_space" != x; then
18512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18514        fi
18515        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18516      fi
18517    fi
18518
18519    # Now join together the path and the arguments once again
18520    if test "x$arguments" != xEOL; then
18521      new_complete="$new_path ${arguments% *}"
18522    else
18523      new_complete="$new_path"
18524    fi
18525
18526    if test "x$complete" != "x$new_complete"; then
18527      FOUND_MAKE="$new_complete"
18528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18529$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18530    fi
18531  fi
18532
18533        fi
18534      fi
18535    fi
18536  fi
18537
18538    fi
18539
18540    if test "x$FOUND_MAKE" = x; then
18541      if test "x$TOOLCHAIN_PATH" != x; then
18542        # We have a toolchain path, check that as well before giving up.
18543        OLD_PATH=$PATH
18544        PATH=$TOOLCHAIN_PATH:$PATH
18545        for ac_prog in gmake
18546do
18547  # Extract the first word of "$ac_prog", so it can be a program name with args.
18548set dummy $ac_prog; ac_word=$2
18549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18550$as_echo_n "checking for $ac_word... " >&6; }
18551if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18552  $as_echo_n "(cached) " >&6
18553else
18554  case $CHECK_TOOLSDIR_GMAKE in
18555  [\\/]* | ?:[\\/]*)
18556  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18557  ;;
18558  *)
18559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18560for as_dir in $PATH
18561do
18562  IFS=$as_save_IFS
18563  test -z "$as_dir" && as_dir=.
18564    for ac_exec_ext in '' $ac_executable_extensions; do
18565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18566    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18568    break 2
18569  fi
18570done
18571  done
18572IFS=$as_save_IFS
18573
18574  ;;
18575esac
18576fi
18577CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18578if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18580$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18581else
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18583$as_echo "no" >&6; }
18584fi
18585
18586
18587  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18588done
18589
18590
18591  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18592  DESCRIPTION="gmake in tools-dir"
18593
18594  # On Cygwin, we require a newer version of make than on other platforms
18595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18596    MAKE_VERSION_EXPR="-e 4\."
18597    MAKE_REQUIRED_VERSION="4.0"
18598   else
18599    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18600    MAKE_REQUIRED_VERSION="3.81"
18601  fi
18602
18603  if test "x$MAKE_CANDIDATE" != x; then
18604    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18605$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18606    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18607    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18608    if test "x$IS_GNU_MAKE" = x; then
18609      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18610$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18611    else
18612      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18613      if test "x$IS_MODERN_MAKE" = x; then
18614        { $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
18615$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;}
18616      else
18617        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18618          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18619            MAKE_EXPECTED_ENV='cygwin'
18620          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18621            MAKE_EXPECTED_ENV='msys'
18622          else
18623            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18624          fi
18625          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18626          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18627        else
18628          # Not relevant for non-Windows
18629          IS_MAKE_CORRECT_ENV=true
18630        fi
18631        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18632          { $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
18633$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;}
18634        else
18635          FOUND_MAKE=$MAKE_CANDIDATE
18636
18637  # Only process if variable expands to non-empty
18638
18639  if test "x$FOUND_MAKE" != x; then
18640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18641
18642  # First separate the path from the arguments. This will split at the first
18643  # space.
18644  complete="$FOUND_MAKE"
18645  path="${complete%% *}"
18646  tmp="$complete EOL"
18647  arguments="${tmp#* }"
18648
18649  # Input might be given as Windows format, start by converting to
18650  # unix format.
18651  new_path=`$CYGPATH -u "$path"`
18652
18653  # Now try to locate executable using which
18654  new_path=`$WHICH "$new_path" 2> /dev/null`
18655  # bat and cmd files are not always considered executable in cygwin causing which
18656  # to not find them
18657  if test "x$new_path" = x \
18658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18660    new_path=`$CYGPATH -u "$path"`
18661  fi
18662  if test "x$new_path" = x; then
18663    # Oops. Which didn't find the executable.
18664    # The splitting of arguments from the executable at a space might have been incorrect,
18665    # since paths with space are more likely in Windows. Give it another try with the whole
18666    # argument.
18667    path="$complete"
18668    arguments="EOL"
18669    new_path=`$CYGPATH -u "$path"`
18670    new_path=`$WHICH "$new_path" 2> /dev/null`
18671    # bat and cmd files are not always considered executable in cygwin causing which
18672    # to not find them
18673    if test "x$new_path" = x \
18674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18676      new_path=`$CYGPATH -u "$path"`
18677    fi
18678    if test "x$new_path" = x; then
18679      # It's still not found. Now this is an unrecoverable error.
18680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18681$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18682      has_space=`$ECHO "$complete" | $GREP " "`
18683      if test "x$has_space" != x; then
18684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18686      fi
18687      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18688    fi
18689  fi
18690
18691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18694  # "foo.exe" is OK but "foo" is an error.
18695  #
18696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18697  # It is also a way to make sure we got the proper file name for the real test later on.
18698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18699  if test "x$test_shortpath" = x; then
18700    # Short path failed, file does not exist as specified.
18701    # Try adding .exe or .cmd
18702    if test -f "${new_path}.exe"; then
18703      input_to_shortpath="${new_path}.exe"
18704    elif test -f "${new_path}.cmd"; then
18705      input_to_shortpath="${new_path}.cmd"
18706    else
18707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18711      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18712    fi
18713  else
18714    input_to_shortpath="$new_path"
18715  fi
18716
18717  # Call helper function which possibly converts this using DOS-style short mode.
18718  # If so, the updated path is stored in $new_path.
18719  new_path="$input_to_shortpath"
18720
18721  input_path="$input_to_shortpath"
18722  # Check if we need to convert this using DOS-style short mode. If the path
18723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18724  # take no chances and rewrite it.
18725  # Note: m4 eats our [], so we need to use [ and ] instead.
18726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18727  if test "x$has_forbidden_chars" != x; then
18728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18732      # Going to short mode and back again did indeed matter. Since short mode is
18733      # case insensitive, let's make it lowercase to improve readability.
18734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18735      # Now convert it back to Unix-style (cygpath)
18736      input_path=`$CYGPATH -u "$shortmode_path"`
18737      new_path="$input_path"
18738    fi
18739  fi
18740
18741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18742  if test "x$test_cygdrive_prefix" = x; then
18743    # As a simple fix, exclude /usr/bin since it's not a real path.
18744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18746      # a path prefixed by /cygdrive for fixpath to work.
18747      new_path="$CYGWIN_ROOT_PATH$input_path"
18748    fi
18749  fi
18750
18751  # remove trailing .exe if any
18752  new_path="${new_path/%.exe/}"
18753
18754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18755
18756  # First separate the path from the arguments. This will split at the first
18757  # space.
18758  complete="$FOUND_MAKE"
18759  path="${complete%% *}"
18760  tmp="$complete EOL"
18761  arguments="${tmp#* }"
18762
18763  # Input might be given as Windows format, start by converting to
18764  # unix format.
18765  new_path="$path"
18766
18767  windows_path="$new_path"
18768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769    unix_path=`$CYGPATH -u "$windows_path"`
18770    new_path="$unix_path"
18771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18773    new_path="$unix_path"
18774  fi
18775
18776
18777  # Now try to locate executable using which
18778  new_path=`$WHICH "$new_path" 2> /dev/null`
18779
18780  if test "x$new_path" = x; then
18781    # Oops. Which didn't find the executable.
18782    # The splitting of arguments from the executable at a space might have been incorrect,
18783    # since paths with space are more likely in Windows. Give it another try with the whole
18784    # argument.
18785    path="$complete"
18786    arguments="EOL"
18787    new_path="$path"
18788
18789  windows_path="$new_path"
18790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791    unix_path=`$CYGPATH -u "$windows_path"`
18792    new_path="$unix_path"
18793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18795    new_path="$unix_path"
18796  fi
18797
18798
18799    new_path=`$WHICH "$new_path" 2> /dev/null`
18800    # bat and cmd files are not always considered executable in MSYS causing which
18801    # to not find them
18802    if test "x$new_path" = x \
18803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18805      new_path="$path"
18806
18807  windows_path="$new_path"
18808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809    unix_path=`$CYGPATH -u "$windows_path"`
18810    new_path="$unix_path"
18811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18813    new_path="$unix_path"
18814  fi
18815
18816    fi
18817
18818    if test "x$new_path" = x; then
18819      # It's still not found. Now this is an unrecoverable error.
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18822      has_space=`$ECHO "$complete" | $GREP " "`
18823      if test "x$has_space" != x; then
18824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18826      fi
18827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18828    fi
18829  fi
18830
18831  # Now new_path has a complete unix path to the binary
18832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18833    # Keep paths in /bin as-is, but remove trailing .exe if any
18834    new_path="${new_path/%.exe/}"
18835    # Do not save /bin paths to all_fixpath_prefixes!
18836  else
18837    # Not in mixed or Windows style, start by that.
18838    new_path=`cmd //c echo $new_path`
18839
18840  input_path="$new_path"
18841  # Check if we need to convert this using DOS-style short mode. If the path
18842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18843  # take no chances and rewrite it.
18844  # Note: m4 eats our [], so we need to use [ and ] instead.
18845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18846  if test "x$has_forbidden_chars" != x; then
18847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18849  fi
18850
18851    # Output is in $new_path
18852
18853  windows_path="$new_path"
18854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18855    unix_path=`$CYGPATH -u "$windows_path"`
18856    new_path="$unix_path"
18857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18859    new_path="$unix_path"
18860  fi
18861
18862    # remove trailing .exe if any
18863    new_path="${new_path/%.exe/}"
18864
18865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18867  fi
18868
18869    else
18870      # We're on a unix platform. Hooray! :)
18871      # First separate the path from the arguments. This will split at the first
18872      # space.
18873      complete="$FOUND_MAKE"
18874      path="${complete%% *}"
18875      tmp="$complete EOL"
18876      arguments="${tmp#* }"
18877
18878      # Cannot rely on the command "which" here since it doesn't always work.
18879      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18880      if test -z "$is_absolute_path"; then
18881        # Path to executable is not absolute. Find it.
18882        IFS_save="$IFS"
18883        IFS=:
18884        for p in $PATH; do
18885          if test -f "$p/$path" && test -x "$p/$path"; then
18886            new_path="$p/$path"
18887            break
18888          fi
18889        done
18890        IFS="$IFS_save"
18891      else
18892        # This is an absolute path, we can use it without further modifications.
18893        new_path="$path"
18894      fi
18895
18896      if test "x$new_path" = x; then
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18899        has_space=`$ECHO "$complete" | $GREP " "`
18900        if test "x$has_space" != x; then
18901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18903        fi
18904        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18905      fi
18906    fi
18907
18908    # Now join together the path and the arguments once again
18909    if test "x$arguments" != xEOL; then
18910      new_complete="$new_path ${arguments% *}"
18911    else
18912      new_complete="$new_path"
18913    fi
18914
18915    if test "x$complete" != "x$new_complete"; then
18916      FOUND_MAKE="$new_complete"
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18918$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18919    fi
18920  fi
18921
18922        fi
18923      fi
18924    fi
18925  fi
18926
18927        if test "x$FOUND_MAKE" = x; then
18928          for ac_prog in make
18929do
18930  # Extract the first word of "$ac_prog", so it can be a program name with args.
18931set dummy $ac_prog; ac_word=$2
18932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18933$as_echo_n "checking for $ac_word... " >&6; }
18934if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18935  $as_echo_n "(cached) " >&6
18936else
18937  case $CHECK_TOOLSDIR_MAKE in
18938  [\\/]* | ?:[\\/]*)
18939  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18940  ;;
18941  *)
18942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18943for as_dir in $PATH
18944do
18945  IFS=$as_save_IFS
18946  test -z "$as_dir" && as_dir=.
18947    for ac_exec_ext in '' $ac_executable_extensions; do
18948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18949    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18951    break 2
18952  fi
18953done
18954  done
18955IFS=$as_save_IFS
18956
18957  ;;
18958esac
18959fi
18960CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18961if test -n "$CHECK_TOOLSDIR_MAKE"; then
18962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18963$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18964else
18965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966$as_echo "no" >&6; }
18967fi
18968
18969
18970  test -n "$CHECK_TOOLSDIR_MAKE" && break
18971done
18972
18973
18974  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18975  DESCRIPTION="make in tools-dir"
18976
18977  # On Cygwin, we require a newer version of make than on other platforms
18978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18979    MAKE_VERSION_EXPR="-e 4\."
18980    MAKE_REQUIRED_VERSION="4.0"
18981   else
18982    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18983    MAKE_REQUIRED_VERSION="3.81"
18984  fi
18985
18986  if test "x$MAKE_CANDIDATE" != x; then
18987    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18988$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18989    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18990    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18991    if test "x$IS_GNU_MAKE" = x; then
18992      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18993$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18994    else
18995      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18996      if test "x$IS_MODERN_MAKE" = x; then
18997        { $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
18998$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;}
18999      else
19000        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19001          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19002            MAKE_EXPECTED_ENV='cygwin'
19003          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19004            MAKE_EXPECTED_ENV='msys'
19005          else
19006            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19007          fi
19008          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19009          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19010        else
19011          # Not relevant for non-Windows
19012          IS_MAKE_CORRECT_ENV=true
19013        fi
19014        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19015          { $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
19016$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;}
19017        else
19018          FOUND_MAKE=$MAKE_CANDIDATE
19019
19020  # Only process if variable expands to non-empty
19021
19022  if test "x$FOUND_MAKE" != x; then
19023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19024
19025  # First separate the path from the arguments. This will split at the first
19026  # space.
19027  complete="$FOUND_MAKE"
19028  path="${complete%% *}"
19029  tmp="$complete EOL"
19030  arguments="${tmp#* }"
19031
19032  # Input might be given as Windows format, start by converting to
19033  # unix format.
19034  new_path=`$CYGPATH -u "$path"`
19035
19036  # Now try to locate executable using which
19037  new_path=`$WHICH "$new_path" 2> /dev/null`
19038  # bat and cmd files are not always considered executable in cygwin causing which
19039  # to not find them
19040  if test "x$new_path" = x \
19041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19043    new_path=`$CYGPATH -u "$path"`
19044  fi
19045  if test "x$new_path" = x; then
19046    # Oops. Which didn't find the executable.
19047    # The splitting of arguments from the executable at a space might have been incorrect,
19048    # since paths with space are more likely in Windows. Give it another try with the whole
19049    # argument.
19050    path="$complete"
19051    arguments="EOL"
19052    new_path=`$CYGPATH -u "$path"`
19053    new_path=`$WHICH "$new_path" 2> /dev/null`
19054    # bat and cmd files are not always considered executable in cygwin causing which
19055    # to not find them
19056    if test "x$new_path" = x \
19057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19059      new_path=`$CYGPATH -u "$path"`
19060    fi
19061    if test "x$new_path" = x; then
19062      # It's still not found. Now this is an unrecoverable error.
19063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19065      has_space=`$ECHO "$complete" | $GREP " "`
19066      if test "x$has_space" != x; then
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19069      fi
19070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19071    fi
19072  fi
19073
19074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19077  # "foo.exe" is OK but "foo" is an error.
19078  #
19079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19080  # It is also a way to make sure we got the proper file name for the real test later on.
19081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19082  if test "x$test_shortpath" = x; then
19083    # Short path failed, file does not exist as specified.
19084    # Try adding .exe or .cmd
19085    if test -f "${new_path}.exe"; then
19086      input_to_shortpath="${new_path}.exe"
19087    elif test -f "${new_path}.cmd"; then
19088      input_to_shortpath="${new_path}.cmd"
19089    else
19090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19095    fi
19096  else
19097    input_to_shortpath="$new_path"
19098  fi
19099
19100  # Call helper function which possibly converts this using DOS-style short mode.
19101  # If so, the updated path is stored in $new_path.
19102  new_path="$input_to_shortpath"
19103
19104  input_path="$input_to_shortpath"
19105  # Check if we need to convert this using DOS-style short mode. If the path
19106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19107  # take no chances and rewrite it.
19108  # Note: m4 eats our [], so we need to use [ and ] instead.
19109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19110  if test "x$has_forbidden_chars" != x; then
19111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19115      # Going to short mode and back again did indeed matter. Since short mode is
19116      # case insensitive, let's make it lowercase to improve readability.
19117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19118      # Now convert it back to Unix-style (cygpath)
19119      input_path=`$CYGPATH -u "$shortmode_path"`
19120      new_path="$input_path"
19121    fi
19122  fi
19123
19124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19125  if test "x$test_cygdrive_prefix" = x; then
19126    # As a simple fix, exclude /usr/bin since it's not a real path.
19127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19129      # a path prefixed by /cygdrive for fixpath to work.
19130      new_path="$CYGWIN_ROOT_PATH$input_path"
19131    fi
19132  fi
19133
19134  # remove trailing .exe if any
19135  new_path="${new_path/%.exe/}"
19136
19137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19138
19139  # First separate the path from the arguments. This will split at the first
19140  # space.
19141  complete="$FOUND_MAKE"
19142  path="${complete%% *}"
19143  tmp="$complete EOL"
19144  arguments="${tmp#* }"
19145
19146  # Input might be given as Windows format, start by converting to
19147  # unix format.
19148  new_path="$path"
19149
19150  windows_path="$new_path"
19151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152    unix_path=`$CYGPATH -u "$windows_path"`
19153    new_path="$unix_path"
19154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19156    new_path="$unix_path"
19157  fi
19158
19159
19160  # Now try to locate executable using which
19161  new_path=`$WHICH "$new_path" 2> /dev/null`
19162
19163  if test "x$new_path" = x; then
19164    # Oops. Which didn't find the executable.
19165    # The splitting of arguments from the executable at a space might have been incorrect,
19166    # since paths with space are more likely in Windows. Give it another try with the whole
19167    # argument.
19168    path="$complete"
19169    arguments="EOL"
19170    new_path="$path"
19171
19172  windows_path="$new_path"
19173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19174    unix_path=`$CYGPATH -u "$windows_path"`
19175    new_path="$unix_path"
19176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19178    new_path="$unix_path"
19179  fi
19180
19181
19182    new_path=`$WHICH "$new_path" 2> /dev/null`
19183    # bat and cmd files are not always considered executable in MSYS causing which
19184    # to not find them
19185    if test "x$new_path" = x \
19186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19188      new_path="$path"
19189
19190  windows_path="$new_path"
19191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19192    unix_path=`$CYGPATH -u "$windows_path"`
19193    new_path="$unix_path"
19194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19196    new_path="$unix_path"
19197  fi
19198
19199    fi
19200
19201    if test "x$new_path" = x; then
19202      # It's still not found. Now this is an unrecoverable error.
19203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19205      has_space=`$ECHO "$complete" | $GREP " "`
19206      if test "x$has_space" != x; then
19207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19209      fi
19210      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19211    fi
19212  fi
19213
19214  # Now new_path has a complete unix path to the binary
19215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19216    # Keep paths in /bin as-is, but remove trailing .exe if any
19217    new_path="${new_path/%.exe/}"
19218    # Do not save /bin paths to all_fixpath_prefixes!
19219  else
19220    # Not in mixed or Windows style, start by that.
19221    new_path=`cmd //c echo $new_path`
19222
19223  input_path="$new_path"
19224  # Check if we need to convert this using DOS-style short mode. If the path
19225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19226  # take no chances and rewrite it.
19227  # Note: m4 eats our [], so we need to use [ and ] instead.
19228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19229  if test "x$has_forbidden_chars" != x; then
19230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19232  fi
19233
19234    # Output is in $new_path
19235
19236  windows_path="$new_path"
19237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19238    unix_path=`$CYGPATH -u "$windows_path"`
19239    new_path="$unix_path"
19240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19242    new_path="$unix_path"
19243  fi
19244
19245    # remove trailing .exe if any
19246    new_path="${new_path/%.exe/}"
19247
19248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19250  fi
19251
19252    else
19253      # We're on a unix platform. Hooray! :)
19254      # First separate the path from the arguments. This will split at the first
19255      # space.
19256      complete="$FOUND_MAKE"
19257      path="${complete%% *}"
19258      tmp="$complete EOL"
19259      arguments="${tmp#* }"
19260
19261      # Cannot rely on the command "which" here since it doesn't always work.
19262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19263      if test -z "$is_absolute_path"; then
19264        # Path to executable is not absolute. Find it.
19265        IFS_save="$IFS"
19266        IFS=:
19267        for p in $PATH; do
19268          if test -f "$p/$path" && test -x "$p/$path"; then
19269            new_path="$p/$path"
19270            break
19271          fi
19272        done
19273        IFS="$IFS_save"
19274      else
19275        # This is an absolute path, we can use it without further modifications.
19276        new_path="$path"
19277      fi
19278
19279      if test "x$new_path" = x; then
19280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19282        has_space=`$ECHO "$complete" | $GREP " "`
19283        if test "x$has_space" != x; then
19284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19286        fi
19287        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19288      fi
19289    fi
19290
19291    # Now join together the path and the arguments once again
19292    if test "x$arguments" != xEOL; then
19293      new_complete="$new_path ${arguments% *}"
19294    else
19295      new_complete="$new_path"
19296    fi
19297
19298    if test "x$complete" != "x$new_complete"; then
19299      FOUND_MAKE="$new_complete"
19300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19301$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19302    fi
19303  fi
19304
19305        fi
19306      fi
19307    fi
19308  fi
19309
19310        fi
19311        PATH=$OLD_PATH
19312      fi
19313    fi
19314
19315    if test "x$FOUND_MAKE" = x; then
19316      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
19317    fi
19318
19319  else
19320    # The variable is set, but is it from the command line or the environment?
19321
19322    # Try to remove the string !MAKE! from our list.
19323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19325      # If it failed, the variable was not from the command line. Ignore it,
19326      # but warn the user (except for BASH, which is always set by the calling BASH).
19327      if test "xMAKE" != xBASH; then
19328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19329$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19330      fi
19331      # Try to locate tool using the code snippet
19332
19333    # Try our hardest to locate a correct version of GNU make
19334    for ac_prog in gmake
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  case $CHECK_GMAKE in
19344  [\\/]* | ?:[\\/]*)
19345  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19346  ;;
19347  *)
19348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349for as_dir in $PATH
19350do
19351  IFS=$as_save_IFS
19352  test -z "$as_dir" && as_dir=.
19353    for ac_exec_ext in '' $ac_executable_extensions; do
19354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357    break 2
19358  fi
19359done
19360  done
19361IFS=$as_save_IFS
19362
19363  ;;
19364esac
19365fi
19366CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19367if test -n "$CHECK_GMAKE"; then
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19369$as_echo "$CHECK_GMAKE" >&6; }
19370else
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372$as_echo "no" >&6; }
19373fi
19374
19375
19376  test -n "$CHECK_GMAKE" && break
19377done
19378
19379
19380  MAKE_CANDIDATE=""$CHECK_GMAKE""
19381  DESCRIPTION="gmake in PATH"
19382
19383  # On Cygwin, we require a newer version of make than on other platforms
19384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19385    MAKE_VERSION_EXPR="-e 4\."
19386    MAKE_REQUIRED_VERSION="4.0"
19387   else
19388    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19389    MAKE_REQUIRED_VERSION="3.81"
19390  fi
19391
19392  if test "x$MAKE_CANDIDATE" != x; then
19393    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19394$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19395    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19396    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19397    if test "x$IS_GNU_MAKE" = x; then
19398      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19399$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19400    else
19401      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19402      if test "x$IS_MODERN_MAKE" = x; then
19403        { $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
19404$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;}
19405      else
19406        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19407          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19408            MAKE_EXPECTED_ENV='cygwin'
19409          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19410            MAKE_EXPECTED_ENV='msys'
19411          else
19412            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19413          fi
19414          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19415          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19416        else
19417          # Not relevant for non-Windows
19418          IS_MAKE_CORRECT_ENV=true
19419        fi
19420        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19421          { $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
19422$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;}
19423        else
19424          FOUND_MAKE=$MAKE_CANDIDATE
19425
19426  # Only process if variable expands to non-empty
19427
19428  if test "x$FOUND_MAKE" != x; then
19429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19430
19431  # First separate the path from the arguments. This will split at the first
19432  # space.
19433  complete="$FOUND_MAKE"
19434  path="${complete%% *}"
19435  tmp="$complete EOL"
19436  arguments="${tmp#* }"
19437
19438  # Input might be given as Windows format, start by converting to
19439  # unix format.
19440  new_path=`$CYGPATH -u "$path"`
19441
19442  # Now try to locate executable using which
19443  new_path=`$WHICH "$new_path" 2> /dev/null`
19444  # bat and cmd files are not always considered executable in cygwin causing which
19445  # to not find them
19446  if test "x$new_path" = x \
19447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19449    new_path=`$CYGPATH -u "$path"`
19450  fi
19451  if test "x$new_path" = x; then
19452    # Oops. Which didn't find the executable.
19453    # The splitting of arguments from the executable at a space might have been incorrect,
19454    # since paths with space are more likely in Windows. Give it another try with the whole
19455    # argument.
19456    path="$complete"
19457    arguments="EOL"
19458    new_path=`$CYGPATH -u "$path"`
19459    new_path=`$WHICH "$new_path" 2> /dev/null`
19460    # bat and cmd files are not always considered executable in cygwin causing which
19461    # to not find them
19462    if test "x$new_path" = x \
19463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19465      new_path=`$CYGPATH -u "$path"`
19466    fi
19467    if test "x$new_path" = x; then
19468      # It's still not found. Now this is an unrecoverable error.
19469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19471      has_space=`$ECHO "$complete" | $GREP " "`
19472      if test "x$has_space" != x; then
19473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19475      fi
19476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19477    fi
19478  fi
19479
19480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19483  # "foo.exe" is OK but "foo" is an error.
19484  #
19485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19486  # It is also a way to make sure we got the proper file name for the real test later on.
19487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19488  if test "x$test_shortpath" = x; then
19489    # Short path failed, file does not exist as specified.
19490    # Try adding .exe or .cmd
19491    if test -f "${new_path}.exe"; then
19492      input_to_shortpath="${new_path}.exe"
19493    elif test -f "${new_path}.cmd"; then
19494      input_to_shortpath="${new_path}.cmd"
19495    else
19496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19500      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19501    fi
19502  else
19503    input_to_shortpath="$new_path"
19504  fi
19505
19506  # Call helper function which possibly converts this using DOS-style short mode.
19507  # If so, the updated path is stored in $new_path.
19508  new_path="$input_to_shortpath"
19509
19510  input_path="$input_to_shortpath"
19511  # Check if we need to convert this using DOS-style short mode. If the path
19512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19513  # take no chances and rewrite it.
19514  # Note: m4 eats our [], so we need to use [ and ] instead.
19515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19516  if test "x$has_forbidden_chars" != x; then
19517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19521      # Going to short mode and back again did indeed matter. Since short mode is
19522      # case insensitive, let's make it lowercase to improve readability.
19523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19524      # Now convert it back to Unix-style (cygpath)
19525      input_path=`$CYGPATH -u "$shortmode_path"`
19526      new_path="$input_path"
19527    fi
19528  fi
19529
19530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19531  if test "x$test_cygdrive_prefix" = x; then
19532    # As a simple fix, exclude /usr/bin since it's not a real path.
19533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19535      # a path prefixed by /cygdrive for fixpath to work.
19536      new_path="$CYGWIN_ROOT_PATH$input_path"
19537    fi
19538  fi
19539
19540  # remove trailing .exe if any
19541  new_path="${new_path/%.exe/}"
19542
19543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19544
19545  # First separate the path from the arguments. This will split at the first
19546  # space.
19547  complete="$FOUND_MAKE"
19548  path="${complete%% *}"
19549  tmp="$complete EOL"
19550  arguments="${tmp#* }"
19551
19552  # Input might be given as Windows format, start by converting to
19553  # unix format.
19554  new_path="$path"
19555
19556  windows_path="$new_path"
19557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19558    unix_path=`$CYGPATH -u "$windows_path"`
19559    new_path="$unix_path"
19560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19562    new_path="$unix_path"
19563  fi
19564
19565
19566  # Now try to locate executable using which
19567  new_path=`$WHICH "$new_path" 2> /dev/null`
19568
19569  if test "x$new_path" = x; then
19570    # Oops. Which didn't find the executable.
19571    # The splitting of arguments from the executable at a space might have been incorrect,
19572    # since paths with space are more likely in Windows. Give it another try with the whole
19573    # argument.
19574    path="$complete"
19575    arguments="EOL"
19576    new_path="$path"
19577
19578  windows_path="$new_path"
19579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19580    unix_path=`$CYGPATH -u "$windows_path"`
19581    new_path="$unix_path"
19582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19584    new_path="$unix_path"
19585  fi
19586
19587
19588    new_path=`$WHICH "$new_path" 2> /dev/null`
19589    # bat and cmd files are not always considered executable in MSYS causing which
19590    # to not find them
19591    if test "x$new_path" = x \
19592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19594      new_path="$path"
19595
19596  windows_path="$new_path"
19597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19598    unix_path=`$CYGPATH -u "$windows_path"`
19599    new_path="$unix_path"
19600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19602    new_path="$unix_path"
19603  fi
19604
19605    fi
19606
19607    if test "x$new_path" = x; then
19608      # It's still not found. Now this is an unrecoverable error.
19609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19611      has_space=`$ECHO "$complete" | $GREP " "`
19612      if test "x$has_space" != x; then
19613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19615      fi
19616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19617    fi
19618  fi
19619
19620  # Now new_path has a complete unix path to the binary
19621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19622    # Keep paths in /bin as-is, but remove trailing .exe if any
19623    new_path="${new_path/%.exe/}"
19624    # Do not save /bin paths to all_fixpath_prefixes!
19625  else
19626    # Not in mixed or Windows style, start by that.
19627    new_path=`cmd //c echo $new_path`
19628
19629  input_path="$new_path"
19630  # Check if we need to convert this using DOS-style short mode. If the path
19631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19632  # take no chances and rewrite it.
19633  # Note: m4 eats our [], so we need to use [ and ] instead.
19634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19635  if test "x$has_forbidden_chars" != x; then
19636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19638  fi
19639
19640    # Output is in $new_path
19641
19642  windows_path="$new_path"
19643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19644    unix_path=`$CYGPATH -u "$windows_path"`
19645    new_path="$unix_path"
19646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19648    new_path="$unix_path"
19649  fi
19650
19651    # remove trailing .exe if any
19652    new_path="${new_path/%.exe/}"
19653
19654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19656  fi
19657
19658    else
19659      # We're on a unix platform. Hooray! :)
19660      # First separate the path from the arguments. This will split at the first
19661      # space.
19662      complete="$FOUND_MAKE"
19663      path="${complete%% *}"
19664      tmp="$complete EOL"
19665      arguments="${tmp#* }"
19666
19667      # Cannot rely on the command "which" here since it doesn't always work.
19668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19669      if test -z "$is_absolute_path"; then
19670        # Path to executable is not absolute. Find it.
19671        IFS_save="$IFS"
19672        IFS=:
19673        for p in $PATH; do
19674          if test -f "$p/$path" && test -x "$p/$path"; then
19675            new_path="$p/$path"
19676            break
19677          fi
19678        done
19679        IFS="$IFS_save"
19680      else
19681        # This is an absolute path, we can use it without further modifications.
19682        new_path="$path"
19683      fi
19684
19685      if test "x$new_path" = x; then
19686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19688        has_space=`$ECHO "$complete" | $GREP " "`
19689        if test "x$has_space" != x; then
19690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19692        fi
19693        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19694      fi
19695    fi
19696
19697    # Now join together the path and the arguments once again
19698    if test "x$arguments" != xEOL; then
19699      new_complete="$new_path ${arguments% *}"
19700    else
19701      new_complete="$new_path"
19702    fi
19703
19704    if test "x$complete" != "x$new_complete"; then
19705      FOUND_MAKE="$new_complete"
19706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19707$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19708    fi
19709  fi
19710
19711        fi
19712      fi
19713    fi
19714  fi
19715
19716
19717    if test "x$FOUND_MAKE" = x; then
19718      for ac_prog in make
19719do
19720  # Extract the first word of "$ac_prog", so it can be a program name with args.
19721set dummy $ac_prog; ac_word=$2
19722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19723$as_echo_n "checking for $ac_word... " >&6; }
19724if ${ac_cv_path_CHECK_MAKE+:} false; then :
19725  $as_echo_n "(cached) " >&6
19726else
19727  case $CHECK_MAKE in
19728  [\\/]* | ?:[\\/]*)
19729  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19730  ;;
19731  *)
19732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19733for as_dir in $PATH
19734do
19735  IFS=$as_save_IFS
19736  test -z "$as_dir" && as_dir=.
19737    for ac_exec_ext in '' $ac_executable_extensions; do
19738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19739    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19741    break 2
19742  fi
19743done
19744  done
19745IFS=$as_save_IFS
19746
19747  ;;
19748esac
19749fi
19750CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19751if test -n "$CHECK_MAKE"; then
19752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19753$as_echo "$CHECK_MAKE" >&6; }
19754else
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756$as_echo "no" >&6; }
19757fi
19758
19759
19760  test -n "$CHECK_MAKE" && break
19761done
19762
19763
19764  MAKE_CANDIDATE=""$CHECK_MAKE""
19765  DESCRIPTION="make in PATH"
19766
19767  # On Cygwin, we require a newer version of make than on other platforms
19768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19769    MAKE_VERSION_EXPR="-e 4\."
19770    MAKE_REQUIRED_VERSION="4.0"
19771   else
19772    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19773    MAKE_REQUIRED_VERSION="3.81"
19774  fi
19775
19776  if test "x$MAKE_CANDIDATE" != x; then
19777    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19778$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19779    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19780    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19781    if test "x$IS_GNU_MAKE" = x; then
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19783$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19784    else
19785      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19786      if test "x$IS_MODERN_MAKE" = x; then
19787        { $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
19788$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;}
19789      else
19790        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19791          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19792            MAKE_EXPECTED_ENV='cygwin'
19793          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19794            MAKE_EXPECTED_ENV='msys'
19795          else
19796            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19797          fi
19798          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19799          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19800        else
19801          # Not relevant for non-Windows
19802          IS_MAKE_CORRECT_ENV=true
19803        fi
19804        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19805          { $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
19806$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;}
19807        else
19808          FOUND_MAKE=$MAKE_CANDIDATE
19809
19810  # Only process if variable expands to non-empty
19811
19812  if test "x$FOUND_MAKE" != x; then
19813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19814
19815  # First separate the path from the arguments. This will split at the first
19816  # space.
19817  complete="$FOUND_MAKE"
19818  path="${complete%% *}"
19819  tmp="$complete EOL"
19820  arguments="${tmp#* }"
19821
19822  # Input might be given as Windows format, start by converting to
19823  # unix format.
19824  new_path=`$CYGPATH -u "$path"`
19825
19826  # Now try to locate executable using which
19827  new_path=`$WHICH "$new_path" 2> /dev/null`
19828  # bat and cmd files are not always considered executable in cygwin causing which
19829  # to not find them
19830  if test "x$new_path" = x \
19831      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19832      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19833    new_path=`$CYGPATH -u "$path"`
19834  fi
19835  if test "x$new_path" = x; then
19836    # Oops. Which didn't find the executable.
19837    # The splitting of arguments from the executable at a space might have been incorrect,
19838    # since paths with space are more likely in Windows. Give it another try with the whole
19839    # argument.
19840    path="$complete"
19841    arguments="EOL"
19842    new_path=`$CYGPATH -u "$path"`
19843    new_path=`$WHICH "$new_path" 2> /dev/null`
19844    # bat and cmd files are not always considered executable in cygwin causing which
19845    # to not find them
19846    if test "x$new_path" = x \
19847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19849      new_path=`$CYGPATH -u "$path"`
19850    fi
19851    if test "x$new_path" = x; then
19852      # It's still not found. Now this is an unrecoverable error.
19853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19855      has_space=`$ECHO "$complete" | $GREP " "`
19856      if test "x$has_space" != x; then
19857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19859      fi
19860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19861    fi
19862  fi
19863
19864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19867  # "foo.exe" is OK but "foo" is an error.
19868  #
19869  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19870  # It is also a way to make sure we got the proper file name for the real test later on.
19871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19872  if test "x$test_shortpath" = x; then
19873    # Short path failed, file does not exist as specified.
19874    # Try adding .exe or .cmd
19875    if test -f "${new_path}.exe"; then
19876      input_to_shortpath="${new_path}.exe"
19877    elif test -f "${new_path}.cmd"; then
19878      input_to_shortpath="${new_path}.cmd"
19879    else
19880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19882      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19883$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19884      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19885    fi
19886  else
19887    input_to_shortpath="$new_path"
19888  fi
19889
19890  # Call helper function which possibly converts this using DOS-style short mode.
19891  # If so, the updated path is stored in $new_path.
19892  new_path="$input_to_shortpath"
19893
19894  input_path="$input_to_shortpath"
19895  # Check if we need to convert this using DOS-style short mode. If the path
19896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19897  # take no chances and rewrite it.
19898  # Note: m4 eats our [], so we need to use [ and ] instead.
19899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19900  if test "x$has_forbidden_chars" != x; then
19901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19905      # Going to short mode and back again did indeed matter. Since short mode is
19906      # case insensitive, let's make it lowercase to improve readability.
19907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19908      # Now convert it back to Unix-style (cygpath)
19909      input_path=`$CYGPATH -u "$shortmode_path"`
19910      new_path="$input_path"
19911    fi
19912  fi
19913
19914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19915  if test "x$test_cygdrive_prefix" = x; then
19916    # As a simple fix, exclude /usr/bin since it's not a real path.
19917    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19919      # a path prefixed by /cygdrive for fixpath to work.
19920      new_path="$CYGWIN_ROOT_PATH$input_path"
19921    fi
19922  fi
19923
19924  # remove trailing .exe if any
19925  new_path="${new_path/%.exe/}"
19926
19927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19928
19929  # First separate the path from the arguments. This will split at the first
19930  # space.
19931  complete="$FOUND_MAKE"
19932  path="${complete%% *}"
19933  tmp="$complete EOL"
19934  arguments="${tmp#* }"
19935
19936  # Input might be given as Windows format, start by converting to
19937  # unix format.
19938  new_path="$path"
19939
19940  windows_path="$new_path"
19941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942    unix_path=`$CYGPATH -u "$windows_path"`
19943    new_path="$unix_path"
19944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19946    new_path="$unix_path"
19947  fi
19948
19949
19950  # Now try to locate executable using which
19951  new_path=`$WHICH "$new_path" 2> /dev/null`
19952
19953  if test "x$new_path" = x; then
19954    # Oops. Which didn't find the executable.
19955    # The splitting of arguments from the executable at a space might have been incorrect,
19956    # since paths with space are more likely in Windows. Give it another try with the whole
19957    # argument.
19958    path="$complete"
19959    arguments="EOL"
19960    new_path="$path"
19961
19962  windows_path="$new_path"
19963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964    unix_path=`$CYGPATH -u "$windows_path"`
19965    new_path="$unix_path"
19966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19968    new_path="$unix_path"
19969  fi
19970
19971
19972    new_path=`$WHICH "$new_path" 2> /dev/null`
19973    # bat and cmd files are not always considered executable in MSYS causing which
19974    # to not find them
19975    if test "x$new_path" = x \
19976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19978      new_path="$path"
19979
19980  windows_path="$new_path"
19981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982    unix_path=`$CYGPATH -u "$windows_path"`
19983    new_path="$unix_path"
19984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19986    new_path="$unix_path"
19987  fi
19988
19989    fi
19990
19991    if test "x$new_path" = x; then
19992      # It's still not found. Now this is an unrecoverable error.
19993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19994$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19995      has_space=`$ECHO "$complete" | $GREP " "`
19996      if test "x$has_space" != x; then
19997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19999      fi
20000      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20001    fi
20002  fi
20003
20004  # Now new_path has a complete unix path to the binary
20005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20006    # Keep paths in /bin as-is, but remove trailing .exe if any
20007    new_path="${new_path/%.exe/}"
20008    # Do not save /bin paths to all_fixpath_prefixes!
20009  else
20010    # Not in mixed or Windows style, start by that.
20011    new_path=`cmd //c echo $new_path`
20012
20013  input_path="$new_path"
20014  # Check if we need to convert this using DOS-style short mode. If the path
20015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20016  # take no chances and rewrite it.
20017  # Note: m4 eats our [], so we need to use [ and ] instead.
20018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20019  if test "x$has_forbidden_chars" != x; then
20020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20022  fi
20023
20024    # Output is in $new_path
20025
20026  windows_path="$new_path"
20027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20028    unix_path=`$CYGPATH -u "$windows_path"`
20029    new_path="$unix_path"
20030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20032    new_path="$unix_path"
20033  fi
20034
20035    # remove trailing .exe if any
20036    new_path="${new_path/%.exe/}"
20037
20038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20040  fi
20041
20042    else
20043      # We're on a unix platform. Hooray! :)
20044      # First separate the path from the arguments. This will split at the first
20045      # space.
20046      complete="$FOUND_MAKE"
20047      path="${complete%% *}"
20048      tmp="$complete EOL"
20049      arguments="${tmp#* }"
20050
20051      # Cannot rely on the command "which" here since it doesn't always work.
20052      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20053      if test -z "$is_absolute_path"; then
20054        # Path to executable is not absolute. Find it.
20055        IFS_save="$IFS"
20056        IFS=:
20057        for p in $PATH; do
20058          if test -f "$p/$path" && test -x "$p/$path"; then
20059            new_path="$p/$path"
20060            break
20061          fi
20062        done
20063        IFS="$IFS_save"
20064      else
20065        # This is an absolute path, we can use it without further modifications.
20066        new_path="$path"
20067      fi
20068
20069      if test "x$new_path" = x; then
20070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20072        has_space=`$ECHO "$complete" | $GREP " "`
20073        if test "x$has_space" != x; then
20074          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20076        fi
20077        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20078      fi
20079    fi
20080
20081    # Now join together the path and the arguments once again
20082    if test "x$arguments" != xEOL; then
20083      new_complete="$new_path ${arguments% *}"
20084    else
20085      new_complete="$new_path"
20086    fi
20087
20088    if test "x$complete" != "x$new_complete"; then
20089      FOUND_MAKE="$new_complete"
20090      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20091$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20092    fi
20093  fi
20094
20095        fi
20096      fi
20097    fi
20098  fi
20099
20100    fi
20101
20102    if test "x$FOUND_MAKE" = x; then
20103      if test "x$TOOLCHAIN_PATH" != x; then
20104        # We have a toolchain path, check that as well before giving up.
20105        OLD_PATH=$PATH
20106        PATH=$TOOLCHAIN_PATH:$PATH
20107        for ac_prog in gmake
20108do
20109  # Extract the first word of "$ac_prog", so it can be a program name with args.
20110set dummy $ac_prog; ac_word=$2
20111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20112$as_echo_n "checking for $ac_word... " >&6; }
20113if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20114  $as_echo_n "(cached) " >&6
20115else
20116  case $CHECK_TOOLSDIR_GMAKE in
20117  [\\/]* | ?:[\\/]*)
20118  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20119  ;;
20120  *)
20121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20122for as_dir in $PATH
20123do
20124  IFS=$as_save_IFS
20125  test -z "$as_dir" && as_dir=.
20126    for ac_exec_ext in '' $ac_executable_extensions; do
20127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20128    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20130    break 2
20131  fi
20132done
20133  done
20134IFS=$as_save_IFS
20135
20136  ;;
20137esac
20138fi
20139CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20140if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20142$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20143else
20144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20145$as_echo "no" >&6; }
20146fi
20147
20148
20149  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20150done
20151
20152
20153  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20154  DESCRIPTION="gmake in tools-dir"
20155
20156  # On Cygwin, we require a newer version of make than on other platforms
20157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20158    MAKE_VERSION_EXPR="-e 4\."
20159    MAKE_REQUIRED_VERSION="4.0"
20160   else
20161    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20162    MAKE_REQUIRED_VERSION="3.81"
20163  fi
20164
20165  if test "x$MAKE_CANDIDATE" != x; then
20166    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20167$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20168    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20169    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20170    if test "x$IS_GNU_MAKE" = x; then
20171      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20172$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20173    else
20174      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20175      if test "x$IS_MODERN_MAKE" = x; then
20176        { $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
20177$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;}
20178      else
20179        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20180          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20181            MAKE_EXPECTED_ENV='cygwin'
20182          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20183            MAKE_EXPECTED_ENV='msys'
20184          else
20185            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20186          fi
20187          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20188          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20189        else
20190          # Not relevant for non-Windows
20191          IS_MAKE_CORRECT_ENV=true
20192        fi
20193        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20194          { $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
20195$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;}
20196        else
20197          FOUND_MAKE=$MAKE_CANDIDATE
20198
20199  # Only process if variable expands to non-empty
20200
20201  if test "x$FOUND_MAKE" != x; then
20202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20203
20204  # First separate the path from the arguments. This will split at the first
20205  # space.
20206  complete="$FOUND_MAKE"
20207  path="${complete%% *}"
20208  tmp="$complete EOL"
20209  arguments="${tmp#* }"
20210
20211  # Input might be given as Windows format, start by converting to
20212  # unix format.
20213  new_path=`$CYGPATH -u "$path"`
20214
20215  # Now try to locate executable using which
20216  new_path=`$WHICH "$new_path" 2> /dev/null`
20217  # bat and cmd files are not always considered executable in cygwin causing which
20218  # to not find them
20219  if test "x$new_path" = x \
20220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20222    new_path=`$CYGPATH -u "$path"`
20223  fi
20224  if test "x$new_path" = x; then
20225    # Oops. Which didn't find the executable.
20226    # The splitting of arguments from the executable at a space might have been incorrect,
20227    # since paths with space are more likely in Windows. Give it another try with the whole
20228    # argument.
20229    path="$complete"
20230    arguments="EOL"
20231    new_path=`$CYGPATH -u "$path"`
20232    new_path=`$WHICH "$new_path" 2> /dev/null`
20233    # bat and cmd files are not always considered executable in cygwin causing which
20234    # to not find them
20235    if test "x$new_path" = x \
20236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20238      new_path=`$CYGPATH -u "$path"`
20239    fi
20240    if test "x$new_path" = x; then
20241      # It's still not found. Now this is an unrecoverable error.
20242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20244      has_space=`$ECHO "$complete" | $GREP " "`
20245      if test "x$has_space" != x; then
20246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20248      fi
20249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20250    fi
20251  fi
20252
20253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20256  # "foo.exe" is OK but "foo" is an error.
20257  #
20258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20259  # It is also a way to make sure we got the proper file name for the real test later on.
20260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20261  if test "x$test_shortpath" = x; then
20262    # Short path failed, file does not exist as specified.
20263    # Try adding .exe or .cmd
20264    if test -f "${new_path}.exe"; then
20265      input_to_shortpath="${new_path}.exe"
20266    elif test -f "${new_path}.cmd"; then
20267      input_to_shortpath="${new_path}.cmd"
20268    else
20269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20273      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20274    fi
20275  else
20276    input_to_shortpath="$new_path"
20277  fi
20278
20279  # Call helper function which possibly converts this using DOS-style short mode.
20280  # If so, the updated path is stored in $new_path.
20281  new_path="$input_to_shortpath"
20282
20283  input_path="$input_to_shortpath"
20284  # Check if we need to convert this using DOS-style short mode. If the path
20285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20286  # take no chances and rewrite it.
20287  # Note: m4 eats our [], so we need to use [ and ] instead.
20288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20289  if test "x$has_forbidden_chars" != x; then
20290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20294      # Going to short mode and back again did indeed matter. Since short mode is
20295      # case insensitive, let's make it lowercase to improve readability.
20296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20297      # Now convert it back to Unix-style (cygpath)
20298      input_path=`$CYGPATH -u "$shortmode_path"`
20299      new_path="$input_path"
20300    fi
20301  fi
20302
20303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20304  if test "x$test_cygdrive_prefix" = x; then
20305    # As a simple fix, exclude /usr/bin since it's not a real path.
20306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20308      # a path prefixed by /cygdrive for fixpath to work.
20309      new_path="$CYGWIN_ROOT_PATH$input_path"
20310    fi
20311  fi
20312
20313  # remove trailing .exe if any
20314  new_path="${new_path/%.exe/}"
20315
20316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20317
20318  # First separate the path from the arguments. This will split at the first
20319  # space.
20320  complete="$FOUND_MAKE"
20321  path="${complete%% *}"
20322  tmp="$complete EOL"
20323  arguments="${tmp#* }"
20324
20325  # Input might be given as Windows format, start by converting to
20326  # unix format.
20327  new_path="$path"
20328
20329  windows_path="$new_path"
20330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20331    unix_path=`$CYGPATH -u "$windows_path"`
20332    new_path="$unix_path"
20333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20335    new_path="$unix_path"
20336  fi
20337
20338
20339  # Now try to locate executable using which
20340  new_path=`$WHICH "$new_path" 2> /dev/null`
20341
20342  if test "x$new_path" = x; then
20343    # Oops. Which didn't find the executable.
20344    # The splitting of arguments from the executable at a space might have been incorrect,
20345    # since paths with space are more likely in Windows. Give it another try with the whole
20346    # argument.
20347    path="$complete"
20348    arguments="EOL"
20349    new_path="$path"
20350
20351  windows_path="$new_path"
20352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353    unix_path=`$CYGPATH -u "$windows_path"`
20354    new_path="$unix_path"
20355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20357    new_path="$unix_path"
20358  fi
20359
20360
20361    new_path=`$WHICH "$new_path" 2> /dev/null`
20362    # bat and cmd files are not always considered executable in MSYS causing which
20363    # to not find them
20364    if test "x$new_path" = x \
20365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20367      new_path="$path"
20368
20369  windows_path="$new_path"
20370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371    unix_path=`$CYGPATH -u "$windows_path"`
20372    new_path="$unix_path"
20373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20375    new_path="$unix_path"
20376  fi
20377
20378    fi
20379
20380    if test "x$new_path" = x; then
20381      # It's still not found. Now this is an unrecoverable error.
20382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20384      has_space=`$ECHO "$complete" | $GREP " "`
20385      if test "x$has_space" != x; then
20386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20388      fi
20389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20390    fi
20391  fi
20392
20393  # Now new_path has a complete unix path to the binary
20394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20395    # Keep paths in /bin as-is, but remove trailing .exe if any
20396    new_path="${new_path/%.exe/}"
20397    # Do not save /bin paths to all_fixpath_prefixes!
20398  else
20399    # Not in mixed or Windows style, start by that.
20400    new_path=`cmd //c echo $new_path`
20401
20402  input_path="$new_path"
20403  # Check if we need to convert this using DOS-style short mode. If the path
20404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20405  # take no chances and rewrite it.
20406  # Note: m4 eats our [], so we need to use [ and ] instead.
20407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20408  if test "x$has_forbidden_chars" != x; then
20409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20411  fi
20412
20413    # Output is in $new_path
20414
20415  windows_path="$new_path"
20416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20417    unix_path=`$CYGPATH -u "$windows_path"`
20418    new_path="$unix_path"
20419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20421    new_path="$unix_path"
20422  fi
20423
20424    # remove trailing .exe if any
20425    new_path="${new_path/%.exe/}"
20426
20427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20429  fi
20430
20431    else
20432      # We're on a unix platform. Hooray! :)
20433      # First separate the path from the arguments. This will split at the first
20434      # space.
20435      complete="$FOUND_MAKE"
20436      path="${complete%% *}"
20437      tmp="$complete EOL"
20438      arguments="${tmp#* }"
20439
20440      # Cannot rely on the command "which" here since it doesn't always work.
20441      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20442      if test -z "$is_absolute_path"; then
20443        # Path to executable is not absolute. Find it.
20444        IFS_save="$IFS"
20445        IFS=:
20446        for p in $PATH; do
20447          if test -f "$p/$path" && test -x "$p/$path"; then
20448            new_path="$p/$path"
20449            break
20450          fi
20451        done
20452        IFS="$IFS_save"
20453      else
20454        # This is an absolute path, we can use it without further modifications.
20455        new_path="$path"
20456      fi
20457
20458      if test "x$new_path" = x; then
20459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20461        has_space=`$ECHO "$complete" | $GREP " "`
20462        if test "x$has_space" != x; then
20463          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20464$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20465        fi
20466        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20467      fi
20468    fi
20469
20470    # Now join together the path and the arguments once again
20471    if test "x$arguments" != xEOL; then
20472      new_complete="$new_path ${arguments% *}"
20473    else
20474      new_complete="$new_path"
20475    fi
20476
20477    if test "x$complete" != "x$new_complete"; then
20478      FOUND_MAKE="$new_complete"
20479      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20480$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20481    fi
20482  fi
20483
20484        fi
20485      fi
20486    fi
20487  fi
20488
20489        if test "x$FOUND_MAKE" = x; then
20490          for ac_prog in make
20491do
20492  # Extract the first word of "$ac_prog", so it can be a program name with args.
20493set dummy $ac_prog; ac_word=$2
20494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20495$as_echo_n "checking for $ac_word... " >&6; }
20496if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20497  $as_echo_n "(cached) " >&6
20498else
20499  case $CHECK_TOOLSDIR_MAKE in
20500  [\\/]* | ?:[\\/]*)
20501  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20502  ;;
20503  *)
20504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20505for as_dir in $PATH
20506do
20507  IFS=$as_save_IFS
20508  test -z "$as_dir" && as_dir=.
20509    for ac_exec_ext in '' $ac_executable_extensions; do
20510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20511    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20513    break 2
20514  fi
20515done
20516  done
20517IFS=$as_save_IFS
20518
20519  ;;
20520esac
20521fi
20522CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20523if test -n "$CHECK_TOOLSDIR_MAKE"; then
20524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20525$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20526else
20527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20528$as_echo "no" >&6; }
20529fi
20530
20531
20532  test -n "$CHECK_TOOLSDIR_MAKE" && break
20533done
20534
20535
20536  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20537  DESCRIPTION="make in tools-dir"
20538
20539  # On Cygwin, we require a newer version of make than on other platforms
20540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20541    MAKE_VERSION_EXPR="-e 4\."
20542    MAKE_REQUIRED_VERSION="4.0"
20543   else
20544    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20545    MAKE_REQUIRED_VERSION="3.81"
20546  fi
20547
20548  if test "x$MAKE_CANDIDATE" != x; then
20549    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20550$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20551    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20552    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20553    if test "x$IS_GNU_MAKE" = x; then
20554      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20555$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20556    else
20557      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20558      if test "x$IS_MODERN_MAKE" = x; then
20559        { $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
20560$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;}
20561      else
20562        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20563          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20564            MAKE_EXPECTED_ENV='cygwin'
20565          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20566            MAKE_EXPECTED_ENV='msys'
20567          else
20568            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20569          fi
20570          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20571          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20572        else
20573          # Not relevant for non-Windows
20574          IS_MAKE_CORRECT_ENV=true
20575        fi
20576        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20577          { $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
20578$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;}
20579        else
20580          FOUND_MAKE=$MAKE_CANDIDATE
20581
20582  # Only process if variable expands to non-empty
20583
20584  if test "x$FOUND_MAKE" != x; then
20585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20586
20587  # First separate the path from the arguments. This will split at the first
20588  # space.
20589  complete="$FOUND_MAKE"
20590  path="${complete%% *}"
20591  tmp="$complete EOL"
20592  arguments="${tmp#* }"
20593
20594  # Input might be given as Windows format, start by converting to
20595  # unix format.
20596  new_path=`$CYGPATH -u "$path"`
20597
20598  # Now try to locate executable using which
20599  new_path=`$WHICH "$new_path" 2> /dev/null`
20600  # bat and cmd files are not always considered executable in cygwin causing which
20601  # to not find them
20602  if test "x$new_path" = x \
20603      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20604      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20605    new_path=`$CYGPATH -u "$path"`
20606  fi
20607  if test "x$new_path" = x; then
20608    # Oops. Which didn't find the executable.
20609    # The splitting of arguments from the executable at a space might have been incorrect,
20610    # since paths with space are more likely in Windows. Give it another try with the whole
20611    # argument.
20612    path="$complete"
20613    arguments="EOL"
20614    new_path=`$CYGPATH -u "$path"`
20615    new_path=`$WHICH "$new_path" 2> /dev/null`
20616    # bat and cmd files are not always considered executable in cygwin causing which
20617    # to not find them
20618    if test "x$new_path" = x \
20619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20621      new_path=`$CYGPATH -u "$path"`
20622    fi
20623    if test "x$new_path" = x; then
20624      # It's still not found. Now this is an unrecoverable error.
20625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20626$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20627      has_space=`$ECHO "$complete" | $GREP " "`
20628      if test "x$has_space" != x; then
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20631      fi
20632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20633    fi
20634  fi
20635
20636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20639  # "foo.exe" is OK but "foo" is an error.
20640  #
20641  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20642  # It is also a way to make sure we got the proper file name for the real test later on.
20643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20644  if test "x$test_shortpath" = x; then
20645    # Short path failed, file does not exist as specified.
20646    # Try adding .exe or .cmd
20647    if test -f "${new_path}.exe"; then
20648      input_to_shortpath="${new_path}.exe"
20649    elif test -f "${new_path}.cmd"; then
20650      input_to_shortpath="${new_path}.cmd"
20651    else
20652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20653$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20656      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20657    fi
20658  else
20659    input_to_shortpath="$new_path"
20660  fi
20661
20662  # Call helper function which possibly converts this using DOS-style short mode.
20663  # If so, the updated path is stored in $new_path.
20664  new_path="$input_to_shortpath"
20665
20666  input_path="$input_to_shortpath"
20667  # Check if we need to convert this using DOS-style short mode. If the path
20668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20669  # take no chances and rewrite it.
20670  # Note: m4 eats our [], so we need to use [ and ] instead.
20671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20672  if test "x$has_forbidden_chars" != x; then
20673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20677      # Going to short mode and back again did indeed matter. Since short mode is
20678      # case insensitive, let's make it lowercase to improve readability.
20679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20680      # Now convert it back to Unix-style (cygpath)
20681      input_path=`$CYGPATH -u "$shortmode_path"`
20682      new_path="$input_path"
20683    fi
20684  fi
20685
20686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20687  if test "x$test_cygdrive_prefix" = x; then
20688    # As a simple fix, exclude /usr/bin since it's not a real path.
20689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20691      # a path prefixed by /cygdrive for fixpath to work.
20692      new_path="$CYGWIN_ROOT_PATH$input_path"
20693    fi
20694  fi
20695
20696  # remove trailing .exe if any
20697  new_path="${new_path/%.exe/}"
20698
20699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20700
20701  # First separate the path from the arguments. This will split at the first
20702  # space.
20703  complete="$FOUND_MAKE"
20704  path="${complete%% *}"
20705  tmp="$complete EOL"
20706  arguments="${tmp#* }"
20707
20708  # Input might be given as Windows format, start by converting to
20709  # unix format.
20710  new_path="$path"
20711
20712  windows_path="$new_path"
20713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20714    unix_path=`$CYGPATH -u "$windows_path"`
20715    new_path="$unix_path"
20716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20718    new_path="$unix_path"
20719  fi
20720
20721
20722  # Now try to locate executable using which
20723  new_path=`$WHICH "$new_path" 2> /dev/null`
20724
20725  if test "x$new_path" = x; then
20726    # Oops. Which didn't find the executable.
20727    # The splitting of arguments from the executable at a space might have been incorrect,
20728    # since paths with space are more likely in Windows. Give it another try with the whole
20729    # argument.
20730    path="$complete"
20731    arguments="EOL"
20732    new_path="$path"
20733
20734  windows_path="$new_path"
20735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20736    unix_path=`$CYGPATH -u "$windows_path"`
20737    new_path="$unix_path"
20738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20740    new_path="$unix_path"
20741  fi
20742
20743
20744    new_path=`$WHICH "$new_path" 2> /dev/null`
20745    # bat and cmd files are not always considered executable in MSYS causing which
20746    # to not find them
20747    if test "x$new_path" = x \
20748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20750      new_path="$path"
20751
20752  windows_path="$new_path"
20753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754    unix_path=`$CYGPATH -u "$windows_path"`
20755    new_path="$unix_path"
20756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20758    new_path="$unix_path"
20759  fi
20760
20761    fi
20762
20763    if test "x$new_path" = x; then
20764      # It's still not found. Now this is an unrecoverable error.
20765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20766$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20767      has_space=`$ECHO "$complete" | $GREP " "`
20768      if test "x$has_space" != x; then
20769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20771      fi
20772      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20773    fi
20774  fi
20775
20776  # Now new_path has a complete unix path to the binary
20777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20778    # Keep paths in /bin as-is, but remove trailing .exe if any
20779    new_path="${new_path/%.exe/}"
20780    # Do not save /bin paths to all_fixpath_prefixes!
20781  else
20782    # Not in mixed or Windows style, start by that.
20783    new_path=`cmd //c echo $new_path`
20784
20785  input_path="$new_path"
20786  # Check if we need to convert this using DOS-style short mode. If the path
20787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20788  # take no chances and rewrite it.
20789  # Note: m4 eats our [], so we need to use [ and ] instead.
20790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20791  if test "x$has_forbidden_chars" != x; then
20792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20794  fi
20795
20796    # Output is in $new_path
20797
20798  windows_path="$new_path"
20799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20800    unix_path=`$CYGPATH -u "$windows_path"`
20801    new_path="$unix_path"
20802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20804    new_path="$unix_path"
20805  fi
20806
20807    # remove trailing .exe if any
20808    new_path="${new_path/%.exe/}"
20809
20810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20812  fi
20813
20814    else
20815      # We're on a unix platform. Hooray! :)
20816      # First separate the path from the arguments. This will split at the first
20817      # space.
20818      complete="$FOUND_MAKE"
20819      path="${complete%% *}"
20820      tmp="$complete EOL"
20821      arguments="${tmp#* }"
20822
20823      # Cannot rely on the command "which" here since it doesn't always work.
20824      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20825      if test -z "$is_absolute_path"; then
20826        # Path to executable is not absolute. Find it.
20827        IFS_save="$IFS"
20828        IFS=:
20829        for p in $PATH; do
20830          if test -f "$p/$path" && test -x "$p/$path"; then
20831            new_path="$p/$path"
20832            break
20833          fi
20834        done
20835        IFS="$IFS_save"
20836      else
20837        # This is an absolute path, we can use it without further modifications.
20838        new_path="$path"
20839      fi
20840
20841      if test "x$new_path" = x; then
20842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20844        has_space=`$ECHO "$complete" | $GREP " "`
20845        if test "x$has_space" != x; then
20846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20848        fi
20849        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20850      fi
20851    fi
20852
20853    # Now join together the path and the arguments once again
20854    if test "x$arguments" != xEOL; then
20855      new_complete="$new_path ${arguments% *}"
20856    else
20857      new_complete="$new_path"
20858    fi
20859
20860    if test "x$complete" != "x$new_complete"; then
20861      FOUND_MAKE="$new_complete"
20862      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20863$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20864    fi
20865  fi
20866
20867        fi
20868      fi
20869    fi
20870  fi
20871
20872        fi
20873        PATH=$OLD_PATH
20874      fi
20875    fi
20876
20877    if test "x$FOUND_MAKE" = x; then
20878      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
20879    fi
20880
20881    else
20882      # If it succeeded, then it was overridden by the user. We will use it
20883      # for the tool.
20884
20885      # First remove it from the list of overridden variables, so we can test
20886      # for unknown variables in the end.
20887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20888
20889      # Check if we try to supply an empty value
20890      if test "x$MAKE" = x; then
20891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20892$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20894$as_echo_n "checking for MAKE... " >&6; }
20895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20896$as_echo "disabled" >&6; }
20897      else
20898        # Check if the provided tool contains a complete path.
20899        tool_specified="$MAKE"
20900        tool_basename="${tool_specified##*/}"
20901        if test "x$tool_basename" = "x$tool_specified"; then
20902          # A command without a complete path is provided, search $PATH.
20903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20904$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20905          # Extract the first word of "$tool_basename", so it can be a program name with args.
20906set dummy $tool_basename; ac_word=$2
20907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20908$as_echo_n "checking for $ac_word... " >&6; }
20909if ${ac_cv_path_MAKE+:} false; then :
20910  $as_echo_n "(cached) " >&6
20911else
20912  case $MAKE in
20913  [\\/]* | ?:[\\/]*)
20914  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20915  ;;
20916  *)
20917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20918for as_dir in $PATH
20919do
20920  IFS=$as_save_IFS
20921  test -z "$as_dir" && as_dir=.
20922    for ac_exec_ext in '' $ac_executable_extensions; do
20923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20924    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20926    break 2
20927  fi
20928done
20929  done
20930IFS=$as_save_IFS
20931
20932  ;;
20933esac
20934fi
20935MAKE=$ac_cv_path_MAKE
20936if test -n "$MAKE"; then
20937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20938$as_echo "$MAKE" >&6; }
20939else
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20941$as_echo "no" >&6; }
20942fi
20943
20944
20945          if test "x$MAKE" = x; then
20946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20947          fi
20948        else
20949          # Otherwise we believe it is a complete path. Use it as it is.
20950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20951$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20953$as_echo_n "checking for MAKE... " >&6; }
20954          if test ! -x "$tool_specified"; then
20955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20956$as_echo "not found" >&6; }
20957            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20958          fi
20959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20960$as_echo "$tool_specified" >&6; }
20961        fi
20962      fi
20963    fi
20964
20965    # If MAKE was set by user, verify the version
20966
20967  MAKE_CANDIDATE=""$MAKE""
20968  DESCRIPTION="user supplied MAKE=$MAKE"
20969
20970  # On Cygwin, we require a newer version of make than on other platforms
20971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20972    MAKE_VERSION_EXPR="-e 4\."
20973    MAKE_REQUIRED_VERSION="4.0"
20974   else
20975    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20976    MAKE_REQUIRED_VERSION="3.81"
20977  fi
20978
20979  if test "x$MAKE_CANDIDATE" != x; then
20980    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20981$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20982    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20983    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20984    if test "x$IS_GNU_MAKE" = x; then
20985      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20986$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20987    else
20988      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20989      if test "x$IS_MODERN_MAKE" = x; then
20990        { $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
20991$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;}
20992      else
20993        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20994          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20995            MAKE_EXPECTED_ENV='cygwin'
20996          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20997            MAKE_EXPECTED_ENV='msys'
20998          else
20999            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21000          fi
21001          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21002          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21003        else
21004          # Not relevant for non-Windows
21005          IS_MAKE_CORRECT_ENV=true
21006        fi
21007        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21008          { $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
21009$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;}
21010        else
21011          FOUND_MAKE=$MAKE_CANDIDATE
21012
21013  # Only process if variable expands to non-empty
21014
21015  if test "x$FOUND_MAKE" != x; then
21016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21017
21018  # First separate the path from the arguments. This will split at the first
21019  # space.
21020  complete="$FOUND_MAKE"
21021  path="${complete%% *}"
21022  tmp="$complete EOL"
21023  arguments="${tmp#* }"
21024
21025  # Input might be given as Windows format, start by converting to
21026  # unix format.
21027  new_path=`$CYGPATH -u "$path"`
21028
21029  # Now try to locate executable using which
21030  new_path=`$WHICH "$new_path" 2> /dev/null`
21031  # bat and cmd files are not always considered executable in cygwin causing which
21032  # to not find them
21033  if test "x$new_path" = x \
21034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21036    new_path=`$CYGPATH -u "$path"`
21037  fi
21038  if test "x$new_path" = x; then
21039    # Oops. Which didn't find the executable.
21040    # The splitting of arguments from the executable at a space might have been incorrect,
21041    # since paths with space are more likely in Windows. Give it another try with the whole
21042    # argument.
21043    path="$complete"
21044    arguments="EOL"
21045    new_path=`$CYGPATH -u "$path"`
21046    new_path=`$WHICH "$new_path" 2> /dev/null`
21047    # bat and cmd files are not always considered executable in cygwin causing which
21048    # to not find them
21049    if test "x$new_path" = x \
21050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21052      new_path=`$CYGPATH -u "$path"`
21053    fi
21054    if test "x$new_path" = x; then
21055      # It's still not found. Now this is an unrecoverable error.
21056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21058      has_space=`$ECHO "$complete" | $GREP " "`
21059      if test "x$has_space" != x; then
21060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21062      fi
21063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21064    fi
21065  fi
21066
21067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21070  # "foo.exe" is OK but "foo" is an error.
21071  #
21072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21073  # It is also a way to make sure we got the proper file name for the real test later on.
21074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21075  if test "x$test_shortpath" = x; then
21076    # Short path failed, file does not exist as specified.
21077    # Try adding .exe or .cmd
21078    if test -f "${new_path}.exe"; then
21079      input_to_shortpath="${new_path}.exe"
21080    elif test -f "${new_path}.cmd"; then
21081      input_to_shortpath="${new_path}.cmd"
21082    else
21083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21088    fi
21089  else
21090    input_to_shortpath="$new_path"
21091  fi
21092
21093  # Call helper function which possibly converts this using DOS-style short mode.
21094  # If so, the updated path is stored in $new_path.
21095  new_path="$input_to_shortpath"
21096
21097  input_path="$input_to_shortpath"
21098  # Check if we need to convert this using DOS-style short mode. If the path
21099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21100  # take no chances and rewrite it.
21101  # Note: m4 eats our [], so we need to use [ and ] instead.
21102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21103  if test "x$has_forbidden_chars" != x; then
21104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21108      # Going to short mode and back again did indeed matter. Since short mode is
21109      # case insensitive, let's make it lowercase to improve readability.
21110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21111      # Now convert it back to Unix-style (cygpath)
21112      input_path=`$CYGPATH -u "$shortmode_path"`
21113      new_path="$input_path"
21114    fi
21115  fi
21116
21117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21118  if test "x$test_cygdrive_prefix" = x; then
21119    # As a simple fix, exclude /usr/bin since it's not a real path.
21120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21122      # a path prefixed by /cygdrive for fixpath to work.
21123      new_path="$CYGWIN_ROOT_PATH$input_path"
21124    fi
21125  fi
21126
21127  # remove trailing .exe if any
21128  new_path="${new_path/%.exe/}"
21129
21130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21131
21132  # First separate the path from the arguments. This will split at the first
21133  # space.
21134  complete="$FOUND_MAKE"
21135  path="${complete%% *}"
21136  tmp="$complete EOL"
21137  arguments="${tmp#* }"
21138
21139  # Input might be given as Windows format, start by converting to
21140  # unix format.
21141  new_path="$path"
21142
21143  windows_path="$new_path"
21144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21145    unix_path=`$CYGPATH -u "$windows_path"`
21146    new_path="$unix_path"
21147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21149    new_path="$unix_path"
21150  fi
21151
21152
21153  # Now try to locate executable using which
21154  new_path=`$WHICH "$new_path" 2> /dev/null`
21155
21156  if test "x$new_path" = x; then
21157    # Oops. Which didn't find the executable.
21158    # The splitting of arguments from the executable at a space might have been incorrect,
21159    # since paths with space are more likely in Windows. Give it another try with the whole
21160    # argument.
21161    path="$complete"
21162    arguments="EOL"
21163    new_path="$path"
21164
21165  windows_path="$new_path"
21166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21167    unix_path=`$CYGPATH -u "$windows_path"`
21168    new_path="$unix_path"
21169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21171    new_path="$unix_path"
21172  fi
21173
21174
21175    new_path=`$WHICH "$new_path" 2> /dev/null`
21176    # bat and cmd files are not always considered executable in MSYS causing which
21177    # to not find them
21178    if test "x$new_path" = x \
21179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21181      new_path="$path"
21182
21183  windows_path="$new_path"
21184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21185    unix_path=`$CYGPATH -u "$windows_path"`
21186    new_path="$unix_path"
21187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21189    new_path="$unix_path"
21190  fi
21191
21192    fi
21193
21194    if test "x$new_path" = x; then
21195      # It's still not found. Now this is an unrecoverable error.
21196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21198      has_space=`$ECHO "$complete" | $GREP " "`
21199      if test "x$has_space" != x; then
21200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21202      fi
21203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21204    fi
21205  fi
21206
21207  # Now new_path has a complete unix path to the binary
21208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21209    # Keep paths in /bin as-is, but remove trailing .exe if any
21210    new_path="${new_path/%.exe/}"
21211    # Do not save /bin paths to all_fixpath_prefixes!
21212  else
21213    # Not in mixed or Windows style, start by that.
21214    new_path=`cmd //c echo $new_path`
21215
21216  input_path="$new_path"
21217  # Check if we need to convert this using DOS-style short mode. If the path
21218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21219  # take no chances and rewrite it.
21220  # Note: m4 eats our [], so we need to use [ and ] instead.
21221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21222  if test "x$has_forbidden_chars" != x; then
21223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21225  fi
21226
21227    # Output is in $new_path
21228
21229  windows_path="$new_path"
21230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21231    unix_path=`$CYGPATH -u "$windows_path"`
21232    new_path="$unix_path"
21233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21235    new_path="$unix_path"
21236  fi
21237
21238    # remove trailing .exe if any
21239    new_path="${new_path/%.exe/}"
21240
21241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21243  fi
21244
21245    else
21246      # We're on a unix platform. Hooray! :)
21247      # First separate the path from the arguments. This will split at the first
21248      # space.
21249      complete="$FOUND_MAKE"
21250      path="${complete%% *}"
21251      tmp="$complete EOL"
21252      arguments="${tmp#* }"
21253
21254      # Cannot rely on the command "which" here since it doesn't always work.
21255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21256      if test -z "$is_absolute_path"; then
21257        # Path to executable is not absolute. Find it.
21258        IFS_save="$IFS"
21259        IFS=:
21260        for p in $PATH; do
21261          if test -f "$p/$path" && test -x "$p/$path"; then
21262            new_path="$p/$path"
21263            break
21264          fi
21265        done
21266        IFS="$IFS_save"
21267      else
21268        # This is an absolute path, we can use it without further modifications.
21269        new_path="$path"
21270      fi
21271
21272      if test "x$new_path" = x; then
21273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21275        has_space=`$ECHO "$complete" | $GREP " "`
21276        if test "x$has_space" != x; then
21277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21279        fi
21280        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21281      fi
21282    fi
21283
21284    # Now join together the path and the arguments once again
21285    if test "x$arguments" != xEOL; then
21286      new_complete="$new_path ${arguments% *}"
21287    else
21288      new_complete="$new_path"
21289    fi
21290
21291    if test "x$complete" != "x$new_complete"; then
21292      FOUND_MAKE="$new_complete"
21293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21294$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21295    fi
21296  fi
21297
21298        fi
21299      fi
21300    fi
21301  fi
21302
21303    if test "x$FOUND_MAKE" = x; then
21304      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21305    fi
21306
21307  fi
21308
21309
21310  MAKE=$FOUND_MAKE
21311
21312  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21313$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21314
21315
21316  # Check if make supports the output sync option and if so, setup using it.
21317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21318$as_echo_n "checking if make --output-sync is supported... " >&6; }
21319  if $MAKE --version -O > /dev/null 2>&1; then
21320    OUTPUT_SYNC_SUPPORTED=true
21321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21322$as_echo "yes" >&6; }
21323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21324$as_echo_n "checking for output-sync value... " >&6; }
21325
21326# Check whether --with-output-sync was given.
21327if test "${with_output_sync+set}" = set; then :
21328  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21329fi
21330
21331    if test "x$OUTPUT_SYNC" = "x"; then
21332      OUTPUT_SYNC=none
21333    fi
21334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21335$as_echo "$OUTPUT_SYNC" >&6; }
21336    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21337      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21338    fi
21339  else
21340    OUTPUT_SYNC_SUPPORTED=false
21341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21342$as_echo "no" >&6; }
21343  fi
21344
21345
21346
21347
21348
21349
21350  # Test if find supports -delete
21351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21352$as_echo_n "checking if find supports -delete... " >&6; }
21353  FIND_DELETE="-delete"
21354
21355  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21356
21357  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21358
21359  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21360  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21361    # No, it does not.
21362    $RM $DELETEDIR/TestIfFindSupportsDelete
21363    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21364      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21365      FIND_DELETE="-print | $XARGS $RM"
21366    else
21367      FIND_DELETE="-exec $RM \{\} \+"
21368    fi
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21370$as_echo "no" >&6; }
21371  else
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21373$as_echo "yes" >&6; }
21374  fi
21375  $RMDIR $DELETEDIR
21376
21377
21378
21379  # Test which kind of tar was found
21380  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21381    TAR_TYPE="gnu"
21382  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21383    TAR_TYPE="bsd"
21384  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21385    TAR_TYPE="bsd"
21386  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21387    TAR_TYPE="solaris"
21388  fi
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21390$as_echo_n "checking what type of tar was found... " >&6; }
21391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21392$as_echo "$TAR_TYPE" >&6; }
21393
21394  TAR_CREATE_FILE_PARAM=""
21395
21396  if test "x$TAR_TYPE" = "xgnu"; then
21397    TAR_INCLUDE_PARAM="T"
21398    TAR_SUPPORTS_TRANSFORM="true"
21399    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21400      # When using gnu tar for Solaris targets, need to use compatibility mode
21401      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21402    fi
21403  else
21404    TAR_INCLUDE_PARAM="I"
21405    TAR_SUPPORTS_TRANSFORM="false"
21406  fi
21407
21408
21409
21410
21411
21412
21413  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21414  # This is a problem for the grep resident on AIX.
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21416$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21417  # Multiple subsequent spaces..
21418  STACK_SPACES='aaa   bbb   ccc'
21419  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21420  # patterns in it.
21421  STACK_LIST=${STACK_SPACES// /$'\n'}
21422  NEEDLE_SPACES='ccc bbb aaa'
21423  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21424  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21425  if test "x$RESULT" == "x"; then
21426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21427$as_echo "yes" >&6; }
21428  else
21429    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21430      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21431    fi
21432    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21433  fi
21434
21435
21436  # These tools might not be installed by default,
21437  # need hint on how to install them.
21438
21439
21440
21441  # Publish this variable in the help.
21442
21443
21444  if [ -z "${UNZIP+x}" ]; then
21445    # The variable is not set by user, try to locate tool using the code snippet
21446    for ac_prog in unzip
21447do
21448  # Extract the first word of "$ac_prog", so it can be a program name with args.
21449set dummy $ac_prog; ac_word=$2
21450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21451$as_echo_n "checking for $ac_word... " >&6; }
21452if ${ac_cv_path_UNZIP+:} false; then :
21453  $as_echo_n "(cached) " >&6
21454else
21455  case $UNZIP in
21456  [\\/]* | ?:[\\/]*)
21457  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21458  ;;
21459  *)
21460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21461for as_dir in $PATH
21462do
21463  IFS=$as_save_IFS
21464  test -z "$as_dir" && as_dir=.
21465    for ac_exec_ext in '' $ac_executable_extensions; do
21466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21467    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21469    break 2
21470  fi
21471done
21472  done
21473IFS=$as_save_IFS
21474
21475  ;;
21476esac
21477fi
21478UNZIP=$ac_cv_path_UNZIP
21479if test -n "$UNZIP"; then
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21481$as_echo "$UNZIP" >&6; }
21482else
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21484$as_echo "no" >&6; }
21485fi
21486
21487
21488  test -n "$UNZIP" && break
21489done
21490
21491  else
21492    # The variable is set, but is it from the command line or the environment?
21493
21494    # Try to remove the string !UNZIP! from our list.
21495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21497      # If it failed, the variable was not from the command line. Ignore it,
21498      # but warn the user (except for BASH, which is always set by the calling BASH).
21499      if test "xUNZIP" != xBASH; then
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21501$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21502      fi
21503      # Try to locate tool using the code snippet
21504      for ac_prog in unzip
21505do
21506  # Extract the first word of "$ac_prog", so it can be a program name with args.
21507set dummy $ac_prog; ac_word=$2
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21509$as_echo_n "checking for $ac_word... " >&6; }
21510if ${ac_cv_path_UNZIP+:} false; then :
21511  $as_echo_n "(cached) " >&6
21512else
21513  case $UNZIP in
21514  [\\/]* | ?:[\\/]*)
21515  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21516  ;;
21517  *)
21518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21519for as_dir in $PATH
21520do
21521  IFS=$as_save_IFS
21522  test -z "$as_dir" && as_dir=.
21523    for ac_exec_ext in '' $ac_executable_extensions; do
21524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21525    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21527    break 2
21528  fi
21529done
21530  done
21531IFS=$as_save_IFS
21532
21533  ;;
21534esac
21535fi
21536UNZIP=$ac_cv_path_UNZIP
21537if test -n "$UNZIP"; then
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21539$as_echo "$UNZIP" >&6; }
21540else
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21542$as_echo "no" >&6; }
21543fi
21544
21545
21546  test -n "$UNZIP" && break
21547done
21548
21549    else
21550      # If it succeeded, then it was overridden by the user. We will use it
21551      # for the tool.
21552
21553      # First remove it from the list of overridden variables, so we can test
21554      # for unknown variables in the end.
21555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21556
21557      # Check if we try to supply an empty value
21558      if test "x$UNZIP" = x; then
21559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21560$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21562$as_echo_n "checking for UNZIP... " >&6; }
21563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21564$as_echo "disabled" >&6; }
21565      else
21566        # Check if the provided tool contains a complete path.
21567        tool_specified="$UNZIP"
21568        tool_basename="${tool_specified##*/}"
21569        if test "x$tool_basename" = "x$tool_specified"; then
21570          # A command without a complete path is provided, search $PATH.
21571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21572$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21573          # Extract the first word of "$tool_basename", so it can be a program name with args.
21574set dummy $tool_basename; ac_word=$2
21575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21576$as_echo_n "checking for $ac_word... " >&6; }
21577if ${ac_cv_path_UNZIP+:} false; then :
21578  $as_echo_n "(cached) " >&6
21579else
21580  case $UNZIP in
21581  [\\/]* | ?:[\\/]*)
21582  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21583  ;;
21584  *)
21585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21586for as_dir in $PATH
21587do
21588  IFS=$as_save_IFS
21589  test -z "$as_dir" && as_dir=.
21590    for ac_exec_ext in '' $ac_executable_extensions; do
21591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21592    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21594    break 2
21595  fi
21596done
21597  done
21598IFS=$as_save_IFS
21599
21600  ;;
21601esac
21602fi
21603UNZIP=$ac_cv_path_UNZIP
21604if test -n "$UNZIP"; then
21605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21606$as_echo "$UNZIP" >&6; }
21607else
21608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21609$as_echo "no" >&6; }
21610fi
21611
21612
21613          if test "x$UNZIP" = x; then
21614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21615          fi
21616        else
21617          # Otherwise we believe it is a complete path. Use it as it is.
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21619$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21621$as_echo_n "checking for UNZIP... " >&6; }
21622          if test ! -x "$tool_specified"; then
21623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21624$as_echo "not found" >&6; }
21625            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21626          fi
21627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21628$as_echo "$tool_specified" >&6; }
21629        fi
21630      fi
21631    fi
21632
21633  fi
21634
21635
21636
21637  if test "x$UNZIP" = x; then
21638    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21639  fi
21640
21641
21642  # Since zip uses "ZIP" as a environment variable for passing options, we need
21643  # to name our variable differently, hence ZIPEXE.
21644
21645
21646
21647  # Publish this variable in the help.
21648
21649
21650  if [ -z "${ZIPEXE+x}" ]; then
21651    # The variable is not set by user, try to locate tool using the code snippet
21652    for ac_prog in zip
21653do
21654  # Extract the first word of "$ac_prog", so it can be a program name with args.
21655set dummy $ac_prog; ac_word=$2
21656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21657$as_echo_n "checking for $ac_word... " >&6; }
21658if ${ac_cv_path_ZIPEXE+:} false; then :
21659  $as_echo_n "(cached) " >&6
21660else
21661  case $ZIPEXE in
21662  [\\/]* | ?:[\\/]*)
21663  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21664  ;;
21665  *)
21666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21667for as_dir in $PATH
21668do
21669  IFS=$as_save_IFS
21670  test -z "$as_dir" && as_dir=.
21671    for ac_exec_ext in '' $ac_executable_extensions; do
21672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21673    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21675    break 2
21676  fi
21677done
21678  done
21679IFS=$as_save_IFS
21680
21681  ;;
21682esac
21683fi
21684ZIPEXE=$ac_cv_path_ZIPEXE
21685if test -n "$ZIPEXE"; then
21686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21687$as_echo "$ZIPEXE" >&6; }
21688else
21689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21690$as_echo "no" >&6; }
21691fi
21692
21693
21694  test -n "$ZIPEXE" && break
21695done
21696
21697  else
21698    # The variable is set, but is it from the command line or the environment?
21699
21700    # Try to remove the string !ZIPEXE! from our list.
21701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21703      # If it failed, the variable was not from the command line. Ignore it,
21704      # but warn the user (except for BASH, which is always set by the calling BASH).
21705      if test "xZIPEXE" != xBASH; then
21706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21707$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21708      fi
21709      # Try to locate tool using the code snippet
21710      for ac_prog in zip
21711do
21712  # Extract the first word of "$ac_prog", so it can be a program name with args.
21713set dummy $ac_prog; ac_word=$2
21714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21715$as_echo_n "checking for $ac_word... " >&6; }
21716if ${ac_cv_path_ZIPEXE+:} false; then :
21717  $as_echo_n "(cached) " >&6
21718else
21719  case $ZIPEXE in
21720  [\\/]* | ?:[\\/]*)
21721  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21722  ;;
21723  *)
21724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21725for as_dir in $PATH
21726do
21727  IFS=$as_save_IFS
21728  test -z "$as_dir" && as_dir=.
21729    for ac_exec_ext in '' $ac_executable_extensions; do
21730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21731    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21733    break 2
21734  fi
21735done
21736  done
21737IFS=$as_save_IFS
21738
21739  ;;
21740esac
21741fi
21742ZIPEXE=$ac_cv_path_ZIPEXE
21743if test -n "$ZIPEXE"; then
21744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21745$as_echo "$ZIPEXE" >&6; }
21746else
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21748$as_echo "no" >&6; }
21749fi
21750
21751
21752  test -n "$ZIPEXE" && break
21753done
21754
21755    else
21756      # If it succeeded, then it was overridden by the user. We will use it
21757      # for the tool.
21758
21759      # First remove it from the list of overridden variables, so we can test
21760      # for unknown variables in the end.
21761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21762
21763      # Check if we try to supply an empty value
21764      if test "x$ZIPEXE" = x; then
21765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21766$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21768$as_echo_n "checking for ZIPEXE... " >&6; }
21769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21770$as_echo "disabled" >&6; }
21771      else
21772        # Check if the provided tool contains a complete path.
21773        tool_specified="$ZIPEXE"
21774        tool_basename="${tool_specified##*/}"
21775        if test "x$tool_basename" = "x$tool_specified"; then
21776          # A command without a complete path is provided, search $PATH.
21777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21778$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21779          # Extract the first word of "$tool_basename", so it can be a program name with args.
21780set dummy $tool_basename; ac_word=$2
21781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21782$as_echo_n "checking for $ac_word... " >&6; }
21783if ${ac_cv_path_ZIPEXE+:} false; then :
21784  $as_echo_n "(cached) " >&6
21785else
21786  case $ZIPEXE in
21787  [\\/]* | ?:[\\/]*)
21788  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21789  ;;
21790  *)
21791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21792for as_dir in $PATH
21793do
21794  IFS=$as_save_IFS
21795  test -z "$as_dir" && as_dir=.
21796    for ac_exec_ext in '' $ac_executable_extensions; do
21797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21798    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21800    break 2
21801  fi
21802done
21803  done
21804IFS=$as_save_IFS
21805
21806  ;;
21807esac
21808fi
21809ZIPEXE=$ac_cv_path_ZIPEXE
21810if test -n "$ZIPEXE"; then
21811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21812$as_echo "$ZIPEXE" >&6; }
21813else
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21815$as_echo "no" >&6; }
21816fi
21817
21818
21819          if test "x$ZIPEXE" = x; then
21820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21821          fi
21822        else
21823          # Otherwise we believe it is a complete path. Use it as it is.
21824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21825$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21827$as_echo_n "checking for ZIPEXE... " >&6; }
21828          if test ! -x "$tool_specified"; then
21829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21830$as_echo "not found" >&6; }
21831            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21832          fi
21833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21834$as_echo "$tool_specified" >&6; }
21835        fi
21836      fi
21837    fi
21838
21839  fi
21840
21841
21842
21843  if test "x$ZIPEXE" = x; then
21844    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21845  fi
21846
21847
21848
21849  # Non-required basic tools
21850
21851
21852
21853  # Publish this variable in the help.
21854
21855
21856  if [ -z "${LDD+x}" ]; then
21857    # The variable is not set by user, try to locate tool using the code snippet
21858    for ac_prog in ldd
21859do
21860  # Extract the first word of "$ac_prog", so it can be a program name with args.
21861set dummy $ac_prog; ac_word=$2
21862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21863$as_echo_n "checking for $ac_word... " >&6; }
21864if ${ac_cv_path_LDD+:} false; then :
21865  $as_echo_n "(cached) " >&6
21866else
21867  case $LDD in
21868  [\\/]* | ?:[\\/]*)
21869  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21870  ;;
21871  *)
21872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21873for as_dir in $PATH
21874do
21875  IFS=$as_save_IFS
21876  test -z "$as_dir" && as_dir=.
21877    for ac_exec_ext in '' $ac_executable_extensions; do
21878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21879    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21881    break 2
21882  fi
21883done
21884  done
21885IFS=$as_save_IFS
21886
21887  ;;
21888esac
21889fi
21890LDD=$ac_cv_path_LDD
21891if test -n "$LDD"; then
21892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21893$as_echo "$LDD" >&6; }
21894else
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21896$as_echo "no" >&6; }
21897fi
21898
21899
21900  test -n "$LDD" && break
21901done
21902
21903  else
21904    # The variable is set, but is it from the command line or the environment?
21905
21906    # Try to remove the string !LDD! from our list.
21907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21909      # If it failed, the variable was not from the command line. Ignore it,
21910      # but warn the user (except for BASH, which is always set by the calling BASH).
21911      if test "xLDD" != xBASH; then
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21913$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21914      fi
21915      # Try to locate tool using the code snippet
21916      for ac_prog in ldd
21917do
21918  # Extract the first word of "$ac_prog", so it can be a program name with args.
21919set dummy $ac_prog; ac_word=$2
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21921$as_echo_n "checking for $ac_word... " >&6; }
21922if ${ac_cv_path_LDD+:} false; then :
21923  $as_echo_n "(cached) " >&6
21924else
21925  case $LDD in
21926  [\\/]* | ?:[\\/]*)
21927  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21928  ;;
21929  *)
21930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931for as_dir in $PATH
21932do
21933  IFS=$as_save_IFS
21934  test -z "$as_dir" && as_dir=.
21935    for ac_exec_ext in '' $ac_executable_extensions; do
21936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21937    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939    break 2
21940  fi
21941done
21942  done
21943IFS=$as_save_IFS
21944
21945  ;;
21946esac
21947fi
21948LDD=$ac_cv_path_LDD
21949if test -n "$LDD"; then
21950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21951$as_echo "$LDD" >&6; }
21952else
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21954$as_echo "no" >&6; }
21955fi
21956
21957
21958  test -n "$LDD" && break
21959done
21960
21961    else
21962      # If it succeeded, then it was overridden by the user. We will use it
21963      # for the tool.
21964
21965      # First remove it from the list of overridden variables, so we can test
21966      # for unknown variables in the end.
21967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21968
21969      # Check if we try to supply an empty value
21970      if test "x$LDD" = x; then
21971        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21972$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21974$as_echo_n "checking for LDD... " >&6; }
21975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21976$as_echo "disabled" >&6; }
21977      else
21978        # Check if the provided tool contains a complete path.
21979        tool_specified="$LDD"
21980        tool_basename="${tool_specified##*/}"
21981        if test "x$tool_basename" = "x$tool_specified"; then
21982          # A command without a complete path is provided, search $PATH.
21983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21984$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21985          # Extract the first word of "$tool_basename", so it can be a program name with args.
21986set dummy $tool_basename; ac_word=$2
21987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21988$as_echo_n "checking for $ac_word... " >&6; }
21989if ${ac_cv_path_LDD+:} false; then :
21990  $as_echo_n "(cached) " >&6
21991else
21992  case $LDD in
21993  [\\/]* | ?:[\\/]*)
21994  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21995  ;;
21996  *)
21997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21998for as_dir in $PATH
21999do
22000  IFS=$as_save_IFS
22001  test -z "$as_dir" && as_dir=.
22002    for ac_exec_ext in '' $ac_executable_extensions; do
22003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22004    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22006    break 2
22007  fi
22008done
22009  done
22010IFS=$as_save_IFS
22011
22012  ;;
22013esac
22014fi
22015LDD=$ac_cv_path_LDD
22016if test -n "$LDD"; then
22017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22018$as_echo "$LDD" >&6; }
22019else
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22021$as_echo "no" >&6; }
22022fi
22023
22024
22025          if test "x$LDD" = x; then
22026            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22027          fi
22028        else
22029          # Otherwise we believe it is a complete path. Use it as it is.
22030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22031$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22032          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22033$as_echo_n "checking for LDD... " >&6; }
22034          if test ! -x "$tool_specified"; then
22035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22036$as_echo "not found" >&6; }
22037            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22038          fi
22039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22040$as_echo "$tool_specified" >&6; }
22041        fi
22042      fi
22043    fi
22044
22045  fi
22046
22047
22048  if test "x$LDD" = "x"; then
22049    # List shared lib dependencies is used for
22050    # debug output and checking for forbidden dependencies.
22051    # We can build without it.
22052    LDD="true"
22053  fi
22054
22055
22056  # Publish this variable in the help.
22057
22058
22059  if [ -z "${OTOOL+x}" ]; then
22060    # The variable is not set by user, try to locate tool using the code snippet
22061    for ac_prog in otool
22062do
22063  # Extract the first word of "$ac_prog", so it can be a program name with args.
22064set dummy $ac_prog; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_path_OTOOL+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  case $OTOOL in
22071  [\\/]* | ?:[\\/]*)
22072  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22073  ;;
22074  *)
22075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22076for as_dir in $PATH
22077do
22078  IFS=$as_save_IFS
22079  test -z "$as_dir" && as_dir=.
22080    for ac_exec_ext in '' $ac_executable_extensions; do
22081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22082    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22084    break 2
22085  fi
22086done
22087  done
22088IFS=$as_save_IFS
22089
22090  ;;
22091esac
22092fi
22093OTOOL=$ac_cv_path_OTOOL
22094if test -n "$OTOOL"; then
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22096$as_echo "$OTOOL" >&6; }
22097else
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22099$as_echo "no" >&6; }
22100fi
22101
22102
22103  test -n "$OTOOL" && break
22104done
22105
22106  else
22107    # The variable is set, but is it from the command line or the environment?
22108
22109    # Try to remove the string !OTOOL! from our list.
22110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22112      # If it failed, the variable was not from the command line. Ignore it,
22113      # but warn the user (except for BASH, which is always set by the calling BASH).
22114      if test "xOTOOL" != xBASH; then
22115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22116$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22117      fi
22118      # Try to locate tool using the code snippet
22119      for ac_prog in otool
22120do
22121  # Extract the first word of "$ac_prog", so it can be a program name with args.
22122set dummy $ac_prog; ac_word=$2
22123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22124$as_echo_n "checking for $ac_word... " >&6; }
22125if ${ac_cv_path_OTOOL+:} false; then :
22126  $as_echo_n "(cached) " >&6
22127else
22128  case $OTOOL in
22129  [\\/]* | ?:[\\/]*)
22130  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22131  ;;
22132  *)
22133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22134for as_dir in $PATH
22135do
22136  IFS=$as_save_IFS
22137  test -z "$as_dir" && as_dir=.
22138    for ac_exec_ext in '' $ac_executable_extensions; do
22139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22140    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22142    break 2
22143  fi
22144done
22145  done
22146IFS=$as_save_IFS
22147
22148  ;;
22149esac
22150fi
22151OTOOL=$ac_cv_path_OTOOL
22152if test -n "$OTOOL"; then
22153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22154$as_echo "$OTOOL" >&6; }
22155else
22156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22157$as_echo "no" >&6; }
22158fi
22159
22160
22161  test -n "$OTOOL" && break
22162done
22163
22164    else
22165      # If it succeeded, then it was overridden by the user. We will use it
22166      # for the tool.
22167
22168      # First remove it from the list of overridden variables, so we can test
22169      # for unknown variables in the end.
22170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22171
22172      # Check if we try to supply an empty value
22173      if test "x$OTOOL" = x; then
22174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22175$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22177$as_echo_n "checking for OTOOL... " >&6; }
22178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22179$as_echo "disabled" >&6; }
22180      else
22181        # Check if the provided tool contains a complete path.
22182        tool_specified="$OTOOL"
22183        tool_basename="${tool_specified##*/}"
22184        if test "x$tool_basename" = "x$tool_specified"; then
22185          # A command without a complete path is provided, search $PATH.
22186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22187$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22188          # Extract the first word of "$tool_basename", so it can be a program name with args.
22189set dummy $tool_basename; ac_word=$2
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22191$as_echo_n "checking for $ac_word... " >&6; }
22192if ${ac_cv_path_OTOOL+:} false; then :
22193  $as_echo_n "(cached) " >&6
22194else
22195  case $OTOOL in
22196  [\\/]* | ?:[\\/]*)
22197  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22198  ;;
22199  *)
22200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22201for as_dir in $PATH
22202do
22203  IFS=$as_save_IFS
22204  test -z "$as_dir" && as_dir=.
22205    for ac_exec_ext in '' $ac_executable_extensions; do
22206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22207    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22209    break 2
22210  fi
22211done
22212  done
22213IFS=$as_save_IFS
22214
22215  ;;
22216esac
22217fi
22218OTOOL=$ac_cv_path_OTOOL
22219if test -n "$OTOOL"; then
22220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22221$as_echo "$OTOOL" >&6; }
22222else
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22224$as_echo "no" >&6; }
22225fi
22226
22227
22228          if test "x$OTOOL" = x; then
22229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22230          fi
22231        else
22232          # Otherwise we believe it is a complete path. Use it as it is.
22233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22234$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22236$as_echo_n "checking for OTOOL... " >&6; }
22237          if test ! -x "$tool_specified"; then
22238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22239$as_echo "not found" >&6; }
22240            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22241          fi
22242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22243$as_echo "$tool_specified" >&6; }
22244        fi
22245      fi
22246    fi
22247
22248  fi
22249
22250
22251  if test "x$OTOOL" = "x"; then
22252    OTOOL="true"
22253  fi
22254
22255
22256  # Publish this variable in the help.
22257
22258
22259  if [ -z "${READELF+x}" ]; then
22260    # The variable is not set by user, try to locate tool using the code snippet
22261    for ac_prog in greadelf readelf
22262do
22263  # Extract the first word of "$ac_prog", so it can be a program name with args.
22264set dummy $ac_prog; ac_word=$2
22265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22266$as_echo_n "checking for $ac_word... " >&6; }
22267if ${ac_cv_path_READELF+:} false; then :
22268  $as_echo_n "(cached) " >&6
22269else
22270  case $READELF in
22271  [\\/]* | ?:[\\/]*)
22272  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22273  ;;
22274  *)
22275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22276for as_dir in $PATH
22277do
22278  IFS=$as_save_IFS
22279  test -z "$as_dir" && as_dir=.
22280    for ac_exec_ext in '' $ac_executable_extensions; do
22281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22282    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22284    break 2
22285  fi
22286done
22287  done
22288IFS=$as_save_IFS
22289
22290  ;;
22291esac
22292fi
22293READELF=$ac_cv_path_READELF
22294if test -n "$READELF"; then
22295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22296$as_echo "$READELF" >&6; }
22297else
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22299$as_echo "no" >&6; }
22300fi
22301
22302
22303  test -n "$READELF" && break
22304done
22305
22306  else
22307    # The variable is set, but is it from the command line or the environment?
22308
22309    # Try to remove the string !READELF! from our list.
22310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22312      # If it failed, the variable was not from the command line. Ignore it,
22313      # but warn the user (except for BASH, which is always set by the calling BASH).
22314      if test "xREADELF" != xBASH; then
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22316$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22317      fi
22318      # Try to locate tool using the code snippet
22319      for ac_prog in greadelf readelf
22320do
22321  # Extract the first word of "$ac_prog", so it can be a program name with args.
22322set dummy $ac_prog; ac_word=$2
22323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22324$as_echo_n "checking for $ac_word... " >&6; }
22325if ${ac_cv_path_READELF+:} false; then :
22326  $as_echo_n "(cached) " >&6
22327else
22328  case $READELF in
22329  [\\/]* | ?:[\\/]*)
22330  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22331  ;;
22332  *)
22333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22334for as_dir in $PATH
22335do
22336  IFS=$as_save_IFS
22337  test -z "$as_dir" && as_dir=.
22338    for ac_exec_ext in '' $ac_executable_extensions; do
22339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22340    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22342    break 2
22343  fi
22344done
22345  done
22346IFS=$as_save_IFS
22347
22348  ;;
22349esac
22350fi
22351READELF=$ac_cv_path_READELF
22352if test -n "$READELF"; then
22353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22354$as_echo "$READELF" >&6; }
22355else
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22357$as_echo "no" >&6; }
22358fi
22359
22360
22361  test -n "$READELF" && break
22362done
22363
22364    else
22365      # If it succeeded, then it was overridden by the user. We will use it
22366      # for the tool.
22367
22368      # First remove it from the list of overridden variables, so we can test
22369      # for unknown variables in the end.
22370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22371
22372      # Check if we try to supply an empty value
22373      if test "x$READELF" = x; then
22374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22375$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22377$as_echo_n "checking for READELF... " >&6; }
22378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22379$as_echo "disabled" >&6; }
22380      else
22381        # Check if the provided tool contains a complete path.
22382        tool_specified="$READELF"
22383        tool_basename="${tool_specified##*/}"
22384        if test "x$tool_basename" = "x$tool_specified"; then
22385          # A command without a complete path is provided, search $PATH.
22386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22387$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22388          # Extract the first word of "$tool_basename", so it can be a program name with args.
22389set dummy $tool_basename; ac_word=$2
22390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22391$as_echo_n "checking for $ac_word... " >&6; }
22392if ${ac_cv_path_READELF+:} false; then :
22393  $as_echo_n "(cached) " >&6
22394else
22395  case $READELF in
22396  [\\/]* | ?:[\\/]*)
22397  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22398  ;;
22399  *)
22400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22401for as_dir in $PATH
22402do
22403  IFS=$as_save_IFS
22404  test -z "$as_dir" && as_dir=.
22405    for ac_exec_ext in '' $ac_executable_extensions; do
22406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22407    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22409    break 2
22410  fi
22411done
22412  done
22413IFS=$as_save_IFS
22414
22415  ;;
22416esac
22417fi
22418READELF=$ac_cv_path_READELF
22419if test -n "$READELF"; then
22420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22421$as_echo "$READELF" >&6; }
22422else
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22424$as_echo "no" >&6; }
22425fi
22426
22427
22428          if test "x$READELF" = x; then
22429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22430          fi
22431        else
22432          # Otherwise we believe it is a complete path. Use it as it is.
22433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22434$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22436$as_echo_n "checking for READELF... " >&6; }
22437          if test ! -x "$tool_specified"; then
22438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22439$as_echo "not found" >&6; }
22440            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22441          fi
22442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22443$as_echo "$tool_specified" >&6; }
22444        fi
22445      fi
22446    fi
22447
22448  fi
22449
22450
22451
22452
22453  # Publish this variable in the help.
22454
22455
22456  if [ -z "${DOT+x}" ]; then
22457    # The variable is not set by user, try to locate tool using the code snippet
22458    for ac_prog in dot
22459do
22460  # Extract the first word of "$ac_prog", so it can be a program name with args.
22461set dummy $ac_prog; ac_word=$2
22462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22463$as_echo_n "checking for $ac_word... " >&6; }
22464if ${ac_cv_path_DOT+:} false; then :
22465  $as_echo_n "(cached) " >&6
22466else
22467  case $DOT in
22468  [\\/]* | ?:[\\/]*)
22469  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22470  ;;
22471  *)
22472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22473for as_dir in $PATH
22474do
22475  IFS=$as_save_IFS
22476  test -z "$as_dir" && as_dir=.
22477    for ac_exec_ext in '' $ac_executable_extensions; do
22478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22479    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22481    break 2
22482  fi
22483done
22484  done
22485IFS=$as_save_IFS
22486
22487  ;;
22488esac
22489fi
22490DOT=$ac_cv_path_DOT
22491if test -n "$DOT"; then
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22493$as_echo "$DOT" >&6; }
22494else
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22496$as_echo "no" >&6; }
22497fi
22498
22499
22500  test -n "$DOT" && break
22501done
22502
22503  else
22504    # The variable is set, but is it from the command line or the environment?
22505
22506    # Try to remove the string !DOT! from our list.
22507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22509      # If it failed, the variable was not from the command line. Ignore it,
22510      # but warn the user (except for BASH, which is always set by the calling BASH).
22511      if test "xDOT" != xBASH; then
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22513$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22514      fi
22515      # Try to locate tool using the code snippet
22516      for ac_prog in dot
22517do
22518  # Extract the first word of "$ac_prog", so it can be a program name with args.
22519set dummy $ac_prog; ac_word=$2
22520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22521$as_echo_n "checking for $ac_word... " >&6; }
22522if ${ac_cv_path_DOT+:} false; then :
22523  $as_echo_n "(cached) " >&6
22524else
22525  case $DOT in
22526  [\\/]* | ?:[\\/]*)
22527  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22528  ;;
22529  *)
22530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531for as_dir in $PATH
22532do
22533  IFS=$as_save_IFS
22534  test -z "$as_dir" && as_dir=.
22535    for ac_exec_ext in '' $ac_executable_extensions; do
22536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22539    break 2
22540  fi
22541done
22542  done
22543IFS=$as_save_IFS
22544
22545  ;;
22546esac
22547fi
22548DOT=$ac_cv_path_DOT
22549if test -n "$DOT"; then
22550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22551$as_echo "$DOT" >&6; }
22552else
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22554$as_echo "no" >&6; }
22555fi
22556
22557
22558  test -n "$DOT" && break
22559done
22560
22561    else
22562      # If it succeeded, then it was overridden by the user. We will use it
22563      # for the tool.
22564
22565      # First remove it from the list of overridden variables, so we can test
22566      # for unknown variables in the end.
22567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22568
22569      # Check if we try to supply an empty value
22570      if test "x$DOT" = x; then
22571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22572$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22574$as_echo_n "checking for DOT... " >&6; }
22575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22576$as_echo "disabled" >&6; }
22577      else
22578        # Check if the provided tool contains a complete path.
22579        tool_specified="$DOT"
22580        tool_basename="${tool_specified##*/}"
22581        if test "x$tool_basename" = "x$tool_specified"; then
22582          # A command without a complete path is provided, search $PATH.
22583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22584$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22585          # Extract the first word of "$tool_basename", so it can be a program name with args.
22586set dummy $tool_basename; ac_word=$2
22587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22588$as_echo_n "checking for $ac_word... " >&6; }
22589if ${ac_cv_path_DOT+:} false; then :
22590  $as_echo_n "(cached) " >&6
22591else
22592  case $DOT in
22593  [\\/]* | ?:[\\/]*)
22594  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22595  ;;
22596  *)
22597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598for as_dir in $PATH
22599do
22600  IFS=$as_save_IFS
22601  test -z "$as_dir" && as_dir=.
22602    for ac_exec_ext in '' $ac_executable_extensions; do
22603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22606    break 2
22607  fi
22608done
22609  done
22610IFS=$as_save_IFS
22611
22612  ;;
22613esac
22614fi
22615DOT=$ac_cv_path_DOT
22616if test -n "$DOT"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22618$as_echo "$DOT" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624
22625          if test "x$DOT" = x; then
22626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22627          fi
22628        else
22629          # Otherwise we believe it is a complete path. Use it as it is.
22630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22631$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22633$as_echo_n "checking for DOT... " >&6; }
22634          if test ! -x "$tool_specified"; then
22635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22636$as_echo "not found" >&6; }
22637            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22638          fi
22639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22640$as_echo "$tool_specified" >&6; }
22641        fi
22642      fi
22643    fi
22644
22645  fi
22646
22647
22648
22649
22650  # Publish this variable in the help.
22651
22652
22653  if [ -z "${HG+x}" ]; then
22654    # The variable is not set by user, try to locate tool using the code snippet
22655    for ac_prog in hg
22656do
22657  # Extract the first word of "$ac_prog", so it can be a program name with args.
22658set dummy $ac_prog; ac_word=$2
22659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22660$as_echo_n "checking for $ac_word... " >&6; }
22661if ${ac_cv_path_HG+:} false; then :
22662  $as_echo_n "(cached) " >&6
22663else
22664  case $HG in
22665  [\\/]* | ?:[\\/]*)
22666  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22667  ;;
22668  *)
22669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22670for as_dir in $PATH
22671do
22672  IFS=$as_save_IFS
22673  test -z "$as_dir" && as_dir=.
22674    for ac_exec_ext in '' $ac_executable_extensions; do
22675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22676    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22678    break 2
22679  fi
22680done
22681  done
22682IFS=$as_save_IFS
22683
22684  ;;
22685esac
22686fi
22687HG=$ac_cv_path_HG
22688if test -n "$HG"; then
22689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22690$as_echo "$HG" >&6; }
22691else
22692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22693$as_echo "no" >&6; }
22694fi
22695
22696
22697  test -n "$HG" && break
22698done
22699
22700  else
22701    # The variable is set, but is it from the command line or the environment?
22702
22703    # Try to remove the string !HG! from our list.
22704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22706      # If it failed, the variable was not from the command line. Ignore it,
22707      # but warn the user (except for BASH, which is always set by the calling BASH).
22708      if test "xHG" != xBASH; then
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22710$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22711      fi
22712      # Try to locate tool using the code snippet
22713      for ac_prog in hg
22714do
22715  # Extract the first word of "$ac_prog", so it can be a program name with args.
22716set dummy $ac_prog; ac_word=$2
22717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22718$as_echo_n "checking for $ac_word... " >&6; }
22719if ${ac_cv_path_HG+:} false; then :
22720  $as_echo_n "(cached) " >&6
22721else
22722  case $HG in
22723  [\\/]* | ?:[\\/]*)
22724  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22725  ;;
22726  *)
22727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22728for as_dir in $PATH
22729do
22730  IFS=$as_save_IFS
22731  test -z "$as_dir" && as_dir=.
22732    for ac_exec_ext in '' $ac_executable_extensions; do
22733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22734    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22736    break 2
22737  fi
22738done
22739  done
22740IFS=$as_save_IFS
22741
22742  ;;
22743esac
22744fi
22745HG=$ac_cv_path_HG
22746if test -n "$HG"; then
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22748$as_echo "$HG" >&6; }
22749else
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22751$as_echo "no" >&6; }
22752fi
22753
22754
22755  test -n "$HG" && break
22756done
22757
22758    else
22759      # If it succeeded, then it was overridden by the user. We will use it
22760      # for the tool.
22761
22762      # First remove it from the list of overridden variables, so we can test
22763      # for unknown variables in the end.
22764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22765
22766      # Check if we try to supply an empty value
22767      if test "x$HG" = x; then
22768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22769$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22771$as_echo_n "checking for HG... " >&6; }
22772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22773$as_echo "disabled" >&6; }
22774      else
22775        # Check if the provided tool contains a complete path.
22776        tool_specified="$HG"
22777        tool_basename="${tool_specified##*/}"
22778        if test "x$tool_basename" = "x$tool_specified"; then
22779          # A command without a complete path is provided, search $PATH.
22780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22781$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22782          # Extract the first word of "$tool_basename", so it can be a program name with args.
22783set dummy $tool_basename; ac_word=$2
22784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22785$as_echo_n "checking for $ac_word... " >&6; }
22786if ${ac_cv_path_HG+:} false; then :
22787  $as_echo_n "(cached) " >&6
22788else
22789  case $HG in
22790  [\\/]* | ?:[\\/]*)
22791  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22792  ;;
22793  *)
22794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22795for as_dir in $PATH
22796do
22797  IFS=$as_save_IFS
22798  test -z "$as_dir" && as_dir=.
22799    for ac_exec_ext in '' $ac_executable_extensions; do
22800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22801    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22803    break 2
22804  fi
22805done
22806  done
22807IFS=$as_save_IFS
22808
22809  ;;
22810esac
22811fi
22812HG=$ac_cv_path_HG
22813if test -n "$HG"; then
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22815$as_echo "$HG" >&6; }
22816else
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22818$as_echo "no" >&6; }
22819fi
22820
22821
22822          if test "x$HG" = x; then
22823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22824          fi
22825        else
22826          # Otherwise we believe it is a complete path. Use it as it is.
22827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22828$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22830$as_echo_n "checking for HG... " >&6; }
22831          if test ! -x "$tool_specified"; then
22832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22833$as_echo "not found" >&6; }
22834            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22835          fi
22836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22837$as_echo "$tool_specified" >&6; }
22838        fi
22839      fi
22840    fi
22841
22842  fi
22843
22844
22845
22846
22847  # Publish this variable in the help.
22848
22849
22850  if [ -z "${STAT+x}" ]; then
22851    # The variable is not set by user, try to locate tool using the code snippet
22852    for ac_prog in stat
22853do
22854  # Extract the first word of "$ac_prog", so it can be a program name with args.
22855set dummy $ac_prog; ac_word=$2
22856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22857$as_echo_n "checking for $ac_word... " >&6; }
22858if ${ac_cv_path_STAT+:} false; then :
22859  $as_echo_n "(cached) " >&6
22860else
22861  case $STAT in
22862  [\\/]* | ?:[\\/]*)
22863  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22864  ;;
22865  *)
22866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22867for as_dir in $PATH
22868do
22869  IFS=$as_save_IFS
22870  test -z "$as_dir" && as_dir=.
22871    for ac_exec_ext in '' $ac_executable_extensions; do
22872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22873    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22875    break 2
22876  fi
22877done
22878  done
22879IFS=$as_save_IFS
22880
22881  ;;
22882esac
22883fi
22884STAT=$ac_cv_path_STAT
22885if test -n "$STAT"; then
22886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22887$as_echo "$STAT" >&6; }
22888else
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22890$as_echo "no" >&6; }
22891fi
22892
22893
22894  test -n "$STAT" && break
22895done
22896
22897  else
22898    # The variable is set, but is it from the command line or the environment?
22899
22900    # Try to remove the string !STAT! from our list.
22901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22903      # If it failed, the variable was not from the command line. Ignore it,
22904      # but warn the user (except for BASH, which is always set by the calling BASH).
22905      if test "xSTAT" != xBASH; then
22906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22907$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22908      fi
22909      # Try to locate tool using the code snippet
22910      for ac_prog in stat
22911do
22912  # Extract the first word of "$ac_prog", so it can be a program name with args.
22913set dummy $ac_prog; ac_word=$2
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915$as_echo_n "checking for $ac_word... " >&6; }
22916if ${ac_cv_path_STAT+:} false; then :
22917  $as_echo_n "(cached) " >&6
22918else
22919  case $STAT in
22920  [\\/]* | ?:[\\/]*)
22921  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22922  ;;
22923  *)
22924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925for as_dir in $PATH
22926do
22927  IFS=$as_save_IFS
22928  test -z "$as_dir" && as_dir=.
22929    for ac_exec_ext in '' $ac_executable_extensions; do
22930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933    break 2
22934  fi
22935done
22936  done
22937IFS=$as_save_IFS
22938
22939  ;;
22940esac
22941fi
22942STAT=$ac_cv_path_STAT
22943if test -n "$STAT"; then
22944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22945$as_echo "$STAT" >&6; }
22946else
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948$as_echo "no" >&6; }
22949fi
22950
22951
22952  test -n "$STAT" && break
22953done
22954
22955    else
22956      # If it succeeded, then it was overridden by the user. We will use it
22957      # for the tool.
22958
22959      # First remove it from the list of overridden variables, so we can test
22960      # for unknown variables in the end.
22961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22962
22963      # Check if we try to supply an empty value
22964      if test "x$STAT" = x; then
22965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22966$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22968$as_echo_n "checking for STAT... " >&6; }
22969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22970$as_echo "disabled" >&6; }
22971      else
22972        # Check if the provided tool contains a complete path.
22973        tool_specified="$STAT"
22974        tool_basename="${tool_specified##*/}"
22975        if test "x$tool_basename" = "x$tool_specified"; then
22976          # A command without a complete path is provided, search $PATH.
22977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22978$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22979          # Extract the first word of "$tool_basename", so it can be a program name with args.
22980set dummy $tool_basename; 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_STAT+:} false; then :
22984  $as_echo_n "(cached) " >&6
22985else
22986  case $STAT in
22987  [\\/]* | ?:[\\/]*)
22988  ac_cv_path_STAT="$STAT" # 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_STAT="$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
23009STAT=$ac_cv_path_STAT
23010if test -n "$STAT"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23012$as_echo "$STAT" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019          if test "x$STAT" = x; then
23020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23021          fi
23022        else
23023          # Otherwise we believe it is a complete path. Use it as it is.
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23025$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23027$as_echo_n "checking for STAT... " >&6; }
23028          if test ! -x "$tool_specified"; then
23029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23030$as_echo "not found" >&6; }
23031            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23032          fi
23033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23034$as_echo "$tool_specified" >&6; }
23035        fi
23036      fi
23037    fi
23038
23039  fi
23040
23041
23042
23043
23044  # Publish this variable in the help.
23045
23046
23047  if [ -z "${TIME+x}" ]; then
23048    # The variable is not set by user, try to locate tool using the code snippet
23049    for ac_prog in time
23050do
23051  # Extract the first word of "$ac_prog", so it can be a program name with args.
23052set dummy $ac_prog; ac_word=$2
23053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23054$as_echo_n "checking for $ac_word... " >&6; }
23055if ${ac_cv_path_TIME+:} false; then :
23056  $as_echo_n "(cached) " >&6
23057else
23058  case $TIME in
23059  [\\/]* | ?:[\\/]*)
23060  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23061  ;;
23062  *)
23063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23064for as_dir in $PATH
23065do
23066  IFS=$as_save_IFS
23067  test -z "$as_dir" && as_dir=.
23068    for ac_exec_ext in '' $ac_executable_extensions; do
23069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23070    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23072    break 2
23073  fi
23074done
23075  done
23076IFS=$as_save_IFS
23077
23078  ;;
23079esac
23080fi
23081TIME=$ac_cv_path_TIME
23082if test -n "$TIME"; then
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23084$as_echo "$TIME" >&6; }
23085else
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23087$as_echo "no" >&6; }
23088fi
23089
23090
23091  test -n "$TIME" && break
23092done
23093
23094  else
23095    # The variable is set, but is it from the command line or the environment?
23096
23097    # Try to remove the string !TIME! from our list.
23098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23100      # If it failed, the variable was not from the command line. Ignore it,
23101      # but warn the user (except for BASH, which is always set by the calling BASH).
23102      if test "xTIME" != xBASH; then
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23104$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23105      fi
23106      # Try to locate tool using the code snippet
23107      for ac_prog in time
23108do
23109  # Extract the first word of "$ac_prog", so it can be a program name with args.
23110set dummy $ac_prog; ac_word=$2
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112$as_echo_n "checking for $ac_word... " >&6; }
23113if ${ac_cv_path_TIME+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116  case $TIME in
23117  [\\/]* | ?:[\\/]*)
23118  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23119  ;;
23120  *)
23121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122for as_dir in $PATH
23123do
23124  IFS=$as_save_IFS
23125  test -z "$as_dir" && as_dir=.
23126    for ac_exec_ext in '' $ac_executable_extensions; do
23127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130    break 2
23131  fi
23132done
23133  done
23134IFS=$as_save_IFS
23135
23136  ;;
23137esac
23138fi
23139TIME=$ac_cv_path_TIME
23140if test -n "$TIME"; then
23141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23142$as_echo "$TIME" >&6; }
23143else
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145$as_echo "no" >&6; }
23146fi
23147
23148
23149  test -n "$TIME" && break
23150done
23151
23152    else
23153      # If it succeeded, then it was overridden by the user. We will use it
23154      # for the tool.
23155
23156      # First remove it from the list of overridden variables, so we can test
23157      # for unknown variables in the end.
23158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23159
23160      # Check if we try to supply an empty value
23161      if test "x$TIME" = x; then
23162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23163$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23165$as_echo_n "checking for TIME... " >&6; }
23166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23167$as_echo "disabled" >&6; }
23168      else
23169        # Check if the provided tool contains a complete path.
23170        tool_specified="$TIME"
23171        tool_basename="${tool_specified##*/}"
23172        if test "x$tool_basename" = "x$tool_specified"; then
23173          # A command without a complete path is provided, search $PATH.
23174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23175$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23176          # Extract the first word of "$tool_basename", so it can be a program name with args.
23177set dummy $tool_basename; ac_word=$2
23178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23179$as_echo_n "checking for $ac_word... " >&6; }
23180if ${ac_cv_path_TIME+:} false; then :
23181  $as_echo_n "(cached) " >&6
23182else
23183  case $TIME in
23184  [\\/]* | ?:[\\/]*)
23185  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23186  ;;
23187  *)
23188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23189for as_dir in $PATH
23190do
23191  IFS=$as_save_IFS
23192  test -z "$as_dir" && as_dir=.
23193    for ac_exec_ext in '' $ac_executable_extensions; do
23194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23195    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23197    break 2
23198  fi
23199done
23200  done
23201IFS=$as_save_IFS
23202
23203  ;;
23204esac
23205fi
23206TIME=$ac_cv_path_TIME
23207if test -n "$TIME"; then
23208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23209$as_echo "$TIME" >&6; }
23210else
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23212$as_echo "no" >&6; }
23213fi
23214
23215
23216          if test "x$TIME" = x; then
23217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23218          fi
23219        else
23220          # Otherwise we believe it is a complete path. Use it as it is.
23221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23222$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23224$as_echo_n "checking for TIME... " >&6; }
23225          if test ! -x "$tool_specified"; then
23226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23227$as_echo "not found" >&6; }
23228            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23229          fi
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23231$as_echo "$tool_specified" >&6; }
23232        fi
23233      fi
23234    fi
23235
23236  fi
23237
23238
23239
23240
23241  # Publish this variable in the help.
23242
23243
23244  if [ -z "${FLOCK+x}" ]; then
23245    # The variable is not set by user, try to locate tool using the code snippet
23246    for ac_prog in flock
23247do
23248  # Extract the first word of "$ac_prog", so it can be a program name with args.
23249set dummy $ac_prog; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if ${ac_cv_path_FLOCK+:} false; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  case $FLOCK in
23256  [\\/]* | ?:[\\/]*)
23257  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23258  ;;
23259  *)
23260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23261for as_dir in $PATH
23262do
23263  IFS=$as_save_IFS
23264  test -z "$as_dir" && as_dir=.
23265    for ac_exec_ext in '' $ac_executable_extensions; do
23266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23267    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23269    break 2
23270  fi
23271done
23272  done
23273IFS=$as_save_IFS
23274
23275  ;;
23276esac
23277fi
23278FLOCK=$ac_cv_path_FLOCK
23279if test -n "$FLOCK"; then
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23281$as_echo "$FLOCK" >&6; }
23282else
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23284$as_echo "no" >&6; }
23285fi
23286
23287
23288  test -n "$FLOCK" && break
23289done
23290
23291  else
23292    # The variable is set, but is it from the command line or the environment?
23293
23294    # Try to remove the string !FLOCK! from our list.
23295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23297      # If it failed, the variable was not from the command line. Ignore it,
23298      # but warn the user (except for BASH, which is always set by the calling BASH).
23299      if test "xFLOCK" != xBASH; then
23300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23301$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23302      fi
23303      # Try to locate tool using the code snippet
23304      for ac_prog in flock
23305do
23306  # Extract the first word of "$ac_prog", so it can be a program name with args.
23307set dummy $ac_prog; ac_word=$2
23308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23309$as_echo_n "checking for $ac_word... " >&6; }
23310if ${ac_cv_path_FLOCK+:} false; then :
23311  $as_echo_n "(cached) " >&6
23312else
23313  case $FLOCK in
23314  [\\/]* | ?:[\\/]*)
23315  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23316  ;;
23317  *)
23318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23319for as_dir in $PATH
23320do
23321  IFS=$as_save_IFS
23322  test -z "$as_dir" && as_dir=.
23323    for ac_exec_ext in '' $ac_executable_extensions; do
23324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23325    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23327    break 2
23328  fi
23329done
23330  done
23331IFS=$as_save_IFS
23332
23333  ;;
23334esac
23335fi
23336FLOCK=$ac_cv_path_FLOCK
23337if test -n "$FLOCK"; then
23338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23339$as_echo "$FLOCK" >&6; }
23340else
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23342$as_echo "no" >&6; }
23343fi
23344
23345
23346  test -n "$FLOCK" && break
23347done
23348
23349    else
23350      # If it succeeded, then it was overridden by the user. We will use it
23351      # for the tool.
23352
23353      # First remove it from the list of overridden variables, so we can test
23354      # for unknown variables in the end.
23355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23356
23357      # Check if we try to supply an empty value
23358      if test "x$FLOCK" = x; then
23359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23360$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23362$as_echo_n "checking for FLOCK... " >&6; }
23363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23364$as_echo "disabled" >&6; }
23365      else
23366        # Check if the provided tool contains a complete path.
23367        tool_specified="$FLOCK"
23368        tool_basename="${tool_specified##*/}"
23369        if test "x$tool_basename" = "x$tool_specified"; then
23370          # A command without a complete path is provided, search $PATH.
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23372$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23373          # Extract the first word of "$tool_basename", so it can be a program name with args.
23374set dummy $tool_basename; ac_word=$2
23375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23376$as_echo_n "checking for $ac_word... " >&6; }
23377if ${ac_cv_path_FLOCK+:} false; then :
23378  $as_echo_n "(cached) " >&6
23379else
23380  case $FLOCK in
23381  [\\/]* | ?:[\\/]*)
23382  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23383  ;;
23384  *)
23385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23386for as_dir in $PATH
23387do
23388  IFS=$as_save_IFS
23389  test -z "$as_dir" && as_dir=.
23390    for ac_exec_ext in '' $ac_executable_extensions; do
23391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23392    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23394    break 2
23395  fi
23396done
23397  done
23398IFS=$as_save_IFS
23399
23400  ;;
23401esac
23402fi
23403FLOCK=$ac_cv_path_FLOCK
23404if test -n "$FLOCK"; then
23405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23406$as_echo "$FLOCK" >&6; }
23407else
23408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23409$as_echo "no" >&6; }
23410fi
23411
23412
23413          if test "x$FLOCK" = x; then
23414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23415          fi
23416        else
23417          # Otherwise we believe it is a complete path. Use it as it is.
23418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23419$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23421$as_echo_n "checking for FLOCK... " >&6; }
23422          if test ! -x "$tool_specified"; then
23423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23424$as_echo "not found" >&6; }
23425            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23426          fi
23427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23428$as_echo "$tool_specified" >&6; }
23429        fi
23430      fi
23431    fi
23432
23433  fi
23434
23435
23436  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23437  # be in the user path.
23438
23439
23440  # Publish this variable in the help.
23441
23442
23443  if [ -z "${DTRACE+x}" ]; then
23444    # The variable is not set by user, try to locate tool using the code snippet
23445    for ac_prog in dtrace
23446do
23447  # Extract the first word of "$ac_prog", so it can be a program name with args.
23448set dummy $ac_prog; ac_word=$2
23449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23450$as_echo_n "checking for $ac_word... " >&6; }
23451if ${ac_cv_path_DTRACE+:} false; then :
23452  $as_echo_n "(cached) " >&6
23453else
23454  case $DTRACE in
23455  [\\/]* | ?:[\\/]*)
23456  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23457  ;;
23458  *)
23459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23460as_dummy="$PATH:/usr/sbin"
23461for as_dir in $as_dummy
23462do
23463  IFS=$as_save_IFS
23464  test -z "$as_dir" && as_dir=.
23465    for ac_exec_ext in '' $ac_executable_extensions; do
23466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23467    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23469    break 2
23470  fi
23471done
23472  done
23473IFS=$as_save_IFS
23474
23475  ;;
23476esac
23477fi
23478DTRACE=$ac_cv_path_DTRACE
23479if test -n "$DTRACE"; then
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23481$as_echo "$DTRACE" >&6; }
23482else
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23484$as_echo "no" >&6; }
23485fi
23486
23487
23488  test -n "$DTRACE" && break
23489done
23490
23491  else
23492    # The variable is set, but is it from the command line or the environment?
23493
23494    # Try to remove the string !DTRACE! from our list.
23495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23497      # If it failed, the variable was not from the command line. Ignore it,
23498      # but warn the user (except for BASH, which is always set by the calling BASH).
23499      if test "xDTRACE" != xBASH; then
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23501$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23502      fi
23503      # Try to locate tool using the code snippet
23504      for ac_prog in dtrace
23505do
23506  # Extract the first word of "$ac_prog", so it can be a program name with args.
23507set dummy $ac_prog; ac_word=$2
23508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23509$as_echo_n "checking for $ac_word... " >&6; }
23510if ${ac_cv_path_DTRACE+:} false; then :
23511  $as_echo_n "(cached) " >&6
23512else
23513  case $DTRACE in
23514  [\\/]* | ?:[\\/]*)
23515  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23516  ;;
23517  *)
23518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23519as_dummy="$PATH:/usr/sbin"
23520for as_dir in $as_dummy
23521do
23522  IFS=$as_save_IFS
23523  test -z "$as_dir" && as_dir=.
23524    for ac_exec_ext in '' $ac_executable_extensions; do
23525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23526    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23528    break 2
23529  fi
23530done
23531  done
23532IFS=$as_save_IFS
23533
23534  ;;
23535esac
23536fi
23537DTRACE=$ac_cv_path_DTRACE
23538if test -n "$DTRACE"; then
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23540$as_echo "$DTRACE" >&6; }
23541else
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23543$as_echo "no" >&6; }
23544fi
23545
23546
23547  test -n "$DTRACE" && break
23548done
23549
23550    else
23551      # If it succeeded, then it was overridden by the user. We will use it
23552      # for the tool.
23553
23554      # First remove it from the list of overridden variables, so we can test
23555      # for unknown variables in the end.
23556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23557
23558      # Check if we try to supply an empty value
23559      if test "x$DTRACE" = x; then
23560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23561$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23563$as_echo_n "checking for DTRACE... " >&6; }
23564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23565$as_echo "disabled" >&6; }
23566      else
23567        # Check if the provided tool contains a complete path.
23568        tool_specified="$DTRACE"
23569        tool_basename="${tool_specified##*/}"
23570        if test "x$tool_basename" = "x$tool_specified"; then
23571          # A command without a complete path is provided, search $PATH.
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23573$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23574          # Extract the first word of "$tool_basename", so it can be a program name with args.
23575set dummy $tool_basename; ac_word=$2
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23577$as_echo_n "checking for $ac_word... " >&6; }
23578if ${ac_cv_path_DTRACE+:} false; then :
23579  $as_echo_n "(cached) " >&6
23580else
23581  case $DTRACE in
23582  [\\/]* | ?:[\\/]*)
23583  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23584  ;;
23585  *)
23586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23587for as_dir in $PATH
23588do
23589  IFS=$as_save_IFS
23590  test -z "$as_dir" && as_dir=.
23591    for ac_exec_ext in '' $ac_executable_extensions; do
23592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23593    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23595    break 2
23596  fi
23597done
23598  done
23599IFS=$as_save_IFS
23600
23601  ;;
23602esac
23603fi
23604DTRACE=$ac_cv_path_DTRACE
23605if test -n "$DTRACE"; then
23606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23607$as_echo "$DTRACE" >&6; }
23608else
23609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23610$as_echo "no" >&6; }
23611fi
23612
23613
23614          if test "x$DTRACE" = x; then
23615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23616          fi
23617        else
23618          # Otherwise we believe it is a complete path. Use it as it is.
23619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23620$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23622$as_echo_n "checking for DTRACE... " >&6; }
23623          if test ! -x "$tool_specified"; then
23624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23625$as_echo "not found" >&6; }
23626            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23627          fi
23628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23629$as_echo "$tool_specified" >&6; }
23630        fi
23631      fi
23632    fi
23633
23634  fi
23635
23636
23637
23638
23639  # Publish this variable in the help.
23640
23641
23642  if [ -z "${PATCH+x}" ]; then
23643    # The variable is not set by user, try to locate tool using the code snippet
23644    for ac_prog in gpatch patch
23645do
23646  # Extract the first word of "$ac_prog", so it can be a program name with args.
23647set dummy $ac_prog; ac_word=$2
23648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23649$as_echo_n "checking for $ac_word... " >&6; }
23650if ${ac_cv_path_PATCH+:} false; then :
23651  $as_echo_n "(cached) " >&6
23652else
23653  case $PATCH in
23654  [\\/]* | ?:[\\/]*)
23655  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23656  ;;
23657  *)
23658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23659for as_dir in $PATH
23660do
23661  IFS=$as_save_IFS
23662  test -z "$as_dir" && as_dir=.
23663    for ac_exec_ext in '' $ac_executable_extensions; do
23664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23665    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23667    break 2
23668  fi
23669done
23670  done
23671IFS=$as_save_IFS
23672
23673  ;;
23674esac
23675fi
23676PATCH=$ac_cv_path_PATCH
23677if test -n "$PATCH"; then
23678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23679$as_echo "$PATCH" >&6; }
23680else
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23682$as_echo "no" >&6; }
23683fi
23684
23685
23686  test -n "$PATCH" && break
23687done
23688
23689  else
23690    # The variable is set, but is it from the command line or the environment?
23691
23692    # Try to remove the string !PATCH! from our list.
23693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23695      # If it failed, the variable was not from the command line. Ignore it,
23696      # but warn the user (except for BASH, which is always set by the calling BASH).
23697      if test "xPATCH" != xBASH; then
23698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23699$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23700      fi
23701      # Try to locate tool using the code snippet
23702      for ac_prog in gpatch patch
23703do
23704  # Extract the first word of "$ac_prog", so it can be a program name with args.
23705set dummy $ac_prog; ac_word=$2
23706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23707$as_echo_n "checking for $ac_word... " >&6; }
23708if ${ac_cv_path_PATCH+:} false; then :
23709  $as_echo_n "(cached) " >&6
23710else
23711  case $PATCH in
23712  [\\/]* | ?:[\\/]*)
23713  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23714  ;;
23715  *)
23716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23717for as_dir in $PATH
23718do
23719  IFS=$as_save_IFS
23720  test -z "$as_dir" && as_dir=.
23721    for ac_exec_ext in '' $ac_executable_extensions; do
23722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23723    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23725    break 2
23726  fi
23727done
23728  done
23729IFS=$as_save_IFS
23730
23731  ;;
23732esac
23733fi
23734PATCH=$ac_cv_path_PATCH
23735if test -n "$PATCH"; then
23736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23737$as_echo "$PATCH" >&6; }
23738else
23739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23740$as_echo "no" >&6; }
23741fi
23742
23743
23744  test -n "$PATCH" && break
23745done
23746
23747    else
23748      # If it succeeded, then it was overridden by the user. We will use it
23749      # for the tool.
23750
23751      # First remove it from the list of overridden variables, so we can test
23752      # for unknown variables in the end.
23753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23754
23755      # Check if we try to supply an empty value
23756      if test "x$PATCH" = x; then
23757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23758$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23760$as_echo_n "checking for PATCH... " >&6; }
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23762$as_echo "disabled" >&6; }
23763      else
23764        # Check if the provided tool contains a complete path.
23765        tool_specified="$PATCH"
23766        tool_basename="${tool_specified##*/}"
23767        if test "x$tool_basename" = "x$tool_specified"; then
23768          # A command without a complete path is provided, search $PATH.
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23770$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23771          # Extract the first word of "$tool_basename", so it can be a program name with args.
23772set dummy $tool_basename; ac_word=$2
23773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23774$as_echo_n "checking for $ac_word... " >&6; }
23775if ${ac_cv_path_PATCH+:} false; then :
23776  $as_echo_n "(cached) " >&6
23777else
23778  case $PATCH in
23779  [\\/]* | ?:[\\/]*)
23780  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23781  ;;
23782  *)
23783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23784for as_dir in $PATH
23785do
23786  IFS=$as_save_IFS
23787  test -z "$as_dir" && as_dir=.
23788    for ac_exec_ext in '' $ac_executable_extensions; do
23789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23790    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23792    break 2
23793  fi
23794done
23795  done
23796IFS=$as_save_IFS
23797
23798  ;;
23799esac
23800fi
23801PATCH=$ac_cv_path_PATCH
23802if test -n "$PATCH"; then
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23804$as_echo "$PATCH" >&6; }
23805else
23806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807$as_echo "no" >&6; }
23808fi
23809
23810
23811          if test "x$PATCH" = x; then
23812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23813          fi
23814        else
23815          # Otherwise we believe it is a complete path. Use it as it is.
23816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23817$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23819$as_echo_n "checking for PATCH... " >&6; }
23820          if test ! -x "$tool_specified"; then
23821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23822$as_echo "not found" >&6; }
23823            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23824          fi
23825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23826$as_echo "$tool_specified" >&6; }
23827        fi
23828      fi
23829    fi
23830
23831  fi
23832
23833
23834  # Check if it's GNU time
23835  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23836  if test "x$IS_GNU_TIME" != x; then
23837    IS_GNU_TIME=yes
23838  else
23839    IS_GNU_TIME=no
23840  fi
23841
23842
23843  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23844
23845
23846
23847  # Publish this variable in the help.
23848
23849
23850  if [ -z "${DSYMUTIL+x}" ]; then
23851    # The variable is not set by user, try to locate tool using the code snippet
23852    for ac_prog in dsymutil
23853do
23854  # Extract the first word of "$ac_prog", so it can be a program name with args.
23855set dummy $ac_prog; ac_word=$2
23856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23857$as_echo_n "checking for $ac_word... " >&6; }
23858if ${ac_cv_path_DSYMUTIL+:} false; then :
23859  $as_echo_n "(cached) " >&6
23860else
23861  case $DSYMUTIL in
23862  [\\/]* | ?:[\\/]*)
23863  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23864  ;;
23865  *)
23866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23867for as_dir in $PATH
23868do
23869  IFS=$as_save_IFS
23870  test -z "$as_dir" && as_dir=.
23871    for ac_exec_ext in '' $ac_executable_extensions; do
23872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23873    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23875    break 2
23876  fi
23877done
23878  done
23879IFS=$as_save_IFS
23880
23881  ;;
23882esac
23883fi
23884DSYMUTIL=$ac_cv_path_DSYMUTIL
23885if test -n "$DSYMUTIL"; then
23886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23887$as_echo "$DSYMUTIL" >&6; }
23888else
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23890$as_echo "no" >&6; }
23891fi
23892
23893
23894  test -n "$DSYMUTIL" && break
23895done
23896
23897  else
23898    # The variable is set, but is it from the command line or the environment?
23899
23900    # Try to remove the string !DSYMUTIL! from our list.
23901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23903      # If it failed, the variable was not from the command line. Ignore it,
23904      # but warn the user (except for BASH, which is always set by the calling BASH).
23905      if test "xDSYMUTIL" != xBASH; then
23906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23907$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23908      fi
23909      # Try to locate tool using the code snippet
23910      for ac_prog in dsymutil
23911do
23912  # Extract the first word of "$ac_prog", so it can be a program name with args.
23913set dummy $ac_prog; ac_word=$2
23914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23915$as_echo_n "checking for $ac_word... " >&6; }
23916if ${ac_cv_path_DSYMUTIL+:} false; then :
23917  $as_echo_n "(cached) " >&6
23918else
23919  case $DSYMUTIL in
23920  [\\/]* | ?:[\\/]*)
23921  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23922  ;;
23923  *)
23924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23925for as_dir in $PATH
23926do
23927  IFS=$as_save_IFS
23928  test -z "$as_dir" && as_dir=.
23929    for ac_exec_ext in '' $ac_executable_extensions; do
23930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23931    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23933    break 2
23934  fi
23935done
23936  done
23937IFS=$as_save_IFS
23938
23939  ;;
23940esac
23941fi
23942DSYMUTIL=$ac_cv_path_DSYMUTIL
23943if test -n "$DSYMUTIL"; then
23944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23945$as_echo "$DSYMUTIL" >&6; }
23946else
23947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23948$as_echo "no" >&6; }
23949fi
23950
23951
23952  test -n "$DSYMUTIL" && break
23953done
23954
23955    else
23956      # If it succeeded, then it was overridden by the user. We will use it
23957      # for the tool.
23958
23959      # First remove it from the list of overridden variables, so we can test
23960      # for unknown variables in the end.
23961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23962
23963      # Check if we try to supply an empty value
23964      if test "x$DSYMUTIL" = x; then
23965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23966$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23968$as_echo_n "checking for DSYMUTIL... " >&6; }
23969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23970$as_echo "disabled" >&6; }
23971      else
23972        # Check if the provided tool contains a complete path.
23973        tool_specified="$DSYMUTIL"
23974        tool_basename="${tool_specified##*/}"
23975        if test "x$tool_basename" = "x$tool_specified"; then
23976          # A command without a complete path is provided, search $PATH.
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23978$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23979          # Extract the first word of "$tool_basename", so it can be a program name with args.
23980set dummy $tool_basename; ac_word=$2
23981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23982$as_echo_n "checking for $ac_word... " >&6; }
23983if ${ac_cv_path_DSYMUTIL+:} false; then :
23984  $as_echo_n "(cached) " >&6
23985else
23986  case $DSYMUTIL in
23987  [\\/]* | ?:[\\/]*)
23988  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23989  ;;
23990  *)
23991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23992for as_dir in $PATH
23993do
23994  IFS=$as_save_IFS
23995  test -z "$as_dir" && as_dir=.
23996    for ac_exec_ext in '' $ac_executable_extensions; do
23997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23998    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24000    break 2
24001  fi
24002done
24003  done
24004IFS=$as_save_IFS
24005
24006  ;;
24007esac
24008fi
24009DSYMUTIL=$ac_cv_path_DSYMUTIL
24010if test -n "$DSYMUTIL"; then
24011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24012$as_echo "$DSYMUTIL" >&6; }
24013else
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24015$as_echo "no" >&6; }
24016fi
24017
24018
24019          if test "x$DSYMUTIL" = x; then
24020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24021          fi
24022        else
24023          # Otherwise we believe it is a complete path. Use it as it is.
24024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24025$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24027$as_echo_n "checking for DSYMUTIL... " >&6; }
24028          if test ! -x "$tool_specified"; then
24029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24030$as_echo "not found" >&6; }
24031            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24032          fi
24033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24034$as_echo "$tool_specified" >&6; }
24035        fi
24036      fi
24037    fi
24038
24039  fi
24040
24041
24042
24043  if test "x$DSYMUTIL" = x; then
24044    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24045  fi
24046
24047
24048
24049
24050
24051  # Publish this variable in the help.
24052
24053
24054  if [ -z "${XATTR+x}" ]; then
24055    # The variable is not set by user, try to locate tool using the code snippet
24056    for ac_prog in xattr
24057do
24058  # Extract the first word of "$ac_prog", so it can be a program name with args.
24059set dummy $ac_prog; ac_word=$2
24060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24061$as_echo_n "checking for $ac_word... " >&6; }
24062if ${ac_cv_path_XATTR+:} false; then :
24063  $as_echo_n "(cached) " >&6
24064else
24065  case $XATTR in
24066  [\\/]* | ?:[\\/]*)
24067  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24068  ;;
24069  *)
24070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24071for as_dir in $PATH
24072do
24073  IFS=$as_save_IFS
24074  test -z "$as_dir" && as_dir=.
24075    for ac_exec_ext in '' $ac_executable_extensions; do
24076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24077    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24079    break 2
24080  fi
24081done
24082  done
24083IFS=$as_save_IFS
24084
24085  ;;
24086esac
24087fi
24088XATTR=$ac_cv_path_XATTR
24089if test -n "$XATTR"; then
24090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24091$as_echo "$XATTR" >&6; }
24092else
24093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24094$as_echo "no" >&6; }
24095fi
24096
24097
24098  test -n "$XATTR" && break
24099done
24100
24101  else
24102    # The variable is set, but is it from the command line or the environment?
24103
24104    # Try to remove the string !XATTR! from our list.
24105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24107      # If it failed, the variable was not from the command line. Ignore it,
24108      # but warn the user (except for BASH, which is always set by the calling BASH).
24109      if test "xXATTR" != xBASH; then
24110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24111$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24112      fi
24113      # Try to locate tool using the code snippet
24114      for ac_prog in xattr
24115do
24116  # Extract the first word of "$ac_prog", so it can be a program name with args.
24117set dummy $ac_prog; ac_word=$2
24118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24119$as_echo_n "checking for $ac_word... " >&6; }
24120if ${ac_cv_path_XATTR+:} false; then :
24121  $as_echo_n "(cached) " >&6
24122else
24123  case $XATTR in
24124  [\\/]* | ?:[\\/]*)
24125  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24126  ;;
24127  *)
24128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24129for as_dir in $PATH
24130do
24131  IFS=$as_save_IFS
24132  test -z "$as_dir" && as_dir=.
24133    for ac_exec_ext in '' $ac_executable_extensions; do
24134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24135    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24137    break 2
24138  fi
24139done
24140  done
24141IFS=$as_save_IFS
24142
24143  ;;
24144esac
24145fi
24146XATTR=$ac_cv_path_XATTR
24147if test -n "$XATTR"; then
24148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24149$as_echo "$XATTR" >&6; }
24150else
24151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24152$as_echo "no" >&6; }
24153fi
24154
24155
24156  test -n "$XATTR" && break
24157done
24158
24159    else
24160      # If it succeeded, then it was overridden by the user. We will use it
24161      # for the tool.
24162
24163      # First remove it from the list of overridden variables, so we can test
24164      # for unknown variables in the end.
24165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24166
24167      # Check if we try to supply an empty value
24168      if test "x$XATTR" = x; then
24169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24170$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24172$as_echo_n "checking for XATTR... " >&6; }
24173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24174$as_echo "disabled" >&6; }
24175      else
24176        # Check if the provided tool contains a complete path.
24177        tool_specified="$XATTR"
24178        tool_basename="${tool_specified##*/}"
24179        if test "x$tool_basename" = "x$tool_specified"; then
24180          # A command without a complete path is provided, search $PATH.
24181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24182$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24183          # Extract the first word of "$tool_basename", so it can be a program name with args.
24184set dummy $tool_basename; ac_word=$2
24185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24186$as_echo_n "checking for $ac_word... " >&6; }
24187if ${ac_cv_path_XATTR+:} false; then :
24188  $as_echo_n "(cached) " >&6
24189else
24190  case $XATTR in
24191  [\\/]* | ?:[\\/]*)
24192  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24193  ;;
24194  *)
24195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24196for as_dir in $PATH
24197do
24198  IFS=$as_save_IFS
24199  test -z "$as_dir" && as_dir=.
24200    for ac_exec_ext in '' $ac_executable_extensions; do
24201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24202    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24204    break 2
24205  fi
24206done
24207  done
24208IFS=$as_save_IFS
24209
24210  ;;
24211esac
24212fi
24213XATTR=$ac_cv_path_XATTR
24214if test -n "$XATTR"; then
24215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24216$as_echo "$XATTR" >&6; }
24217else
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220fi
24221
24222
24223          if test "x$XATTR" = x; then
24224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24225          fi
24226        else
24227          # Otherwise we believe it is a complete path. Use it as it is.
24228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24229$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24231$as_echo_n "checking for XATTR... " >&6; }
24232          if test ! -x "$tool_specified"; then
24233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24234$as_echo "not found" >&6; }
24235            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24236          fi
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24238$as_echo "$tool_specified" >&6; }
24239        fi
24240      fi
24241    fi
24242
24243  fi
24244
24245
24246
24247  if test "x$XATTR" = x; then
24248    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24249  fi
24250
24251
24252
24253
24254  # Publish this variable in the help.
24255
24256
24257  if [ -z "${CODESIGN+x}" ]; then
24258    # The variable is not set by user, try to locate tool using the code snippet
24259    for ac_prog in codesign
24260do
24261  # Extract the first word of "$ac_prog", so it can be a program name with args.
24262set dummy $ac_prog; ac_word=$2
24263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24264$as_echo_n "checking for $ac_word... " >&6; }
24265if ${ac_cv_path_CODESIGN+:} false; then :
24266  $as_echo_n "(cached) " >&6
24267else
24268  case $CODESIGN in
24269  [\\/]* | ?:[\\/]*)
24270  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24271  ;;
24272  *)
24273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24274for as_dir in $PATH
24275do
24276  IFS=$as_save_IFS
24277  test -z "$as_dir" && as_dir=.
24278    for ac_exec_ext in '' $ac_executable_extensions; do
24279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24280    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24282    break 2
24283  fi
24284done
24285  done
24286IFS=$as_save_IFS
24287
24288  ;;
24289esac
24290fi
24291CODESIGN=$ac_cv_path_CODESIGN
24292if test -n "$CODESIGN"; then
24293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24294$as_echo "$CODESIGN" >&6; }
24295else
24296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24297$as_echo "no" >&6; }
24298fi
24299
24300
24301  test -n "$CODESIGN" && break
24302done
24303
24304  else
24305    # The variable is set, but is it from the command line or the environment?
24306
24307    # Try to remove the string !CODESIGN! from our list.
24308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24310      # If it failed, the variable was not from the command line. Ignore it,
24311      # but warn the user (except for BASH, which is always set by the calling BASH).
24312      if test "xCODESIGN" != xBASH; then
24313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24314$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24315      fi
24316      # Try to locate tool using the code snippet
24317      for ac_prog in codesign
24318do
24319  # Extract the first word of "$ac_prog", so it can be a program name with args.
24320set dummy $ac_prog; ac_word=$2
24321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24322$as_echo_n "checking for $ac_word... " >&6; }
24323if ${ac_cv_path_CODESIGN+:} false; then :
24324  $as_echo_n "(cached) " >&6
24325else
24326  case $CODESIGN in
24327  [\\/]* | ?:[\\/]*)
24328  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24329  ;;
24330  *)
24331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24332for as_dir in $PATH
24333do
24334  IFS=$as_save_IFS
24335  test -z "$as_dir" && as_dir=.
24336    for ac_exec_ext in '' $ac_executable_extensions; do
24337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24338    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24340    break 2
24341  fi
24342done
24343  done
24344IFS=$as_save_IFS
24345
24346  ;;
24347esac
24348fi
24349CODESIGN=$ac_cv_path_CODESIGN
24350if test -n "$CODESIGN"; then
24351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24352$as_echo "$CODESIGN" >&6; }
24353else
24354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24355$as_echo "no" >&6; }
24356fi
24357
24358
24359  test -n "$CODESIGN" && break
24360done
24361
24362    else
24363      # If it succeeded, then it was overridden by the user. We will use it
24364      # for the tool.
24365
24366      # First remove it from the list of overridden variables, so we can test
24367      # for unknown variables in the end.
24368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24369
24370      # Check if we try to supply an empty value
24371      if test "x$CODESIGN" = x; then
24372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24373$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24375$as_echo_n "checking for CODESIGN... " >&6; }
24376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24377$as_echo "disabled" >&6; }
24378      else
24379        # Check if the provided tool contains a complete path.
24380        tool_specified="$CODESIGN"
24381        tool_basename="${tool_specified##*/}"
24382        if test "x$tool_basename" = "x$tool_specified"; then
24383          # A command without a complete path is provided, search $PATH.
24384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24385$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24386          # Extract the first word of "$tool_basename", so it can be a program name with args.
24387set dummy $tool_basename; ac_word=$2
24388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24389$as_echo_n "checking for $ac_word... " >&6; }
24390if ${ac_cv_path_CODESIGN+:} false; then :
24391  $as_echo_n "(cached) " >&6
24392else
24393  case $CODESIGN in
24394  [\\/]* | ?:[\\/]*)
24395  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24396  ;;
24397  *)
24398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24399for as_dir in $PATH
24400do
24401  IFS=$as_save_IFS
24402  test -z "$as_dir" && as_dir=.
24403    for ac_exec_ext in '' $ac_executable_extensions; do
24404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24405    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24407    break 2
24408  fi
24409done
24410  done
24411IFS=$as_save_IFS
24412
24413  ;;
24414esac
24415fi
24416CODESIGN=$ac_cv_path_CODESIGN
24417if test -n "$CODESIGN"; then
24418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24419$as_echo "$CODESIGN" >&6; }
24420else
24421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24422$as_echo "no" >&6; }
24423fi
24424
24425
24426          if test "x$CODESIGN" = x; then
24427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24428          fi
24429        else
24430          # Otherwise we believe it is a complete path. Use it as it is.
24431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24432$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24434$as_echo_n "checking for CODESIGN... " >&6; }
24435          if test ! -x "$tool_specified"; then
24436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24437$as_echo "not found" >&6; }
24438            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24439          fi
24440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24441$as_echo "$tool_specified" >&6; }
24442        fi
24443      fi
24444    fi
24445
24446  fi
24447
24448
24449    if test "x$CODESIGN" != "x"; then
24450      # Verify that the openjdk_codesign certificate is present
24451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24452$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24453      $RM codesign-testfile
24454      $TOUCH codesign-testfile
24455      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24456      $RM codesign-testfile
24457      if test "x$CODESIGN" = x; then
24458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24459$as_echo "no" >&6; }
24460      else
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24462$as_echo "yes" >&6; }
24463      fi
24464    fi
24465
24466
24467
24468  # Publish this variable in the help.
24469
24470
24471  if [ -z "${SETFILE+x}" ]; then
24472    # The variable is not set by user, try to locate tool using the code snippet
24473    for ac_prog in SetFile
24474do
24475  # Extract the first word of "$ac_prog", so it can be a program name with args.
24476set dummy $ac_prog; ac_word=$2
24477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24478$as_echo_n "checking for $ac_word... " >&6; }
24479if ${ac_cv_path_SETFILE+:} false; then :
24480  $as_echo_n "(cached) " >&6
24481else
24482  case $SETFILE in
24483  [\\/]* | ?:[\\/]*)
24484  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24485  ;;
24486  *)
24487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24488for as_dir in $PATH
24489do
24490  IFS=$as_save_IFS
24491  test -z "$as_dir" && as_dir=.
24492    for ac_exec_ext in '' $ac_executable_extensions; do
24493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24494    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24496    break 2
24497  fi
24498done
24499  done
24500IFS=$as_save_IFS
24501
24502  ;;
24503esac
24504fi
24505SETFILE=$ac_cv_path_SETFILE
24506if test -n "$SETFILE"; then
24507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24508$as_echo "$SETFILE" >&6; }
24509else
24510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24511$as_echo "no" >&6; }
24512fi
24513
24514
24515  test -n "$SETFILE" && break
24516done
24517
24518  else
24519    # The variable is set, but is it from the command line or the environment?
24520
24521    # Try to remove the string !SETFILE! from our list.
24522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24524      # If it failed, the variable was not from the command line. Ignore it,
24525      # but warn the user (except for BASH, which is always set by the calling BASH).
24526      if test "xSETFILE" != xBASH; then
24527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24528$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24529      fi
24530      # Try to locate tool using the code snippet
24531      for ac_prog in SetFile
24532do
24533  # Extract the first word of "$ac_prog", so it can be a program name with args.
24534set dummy $ac_prog; ac_word=$2
24535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24536$as_echo_n "checking for $ac_word... " >&6; }
24537if ${ac_cv_path_SETFILE+:} false; then :
24538  $as_echo_n "(cached) " >&6
24539else
24540  case $SETFILE in
24541  [\\/]* | ?:[\\/]*)
24542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24543  ;;
24544  *)
24545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24546for as_dir in $PATH
24547do
24548  IFS=$as_save_IFS
24549  test -z "$as_dir" && as_dir=.
24550    for ac_exec_ext in '' $ac_executable_extensions; do
24551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24554    break 2
24555  fi
24556done
24557  done
24558IFS=$as_save_IFS
24559
24560  ;;
24561esac
24562fi
24563SETFILE=$ac_cv_path_SETFILE
24564if test -n "$SETFILE"; then
24565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24566$as_echo "$SETFILE" >&6; }
24567else
24568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24569$as_echo "no" >&6; }
24570fi
24571
24572
24573  test -n "$SETFILE" && break
24574done
24575
24576    else
24577      # If it succeeded, then it was overridden by the user. We will use it
24578      # for the tool.
24579
24580      # First remove it from the list of overridden variables, so we can test
24581      # for unknown variables in the end.
24582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24583
24584      # Check if we try to supply an empty value
24585      if test "x$SETFILE" = x; then
24586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24587$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24589$as_echo_n "checking for SETFILE... " >&6; }
24590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24591$as_echo "disabled" >&6; }
24592      else
24593        # Check if the provided tool contains a complete path.
24594        tool_specified="$SETFILE"
24595        tool_basename="${tool_specified##*/}"
24596        if test "x$tool_basename" = "x$tool_specified"; then
24597          # A command without a complete path is provided, search $PATH.
24598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24599$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24600          # Extract the first word of "$tool_basename", so it can be a program name with args.
24601set dummy $tool_basename; ac_word=$2
24602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24603$as_echo_n "checking for $ac_word... " >&6; }
24604if ${ac_cv_path_SETFILE+:} false; then :
24605  $as_echo_n "(cached) " >&6
24606else
24607  case $SETFILE in
24608  [\\/]* | ?:[\\/]*)
24609  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24610  ;;
24611  *)
24612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24613for as_dir in $PATH
24614do
24615  IFS=$as_save_IFS
24616  test -z "$as_dir" && as_dir=.
24617    for ac_exec_ext in '' $ac_executable_extensions; do
24618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24619    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24621    break 2
24622  fi
24623done
24624  done
24625IFS=$as_save_IFS
24626
24627  ;;
24628esac
24629fi
24630SETFILE=$ac_cv_path_SETFILE
24631if test -n "$SETFILE"; then
24632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24633$as_echo "$SETFILE" >&6; }
24634else
24635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24636$as_echo "no" >&6; }
24637fi
24638
24639
24640          if test "x$SETFILE" = x; then
24641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24642          fi
24643        else
24644          # Otherwise we believe it is a complete path. Use it as it is.
24645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24646$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24648$as_echo_n "checking for SETFILE... " >&6; }
24649          if test ! -x "$tool_specified"; then
24650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24651$as_echo "not found" >&6; }
24652            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24653          fi
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24655$as_echo "$tool_specified" >&6; }
24656        fi
24657      fi
24658    fi
24659
24660  fi
24661
24662
24663
24664  if test "x$SETFILE" = x; then
24665    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24666  fi
24667
24668
24669  fi
24670
24671
24672  # Check bash version
24673  # Extra [ ] to stop m4 mangling
24674   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24676$as_echo_n "checking bash version... " >&6; }
24677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24678$as_echo "$BASH_VER" >&6; }
24679
24680  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24681  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24682  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24683    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24684  fi
24685
24686  # Test if bash supports pipefail.
24687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24688$as_echo_n "checking if bash supports pipefail... " >&6; }
24689  if ${BASH} -c 'set -o pipefail'; then
24690    BASH_ARGS="$BASH_ARGS -o pipefail"
24691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24692$as_echo "yes" >&6; }
24693  else
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24695$as_echo "no" >&6; }
24696  fi
24697
24698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24699$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24700  if ${BASH} -e -c 'true'; then
24701    BASH_ARGS="$BASH_ARGS -e"
24702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24703$as_echo "yes" >&6; }
24704  else
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24706$as_echo "no" >&6; }
24707  fi
24708
24709
24710
24711
24712# Check if pkg-config is available.
24713
24714
24715if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24716	if test -n "$ac_tool_prefix"; then
24717  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24718set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24720$as_echo_n "checking for $ac_word... " >&6; }
24721if ${ac_cv_path_PKG_CONFIG+:} false; then :
24722  $as_echo_n "(cached) " >&6
24723else
24724  case $PKG_CONFIG in
24725  [\\/]* | ?:[\\/]*)
24726  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24727  ;;
24728  *)
24729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24730for as_dir in $PATH
24731do
24732  IFS=$as_save_IFS
24733  test -z "$as_dir" && as_dir=.
24734    for ac_exec_ext in '' $ac_executable_extensions; do
24735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24736    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24738    break 2
24739  fi
24740done
24741  done
24742IFS=$as_save_IFS
24743
24744  ;;
24745esac
24746fi
24747PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24748if test -n "$PKG_CONFIG"; then
24749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24750$as_echo "$PKG_CONFIG" >&6; }
24751else
24752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24753$as_echo "no" >&6; }
24754fi
24755
24756
24757fi
24758if test -z "$ac_cv_path_PKG_CONFIG"; then
24759  ac_pt_PKG_CONFIG=$PKG_CONFIG
24760  # Extract the first word of "pkg-config", so it can be a program name with args.
24761set dummy pkg-config; ac_word=$2
24762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24763$as_echo_n "checking for $ac_word... " >&6; }
24764if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24765  $as_echo_n "(cached) " >&6
24766else
24767  case $ac_pt_PKG_CONFIG in
24768  [\\/]* | ?:[\\/]*)
24769  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24770  ;;
24771  *)
24772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24773for as_dir in $PATH
24774do
24775  IFS=$as_save_IFS
24776  test -z "$as_dir" && as_dir=.
24777    for ac_exec_ext in '' $ac_executable_extensions; do
24778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24779    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24781    break 2
24782  fi
24783done
24784  done
24785IFS=$as_save_IFS
24786
24787  ;;
24788esac
24789fi
24790ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24791if test -n "$ac_pt_PKG_CONFIG"; then
24792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24793$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24794else
24795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24796$as_echo "no" >&6; }
24797fi
24798
24799  if test "x$ac_pt_PKG_CONFIG" = x; then
24800    PKG_CONFIG=""
24801  else
24802    case $cross_compiling:$ac_tool_warned in
24803yes:)
24804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24806ac_tool_warned=yes ;;
24807esac
24808    PKG_CONFIG=$ac_pt_PKG_CONFIG
24809  fi
24810else
24811  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24812fi
24813
24814fi
24815if test -n "$PKG_CONFIG"; then
24816	_pkg_min_version=0.9.0
24817	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24818$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24819	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24820		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24821$as_echo "yes" >&6; }
24822	else
24823		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24824$as_echo "no" >&6; }
24825		PKG_CONFIG=""
24826	fi
24827
24828fi
24829
24830# After basic tools have been setup, we can check build os specific details.
24831
24832  ###############################################################################
24833
24834  # Note that this is the build platform OS version!
24835
24836  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24837  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24838  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24839  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24840
24841
24842
24843
24844
24845# Misc basic settings
24846
24847
24848# Check whether --with-default-make-target was given.
24849if test "${with_default_make_target+set}" = set; then :
24850  withval=$with_default_make_target;
24851fi
24852
24853  if test "x$with_default_make_target" = "x" \
24854      || test "x$with_default_make_target" = "xyes"; then
24855    DEFAULT_MAKE_TARGET="exploded-image"
24856  elif test "x$with_default_make_target" = "xno"; then
24857    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24858  else
24859    DEFAULT_MAKE_TARGET="$with_default_make_target"
24860  fi
24861
24862
24863
24864
24865###############################################################################
24866#
24867# Determine OpenJDK variants, options and version numbers.
24868#
24869###############################################################################
24870
24871# We need build & target for this.
24872
24873  # Should we build a JDK without a graphical UI?
24874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24875$as_echo_n "checking headless only... " >&6; }
24876  # Check whether --enable-headless-only was given.
24877if test "${enable_headless_only+set}" = set; then :
24878  enableval=$enable_headless_only;
24879fi
24880
24881
24882  if test "x$enable_headless_only" = "xyes"; then
24883    ENABLE_HEADLESS_ONLY="true"
24884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24885$as_echo "yes" >&6; }
24886  elif test "x$enable_headless_only" = "xno"; then
24887    ENABLE_HEADLESS_ONLY="false"
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24889$as_echo "no" >&6; }
24890  elif test "x$enable_headless_only" = "x"; then
24891    ENABLE_HEADLESS_ONLY="false"
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24893$as_echo "no" >&6; }
24894  else
24895    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24896  fi
24897
24898
24899
24900  # Should we build the complete docs, or just a lightweight version?
24901  # Check whether --enable-full-docs was given.
24902if test "${enable_full_docs+set}" = set; then :
24903  enableval=$enable_full_docs;
24904fi
24905
24906
24907  # Verify dependencies
24908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24909$as_echo_n "checking for graphviz dot... " >&6; }
24910  if test "x$DOT" != "x"; then
24911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24912$as_echo "yes" >&6; }
24913  else
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24915$as_echo "no, cannot generate full docs" >&6; }
24916    FULL_DOCS_DEP_MISSING=true
24917  fi
24918
24919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24920$as_echo_n "checking for pandoc... " >&6; }
24921  if test "x$PANDOC" != "x"; then
24922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24923$as_echo "yes" >&6; }
24924  else
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24926$as_echo "no, cannot generate full docs" >&6; }
24927    FULL_DOCS_DEP_MISSING=true
24928  fi
24929
24930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24931$as_echo_n "checking full docs... " >&6; }
24932  if test "x$enable_full_docs" = xyes; then
24933    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24935$as_echo "no, missing dependencies" >&6; }
24936
24937  # Print a helpful message on how to acquire the necessary build dependency.
24938  # dot is the help tag: freetype, cups, alsa etc
24939  MISSING_DEPENDENCY=dot
24940
24941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24942    cygwin_help $MISSING_DEPENDENCY
24943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24944    msys_help $MISSING_DEPENDENCY
24945  else
24946    PKGHANDLER_COMMAND=
24947
24948    case $PKGHANDLER in
24949      apt-get)
24950        apt_help     $MISSING_DEPENDENCY ;;
24951      yum)
24952        yum_help     $MISSING_DEPENDENCY ;;
24953      brew)
24954        brew_help    $MISSING_DEPENDENCY ;;
24955      port)
24956        port_help    $MISSING_DEPENDENCY ;;
24957      pkgutil)
24958        pkgutil_help $MISSING_DEPENDENCY ;;
24959      pkgadd)
24960        pkgadd_help  $MISSING_DEPENDENCY ;;
24961    esac
24962
24963    if test "x$PKGHANDLER_COMMAND" != x; then
24964      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24965    fi
24966  fi
24967
24968      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24969    else
24970      ENABLE_FULL_DOCS=true
24971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24972$as_echo "yes, forced" >&6; }
24973    fi
24974  elif test "x$enable_full_docs" = xno; then
24975    ENABLE_FULL_DOCS=false
24976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24977$as_echo "no, forced" >&6; }
24978  elif test "x$enable_full_docs" = x; then
24979    # Check for prerequisites
24980    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24981      ENABLE_FULL_DOCS=false
24982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24983$as_echo "no, missing dependencies" >&6; }
24984    else
24985      ENABLE_FULL_DOCS=true
24986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24987$as_echo "yes, dependencies present" >&6; }
24988    fi
24989  else
24990    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24991  fi
24992
24993
24994
24995  # Choose cacerts source file
24996
24997# Check whether --with-cacerts-file was given.
24998if test "${with_cacerts_file+set}" = set; then :
24999  withval=$with_cacerts_file;
25000fi
25001
25002  if test "x$with_cacerts_file" != x; then
25003    CACERTS_FILE=$with_cacerts_file
25004  fi
25005
25006
25007  # Enable or disable unlimited crypto
25008  # Check whether --enable-unlimited-crypto was given.
25009if test "${enable_unlimited_crypto+set}" = set; then :
25010  enableval=$enable_unlimited_crypto;
25011else
25012  enable_unlimited_crypto=yes
25013fi
25014
25015  if test "x$enable_unlimited_crypto" = "xyes"; then
25016    UNLIMITED_CRYPTO=true
25017  else
25018    UNLIMITED_CRYPTO=false
25019  fi
25020
25021
25022  # Should we build the serviceability agent (SA)?
25023  INCLUDE_SA=true
25024  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25025    INCLUDE_SA=false
25026  fi
25027  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25028    INCLUDE_SA=false
25029  fi
25030
25031
25032  # Compress jars
25033  COMPRESS_JARS=false
25034
25035
25036
25037  # Setup default copyright year. Mostly overridden when building close to a new year.
25038
25039# Check whether --with-copyright-year was given.
25040if test "${with_copyright_year+set}" = set; then :
25041  withval=$with_copyright_year;
25042fi
25043
25044  if test "x$with_copyright_year" = xyes; then
25045    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25046  elif test "x$with_copyright_year" != x; then
25047    COPYRIGHT_YEAR="$with_copyright_year"
25048  else
25049    COPYRIGHT_YEAR=`$DATE +'%Y'`
25050  fi
25051
25052
25053
25054  # Check whether --enable-keep-packaged-modules was given.
25055if test "${enable_keep_packaged_modules+set}" = set; then :
25056  enableval=$enable_keep_packaged_modules;
25057fi
25058
25059
25060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25061$as_echo_n "checking if packaged modules are kept... " >&6; }
25062  if test "x$enable_keep_packaged_modules" = "xyes"; then
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25064$as_echo "yes" >&6; }
25065    JLINK_KEEP_PACKAGED_MODULES=true
25066  elif test "x$enable_keep_packaged_modules" = "xno"; then
25067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25068$as_echo "no" >&6; }
25069    JLINK_KEEP_PACKAGED_MODULES=false
25070  elif test "x$enable_keep_packaged_modules" = "x"; then
25071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25072$as_echo "yes (default)" >&6; }
25073    JLINK_KEEP_PACKAGED_MODULES=true
25074  else
25075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25076$as_echo "error" >&6; }
25077    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25078  fi
25079
25080
25081
25082
25083  # Warn user that old version arguments are deprecated.
25084
25085
25086# Check whether --with-milestone was given.
25087if test "${with_milestone+set}" = set; then :
25088  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25089$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25090fi
25091
25092
25093
25094
25095# Check whether --with-update-version was given.
25096if test "${with_update_version+set}" = set; then :
25097  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25098$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25099fi
25100
25101
25102
25103
25104# Check whether --with-user-release-suffix was given.
25105if test "${with_user_release_suffix+set}" = set; then :
25106  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
25107$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25108fi
25109
25110
25111
25112
25113# Check whether --with-build-number was given.
25114if test "${with_build_number+set}" = set; then :
25115  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25116$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25117fi
25118
25119
25120
25121  # Source the version numbers file
25122  . $AUTOCONF_DIR/version-numbers
25123
25124  # Some non-version number information is set in that file
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134  # Override version from arguments
25135
25136  # If --with-version-string is set, process it first. It is possible to
25137  # override parts with more specific flags, since these are processed later.
25138
25139# Check whether --with-version-string was given.
25140if test "${with_version_string+set}" = set; then :
25141  withval=$with_version_string;
25142fi
25143
25144  if test "x$with_version_string" = xyes; then
25145    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25146  elif test "x$with_version_string" != x; then
25147    # Additional [] needed to keep m4 from mangling shell constructs.
25148    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25149      VERSION_MAJOR=${BASH_REMATCH[1]}
25150      VERSION_MINOR=${BASH_REMATCH[3]}
25151      VERSION_SECURITY=${BASH_REMATCH[5]}
25152      VERSION_PATCH=${BASH_REMATCH[7]}
25153      VERSION_PRE=${BASH_REMATCH[9]}
25154      version_plus_separator=${BASH_REMATCH[11]}
25155      VERSION_BUILD=${BASH_REMATCH[12]}
25156      VERSION_OPT=${BASH_REMATCH[14]}
25157      # Unspecified numerical fields are interpreted as 0.
25158      if test "x$VERSION_MINOR" = x; then
25159        VERSION_MINOR=0
25160      fi
25161      if test "x$VERSION_SECURITY" = x; then
25162        VERSION_SECURITY=0
25163      fi
25164      if test "x$VERSION_PATCH" = x; then
25165        VERSION_PATCH=0
25166      fi
25167      if test "x$version_plus_separator" != x \
25168          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25169        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25170      fi
25171      # Stop the version part process from setting default values.
25172      # We still allow them to explicitly override though.
25173      NO_DEFAULT_VERSION_PARTS=true
25174    else
25175      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25176    fi
25177  fi
25178
25179
25180# Check whether --with-version-pre was given.
25181if test "${with_version_pre+set}" = set; then :
25182  withval=$with_version_pre; with_version_pre_present=true
25183else
25184  with_version_pre_present=false
25185fi
25186
25187
25188  if test "x$with_version_pre_present" = xtrue; then
25189    if test "x$with_version_pre" = xyes; then
25190      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25191    elif test "x$with_version_pre" = xno; then
25192      # Interpret --without-* as empty string instead of the literal "no"
25193      VERSION_PRE=
25194    else
25195      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25196       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25197      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25199$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25200      fi
25201    fi
25202  else
25203    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25204      # Default is to use "internal" as pre
25205      VERSION_PRE="internal"
25206    fi
25207  fi
25208
25209
25210# Check whether --with-version-opt was given.
25211if test "${with_version_opt+set}" = set; then :
25212  withval=$with_version_opt; with_version_opt_present=true
25213else
25214  with_version_opt_present=false
25215fi
25216
25217
25218  if test "x$with_version_opt_present" = xtrue; then
25219    if test "x$with_version_opt" = xyes; then
25220      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25221    elif test "x$with_version_opt" = xno; then
25222      # Interpret --without-* as empty string instead of the literal "no"
25223      VERSION_OPT=
25224    else
25225      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25226       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25227      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25229$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25230      fi
25231    fi
25232  else
25233    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25234      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25235      # Outer [ ] to quote m4.
25236       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25237      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25238    fi
25239  fi
25240
25241
25242# Check whether --with-version-build was given.
25243if test "${with_version_build+set}" = set; then :
25244  withval=$with_version_build; with_version_build_present=true
25245else
25246  with_version_build_present=false
25247fi
25248
25249
25250  if test "x$with_version_build_present" = xtrue; then
25251    if test "x$with_version_build" = xyes; then
25252      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25253    elif test "x$with_version_build" = xno; then
25254      # Interpret --without-* as empty string instead of the literal "no"
25255      VERSION_BUILD=
25256    elif test "x$with_version_build" = x; then
25257      VERSION_BUILD=
25258    else
25259
25260  # Additional [] needed to keep m4 from mangling shell constructs.
25261  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25262    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25263  fi
25264  # Extract the version number without leading zeros.
25265  cleaned_value=${BASH_REMATCH[1]}
25266  if test "x$cleaned_value" = x; then
25267    # Special case for zero
25268    cleaned_value=${BASH_REMATCH[2]}
25269  fi
25270
25271  if test $cleaned_value -gt 255; then
25272    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25273  fi
25274  if test "x$cleaned_value" != "x$with_version_build"; then
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25276$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25277  fi
25278  VERSION_BUILD=$cleaned_value
25279
25280    fi
25281  else
25282    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25283      # Default is to not have a build number.
25284      VERSION_BUILD=""
25285      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25286      VERSION_BUILD=0
25287    fi
25288  fi
25289
25290
25291# Check whether --with-version-major was given.
25292if test "${with_version_major+set}" = set; then :
25293  withval=$with_version_major; with_version_major_present=true
25294else
25295  with_version_major_present=false
25296fi
25297
25298
25299  if test "x$with_version_major_present" = xtrue; then
25300    if test "x$with_version_major" = xyes; then
25301      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25302    else
25303
25304  # Additional [] needed to keep m4 from mangling shell constructs.
25305  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25306    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25307  fi
25308  # Extract the version number without leading zeros.
25309  cleaned_value=${BASH_REMATCH[1]}
25310  if test "x$cleaned_value" = x; then
25311    # Special case for zero
25312    cleaned_value=${BASH_REMATCH[2]}
25313  fi
25314
25315  if test $cleaned_value -gt 255; then
25316    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25317  fi
25318  if test "x$cleaned_value" != "x$with_version_major"; then
25319    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25320$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25321  fi
25322  VERSION_MAJOR=$cleaned_value
25323
25324    fi
25325  else
25326    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25327      # Default is to get value from version-numbers
25328      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25329    fi
25330  fi
25331
25332
25333# Check whether --with-version-minor was given.
25334if test "${with_version_minor+set}" = set; then :
25335  withval=$with_version_minor; with_version_minor_present=true
25336else
25337  with_version_minor_present=false
25338fi
25339
25340
25341  if test "x$with_version_minor_present" = xtrue; then
25342    if test "x$with_version_minor" = xyes; then
25343      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25344    elif test "x$with_version_minor" = xno; then
25345      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25346      VERSION_MINOR=0
25347    elif test "x$with_version_minor" = x; then
25348      VERSION_MINOR=0
25349    else
25350
25351  # Additional [] needed to keep m4 from mangling shell constructs.
25352  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25353    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25354  fi
25355  # Extract the version number without leading zeros.
25356  cleaned_value=${BASH_REMATCH[1]}
25357  if test "x$cleaned_value" = x; then
25358    # Special case for zero
25359    cleaned_value=${BASH_REMATCH[2]}
25360  fi
25361
25362  if test $cleaned_value -gt 255; then
25363    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25364  fi
25365  if test "x$cleaned_value" != "x$with_version_minor"; then
25366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25367$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25368  fi
25369  VERSION_MINOR=$cleaned_value
25370
25371    fi
25372  else
25373    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25374      # Default is 0, if unspecified
25375      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25376    fi
25377  fi
25378
25379
25380# Check whether --with-version-security was given.
25381if test "${with_version_security+set}" = set; then :
25382  withval=$with_version_security; with_version_security_present=true
25383else
25384  with_version_security_present=false
25385fi
25386
25387
25388  if test "x$with_version_security_present" = xtrue; then
25389    if test "x$with_version_security" = xyes; then
25390      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25391    elif test "x$with_version_security" = xno; then
25392      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25393      VERSION_SECURITY=0
25394    elif test "x$with_version_security" = x; then
25395      VERSION_SECURITY=0
25396    else
25397
25398  # Additional [] needed to keep m4 from mangling shell constructs.
25399  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25400    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25401  fi
25402  # Extract the version number without leading zeros.
25403  cleaned_value=${BASH_REMATCH[1]}
25404  if test "x$cleaned_value" = x; then
25405    # Special case for zero
25406    cleaned_value=${BASH_REMATCH[2]}
25407  fi
25408
25409  if test $cleaned_value -gt 255; then
25410    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25411  fi
25412  if test "x$cleaned_value" != "x$with_version_security"; then
25413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25414$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25415  fi
25416  VERSION_SECURITY=$cleaned_value
25417
25418    fi
25419  else
25420    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25421      # Default is 0, if unspecified
25422      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25423    fi
25424  fi
25425
25426
25427# Check whether --with-version-patch was given.
25428if test "${with_version_patch+set}" = set; then :
25429  withval=$with_version_patch; with_version_patch_present=true
25430else
25431  with_version_patch_present=false
25432fi
25433
25434
25435  if test "x$with_version_patch_present" = xtrue; then
25436    if test "x$with_version_patch" = xyes; then
25437      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25438    elif test "x$with_version_patch" = xno; then
25439      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25440      VERSION_PATCH=0
25441    elif test "x$with_version_patch" = x; then
25442      VERSION_PATCH=0
25443    else
25444
25445  # Additional [] needed to keep m4 from mangling shell constructs.
25446  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25447    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25448  fi
25449  # Extract the version number without leading zeros.
25450  cleaned_value=${BASH_REMATCH[1]}
25451  if test "x$cleaned_value" = x; then
25452    # Special case for zero
25453    cleaned_value=${BASH_REMATCH[2]}
25454  fi
25455
25456  if test $cleaned_value -gt 255; then
25457    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25458  fi
25459  if test "x$cleaned_value" != "x$with_version_patch"; then
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25461$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25462  fi
25463  VERSION_PATCH=$cleaned_value
25464
25465    fi
25466  else
25467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25468      # Default is 0, if unspecified
25469      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25470    fi
25471  fi
25472
25473  # Calculate derived version properties
25474
25475  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25476  if test "x$VERSION_PRE" = x; then
25477    VERSION_IS_GA=true
25478  else
25479    VERSION_IS_GA=false
25480  fi
25481
25482  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25483  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25484
25485  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25486  # Strip trailing zeroes from stripped_version_number
25487  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25488  VERSION_NUMBER=$stripped_version_number
25489
25490  # The complete version string, with additional build information
25491  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25492    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25493  else
25494    # If either build or opt is set, we need a + separator
25495    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25496  fi
25497
25498  # The short version string, just VERSION_NUMBER and PRE, if present.
25499  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25500
25501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25502$as_echo_n "checking for version string... " >&6; }
25503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25504$as_echo "$VERSION_STRING" >&6; }
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520###############################################################################
25521#
25522# Setup BootJDK, used to bootstrap the build.
25523#
25524###############################################################################
25525
25526
25527  BOOT_JDK_FOUND=no
25528
25529# Check whether --with-boot-jdk was given.
25530if test "${with_boot_jdk+set}" = set; then :
25531  withval=$with_boot_jdk;
25532fi
25533
25534
25535  # We look for the Boot JDK through various means, going from more certain to
25536  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25537  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25538  # must check if this is indeed valid; otherwise we'll continue looking.
25539
25540  # Test: Is bootjdk explicitly set by command line arguments?
25541
25542  if test "x$BOOT_JDK_FOUND" = xno; then
25543    # Now execute the test
25544
25545  if test "x$with_boot_jdk" != x; then
25546    BOOT_JDK=$with_boot_jdk
25547    BOOT_JDK_FOUND=maybe
25548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25549$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      if test -d "$path"; then
25706        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707      else
25708        dir="`$DIRNAME "$path"`"
25709        base="`$BASENAME "$path"`"
25710        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711      fi
25712    fi
25713  fi
25714
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716$as_echo_n "checking for Boot JDK... " >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718$as_echo "$BOOT_JDK" >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720$as_echo_n "checking Boot JDK version... " >&6; }
25721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723$as_echo "$BOOT_JDK_VERSION" >&6; }
25724          fi # end check jdk version
25725        fi # end check javac
25726      fi # end check java
25727    fi # end check boot jdk found
25728  fi
25729
25730  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25731    # Having specified an argument which is incorrect will produce an instant failure;
25732    # we should not go on looking
25733    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25734  fi
25735
25736  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25737
25738  if test "x$BOOT_JDK_FOUND" = xno; then
25739    # Now execute the test
25740
25741  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25742    # First check at user selected default
25743
25744  if test "x$BOOT_JDK_FOUND" = xno; then
25745    # Now execute the test
25746
25747  if test -x /usr/libexec/java_home; then
25748    BOOT_JDK=`/usr/libexec/java_home `
25749    BOOT_JDK_FOUND=maybe
25750    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25751$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25752  fi
25753
25754
25755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25757      # Do we have a bin/java?
25758      if test ! -x "$BOOT_JDK/bin/java"; then
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25761        BOOT_JDK_FOUND=no
25762      else
25763        # Do we have a bin/javac?
25764        if test ! -x "$BOOT_JDK/bin/javac"; then
25765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25769          BOOT_JDK_FOUND=no
25770        else
25771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25773
25774          # Extra M4 quote needed to protect [] in grep expression.
25775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25776          if test "x$FOUND_CORRECT_VERSION" = x; then
25777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25781            BOOT_JDK_FOUND=no
25782          else
25783            # We're done! :-)
25784            BOOT_JDK_FOUND=yes
25785
25786  # Only process if variable expands to non-empty
25787
25788  if test "x$BOOT_JDK" != x; then
25789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25790
25791  # Input might be given as Windows format, start by converting to
25792  # unix format.
25793  path="$BOOT_JDK"
25794  new_path=`$CYGPATH -u "$path"`
25795
25796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25799  # "foo.exe" is OK but "foo" is an error.
25800  #
25801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25802  # It is also a way to make sure we got the proper file name for the real test later on.
25803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25804  if test "x$test_shortpath" = x; then
25805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25808  fi
25809
25810  # Call helper function which possibly converts this using DOS-style short mode.
25811  # If so, the updated path is stored in $new_path.
25812
25813  input_path="$new_path"
25814  # Check if we need to convert this using DOS-style short mode. If the path
25815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25816  # take no chances and rewrite it.
25817  # Note: m4 eats our [], so we need to use [ and ] instead.
25818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25819  if test "x$has_forbidden_chars" != x; then
25820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25824      # Going to short mode and back again did indeed matter. Since short mode is
25825      # case insensitive, let's make it lowercase to improve readability.
25826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25827      # Now convert it back to Unix-style (cygpath)
25828      input_path=`$CYGPATH -u "$shortmode_path"`
25829      new_path="$input_path"
25830    fi
25831  fi
25832
25833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25834  if test "x$test_cygdrive_prefix" = x; then
25835    # As a simple fix, exclude /usr/bin since it's not a real path.
25836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25838      # a path prefixed by /cygdrive for fixpath to work.
25839      new_path="$CYGWIN_ROOT_PATH$input_path"
25840    fi
25841  fi
25842
25843
25844  if test "x$path" != "x$new_path"; then
25845    BOOT_JDK="$new_path"
25846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25848  fi
25849
25850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25851
25852  path="$BOOT_JDK"
25853  has_colon=`$ECHO $path | $GREP ^.:`
25854  new_path="$path"
25855  if test "x$has_colon" = x; then
25856    # Not in mixed or Windows style, start by that.
25857    new_path=`cmd //c echo $path`
25858  fi
25859
25860
25861  input_path="$new_path"
25862  # Check if we need to convert this using DOS-style short mode. If the path
25863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25864  # take no chances and rewrite it.
25865  # Note: m4 eats our [], so we need to use [ and ] instead.
25866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25867  if test "x$has_forbidden_chars" != x; then
25868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25870  fi
25871
25872
25873  windows_path="$new_path"
25874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25875    unix_path=`$CYGPATH -u "$windows_path"`
25876    new_path="$unix_path"
25877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25879    new_path="$unix_path"
25880  fi
25881
25882  if test "x$path" != "x$new_path"; then
25883    BOOT_JDK="$new_path"
25884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25886  fi
25887
25888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25890
25891    else
25892      # We're on a unix platform. Hooray! :)
25893      path="$BOOT_JDK"
25894      has_space=`$ECHO "$path" | $GREP " "`
25895      if test "x$has_space" != x; then
25896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25899      fi
25900
25901      # Use eval to expand a potential ~
25902      eval path="$path"
25903      if test ! -f "$path" && test ! -d "$path"; then
25904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25905      fi
25906
25907      if test -d "$path"; then
25908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25909      else
25910        dir="`$DIRNAME "$path"`"
25911        base="`$BASENAME "$path"`"
25912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25913      fi
25914    fi
25915  fi
25916
25917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25918$as_echo_n "checking for Boot JDK... " >&6; }
25919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25920$as_echo "$BOOT_JDK" >&6; }
25921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25922$as_echo_n "checking Boot JDK version... " >&6; }
25923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25925$as_echo "$BOOT_JDK_VERSION" >&6; }
25926          fi # end check jdk version
25927        fi # end check javac
25928      fi # end check java
25929    fi # end check boot jdk found
25930  fi
25931
25932    # If that did not work out (e.g. too old), try explicit versions instead
25933
25934  if test "x$BOOT_JDK_FOUND" = xno; then
25935    # Now execute the test
25936
25937  if test -x /usr/libexec/java_home; then
25938    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25939    BOOT_JDK_FOUND=maybe
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25941$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25942  fi
25943
25944
25945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25947      # Do we have a bin/java?
25948      if test ! -x "$BOOT_JDK/bin/java"; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25951        BOOT_JDK_FOUND=no
25952      else
25953        # Do we have a bin/javac?
25954        if test ! -x "$BOOT_JDK/bin/javac"; then
25955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25959          BOOT_JDK_FOUND=no
25960        else
25961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25963
25964          # Extra M4 quote needed to protect [] in grep expression.
25965          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25966          if test "x$FOUND_CORRECT_VERSION" = x; then
25967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25971            BOOT_JDK_FOUND=no
25972          else
25973            # We're done! :-)
25974            BOOT_JDK_FOUND=yes
25975
25976  # Only process if variable expands to non-empty
25977
25978  if test "x$BOOT_JDK" != x; then
25979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25980
25981  # Input might be given as Windows format, start by converting to
25982  # unix format.
25983  path="$BOOT_JDK"
25984  new_path=`$CYGPATH -u "$path"`
25985
25986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25989  # "foo.exe" is OK but "foo" is an error.
25990  #
25991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25992  # It is also a way to make sure we got the proper file name for the real test later on.
25993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25994  if test "x$test_shortpath" = x; then
25995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25998  fi
25999
26000  # Call helper function which possibly converts this using DOS-style short mode.
26001  # If so, the updated path is stored in $new_path.
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26014      # Going to short mode and back again did indeed matter. Since short mode is
26015      # case insensitive, let's make it lowercase to improve readability.
26016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26017      # Now convert it back to Unix-style (cygpath)
26018      input_path=`$CYGPATH -u "$shortmode_path"`
26019      new_path="$input_path"
26020    fi
26021  fi
26022
26023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26024  if test "x$test_cygdrive_prefix" = x; then
26025    # As a simple fix, exclude /usr/bin since it's not a real path.
26026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26028      # a path prefixed by /cygdrive for fixpath to work.
26029      new_path="$CYGWIN_ROOT_PATH$input_path"
26030    fi
26031  fi
26032
26033
26034  if test "x$path" != "x$new_path"; then
26035    BOOT_JDK="$new_path"
26036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26038  fi
26039
26040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26041
26042  path="$BOOT_JDK"
26043  has_colon=`$ECHO $path | $GREP ^.:`
26044  new_path="$path"
26045  if test "x$has_colon" = x; then
26046    # Not in mixed or Windows style, start by that.
26047    new_path=`cmd //c echo $path`
26048  fi
26049
26050
26051  input_path="$new_path"
26052  # Check if we need to convert this using DOS-style short mode. If the path
26053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26054  # take no chances and rewrite it.
26055  # Note: m4 eats our [], so we need to use [ and ] instead.
26056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26057  if test "x$has_forbidden_chars" != x; then
26058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26060  fi
26061
26062
26063  windows_path="$new_path"
26064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26065    unix_path=`$CYGPATH -u "$windows_path"`
26066    new_path="$unix_path"
26067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26069    new_path="$unix_path"
26070  fi
26071
26072  if test "x$path" != "x$new_path"; then
26073    BOOT_JDK="$new_path"
26074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26076  fi
26077
26078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26080
26081    else
26082      # We're on a unix platform. Hooray! :)
26083      path="$BOOT_JDK"
26084      has_space=`$ECHO "$path" | $GREP " "`
26085      if test "x$has_space" != x; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26089      fi
26090
26091      # Use eval to expand a potential ~
26092      eval path="$path"
26093      if test ! -f "$path" && test ! -d "$path"; then
26094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26095      fi
26096
26097      if test -d "$path"; then
26098        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26099      else
26100        dir="`$DIRNAME "$path"`"
26101        base="`$BASENAME "$path"`"
26102        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26103      fi
26104    fi
26105  fi
26106
26107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26108$as_echo_n "checking for Boot JDK... " >&6; }
26109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26110$as_echo "$BOOT_JDK" >&6; }
26111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26112$as_echo_n "checking Boot JDK version... " >&6; }
26113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26115$as_echo "$BOOT_JDK_VERSION" >&6; }
26116          fi # end check jdk version
26117        fi # end check javac
26118      fi # end check java
26119    fi # end check boot jdk found
26120  fi
26121
26122
26123  if test "x$BOOT_JDK_FOUND" = xno; then
26124    # Now execute the test
26125
26126  if test -x /usr/libexec/java_home; then
26127    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26128    BOOT_JDK_FOUND=maybe
26129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26130$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26131  fi
26132
26133
26134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26136      # Do we have a bin/java?
26137      if test ! -x "$BOOT_JDK/bin/java"; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26140        BOOT_JDK_FOUND=no
26141      else
26142        # Do we have a bin/javac?
26143        if test ! -x "$BOOT_JDK/bin/javac"; then
26144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26148          BOOT_JDK_FOUND=no
26149        else
26150          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26151          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26152
26153          # Extra M4 quote needed to protect [] in grep expression.
26154          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26155          if test "x$FOUND_CORRECT_VERSION" = x; then
26156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26158            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26159$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26160            BOOT_JDK_FOUND=no
26161          else
26162            # We're done! :-)
26163            BOOT_JDK_FOUND=yes
26164
26165  # Only process if variable expands to non-empty
26166
26167  if test "x$BOOT_JDK" != x; then
26168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26169
26170  # Input might be given as Windows format, start by converting to
26171  # unix format.
26172  path="$BOOT_JDK"
26173  new_path=`$CYGPATH -u "$path"`
26174
26175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26178  # "foo.exe" is OK but "foo" is an error.
26179  #
26180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26181  # It is also a way to make sure we got the proper file name for the real test later on.
26182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26183  if test "x$test_shortpath" = x; then
26184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26187  fi
26188
26189  # Call helper function which possibly converts this using DOS-style short mode.
26190  # If so, the updated path is stored in $new_path.
26191
26192  input_path="$new_path"
26193  # Check if we need to convert this using DOS-style short mode. If the path
26194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26195  # take no chances and rewrite it.
26196  # Note: m4 eats our [], so we need to use [ and ] instead.
26197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26198  if test "x$has_forbidden_chars" != x; then
26199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26203      # Going to short mode and back again did indeed matter. Since short mode is
26204      # case insensitive, let's make it lowercase to improve readability.
26205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206      # Now convert it back to Unix-style (cygpath)
26207      input_path=`$CYGPATH -u "$shortmode_path"`
26208      new_path="$input_path"
26209    fi
26210  fi
26211
26212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26213  if test "x$test_cygdrive_prefix" = x; then
26214    # As a simple fix, exclude /usr/bin since it's not a real path.
26215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26217      # a path prefixed by /cygdrive for fixpath to work.
26218      new_path="$CYGWIN_ROOT_PATH$input_path"
26219    fi
26220  fi
26221
26222
26223  if test "x$path" != "x$new_path"; then
26224    BOOT_JDK="$new_path"
26225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26227  fi
26228
26229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26230
26231  path="$BOOT_JDK"
26232  has_colon=`$ECHO $path | $GREP ^.:`
26233  new_path="$path"
26234  if test "x$has_colon" = x; then
26235    # Not in mixed or Windows style, start by that.
26236    new_path=`cmd //c echo $path`
26237  fi
26238
26239
26240  input_path="$new_path"
26241  # Check if we need to convert this using DOS-style short mode. If the path
26242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26243  # take no chances and rewrite it.
26244  # Note: m4 eats our [], so we need to use [ and ] instead.
26245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26246  if test "x$has_forbidden_chars" != x; then
26247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26249  fi
26250
26251
26252  windows_path="$new_path"
26253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26254    unix_path=`$CYGPATH -u "$windows_path"`
26255    new_path="$unix_path"
26256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26258    new_path="$unix_path"
26259  fi
26260
26261  if test "x$path" != "x$new_path"; then
26262    BOOT_JDK="$new_path"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26265  fi
26266
26267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26269
26270    else
26271      # We're on a unix platform. Hooray! :)
26272      path="$BOOT_JDK"
26273      has_space=`$ECHO "$path" | $GREP " "`
26274      if test "x$has_space" != x; then
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26278      fi
26279
26280      # Use eval to expand a potential ~
26281      eval path="$path"
26282      if test ! -f "$path" && test ! -d "$path"; then
26283        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26284      fi
26285
26286      if test -d "$path"; then
26287        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26288      else
26289        dir="`$DIRNAME "$path"`"
26290        base="`$BASENAME "$path"`"
26291        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26292      fi
26293    fi
26294  fi
26295
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26297$as_echo_n "checking for Boot JDK... " >&6; }
26298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26299$as_echo "$BOOT_JDK" >&6; }
26300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26301$as_echo_n "checking Boot JDK version... " >&6; }
26302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26304$as_echo "$BOOT_JDK_VERSION" >&6; }
26305          fi # end check jdk version
26306        fi # end check javac
26307      fi # end check java
26308    fi # end check boot jdk found
26309  fi
26310
26311
26312  if test "x$BOOT_JDK_FOUND" = xno; then
26313    # Now execute the test
26314
26315  if test -x /usr/libexec/java_home; then
26316    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26317    BOOT_JDK_FOUND=maybe
26318    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26319$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26320  fi
26321
26322
26323    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26324    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26325      # Do we have a bin/java?
26326      if test ! -x "$BOOT_JDK/bin/java"; then
26327        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26329        BOOT_JDK_FOUND=no
26330      else
26331        # Do we have a bin/javac?
26332        if test ! -x "$BOOT_JDK/bin/javac"; then
26333          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26335          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26336$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26337          BOOT_JDK_FOUND=no
26338        else
26339          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26340          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26341
26342          # Extra M4 quote needed to protect [] in grep expression.
26343          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26344          if test "x$FOUND_CORRECT_VERSION" = x; then
26345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26347            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26348$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26349            BOOT_JDK_FOUND=no
26350          else
26351            # We're done! :-)
26352            BOOT_JDK_FOUND=yes
26353
26354  # Only process if variable expands to non-empty
26355
26356  if test "x$BOOT_JDK" != x; then
26357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26358
26359  # Input might be given as Windows format, start by converting to
26360  # unix format.
26361  path="$BOOT_JDK"
26362  new_path=`$CYGPATH -u "$path"`
26363
26364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26367  # "foo.exe" is OK but "foo" is an error.
26368  #
26369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26370  # It is also a way to make sure we got the proper file name for the real test later on.
26371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26372  if test "x$test_shortpath" = x; then
26373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26375    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26376  fi
26377
26378  # Call helper function which possibly converts this using DOS-style short mode.
26379  # If so, the updated path is stored in $new_path.
26380
26381  input_path="$new_path"
26382  # Check if we need to convert this using DOS-style short mode. If the path
26383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26384  # take no chances and rewrite it.
26385  # Note: m4 eats our [], so we need to use [ and ] instead.
26386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26387  if test "x$has_forbidden_chars" != x; then
26388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26392      # Going to short mode and back again did indeed matter. Since short mode is
26393      # case insensitive, let's make it lowercase to improve readability.
26394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26395      # Now convert it back to Unix-style (cygpath)
26396      input_path=`$CYGPATH -u "$shortmode_path"`
26397      new_path="$input_path"
26398    fi
26399  fi
26400
26401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26402  if test "x$test_cygdrive_prefix" = x; then
26403    # As a simple fix, exclude /usr/bin since it's not a real path.
26404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26406      # a path prefixed by /cygdrive for fixpath to work.
26407      new_path="$CYGWIN_ROOT_PATH$input_path"
26408    fi
26409  fi
26410
26411
26412  if test "x$path" != "x$new_path"; then
26413    BOOT_JDK="$new_path"
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26416  fi
26417
26418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26419
26420  path="$BOOT_JDK"
26421  has_colon=`$ECHO $path | $GREP ^.:`
26422  new_path="$path"
26423  if test "x$has_colon" = x; then
26424    # Not in mixed or Windows style, start by that.
26425    new_path=`cmd //c echo $path`
26426  fi
26427
26428
26429  input_path="$new_path"
26430  # Check if we need to convert this using DOS-style short mode. If the path
26431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26432  # take no chances and rewrite it.
26433  # Note: m4 eats our [], so we need to use [ and ] instead.
26434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26435  if test "x$has_forbidden_chars" != x; then
26436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26438  fi
26439
26440
26441  windows_path="$new_path"
26442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26443    unix_path=`$CYGPATH -u "$windows_path"`
26444    new_path="$unix_path"
26445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26447    new_path="$unix_path"
26448  fi
26449
26450  if test "x$path" != "x$new_path"; then
26451    BOOT_JDK="$new_path"
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26454  fi
26455
26456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26458
26459    else
26460      # We're on a unix platform. Hooray! :)
26461      path="$BOOT_JDK"
26462      has_space=`$ECHO "$path" | $GREP " "`
26463      if test "x$has_space" != x; then
26464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26467      fi
26468
26469      # Use eval to expand a potential ~
26470      eval path="$path"
26471      if test ! -f "$path" && test ! -d "$path"; then
26472        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26473      fi
26474
26475      if test -d "$path"; then
26476        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26477      else
26478        dir="`$DIRNAME "$path"`"
26479        base="`$BASENAME "$path"`"
26480        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26481      fi
26482    fi
26483  fi
26484
26485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26486$as_echo_n "checking for Boot JDK... " >&6; }
26487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26488$as_echo "$BOOT_JDK" >&6; }
26489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26490$as_echo_n "checking Boot JDK version... " >&6; }
26491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26493$as_echo "$BOOT_JDK_VERSION" >&6; }
26494          fi # end check jdk version
26495        fi # end check javac
26496      fi # end check java
26497    fi # end check boot jdk found
26498  fi
26499
26500  fi
26501
26502
26503    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26504    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26505      # Do we have a bin/java?
26506      if test ! -x "$BOOT_JDK/bin/java"; then
26507        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26509        BOOT_JDK_FOUND=no
26510      else
26511        # Do we have a bin/javac?
26512        if test ! -x "$BOOT_JDK/bin/javac"; then
26513          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26515          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26516$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26517          BOOT_JDK_FOUND=no
26518        else
26519          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26520          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26521
26522          # Extra M4 quote needed to protect [] in grep expression.
26523          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26524          if test "x$FOUND_CORRECT_VERSION" = x; then
26525            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26527            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26528$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26529            BOOT_JDK_FOUND=no
26530          else
26531            # We're done! :-)
26532            BOOT_JDK_FOUND=yes
26533
26534  # Only process if variable expands to non-empty
26535
26536  if test "x$BOOT_JDK" != x; then
26537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538
26539  # Input might be given as Windows format, start by converting to
26540  # unix format.
26541  path="$BOOT_JDK"
26542  new_path=`$CYGPATH -u "$path"`
26543
26544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26547  # "foo.exe" is OK but "foo" is an error.
26548  #
26549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26550  # It is also a way to make sure we got the proper file name for the real test later on.
26551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26552  if test "x$test_shortpath" = x; then
26553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26556  fi
26557
26558  # Call helper function which possibly converts this using DOS-style short mode.
26559  # If so, the updated path is stored in $new_path.
26560
26561  input_path="$new_path"
26562  # Check if we need to convert this using DOS-style short mode. If the path
26563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26564  # take no chances and rewrite it.
26565  # Note: m4 eats our [], so we need to use [ and ] instead.
26566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26567  if test "x$has_forbidden_chars" != x; then
26568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26572      # Going to short mode and back again did indeed matter. Since short mode is
26573      # case insensitive, let's make it lowercase to improve readability.
26574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26575      # Now convert it back to Unix-style (cygpath)
26576      input_path=`$CYGPATH -u "$shortmode_path"`
26577      new_path="$input_path"
26578    fi
26579  fi
26580
26581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26582  if test "x$test_cygdrive_prefix" = x; then
26583    # As a simple fix, exclude /usr/bin since it's not a real path.
26584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26586      # a path prefixed by /cygdrive for fixpath to work.
26587      new_path="$CYGWIN_ROOT_PATH$input_path"
26588    fi
26589  fi
26590
26591
26592  if test "x$path" != "x$new_path"; then
26593    BOOT_JDK="$new_path"
26594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26596  fi
26597
26598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26599
26600  path="$BOOT_JDK"
26601  has_colon=`$ECHO $path | $GREP ^.:`
26602  new_path="$path"
26603  if test "x$has_colon" = x; then
26604    # Not in mixed or Windows style, start by that.
26605    new_path=`cmd //c echo $path`
26606  fi
26607
26608
26609  input_path="$new_path"
26610  # Check if we need to convert this using DOS-style short mode. If the path
26611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26612  # take no chances and rewrite it.
26613  # Note: m4 eats our [], so we need to use [ and ] instead.
26614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26615  if test "x$has_forbidden_chars" != x; then
26616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26618  fi
26619
26620
26621  windows_path="$new_path"
26622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26623    unix_path=`$CYGPATH -u "$windows_path"`
26624    new_path="$unix_path"
26625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26627    new_path="$unix_path"
26628  fi
26629
26630  if test "x$path" != "x$new_path"; then
26631    BOOT_JDK="$new_path"
26632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26634  fi
26635
26636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26638
26639    else
26640      # We're on a unix platform. Hooray! :)
26641      path="$BOOT_JDK"
26642      has_space=`$ECHO "$path" | $GREP " "`
26643      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
26647      fi
26648
26649      # Use eval to expand a potential ~
26650      eval path="$path"
26651      if test ! -f "$path" && test ! -d "$path"; then
26652        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26653      fi
26654
26655      if test -d "$path"; then
26656        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26657      else
26658        dir="`$DIRNAME "$path"`"
26659        base="`$BASENAME "$path"`"
26660        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26661      fi
26662    fi
26663  fi
26664
26665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26666$as_echo_n "checking for Boot JDK... " >&6; }
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26668$as_echo "$BOOT_JDK" >&6; }
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26670$as_echo_n "checking Boot JDK version... " >&6; }
26671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26673$as_echo "$BOOT_JDK_VERSION" >&6; }
26674          fi # end check jdk version
26675        fi # end check javac
26676      fi # end check java
26677    fi # end check boot jdk found
26678  fi
26679
26680
26681  # Test: Is $JAVA_HOME set?
26682
26683  if test "x$BOOT_JDK_FOUND" = xno; then
26684    # Now execute the test
26685
26686  if test "x$JAVA_HOME" != x; then
26687    JAVA_HOME_PROCESSED="$JAVA_HOME"
26688
26689  # Only process if variable expands to non-empty
26690
26691  if test "x$JAVA_HOME_PROCESSED" != x; then
26692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26693
26694  # Input might be given as Windows format, start by converting to
26695  # unix format.
26696  path="$JAVA_HOME_PROCESSED"
26697  new_path=`$CYGPATH -u "$path"`
26698
26699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26702  # "foo.exe" is OK but "foo" is an error.
26703  #
26704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26705  # It is also a way to make sure we got the proper file name for the real test later on.
26706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26707  if test "x$test_shortpath" = x; then
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26709$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26710    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26711  fi
26712
26713  # Call helper function which possibly converts this using DOS-style short mode.
26714  # If so, the updated path is stored in $new_path.
26715
26716  input_path="$new_path"
26717  # Check if we need to convert this using DOS-style short mode. If the path
26718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26719  # take no chances and rewrite it.
26720  # Note: m4 eats our [], so we need to use [ and ] instead.
26721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26722  if test "x$has_forbidden_chars" != x; then
26723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26727      # Going to short mode and back again did indeed matter. Since short mode is
26728      # case insensitive, let's make it lowercase to improve readability.
26729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26730      # Now convert it back to Unix-style (cygpath)
26731      input_path=`$CYGPATH -u "$shortmode_path"`
26732      new_path="$input_path"
26733    fi
26734  fi
26735
26736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26737  if test "x$test_cygdrive_prefix" = x; then
26738    # As a simple fix, exclude /usr/bin since it's not a real path.
26739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26741      # a path prefixed by /cygdrive for fixpath to work.
26742      new_path="$CYGWIN_ROOT_PATH$input_path"
26743    fi
26744  fi
26745
26746
26747  if test "x$path" != "x$new_path"; then
26748    JAVA_HOME_PROCESSED="$new_path"
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26750$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26751  fi
26752
26753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754
26755  path="$JAVA_HOME_PROCESSED"
26756  has_colon=`$ECHO $path | $GREP ^.:`
26757  new_path="$path"
26758  if test "x$has_colon" = x; then
26759    # Not in mixed or Windows style, start by that.
26760    new_path=`cmd //c echo $path`
26761  fi
26762
26763
26764  input_path="$new_path"
26765  # Check if we need to convert this using DOS-style short mode. If the path
26766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26767  # take no chances and rewrite it.
26768  # Note: m4 eats our [], so we need to use [ and ] instead.
26769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26770  if test "x$has_forbidden_chars" != x; then
26771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26773  fi
26774
26775
26776  windows_path="$new_path"
26777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26778    unix_path=`$CYGPATH -u "$windows_path"`
26779    new_path="$unix_path"
26780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26782    new_path="$unix_path"
26783  fi
26784
26785  if test "x$path" != "x$new_path"; then
26786    JAVA_HOME_PROCESSED="$new_path"
26787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26788$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26789  fi
26790
26791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26793
26794    else
26795      # We're on a unix platform. Hooray! :)
26796      path="$JAVA_HOME_PROCESSED"
26797      has_space=`$ECHO "$path" | $GREP " "`
26798      if test "x$has_space" != x; then
26799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26800$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26802      fi
26803
26804      # Use eval to expand a potential ~
26805      eval path="$path"
26806      if test ! -f "$path" && test ! -d "$path"; then
26807        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26808      fi
26809
26810      if test -d "$path"; then
26811        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26812      else
26813        dir="`$DIRNAME "$path"`"
26814        base="`$BASENAME "$path"`"
26815        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26816      fi
26817    fi
26818  fi
26819
26820    if test ! -d "$JAVA_HOME_PROCESSED"; then
26821      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26822$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26823    else
26824      # Aha, the user has set a JAVA_HOME
26825      # let us use that as the Boot JDK.
26826      BOOT_JDK="$JAVA_HOME_PROCESSED"
26827      BOOT_JDK_FOUND=maybe
26828      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26829$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26830    fi
26831  fi
26832
26833
26834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26836      # Do we have a bin/java?
26837      if test ! -x "$BOOT_JDK/bin/java"; then
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26840        BOOT_JDK_FOUND=no
26841      else
26842        # Do we have a bin/javac?
26843        if test ! -x "$BOOT_JDK/bin/javac"; then
26844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26848          BOOT_JDK_FOUND=no
26849        else
26850          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26851          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26852
26853          # Extra M4 quote needed to protect [] in grep expression.
26854          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26855          if test "x$FOUND_CORRECT_VERSION" = x; then
26856            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26858            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26859$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26860            BOOT_JDK_FOUND=no
26861          else
26862            # We're done! :-)
26863            BOOT_JDK_FOUND=yes
26864
26865  # Only process if variable expands to non-empty
26866
26867  if test "x$BOOT_JDK" != x; then
26868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26869
26870  # Input might be given as Windows format, start by converting to
26871  # unix format.
26872  path="$BOOT_JDK"
26873  new_path=`$CYGPATH -u "$path"`
26874
26875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26878  # "foo.exe" is OK but "foo" is an error.
26879  #
26880  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26881  # It is also a way to make sure we got the proper file name for the real test later on.
26882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26883  if test "x$test_shortpath" = x; then
26884    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26886    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26887  fi
26888
26889  # Call helper function which possibly converts this using DOS-style short mode.
26890  # If so, the updated path is stored in $new_path.
26891
26892  input_path="$new_path"
26893  # Check if we need to convert this using DOS-style short mode. If the path
26894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26895  # take no chances and rewrite it.
26896  # Note: m4 eats our [], so we need to use [ and ] instead.
26897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26898  if test "x$has_forbidden_chars" != x; then
26899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26903      # Going to short mode and back again did indeed matter. Since short mode is
26904      # case insensitive, let's make it lowercase to improve readability.
26905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26906      # Now convert it back to Unix-style (cygpath)
26907      input_path=`$CYGPATH -u "$shortmode_path"`
26908      new_path="$input_path"
26909    fi
26910  fi
26911
26912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26913  if test "x$test_cygdrive_prefix" = x; then
26914    # As a simple fix, exclude /usr/bin since it's not a real path.
26915    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26917      # a path prefixed by /cygdrive for fixpath to work.
26918      new_path="$CYGWIN_ROOT_PATH$input_path"
26919    fi
26920  fi
26921
26922
26923  if test "x$path" != "x$new_path"; then
26924    BOOT_JDK="$new_path"
26925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26927  fi
26928
26929    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930
26931  path="$BOOT_JDK"
26932  has_colon=`$ECHO $path | $GREP ^.:`
26933  new_path="$path"
26934  if test "x$has_colon" = x; then
26935    # Not in mixed or Windows style, start by that.
26936    new_path=`cmd //c echo $path`
26937  fi
26938
26939
26940  input_path="$new_path"
26941  # Check if we need to convert this using DOS-style short mode. If the path
26942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26943  # take no chances and rewrite it.
26944  # Note: m4 eats our [], so we need to use [ and ] instead.
26945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26946  if test "x$has_forbidden_chars" != x; then
26947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26949  fi
26950
26951
26952  windows_path="$new_path"
26953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26954    unix_path=`$CYGPATH -u "$windows_path"`
26955    new_path="$unix_path"
26956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26958    new_path="$unix_path"
26959  fi
26960
26961  if test "x$path" != "x$new_path"; then
26962    BOOT_JDK="$new_path"
26963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26965  fi
26966
26967  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26968  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26969
26970    else
26971      # We're on a unix platform. Hooray! :)
26972      path="$BOOT_JDK"
26973      has_space=`$ECHO "$path" | $GREP " "`
26974      if test "x$has_space" != x; then
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26977        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26978      fi
26979
26980      # Use eval to expand a potential ~
26981      eval path="$path"
26982      if test ! -f "$path" && test ! -d "$path"; then
26983        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26984      fi
26985
26986      if test -d "$path"; then
26987        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26988      else
26989        dir="`$DIRNAME "$path"`"
26990        base="`$BASENAME "$path"`"
26991        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26992      fi
26993    fi
26994  fi
26995
26996            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26997$as_echo_n "checking for Boot JDK... " >&6; }
26998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26999$as_echo "$BOOT_JDK" >&6; }
27000            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27001$as_echo_n "checking Boot JDK version... " >&6; }
27002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27004$as_echo "$BOOT_JDK_VERSION" >&6; }
27005          fi # end check jdk version
27006        fi # end check javac
27007      fi # end check java
27008    fi # end check boot jdk found
27009  fi
27010
27011
27012  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27013
27014  if test "x$BOOT_JDK_FOUND" = xno; then
27015    # Now execute the test
27016
27017  # Extract the first word of "javac", so it can be a program name with args.
27018set dummy javac; ac_word=$2
27019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27020$as_echo_n "checking for $ac_word... " >&6; }
27021if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27022  $as_echo_n "(cached) " >&6
27023else
27024  case $JAVAC_CHECK in
27025  [\\/]* | ?:[\\/]*)
27026  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27027  ;;
27028  *)
27029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27030for as_dir in $PATH
27031do
27032  IFS=$as_save_IFS
27033  test -z "$as_dir" && as_dir=.
27034    for ac_exec_ext in '' $ac_executable_extensions; do
27035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27036    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27038    break 2
27039  fi
27040done
27041  done
27042IFS=$as_save_IFS
27043
27044  ;;
27045esac
27046fi
27047JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27048if test -n "$JAVAC_CHECK"; then
27049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27050$as_echo "$JAVAC_CHECK" >&6; }
27051else
27052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27053$as_echo "no" >&6; }
27054fi
27055
27056
27057  # Extract the first word of "java", so it can be a program name with args.
27058set dummy java; ac_word=$2
27059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27060$as_echo_n "checking for $ac_word... " >&6; }
27061if ${ac_cv_path_JAVA_CHECK+:} false; then :
27062  $as_echo_n "(cached) " >&6
27063else
27064  case $JAVA_CHECK in
27065  [\\/]* | ?:[\\/]*)
27066  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27067  ;;
27068  *)
27069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27070for as_dir in $PATH
27071do
27072  IFS=$as_save_IFS
27073  test -z "$as_dir" && as_dir=.
27074    for ac_exec_ext in '' $ac_executable_extensions; do
27075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27076    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27078    break 2
27079  fi
27080done
27081  done
27082IFS=$as_save_IFS
27083
27084  ;;
27085esac
27086fi
27087JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27088if test -n "$JAVA_CHECK"; then
27089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27090$as_echo "$JAVA_CHECK" >&6; }
27091else
27092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27093$as_echo "no" >&6; }
27094fi
27095
27096
27097  BINARY="$JAVAC_CHECK"
27098  if test "x$JAVAC_CHECK" = x; then
27099    BINARY="$JAVA_CHECK"
27100  fi
27101  if test "x$BINARY" != x; then
27102    # So there is a java(c) binary, it might be part of a JDK.
27103    # Lets find the JDK/JRE directory by following symbolic links.
27104    # Linux/GNU systems often have links from /usr/bin/java to
27105    # /etc/alternatives/java to the real JDK binary.
27106
27107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27108    # Follow a chain of symbolic links. Use readlink
27109    # where it exists, else fall back to horribly
27110    # complicated shell code.
27111    if test "x$READLINK_TESTED" != yes; then
27112      # On MacOSX there is a readlink tool with a different
27113      # purpose than the GNU readlink tool. Check the found readlink.
27114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27115      if test "x$ISGNU" = x; then
27116        # A readlink that we do not know how to use.
27117        # Are there other non-GNU readlinks out there?
27118        READLINK_TESTED=yes
27119        READLINK=
27120      fi
27121    fi
27122
27123    if test "x$READLINK" != x; then
27124      BINARY=`$READLINK -f $BINARY`
27125    else
27126      # Save the current directory for restoring afterwards
27127      STARTDIR=$PWD
27128      COUNTER=0
27129      sym_link_dir=`$DIRNAME $BINARY`
27130      sym_link_file=`$BASENAME $BINARY`
27131      cd $sym_link_dir
27132      # Use -P flag to resolve symlinks in directories.
27133      cd `$THEPWDCMD -P`
27134      sym_link_dir=`$THEPWDCMD -P`
27135      # Resolve file symlinks
27136      while test $COUNTER -lt 20; do
27137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27138        if test "x$ISLINK" == x; then
27139          # This is not a symbolic link! We are done!
27140          break
27141        fi
27142        # Again resolve directory symlinks since the target of the just found
27143        # link could be in a different directory
27144        cd `$DIRNAME $ISLINK`
27145        sym_link_dir=`$THEPWDCMD -P`
27146        sym_link_file=`$BASENAME $ISLINK`
27147        let COUNTER=COUNTER+1
27148      done
27149      cd $STARTDIR
27150      BINARY=$sym_link_dir/$sym_link_file
27151    fi
27152  fi
27153
27154    BOOT_JDK=`dirname "$BINARY"`
27155    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27156    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27157      # Looks like we found ourselves an JDK
27158      BOOT_JDK_FOUND=maybe
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27160$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27161    fi
27162  fi
27163
27164
27165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27167      # Do we have a bin/java?
27168      if test ! -x "$BOOT_JDK/bin/java"; then
27169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27171        BOOT_JDK_FOUND=no
27172      else
27173        # Do we have a bin/javac?
27174        if test ! -x "$BOOT_JDK/bin/javac"; then
27175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27179          BOOT_JDK_FOUND=no
27180        else
27181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27183
27184          # Extra M4 quote needed to protect [] in grep expression.
27185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27186          if test "x$FOUND_CORRECT_VERSION" = x; then
27187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27191            BOOT_JDK_FOUND=no
27192          else
27193            # We're done! :-)
27194            BOOT_JDK_FOUND=yes
27195
27196  # Only process if variable expands to non-empty
27197
27198  if test "x$BOOT_JDK" != x; then
27199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200
27201  # Input might be given as Windows format, start by converting to
27202  # unix format.
27203  path="$BOOT_JDK"
27204  new_path=`$CYGPATH -u "$path"`
27205
27206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27209  # "foo.exe" is OK but "foo" is an error.
27210  #
27211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27212  # It is also a way to make sure we got the proper file name for the real test later on.
27213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27214  if test "x$test_shortpath" = x; then
27215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27218  fi
27219
27220  # Call helper function which possibly converts this using DOS-style short mode.
27221  # If so, the updated path is stored in $new_path.
27222
27223  input_path="$new_path"
27224  # Check if we need to convert this using DOS-style short mode. If the path
27225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27226  # take no chances and rewrite it.
27227  # Note: m4 eats our [], so we need to use [ and ] instead.
27228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27229  if test "x$has_forbidden_chars" != x; then
27230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27234      # Going to short mode and back again did indeed matter. Since short mode is
27235      # case insensitive, let's make it lowercase to improve readability.
27236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27237      # Now convert it back to Unix-style (cygpath)
27238      input_path=`$CYGPATH -u "$shortmode_path"`
27239      new_path="$input_path"
27240    fi
27241  fi
27242
27243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27244  if test "x$test_cygdrive_prefix" = x; then
27245    # As a simple fix, exclude /usr/bin since it's not a real path.
27246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27248      # a path prefixed by /cygdrive for fixpath to work.
27249      new_path="$CYGWIN_ROOT_PATH$input_path"
27250    fi
27251  fi
27252
27253
27254  if test "x$path" != "x$new_path"; then
27255    BOOT_JDK="$new_path"
27256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27258  fi
27259
27260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27261
27262  path="$BOOT_JDK"
27263  has_colon=`$ECHO $path | $GREP ^.:`
27264  new_path="$path"
27265  if test "x$has_colon" = x; then
27266    # Not in mixed or Windows style, start by that.
27267    new_path=`cmd //c echo $path`
27268  fi
27269
27270
27271  input_path="$new_path"
27272  # Check if we need to convert this using DOS-style short mode. If the path
27273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27274  # take no chances and rewrite it.
27275  # Note: m4 eats our [], so we need to use [ and ] instead.
27276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27277  if test "x$has_forbidden_chars" != x; then
27278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27280  fi
27281
27282
27283  windows_path="$new_path"
27284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27285    unix_path=`$CYGPATH -u "$windows_path"`
27286    new_path="$unix_path"
27287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27289    new_path="$unix_path"
27290  fi
27291
27292  if test "x$path" != "x$new_path"; then
27293    BOOT_JDK="$new_path"
27294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27296  fi
27297
27298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27300
27301    else
27302      # We're on a unix platform. Hooray! :)
27303      path="$BOOT_JDK"
27304      has_space=`$ECHO "$path" | $GREP " "`
27305      if test "x$has_space" != x; then
27306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27309      fi
27310
27311      # Use eval to expand a potential ~
27312      eval path="$path"
27313      if test ! -f "$path" && test ! -d "$path"; then
27314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27315      fi
27316
27317      if test -d "$path"; then
27318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27319      else
27320        dir="`$DIRNAME "$path"`"
27321        base="`$BASENAME "$path"`"
27322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27323      fi
27324    fi
27325  fi
27326
27327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27328$as_echo_n "checking for Boot JDK... " >&6; }
27329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27330$as_echo "$BOOT_JDK" >&6; }
27331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27332$as_echo_n "checking Boot JDK version... " >&6; }
27333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27335$as_echo "$BOOT_JDK_VERSION" >&6; }
27336          fi # end check jdk version
27337        fi # end check javac
27338      fi # end check java
27339    fi # end check boot jdk found
27340  fi
27341
27342
27343  # Test: Is there a JDK installed in default, well-known locations?
27344
27345  if test "x$BOOT_JDK_FOUND" = xno; then
27346    # Now execute the test
27347
27348  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27349
27350  if test "x$BOOT_JDK_FOUND" = xno; then
27351    # Now execute the test
27352
27353  if test "x$ProgramW6432" != x; then
27354    VIRTUAL_DIR="$ProgramW6432/Java"
27355
27356  windows_path="$VIRTUAL_DIR"
27357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27358    unix_path=`$CYGPATH -u "$windows_path"`
27359    VIRTUAL_DIR="$unix_path"
27360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27362    VIRTUAL_DIR="$unix_path"
27363  fi
27364
27365
27366  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27367  BOOT_JDK_SUFFIX=""
27368  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27369  if test "x$ALL_JDKS_FOUND" != x; then
27370    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27371
27372  if test "x$BOOT_JDK_FOUND" = xno; then
27373    # Now execute the test
27374
27375        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27376        if test -d "$BOOT_JDK"; then
27377          BOOT_JDK_FOUND=maybe
27378          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27379$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27380        fi
27381
27382
27383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27385      # Do we have a bin/java?
27386      if test ! -x "$BOOT_JDK/bin/java"; then
27387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27389        BOOT_JDK_FOUND=no
27390      else
27391        # Do we have a bin/javac?
27392        if test ! -x "$BOOT_JDK/bin/javac"; then
27393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27397          BOOT_JDK_FOUND=no
27398        else
27399          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27400          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27401
27402          # Extra M4 quote needed to protect [] in grep expression.
27403          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27404          if test "x$FOUND_CORRECT_VERSION" = x; then
27405            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27407            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27408$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27409            BOOT_JDK_FOUND=no
27410          else
27411            # We're done! :-)
27412            BOOT_JDK_FOUND=yes
27413
27414  # Only process if variable expands to non-empty
27415
27416  if test "x$BOOT_JDK" != x; then
27417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27418
27419  # Input might be given as Windows format, start by converting to
27420  # unix format.
27421  path="$BOOT_JDK"
27422  new_path=`$CYGPATH -u "$path"`
27423
27424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27427  # "foo.exe" is OK but "foo" is an error.
27428  #
27429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27430  # It is also a way to make sure we got the proper file name for the real test later on.
27431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27432  if test "x$test_shortpath" = x; then
27433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27436  fi
27437
27438  # Call helper function which possibly converts this using DOS-style short mode.
27439  # If so, the updated path is stored in $new_path.
27440
27441  input_path="$new_path"
27442  # Check if we need to convert this using DOS-style short mode. If the path
27443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27444  # take no chances and rewrite it.
27445  # Note: m4 eats our [], so we need to use [ and ] instead.
27446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27447  if test "x$has_forbidden_chars" != x; then
27448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27452      # Going to short mode and back again did indeed matter. Since short mode is
27453      # case insensitive, let's make it lowercase to improve readability.
27454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27455      # Now convert it back to Unix-style (cygpath)
27456      input_path=`$CYGPATH -u "$shortmode_path"`
27457      new_path="$input_path"
27458    fi
27459  fi
27460
27461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27462  if test "x$test_cygdrive_prefix" = x; then
27463    # As a simple fix, exclude /usr/bin since it's not a real path.
27464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27466      # a path prefixed by /cygdrive for fixpath to work.
27467      new_path="$CYGWIN_ROOT_PATH$input_path"
27468    fi
27469  fi
27470
27471
27472  if test "x$path" != "x$new_path"; then
27473    BOOT_JDK="$new_path"
27474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27476  fi
27477
27478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27479
27480  path="$BOOT_JDK"
27481  has_colon=`$ECHO $path | $GREP ^.:`
27482  new_path="$path"
27483  if test "x$has_colon" = x; then
27484    # Not in mixed or Windows style, start by that.
27485    new_path=`cmd //c echo $path`
27486  fi
27487
27488
27489  input_path="$new_path"
27490  # Check if we need to convert this using DOS-style short mode. If the path
27491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27492  # take no chances and rewrite it.
27493  # Note: m4 eats our [], so we need to use [ and ] instead.
27494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27495  if test "x$has_forbidden_chars" != x; then
27496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27498  fi
27499
27500
27501  windows_path="$new_path"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    new_path="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    new_path="$unix_path"
27508  fi
27509
27510  if test "x$path" != "x$new_path"; then
27511    BOOT_JDK="$new_path"
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27514  fi
27515
27516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27518
27519    else
27520      # We're on a unix platform. Hooray! :)
27521      path="$BOOT_JDK"
27522      has_space=`$ECHO "$path" | $GREP " "`
27523      if test "x$has_space" != x; then
27524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27527      fi
27528
27529      # Use eval to expand a potential ~
27530      eval path="$path"
27531      if test ! -f "$path" && test ! -d "$path"; then
27532        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27533      fi
27534
27535      if test -d "$path"; then
27536        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27537      else
27538        dir="`$DIRNAME "$path"`"
27539        base="`$BASENAME "$path"`"
27540        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27541      fi
27542    fi
27543  fi
27544
27545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27546$as_echo_n "checking for Boot JDK... " >&6; }
27547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27548$as_echo "$BOOT_JDK" >&6; }
27549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27550$as_echo_n "checking Boot JDK version... " >&6; }
27551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27553$as_echo "$BOOT_JDK_VERSION" >&6; }
27554          fi # end check jdk version
27555        fi # end check javac
27556      fi # end check java
27557    fi # end check boot jdk found
27558  fi
27559
27560    done
27561  fi
27562
27563  fi
27564
27565
27566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27568      # Do we have a bin/java?
27569      if test ! -x "$BOOT_JDK/bin/java"; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27572        BOOT_JDK_FOUND=no
27573      else
27574        # Do we have a bin/javac?
27575        if test ! -x "$BOOT_JDK/bin/javac"; then
27576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27580          BOOT_JDK_FOUND=no
27581        else
27582          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27583          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27584
27585          # Extra M4 quote needed to protect [] in grep expression.
27586          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27587          if test "x$FOUND_CORRECT_VERSION" = x; then
27588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27590            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27591$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27592            BOOT_JDK_FOUND=no
27593          else
27594            # We're done! :-)
27595            BOOT_JDK_FOUND=yes
27596
27597  # Only process if variable expands to non-empty
27598
27599  if test "x$BOOT_JDK" != x; then
27600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27601
27602  # Input might be given as Windows format, start by converting to
27603  # unix format.
27604  path="$BOOT_JDK"
27605  new_path=`$CYGPATH -u "$path"`
27606
27607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27610  # "foo.exe" is OK but "foo" is an error.
27611  #
27612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27613  # It is also a way to make sure we got the proper file name for the real test later on.
27614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27615  if test "x$test_shortpath" = x; then
27616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27619  fi
27620
27621  # Call helper function which possibly converts this using DOS-style short mode.
27622  # If so, the updated path is stored in $new_path.
27623
27624  input_path="$new_path"
27625  # Check if we need to convert this using DOS-style short mode. If the path
27626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27627  # take no chances and rewrite it.
27628  # Note: m4 eats our [], so we need to use [ and ] instead.
27629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27630  if test "x$has_forbidden_chars" != x; then
27631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27635      # Going to short mode and back again did indeed matter. Since short mode is
27636      # case insensitive, let's make it lowercase to improve readability.
27637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27638      # Now convert it back to Unix-style (cygpath)
27639      input_path=`$CYGPATH -u "$shortmode_path"`
27640      new_path="$input_path"
27641    fi
27642  fi
27643
27644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27645  if test "x$test_cygdrive_prefix" = x; then
27646    # As a simple fix, exclude /usr/bin since it's not a real path.
27647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27649      # a path prefixed by /cygdrive for fixpath to work.
27650      new_path="$CYGWIN_ROOT_PATH$input_path"
27651    fi
27652  fi
27653
27654
27655  if test "x$path" != "x$new_path"; then
27656    BOOT_JDK="$new_path"
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27659  fi
27660
27661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27662
27663  path="$BOOT_JDK"
27664  has_colon=`$ECHO $path | $GREP ^.:`
27665  new_path="$path"
27666  if test "x$has_colon" = x; then
27667    # Not in mixed or Windows style, start by that.
27668    new_path=`cmd //c echo $path`
27669  fi
27670
27671
27672  input_path="$new_path"
27673  # Check if we need to convert this using DOS-style short mode. If the path
27674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27675  # take no chances and rewrite it.
27676  # Note: m4 eats our [], so we need to use [ and ] instead.
27677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27678  if test "x$has_forbidden_chars" != x; then
27679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27681  fi
27682
27683
27684  windows_path="$new_path"
27685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27686    unix_path=`$CYGPATH -u "$windows_path"`
27687    new_path="$unix_path"
27688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27690    new_path="$unix_path"
27691  fi
27692
27693  if test "x$path" != "x$new_path"; then
27694    BOOT_JDK="$new_path"
27695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27697  fi
27698
27699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27701
27702    else
27703      # We're on a unix platform. Hooray! :)
27704      path="$BOOT_JDK"
27705      has_space=`$ECHO "$path" | $GREP " "`
27706      if test "x$has_space" != x; then
27707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27710      fi
27711
27712      # Use eval to expand a potential ~
27713      eval path="$path"
27714      if test ! -f "$path" && test ! -d "$path"; then
27715        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27716      fi
27717
27718      if test -d "$path"; then
27719        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27720      else
27721        dir="`$DIRNAME "$path"`"
27722        base="`$BASENAME "$path"`"
27723        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27724      fi
27725    fi
27726  fi
27727
27728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27729$as_echo_n "checking for Boot JDK... " >&6; }
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27731$as_echo "$BOOT_JDK" >&6; }
27732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27733$as_echo_n "checking Boot JDK version... " >&6; }
27734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27736$as_echo "$BOOT_JDK_VERSION" >&6; }
27737          fi # end check jdk version
27738        fi # end check javac
27739      fi # end check java
27740    fi # end check boot jdk found
27741  fi
27742
27743
27744  if test "x$BOOT_JDK_FOUND" = xno; then
27745    # Now execute the test
27746
27747  if test "x$PROGRAMW6432" != x; then
27748    VIRTUAL_DIR="$PROGRAMW6432/Java"
27749
27750  windows_path="$VIRTUAL_DIR"
27751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27752    unix_path=`$CYGPATH -u "$windows_path"`
27753    VIRTUAL_DIR="$unix_path"
27754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27756    VIRTUAL_DIR="$unix_path"
27757  fi
27758
27759
27760  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27761  BOOT_JDK_SUFFIX=""
27762  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27763  if test "x$ALL_JDKS_FOUND" != x; then
27764    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27765
27766  if test "x$BOOT_JDK_FOUND" = xno; then
27767    # Now execute the test
27768
27769        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27770        if test -d "$BOOT_JDK"; then
27771          BOOT_JDK_FOUND=maybe
27772          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27773$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27774        fi
27775
27776
27777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27779      # Do we have a bin/java?
27780      if test ! -x "$BOOT_JDK/bin/java"; then
27781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27783        BOOT_JDK_FOUND=no
27784      else
27785        # Do we have a bin/javac?
27786        if test ! -x "$BOOT_JDK/bin/javac"; then
27787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27791          BOOT_JDK_FOUND=no
27792        else
27793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27795
27796          # Extra M4 quote needed to protect [] in grep expression.
27797          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27798          if test "x$FOUND_CORRECT_VERSION" = x; then
27799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27803            BOOT_JDK_FOUND=no
27804          else
27805            # We're done! :-)
27806            BOOT_JDK_FOUND=yes
27807
27808  # Only process if variable expands to non-empty
27809
27810  if test "x$BOOT_JDK" != x; then
27811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27812
27813  # Input might be given as Windows format, start by converting to
27814  # unix format.
27815  path="$BOOT_JDK"
27816  new_path=`$CYGPATH -u "$path"`
27817
27818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27821  # "foo.exe" is OK but "foo" is an error.
27822  #
27823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27824  # It is also a way to make sure we got the proper file name for the real test later on.
27825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27826  if test "x$test_shortpath" = x; then
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27830  fi
27831
27832  # Call helper function which possibly converts this using DOS-style short mode.
27833  # If so, the updated path is stored in $new_path.
27834
27835  input_path="$new_path"
27836  # Check if we need to convert this using DOS-style short mode. If the path
27837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27838  # take no chances and rewrite it.
27839  # Note: m4 eats our [], so we need to use [ and ] instead.
27840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27841  if test "x$has_forbidden_chars" != x; then
27842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27846      # Going to short mode and back again did indeed matter. Since short mode is
27847      # case insensitive, let's make it lowercase to improve readability.
27848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27849      # Now convert it back to Unix-style (cygpath)
27850      input_path=`$CYGPATH -u "$shortmode_path"`
27851      new_path="$input_path"
27852    fi
27853  fi
27854
27855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27856  if test "x$test_cygdrive_prefix" = x; then
27857    # As a simple fix, exclude /usr/bin since it's not a real path.
27858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27860      # a path prefixed by /cygdrive for fixpath to work.
27861      new_path="$CYGWIN_ROOT_PATH$input_path"
27862    fi
27863  fi
27864
27865
27866  if test "x$path" != "x$new_path"; then
27867    BOOT_JDK="$new_path"
27868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27870  fi
27871
27872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27873
27874  path="$BOOT_JDK"
27875  has_colon=`$ECHO $path | $GREP ^.:`
27876  new_path="$path"
27877  if test "x$has_colon" = x; then
27878    # Not in mixed or Windows style, start by that.
27879    new_path=`cmd //c echo $path`
27880  fi
27881
27882
27883  input_path="$new_path"
27884  # Check if we need to convert this using DOS-style short mode. If the path
27885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27886  # take no chances and rewrite it.
27887  # Note: m4 eats our [], so we need to use [ and ] instead.
27888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27889  if test "x$has_forbidden_chars" != x; then
27890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27892  fi
27893
27894
27895  windows_path="$new_path"
27896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27897    unix_path=`$CYGPATH -u "$windows_path"`
27898    new_path="$unix_path"
27899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27901    new_path="$unix_path"
27902  fi
27903
27904  if test "x$path" != "x$new_path"; then
27905    BOOT_JDK="$new_path"
27906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27908  fi
27909
27910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27912
27913    else
27914      # We're on a unix platform. Hooray! :)
27915      path="$BOOT_JDK"
27916      has_space=`$ECHO "$path" | $GREP " "`
27917      if test "x$has_space" != x; then
27918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27921      fi
27922
27923      # Use eval to expand a potential ~
27924      eval path="$path"
27925      if test ! -f "$path" && test ! -d "$path"; then
27926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27927      fi
27928
27929      if test -d "$path"; then
27930        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27931      else
27932        dir="`$DIRNAME "$path"`"
27933        base="`$BASENAME "$path"`"
27934        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27935      fi
27936    fi
27937  fi
27938
27939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27940$as_echo_n "checking for Boot JDK... " >&6; }
27941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27942$as_echo "$BOOT_JDK" >&6; }
27943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27944$as_echo_n "checking Boot JDK version... " >&6; }
27945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27947$as_echo "$BOOT_JDK_VERSION" >&6; }
27948          fi # end check jdk version
27949        fi # end check javac
27950      fi # end check java
27951    fi # end check boot jdk found
27952  fi
27953
27954    done
27955  fi
27956
27957  fi
27958
27959
27960    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27961    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27962      # Do we have a bin/java?
27963      if test ! -x "$BOOT_JDK/bin/java"; then
27964        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27966        BOOT_JDK_FOUND=no
27967      else
27968        # Do we have a bin/javac?
27969        if test ! -x "$BOOT_JDK/bin/javac"; then
27970          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27972          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27973$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27974          BOOT_JDK_FOUND=no
27975        else
27976          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27977          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27978
27979          # Extra M4 quote needed to protect [] in grep expression.
27980          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27981          if test "x$FOUND_CORRECT_VERSION" = x; then
27982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27984            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27985$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27986            BOOT_JDK_FOUND=no
27987          else
27988            # We're done! :-)
27989            BOOT_JDK_FOUND=yes
27990
27991  # Only process if variable expands to non-empty
27992
27993  if test "x$BOOT_JDK" != x; then
27994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27995
27996  # Input might be given as Windows format, start by converting to
27997  # unix format.
27998  path="$BOOT_JDK"
27999  new_path=`$CYGPATH -u "$path"`
28000
28001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28004  # "foo.exe" is OK but "foo" is an error.
28005  #
28006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28007  # It is also a way to make sure we got the proper file name for the real test later on.
28008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28009  if test "x$test_shortpath" = x; then
28010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28012    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28013  fi
28014
28015  # Call helper function which possibly converts this using DOS-style short mode.
28016  # If so, the updated path is stored in $new_path.
28017
28018  input_path="$new_path"
28019  # Check if we need to convert this using DOS-style short mode. If the path
28020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28021  # take no chances and rewrite it.
28022  # Note: m4 eats our [], so we need to use [ and ] instead.
28023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28024  if test "x$has_forbidden_chars" != x; then
28025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28029      # Going to short mode and back again did indeed matter. Since short mode is
28030      # case insensitive, let's make it lowercase to improve readability.
28031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28032      # Now convert it back to Unix-style (cygpath)
28033      input_path=`$CYGPATH -u "$shortmode_path"`
28034      new_path="$input_path"
28035    fi
28036  fi
28037
28038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28039  if test "x$test_cygdrive_prefix" = x; then
28040    # As a simple fix, exclude /usr/bin since it's not a real path.
28041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28043      # a path prefixed by /cygdrive for fixpath to work.
28044      new_path="$CYGWIN_ROOT_PATH$input_path"
28045    fi
28046  fi
28047
28048
28049  if test "x$path" != "x$new_path"; then
28050    BOOT_JDK="$new_path"
28051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28053  fi
28054
28055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28056
28057  path="$BOOT_JDK"
28058  has_colon=`$ECHO $path | $GREP ^.:`
28059  new_path="$path"
28060  if test "x$has_colon" = x; then
28061    # Not in mixed or Windows style, start by that.
28062    new_path=`cmd //c echo $path`
28063  fi
28064
28065
28066  input_path="$new_path"
28067  # Check if we need to convert this using DOS-style short mode. If the path
28068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28069  # take no chances and rewrite it.
28070  # Note: m4 eats our [], so we need to use [ and ] instead.
28071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28072  if test "x$has_forbidden_chars" != x; then
28073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28075  fi
28076
28077
28078  windows_path="$new_path"
28079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28080    unix_path=`$CYGPATH -u "$windows_path"`
28081    new_path="$unix_path"
28082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28084    new_path="$unix_path"
28085  fi
28086
28087  if test "x$path" != "x$new_path"; then
28088    BOOT_JDK="$new_path"
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28091  fi
28092
28093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28095
28096    else
28097      # We're on a unix platform. Hooray! :)
28098      path="$BOOT_JDK"
28099      has_space=`$ECHO "$path" | $GREP " "`
28100      if test "x$has_space" != x; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28104      fi
28105
28106      # Use eval to expand a potential ~
28107      eval path="$path"
28108      if test ! -f "$path" && test ! -d "$path"; then
28109        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28110      fi
28111
28112      if test -d "$path"; then
28113        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28114      else
28115        dir="`$DIRNAME "$path"`"
28116        base="`$BASENAME "$path"`"
28117        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28118      fi
28119    fi
28120  fi
28121
28122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28123$as_echo_n "checking for Boot JDK... " >&6; }
28124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28125$as_echo "$BOOT_JDK" >&6; }
28126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28127$as_echo_n "checking Boot JDK version... " >&6; }
28128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28130$as_echo "$BOOT_JDK_VERSION" >&6; }
28131          fi # end check jdk version
28132        fi # end check javac
28133      fi # end check java
28134    fi # end check boot jdk found
28135  fi
28136
28137
28138  if test "x$BOOT_JDK_FOUND" = xno; then
28139    # Now execute the test
28140
28141  if test "x$PROGRAMFILES" != x; then
28142    VIRTUAL_DIR="$PROGRAMFILES/Java"
28143
28144  windows_path="$VIRTUAL_DIR"
28145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28146    unix_path=`$CYGPATH -u "$windows_path"`
28147    VIRTUAL_DIR="$unix_path"
28148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28150    VIRTUAL_DIR="$unix_path"
28151  fi
28152
28153
28154  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28155  BOOT_JDK_SUFFIX=""
28156  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28157  if test "x$ALL_JDKS_FOUND" != x; then
28158    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28164        if test -d "$BOOT_JDK"; then
28165          BOOT_JDK_FOUND=maybe
28166          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28167$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28168        fi
28169
28170
28171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28173      # Do we have a bin/java?
28174      if test ! -x "$BOOT_JDK/bin/java"; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28177        BOOT_JDK_FOUND=no
28178      else
28179        # Do we have a bin/javac?
28180        if test ! -x "$BOOT_JDK/bin/javac"; then
28181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28185          BOOT_JDK_FOUND=no
28186        else
28187          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28188          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28189
28190          # Extra M4 quote needed to protect [] in grep expression.
28191          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28192          if test "x$FOUND_CORRECT_VERSION" = x; then
28193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28195            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28196$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28197            BOOT_JDK_FOUND=no
28198          else
28199            # We're done! :-)
28200            BOOT_JDK_FOUND=yes
28201
28202  # Only process if variable expands to non-empty
28203
28204  if test "x$BOOT_JDK" != x; then
28205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206
28207  # Input might be given as Windows format, start by converting to
28208  # unix format.
28209  path="$BOOT_JDK"
28210  new_path=`$CYGPATH -u "$path"`
28211
28212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28215  # "foo.exe" is OK but "foo" is an error.
28216  #
28217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28218  # It is also a way to make sure we got the proper file name for the real test later on.
28219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28220  if test "x$test_shortpath" = x; then
28221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28224  fi
28225
28226  # Call helper function which possibly converts this using DOS-style short mode.
28227  # If so, the updated path is stored in $new_path.
28228
28229  input_path="$new_path"
28230  # Check if we need to convert this using DOS-style short mode. If the path
28231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28232  # take no chances and rewrite it.
28233  # Note: m4 eats our [], so we need to use [ and ] instead.
28234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28235  if test "x$has_forbidden_chars" != x; then
28236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28240      # Going to short mode and back again did indeed matter. Since short mode is
28241      # case insensitive, let's make it lowercase to improve readability.
28242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28243      # Now convert it back to Unix-style (cygpath)
28244      input_path=`$CYGPATH -u "$shortmode_path"`
28245      new_path="$input_path"
28246    fi
28247  fi
28248
28249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28250  if test "x$test_cygdrive_prefix" = x; then
28251    # As a simple fix, exclude /usr/bin since it's not a real path.
28252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28254      # a path prefixed by /cygdrive for fixpath to work.
28255      new_path="$CYGWIN_ROOT_PATH$input_path"
28256    fi
28257  fi
28258
28259
28260  if test "x$path" != "x$new_path"; then
28261    BOOT_JDK="$new_path"
28262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28264  fi
28265
28266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28267
28268  path="$BOOT_JDK"
28269  has_colon=`$ECHO $path | $GREP ^.:`
28270  new_path="$path"
28271  if test "x$has_colon" = x; then
28272    # Not in mixed or Windows style, start by that.
28273    new_path=`cmd //c echo $path`
28274  fi
28275
28276
28277  input_path="$new_path"
28278  # Check if we need to convert this using DOS-style short mode. If the path
28279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28280  # take no chances and rewrite it.
28281  # Note: m4 eats our [], so we need to use [ and ] instead.
28282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28283  if test "x$has_forbidden_chars" != x; then
28284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28286  fi
28287
28288
28289  windows_path="$new_path"
28290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28291    unix_path=`$CYGPATH -u "$windows_path"`
28292    new_path="$unix_path"
28293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28295    new_path="$unix_path"
28296  fi
28297
28298  if test "x$path" != "x$new_path"; then
28299    BOOT_JDK="$new_path"
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28302  fi
28303
28304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28306
28307    else
28308      # We're on a unix platform. Hooray! :)
28309      path="$BOOT_JDK"
28310      has_space=`$ECHO "$path" | $GREP " "`
28311      if test "x$has_space" != x; then
28312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28315      fi
28316
28317      # Use eval to expand a potential ~
28318      eval path="$path"
28319      if test ! -f "$path" && test ! -d "$path"; then
28320        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28321      fi
28322
28323      if test -d "$path"; then
28324        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28325      else
28326        dir="`$DIRNAME "$path"`"
28327        base="`$BASENAME "$path"`"
28328        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28329      fi
28330    fi
28331  fi
28332
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28334$as_echo_n "checking for Boot JDK... " >&6; }
28335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28336$as_echo "$BOOT_JDK" >&6; }
28337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28338$as_echo_n "checking Boot JDK version... " >&6; }
28339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28341$as_echo "$BOOT_JDK_VERSION" >&6; }
28342          fi # end check jdk version
28343        fi # end check javac
28344      fi # end check java
28345    fi # end check boot jdk found
28346  fi
28347
28348    done
28349  fi
28350
28351  fi
28352
28353
28354    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28355    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28356      # Do we have a bin/java?
28357      if test ! -x "$BOOT_JDK/bin/java"; then
28358        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28360        BOOT_JDK_FOUND=no
28361      else
28362        # Do we have a bin/javac?
28363        if test ! -x "$BOOT_JDK/bin/javac"; then
28364          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28366          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28367$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28368          BOOT_JDK_FOUND=no
28369        else
28370          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28371          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28372
28373          # Extra M4 quote needed to protect [] in grep expression.
28374          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28375          if test "x$FOUND_CORRECT_VERSION" = x; then
28376            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28378            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28379$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28380            BOOT_JDK_FOUND=no
28381          else
28382            # We're done! :-)
28383            BOOT_JDK_FOUND=yes
28384
28385  # Only process if variable expands to non-empty
28386
28387  if test "x$BOOT_JDK" != x; then
28388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28389
28390  # Input might be given as Windows format, start by converting to
28391  # unix format.
28392  path="$BOOT_JDK"
28393  new_path=`$CYGPATH -u "$path"`
28394
28395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28398  # "foo.exe" is OK but "foo" is an error.
28399  #
28400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28401  # It is also a way to make sure we got the proper file name for the real test later on.
28402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28403  if test "x$test_shortpath" = x; then
28404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28407  fi
28408
28409  # Call helper function which possibly converts this using DOS-style short mode.
28410  # If so, the updated path is stored in $new_path.
28411
28412  input_path="$new_path"
28413  # Check if we need to convert this using DOS-style short mode. If the path
28414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28415  # take no chances and rewrite it.
28416  # Note: m4 eats our [], so we need to use [ and ] instead.
28417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28418  if test "x$has_forbidden_chars" != x; then
28419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28423      # Going to short mode and back again did indeed matter. Since short mode is
28424      # case insensitive, let's make it lowercase to improve readability.
28425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28426      # Now convert it back to Unix-style (cygpath)
28427      input_path=`$CYGPATH -u "$shortmode_path"`
28428      new_path="$input_path"
28429    fi
28430  fi
28431
28432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28433  if test "x$test_cygdrive_prefix" = x; then
28434    # As a simple fix, exclude /usr/bin since it's not a real path.
28435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28437      # a path prefixed by /cygdrive for fixpath to work.
28438      new_path="$CYGWIN_ROOT_PATH$input_path"
28439    fi
28440  fi
28441
28442
28443  if test "x$path" != "x$new_path"; then
28444    BOOT_JDK="$new_path"
28445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28447  fi
28448
28449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28450
28451  path="$BOOT_JDK"
28452  has_colon=`$ECHO $path | $GREP ^.:`
28453  new_path="$path"
28454  if test "x$has_colon" = x; then
28455    # Not in mixed or Windows style, start by that.
28456    new_path=`cmd //c echo $path`
28457  fi
28458
28459
28460  input_path="$new_path"
28461  # Check if we need to convert this using DOS-style short mode. If the path
28462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28463  # take no chances and rewrite it.
28464  # Note: m4 eats our [], so we need to use [ and ] instead.
28465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28466  if test "x$has_forbidden_chars" != x; then
28467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28469  fi
28470
28471
28472  windows_path="$new_path"
28473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28474    unix_path=`$CYGPATH -u "$windows_path"`
28475    new_path="$unix_path"
28476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28478    new_path="$unix_path"
28479  fi
28480
28481  if test "x$path" != "x$new_path"; then
28482    BOOT_JDK="$new_path"
28483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28485  fi
28486
28487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28489
28490    else
28491      # We're on a unix platform. Hooray! :)
28492      path="$BOOT_JDK"
28493      has_space=`$ECHO "$path" | $GREP " "`
28494      if test "x$has_space" != x; then
28495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28498      fi
28499
28500      # Use eval to expand a potential ~
28501      eval path="$path"
28502      if test ! -f "$path" && test ! -d "$path"; then
28503        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28504      fi
28505
28506      if test -d "$path"; then
28507        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28508      else
28509        dir="`$DIRNAME "$path"`"
28510        base="`$BASENAME "$path"`"
28511        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28512      fi
28513    fi
28514  fi
28515
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28517$as_echo_n "checking for Boot JDK... " >&6; }
28518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28519$as_echo "$BOOT_JDK" >&6; }
28520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28521$as_echo_n "checking Boot JDK version... " >&6; }
28522            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28524$as_echo "$BOOT_JDK_VERSION" >&6; }
28525          fi # end check jdk version
28526        fi # end check javac
28527      fi # end check java
28528    fi # end check boot jdk found
28529  fi
28530
28531
28532  if test "x$BOOT_JDK_FOUND" = xno; then
28533    # Now execute the test
28534
28535  if test "x$ProgramFiles" != x; then
28536    VIRTUAL_DIR="$ProgramFiles/Java"
28537
28538  windows_path="$VIRTUAL_DIR"
28539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28540    unix_path=`$CYGPATH -u "$windows_path"`
28541    VIRTUAL_DIR="$unix_path"
28542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28544    VIRTUAL_DIR="$unix_path"
28545  fi
28546
28547
28548  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28549  BOOT_JDK_SUFFIX=""
28550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28551  if test "x$ALL_JDKS_FOUND" != x; then
28552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28558        if test -d "$BOOT_JDK"; then
28559          BOOT_JDK_FOUND=maybe
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28562        fi
28563
28564
28565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28567      # Do we have a bin/java?
28568      if test ! -x "$BOOT_JDK/bin/java"; then
28569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28571        BOOT_JDK_FOUND=no
28572      else
28573        # Do we have a bin/javac?
28574        if test ! -x "$BOOT_JDK/bin/javac"; then
28575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28579          BOOT_JDK_FOUND=no
28580        else
28581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28583
28584          # Extra M4 quote needed to protect [] in grep expression.
28585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28586          if test "x$FOUND_CORRECT_VERSION" = x; then
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28591            BOOT_JDK_FOUND=no
28592          else
28593            # We're done! :-)
28594            BOOT_JDK_FOUND=yes
28595
28596  # Only process if variable expands to non-empty
28597
28598  if test "x$BOOT_JDK" != x; then
28599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600
28601  # Input might be given as Windows format, start by converting to
28602  # unix format.
28603  path="$BOOT_JDK"
28604  new_path=`$CYGPATH -u "$path"`
28605
28606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28609  # "foo.exe" is OK but "foo" is an error.
28610  #
28611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28612  # It is also a way to make sure we got the proper file name for the real test later on.
28613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28614  if test "x$test_shortpath" = x; then
28615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28618  fi
28619
28620  # Call helper function which possibly converts this using DOS-style short mode.
28621  # If so, the updated path is stored in $new_path.
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28634      # Going to short mode and back again did indeed matter. Since short mode is
28635      # case insensitive, let's make it lowercase to improve readability.
28636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28637      # Now convert it back to Unix-style (cygpath)
28638      input_path=`$CYGPATH -u "$shortmode_path"`
28639      new_path="$input_path"
28640    fi
28641  fi
28642
28643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28644  if test "x$test_cygdrive_prefix" = x; then
28645    # As a simple fix, exclude /usr/bin since it's not a real path.
28646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28648      # a path prefixed by /cygdrive for fixpath to work.
28649      new_path="$CYGWIN_ROOT_PATH$input_path"
28650    fi
28651  fi
28652
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28661
28662  path="$BOOT_JDK"
28663  has_colon=`$ECHO $path | $GREP ^.:`
28664  new_path="$path"
28665  if test "x$has_colon" = x; then
28666    # Not in mixed or Windows style, start by that.
28667    new_path=`cmd //c echo $path`
28668  fi
28669
28670
28671  input_path="$new_path"
28672  # Check if we need to convert this using DOS-style short mode. If the path
28673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28674  # take no chances and rewrite it.
28675  # Note: m4 eats our [], so we need to use [ and ] instead.
28676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28677  if test "x$has_forbidden_chars" != x; then
28678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28680  fi
28681
28682
28683  windows_path="$new_path"
28684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685    unix_path=`$CYGPATH -u "$windows_path"`
28686    new_path="$unix_path"
28687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28689    new_path="$unix_path"
28690  fi
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700
28701    else
28702      # We're on a unix platform. Hooray! :)
28703      path="$BOOT_JDK"
28704      has_space=`$ECHO "$path" | $GREP " "`
28705      if test "x$has_space" != x; then
28706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28709      fi
28710
28711      # Use eval to expand a potential ~
28712      eval path="$path"
28713      if test ! -f "$path" && test ! -d "$path"; then
28714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28715      fi
28716
28717      if test -d "$path"; then
28718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28719      else
28720        dir="`$DIRNAME "$path"`"
28721        base="`$BASENAME "$path"`"
28722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28723      fi
28724    fi
28725  fi
28726
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28728$as_echo_n "checking for Boot JDK... " >&6; }
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28730$as_echo "$BOOT_JDK" >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28732$as_echo_n "checking Boot JDK version... " >&6; }
28733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28735$as_echo "$BOOT_JDK_VERSION" >&6; }
28736          fi # end check jdk version
28737        fi # end check javac
28738      fi # end check java
28739    fi # end check boot jdk found
28740  fi
28741
28742    done
28743  fi
28744
28745  fi
28746
28747
28748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28750      # Do we have a bin/java?
28751      if test ! -x "$BOOT_JDK/bin/java"; then
28752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28754        BOOT_JDK_FOUND=no
28755      else
28756        # Do we have a bin/javac?
28757        if test ! -x "$BOOT_JDK/bin/javac"; then
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28762          BOOT_JDK_FOUND=no
28763        else
28764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28766
28767          # Extra M4 quote needed to protect [] in grep expression.
28768          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28769          if test "x$FOUND_CORRECT_VERSION" = x; then
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28774            BOOT_JDK_FOUND=no
28775          else
28776            # We're done! :-)
28777            BOOT_JDK_FOUND=yes
28778
28779  # Only process if variable expands to non-empty
28780
28781  if test "x$BOOT_JDK" != x; then
28782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28783
28784  # Input might be given as Windows format, start by converting to
28785  # unix format.
28786  path="$BOOT_JDK"
28787  new_path=`$CYGPATH -u "$path"`
28788
28789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28792  # "foo.exe" is OK but "foo" is an error.
28793  #
28794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28795  # It is also a way to make sure we got the proper file name for the real test later on.
28796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28797  if test "x$test_shortpath" = x; then
28798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28801  fi
28802
28803  # Call helper function which possibly converts this using DOS-style short mode.
28804  # If so, the updated path is stored in $new_path.
28805
28806  input_path="$new_path"
28807  # Check if we need to convert this using DOS-style short mode. If the path
28808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28809  # take no chances and rewrite it.
28810  # Note: m4 eats our [], so we need to use [ and ] instead.
28811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28812  if test "x$has_forbidden_chars" != x; then
28813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28817      # Going to short mode and back again did indeed matter. Since short mode is
28818      # case insensitive, let's make it lowercase to improve readability.
28819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28820      # Now convert it back to Unix-style (cygpath)
28821      input_path=`$CYGPATH -u "$shortmode_path"`
28822      new_path="$input_path"
28823    fi
28824  fi
28825
28826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28827  if test "x$test_cygdrive_prefix" = x; then
28828    # As a simple fix, exclude /usr/bin since it's not a real path.
28829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28831      # a path prefixed by /cygdrive for fixpath to work.
28832      new_path="$CYGWIN_ROOT_PATH$input_path"
28833    fi
28834  fi
28835
28836
28837  if test "x$path" != "x$new_path"; then
28838    BOOT_JDK="$new_path"
28839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28841  fi
28842
28843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28844
28845  path="$BOOT_JDK"
28846  has_colon=`$ECHO $path | $GREP ^.:`
28847  new_path="$path"
28848  if test "x$has_colon" = x; then
28849    # Not in mixed or Windows style, start by that.
28850    new_path=`cmd //c echo $path`
28851  fi
28852
28853
28854  input_path="$new_path"
28855  # Check if we need to convert this using DOS-style short mode. If the path
28856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28857  # take no chances and rewrite it.
28858  # Note: m4 eats our [], so we need to use [ and ] instead.
28859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28860  if test "x$has_forbidden_chars" != x; then
28861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28863  fi
28864
28865
28866  windows_path="$new_path"
28867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28868    unix_path=`$CYGPATH -u "$windows_path"`
28869    new_path="$unix_path"
28870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28872    new_path="$unix_path"
28873  fi
28874
28875  if test "x$path" != "x$new_path"; then
28876    BOOT_JDK="$new_path"
28877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28879  fi
28880
28881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28883
28884    else
28885      # We're on a unix platform. Hooray! :)
28886      path="$BOOT_JDK"
28887      has_space=`$ECHO "$path" | $GREP " "`
28888      if test "x$has_space" != x; then
28889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28892      fi
28893
28894      # Use eval to expand a potential ~
28895      eval path="$path"
28896      if test ! -f "$path" && test ! -d "$path"; then
28897        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28898      fi
28899
28900      if test -d "$path"; then
28901        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28902      else
28903        dir="`$DIRNAME "$path"`"
28904        base="`$BASENAME "$path"`"
28905        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28906      fi
28907    fi
28908  fi
28909
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28911$as_echo_n "checking for Boot JDK... " >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28913$as_echo "$BOOT_JDK" >&6; }
28914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28915$as_echo_n "checking Boot JDK version... " >&6; }
28916            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28918$as_echo "$BOOT_JDK_VERSION" >&6; }
28919          fi # end check jdk version
28920        fi # end check javac
28921      fi # end check java
28922    fi # end check boot jdk found
28923  fi
28924
28925
28926  if test "x$BOOT_JDK_FOUND" = xno; then
28927    # Now execute the test
28928
28929  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28930  BOOT_JDK_SUFFIX=""
28931  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28932  if test "x$ALL_JDKS_FOUND" != x; then
28933    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28934
28935  if test "x$BOOT_JDK_FOUND" = xno; then
28936    # Now execute the test
28937
28938        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28939        if test -d "$BOOT_JDK"; then
28940          BOOT_JDK_FOUND=maybe
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28942$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28943        fi
28944
28945
28946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28948      # Do we have a bin/java?
28949      if test ! -x "$BOOT_JDK/bin/java"; then
28950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28952        BOOT_JDK_FOUND=no
28953      else
28954        # Do we have a bin/javac?
28955        if test ! -x "$BOOT_JDK/bin/javac"; then
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28960          BOOT_JDK_FOUND=no
28961        else
28962          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28963          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28964
28965          # Extra M4 quote needed to protect [] in grep expression.
28966          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28967          if test "x$FOUND_CORRECT_VERSION" = x; then
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28970            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28971$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28972            BOOT_JDK_FOUND=no
28973          else
28974            # We're done! :-)
28975            BOOT_JDK_FOUND=yes
28976
28977  # Only process if variable expands to non-empty
28978
28979  if test "x$BOOT_JDK" != x; then
28980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28981
28982  # Input might be given as Windows format, start by converting to
28983  # unix format.
28984  path="$BOOT_JDK"
28985  new_path=`$CYGPATH -u "$path"`
28986
28987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28990  # "foo.exe" is OK but "foo" is an error.
28991  #
28992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28993  # It is also a way to make sure we got the proper file name for the real test later on.
28994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28995  if test "x$test_shortpath" = x; then
28996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28999  fi
29000
29001  # Call helper function which possibly converts this using DOS-style short mode.
29002  # If so, the updated path is stored in $new_path.
29003
29004  input_path="$new_path"
29005  # Check if we need to convert this using DOS-style short mode. If the path
29006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29007  # take no chances and rewrite it.
29008  # Note: m4 eats our [], so we need to use [ and ] instead.
29009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29010  if test "x$has_forbidden_chars" != x; then
29011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29015      # Going to short mode and back again did indeed matter. Since short mode is
29016      # case insensitive, let's make it lowercase to improve readability.
29017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29018      # Now convert it back to Unix-style (cygpath)
29019      input_path=`$CYGPATH -u "$shortmode_path"`
29020      new_path="$input_path"
29021    fi
29022  fi
29023
29024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29025  if test "x$test_cygdrive_prefix" = x; then
29026    # As a simple fix, exclude /usr/bin since it's not a real path.
29027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29029      # a path prefixed by /cygdrive for fixpath to work.
29030      new_path="$CYGWIN_ROOT_PATH$input_path"
29031    fi
29032  fi
29033
29034
29035  if test "x$path" != "x$new_path"; then
29036    BOOT_JDK="$new_path"
29037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29039  fi
29040
29041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29042
29043  path="$BOOT_JDK"
29044  has_colon=`$ECHO $path | $GREP ^.:`
29045  new_path="$path"
29046  if test "x$has_colon" = x; then
29047    # Not in mixed or Windows style, start by that.
29048    new_path=`cmd //c echo $path`
29049  fi
29050
29051
29052  input_path="$new_path"
29053  # Check if we need to convert this using DOS-style short mode. If the path
29054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29055  # take no chances and rewrite it.
29056  # Note: m4 eats our [], so we need to use [ and ] instead.
29057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29058  if test "x$has_forbidden_chars" != x; then
29059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29061  fi
29062
29063
29064  windows_path="$new_path"
29065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29066    unix_path=`$CYGPATH -u "$windows_path"`
29067    new_path="$unix_path"
29068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29070    new_path="$unix_path"
29071  fi
29072
29073  if test "x$path" != "x$new_path"; then
29074    BOOT_JDK="$new_path"
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29077  fi
29078
29079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29081
29082    else
29083      # We're on a unix platform. Hooray! :)
29084      path="$BOOT_JDK"
29085      has_space=`$ECHO "$path" | $GREP " "`
29086      if test "x$has_space" != x; then
29087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29090      fi
29091
29092      # Use eval to expand a potential ~
29093      eval path="$path"
29094      if test ! -f "$path" && test ! -d "$path"; then
29095        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29096      fi
29097
29098      if test -d "$path"; then
29099        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29100      else
29101        dir="`$DIRNAME "$path"`"
29102        base="`$BASENAME "$path"`"
29103        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29104      fi
29105    fi
29106  fi
29107
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29109$as_echo_n "checking for Boot JDK... " >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29111$as_echo "$BOOT_JDK" >&6; }
29112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29113$as_echo_n "checking Boot JDK version... " >&6; }
29114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29116$as_echo "$BOOT_JDK_VERSION" >&6; }
29117          fi # end check jdk version
29118        fi # end check javac
29119      fi # end check java
29120    fi # end check boot jdk found
29121  fi
29122
29123    done
29124  fi
29125
29126
29127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29129      # Do we have a bin/java?
29130      if test ! -x "$BOOT_JDK/bin/java"; then
29131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29133        BOOT_JDK_FOUND=no
29134      else
29135        # Do we have a bin/javac?
29136        if test ! -x "$BOOT_JDK/bin/javac"; then
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29141          BOOT_JDK_FOUND=no
29142        else
29143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29145
29146          # Extra M4 quote needed to protect [] in grep expression.
29147          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29148          if test "x$FOUND_CORRECT_VERSION" = x; then
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29153            BOOT_JDK_FOUND=no
29154          else
29155            # We're done! :-)
29156            BOOT_JDK_FOUND=yes
29157
29158  # Only process if variable expands to non-empty
29159
29160  if test "x$BOOT_JDK" != x; then
29161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29162
29163  # Input might be given as Windows format, start by converting to
29164  # unix format.
29165  path="$BOOT_JDK"
29166  new_path=`$CYGPATH -u "$path"`
29167
29168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29171  # "foo.exe" is OK but "foo" is an error.
29172  #
29173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29174  # It is also a way to make sure we got the proper file name for the real test later on.
29175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29176  if test "x$test_shortpath" = x; then
29177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29180  fi
29181
29182  # Call helper function which possibly converts this using DOS-style short mode.
29183  # If so, the updated path is stored in $new_path.
29184
29185  input_path="$new_path"
29186  # Check if we need to convert this using DOS-style short mode. If the path
29187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29188  # take no chances and rewrite it.
29189  # Note: m4 eats our [], so we need to use [ and ] instead.
29190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29191  if test "x$has_forbidden_chars" != x; then
29192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29196      # Going to short mode and back again did indeed matter. Since short mode is
29197      # case insensitive, let's make it lowercase to improve readability.
29198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29199      # Now convert it back to Unix-style (cygpath)
29200      input_path=`$CYGPATH -u "$shortmode_path"`
29201      new_path="$input_path"
29202    fi
29203  fi
29204
29205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29206  if test "x$test_cygdrive_prefix" = x; then
29207    # As a simple fix, exclude /usr/bin since it's not a real path.
29208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29210      # a path prefixed by /cygdrive for fixpath to work.
29211      new_path="$CYGWIN_ROOT_PATH$input_path"
29212    fi
29213  fi
29214
29215
29216  if test "x$path" != "x$new_path"; then
29217    BOOT_JDK="$new_path"
29218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29220  fi
29221
29222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29223
29224  path="$BOOT_JDK"
29225  has_colon=`$ECHO $path | $GREP ^.:`
29226  new_path="$path"
29227  if test "x$has_colon" = x; then
29228    # Not in mixed or Windows style, start by that.
29229    new_path=`cmd //c echo $path`
29230  fi
29231
29232
29233  input_path="$new_path"
29234  # Check if we need to convert this using DOS-style short mode. If the path
29235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29236  # take no chances and rewrite it.
29237  # Note: m4 eats our [], so we need to use [ and ] instead.
29238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29239  if test "x$has_forbidden_chars" != x; then
29240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29242  fi
29243
29244
29245  windows_path="$new_path"
29246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29247    unix_path=`$CYGPATH -u "$windows_path"`
29248    new_path="$unix_path"
29249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29251    new_path="$unix_path"
29252  fi
29253
29254  if test "x$path" != "x$new_path"; then
29255    BOOT_JDK="$new_path"
29256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29258  fi
29259
29260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29262
29263    else
29264      # We're on a unix platform. Hooray! :)
29265      path="$BOOT_JDK"
29266      has_space=`$ECHO "$path" | $GREP " "`
29267      if test "x$has_space" != x; then
29268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29271      fi
29272
29273      # Use eval to expand a potential ~
29274      eval path="$path"
29275      if test ! -f "$path" && test ! -d "$path"; then
29276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29277      fi
29278
29279      if test -d "$path"; then
29280        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29281      else
29282        dir="`$DIRNAME "$path"`"
29283        base="`$BASENAME "$path"`"
29284        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29285      fi
29286    fi
29287  fi
29288
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29290$as_echo_n "checking for Boot JDK... " >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29292$as_echo "$BOOT_JDK" >&6; }
29293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29294$as_echo_n "checking Boot JDK version... " >&6; }
29295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29297$as_echo "$BOOT_JDK_VERSION" >&6; }
29298          fi # end check jdk version
29299        fi # end check javac
29300      fi # end check java
29301    fi # end check boot jdk found
29302  fi
29303
29304  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29305
29306  if test "x$BOOT_JDK_FOUND" = xno; then
29307    # Now execute the test
29308
29309  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29310  BOOT_JDK_SUFFIX="/Contents/Home"
29311  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29312  if test "x$ALL_JDKS_FOUND" != x; then
29313    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29314
29315  if test "x$BOOT_JDK_FOUND" = xno; then
29316    # Now execute the test
29317
29318        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29319        if test -d "$BOOT_JDK"; then
29320          BOOT_JDK_FOUND=maybe
29321          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29322$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29323        fi
29324
29325
29326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29328      # Do we have a bin/java?
29329      if test ! -x "$BOOT_JDK/bin/java"; then
29330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29332        BOOT_JDK_FOUND=no
29333      else
29334        # Do we have a bin/javac?
29335        if test ! -x "$BOOT_JDK/bin/javac"; then
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29340          BOOT_JDK_FOUND=no
29341        else
29342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29344
29345          # Extra M4 quote needed to protect [] in grep expression.
29346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29347          if test "x$FOUND_CORRECT_VERSION" = x; then
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29352            BOOT_JDK_FOUND=no
29353          else
29354            # We're done! :-)
29355            BOOT_JDK_FOUND=yes
29356
29357  # Only process if variable expands to non-empty
29358
29359  if test "x$BOOT_JDK" != x; then
29360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29361
29362  # Input might be given as Windows format, start by converting to
29363  # unix format.
29364  path="$BOOT_JDK"
29365  new_path=`$CYGPATH -u "$path"`
29366
29367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29370  # "foo.exe" is OK but "foo" is an error.
29371  #
29372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29373  # It is also a way to make sure we got the proper file name for the real test later on.
29374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29375  if test "x$test_shortpath" = x; then
29376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29379  fi
29380
29381  # Call helper function which possibly converts this using DOS-style short mode.
29382  # If so, the updated path is stored in $new_path.
29383
29384  input_path="$new_path"
29385  # Check if we need to convert this using DOS-style short mode. If the path
29386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29387  # take no chances and rewrite it.
29388  # Note: m4 eats our [], so we need to use [ and ] instead.
29389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29390  if test "x$has_forbidden_chars" != x; then
29391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29395      # Going to short mode and back again did indeed matter. Since short mode is
29396      # case insensitive, let's make it lowercase to improve readability.
29397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29398      # Now convert it back to Unix-style (cygpath)
29399      input_path=`$CYGPATH -u "$shortmode_path"`
29400      new_path="$input_path"
29401    fi
29402  fi
29403
29404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29405  if test "x$test_cygdrive_prefix" = x; then
29406    # As a simple fix, exclude /usr/bin since it's not a real path.
29407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29409      # a path prefixed by /cygdrive for fixpath to work.
29410      new_path="$CYGWIN_ROOT_PATH$input_path"
29411    fi
29412  fi
29413
29414
29415  if test "x$path" != "x$new_path"; then
29416    BOOT_JDK="$new_path"
29417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29419  fi
29420
29421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29422
29423  path="$BOOT_JDK"
29424  has_colon=`$ECHO $path | $GREP ^.:`
29425  new_path="$path"
29426  if test "x$has_colon" = x; then
29427    # Not in mixed or Windows style, start by that.
29428    new_path=`cmd //c echo $path`
29429  fi
29430
29431
29432  input_path="$new_path"
29433  # Check if we need to convert this using DOS-style short mode. If the path
29434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29435  # take no chances and rewrite it.
29436  # Note: m4 eats our [], so we need to use [ and ] instead.
29437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29438  if test "x$has_forbidden_chars" != x; then
29439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29441  fi
29442
29443
29444  windows_path="$new_path"
29445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29446    unix_path=`$CYGPATH -u "$windows_path"`
29447    new_path="$unix_path"
29448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29450    new_path="$unix_path"
29451  fi
29452
29453  if test "x$path" != "x$new_path"; then
29454    BOOT_JDK="$new_path"
29455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29457  fi
29458
29459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29461
29462    else
29463      # We're on a unix platform. Hooray! :)
29464      path="$BOOT_JDK"
29465      has_space=`$ECHO "$path" | $GREP " "`
29466      if test "x$has_space" != x; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29470      fi
29471
29472      # Use eval to expand a potential ~
29473      eval path="$path"
29474      if test ! -f "$path" && test ! -d "$path"; then
29475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29476      fi
29477
29478      if test -d "$path"; then
29479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29480      else
29481        dir="`$DIRNAME "$path"`"
29482        base="`$BASENAME "$path"`"
29483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29484      fi
29485    fi
29486  fi
29487
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29489$as_echo_n "checking for Boot JDK... " >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29491$as_echo "$BOOT_JDK" >&6; }
29492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29493$as_echo_n "checking Boot JDK version... " >&6; }
29494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29496$as_echo "$BOOT_JDK_VERSION" >&6; }
29497          fi # end check jdk version
29498        fi # end check javac
29499      fi # end check java
29500    fi # end check boot jdk found
29501  fi
29502
29503    done
29504  fi
29505
29506
29507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29509      # Do we have a bin/java?
29510      if test ! -x "$BOOT_JDK/bin/java"; then
29511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29513        BOOT_JDK_FOUND=no
29514      else
29515        # Do we have a bin/javac?
29516        if test ! -x "$BOOT_JDK/bin/javac"; then
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29521          BOOT_JDK_FOUND=no
29522        else
29523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29525
29526          # Extra M4 quote needed to protect [] in grep expression.
29527          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29528          if test "x$FOUND_CORRECT_VERSION" = x; then
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29533            BOOT_JDK_FOUND=no
29534          else
29535            # We're done! :-)
29536            BOOT_JDK_FOUND=yes
29537
29538  # Only process if variable expands to non-empty
29539
29540  if test "x$BOOT_JDK" != x; then
29541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29542
29543  # Input might be given as Windows format, start by converting to
29544  # unix format.
29545  path="$BOOT_JDK"
29546  new_path=`$CYGPATH -u "$path"`
29547
29548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29551  # "foo.exe" is OK but "foo" is an error.
29552  #
29553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29554  # It is also a way to make sure we got the proper file name for the real test later on.
29555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29556  if test "x$test_shortpath" = x; then
29557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29560  fi
29561
29562  # Call helper function which possibly converts this using DOS-style short mode.
29563  # If so, the updated path is stored in $new_path.
29564
29565  input_path="$new_path"
29566  # Check if we need to convert this using DOS-style short mode. If the path
29567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29568  # take no chances and rewrite it.
29569  # Note: m4 eats our [], so we need to use [ and ] instead.
29570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29571  if test "x$has_forbidden_chars" != x; then
29572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29576      # Going to short mode and back again did indeed matter. Since short mode is
29577      # case insensitive, let's make it lowercase to improve readability.
29578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29579      # Now convert it back to Unix-style (cygpath)
29580      input_path=`$CYGPATH -u "$shortmode_path"`
29581      new_path="$input_path"
29582    fi
29583  fi
29584
29585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29586  if test "x$test_cygdrive_prefix" = x; then
29587    # As a simple fix, exclude /usr/bin since it's not a real path.
29588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29590      # a path prefixed by /cygdrive for fixpath to work.
29591      new_path="$CYGWIN_ROOT_PATH$input_path"
29592    fi
29593  fi
29594
29595
29596  if test "x$path" != "x$new_path"; then
29597    BOOT_JDK="$new_path"
29598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29600  fi
29601
29602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603
29604  path="$BOOT_JDK"
29605  has_colon=`$ECHO $path | $GREP ^.:`
29606  new_path="$path"
29607  if test "x$has_colon" = x; then
29608    # Not in mixed or Windows style, start by that.
29609    new_path=`cmd //c echo $path`
29610  fi
29611
29612
29613  input_path="$new_path"
29614  # Check if we need to convert this using DOS-style short mode. If the path
29615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29616  # take no chances and rewrite it.
29617  # Note: m4 eats our [], so we need to use [ and ] instead.
29618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29619  if test "x$has_forbidden_chars" != x; then
29620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29622  fi
29623
29624
29625  windows_path="$new_path"
29626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29627    unix_path=`$CYGPATH -u "$windows_path"`
29628    new_path="$unix_path"
29629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29631    new_path="$unix_path"
29632  fi
29633
29634  if test "x$path" != "x$new_path"; then
29635    BOOT_JDK="$new_path"
29636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29638  fi
29639
29640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29642
29643    else
29644      # We're on a unix platform. Hooray! :)
29645      path="$BOOT_JDK"
29646      has_space=`$ECHO "$path" | $GREP " "`
29647      if test "x$has_space" != x; then
29648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29651      fi
29652
29653      # Use eval to expand a potential ~
29654      eval path="$path"
29655      if test ! -f "$path" && test ! -d "$path"; then
29656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29657      fi
29658
29659      if test -d "$path"; then
29660        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29661      else
29662        dir="`$DIRNAME "$path"`"
29663        base="`$BASENAME "$path"`"
29664        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29665      fi
29666    fi
29667  fi
29668
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29670$as_echo_n "checking for Boot JDK... " >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29672$as_echo "$BOOT_JDK" >&6; }
29673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29674$as_echo_n "checking Boot JDK version... " >&6; }
29675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29677$as_echo "$BOOT_JDK_VERSION" >&6; }
29678          fi # end check jdk version
29679        fi # end check javac
29680      fi # end check java
29681    fi # end check boot jdk found
29682  fi
29683
29684
29685  if test "x$BOOT_JDK_FOUND" = xno; then
29686    # Now execute the test
29687
29688  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29689  BOOT_JDK_SUFFIX="/Contents/Home"
29690  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29691  if test "x$ALL_JDKS_FOUND" != x; then
29692    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29693
29694  if test "x$BOOT_JDK_FOUND" = xno; then
29695    # Now execute the test
29696
29697        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29698        if test -d "$BOOT_JDK"; then
29699          BOOT_JDK_FOUND=maybe
29700          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29701$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29702        fi
29703
29704
29705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29707      # Do we have a bin/java?
29708      if test ! -x "$BOOT_JDK/bin/java"; then
29709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29711        BOOT_JDK_FOUND=no
29712      else
29713        # Do we have a bin/javac?
29714        if test ! -x "$BOOT_JDK/bin/javac"; then
29715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29719          BOOT_JDK_FOUND=no
29720        else
29721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29723
29724          # Extra M4 quote needed to protect [] in grep expression.
29725          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29726          if test "x$FOUND_CORRECT_VERSION" = x; then
29727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29731            BOOT_JDK_FOUND=no
29732          else
29733            # We're done! :-)
29734            BOOT_JDK_FOUND=yes
29735
29736  # Only process if variable expands to non-empty
29737
29738  if test "x$BOOT_JDK" != x; then
29739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29740
29741  # Input might be given as Windows format, start by converting to
29742  # unix format.
29743  path="$BOOT_JDK"
29744  new_path=`$CYGPATH -u "$path"`
29745
29746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29749  # "foo.exe" is OK but "foo" is an error.
29750  #
29751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29752  # It is also a way to make sure we got the proper file name for the real test later on.
29753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29754  if test "x$test_shortpath" = x; then
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29757    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29758  fi
29759
29760  # Call helper function which possibly converts this using DOS-style short mode.
29761  # If so, the updated path is stored in $new_path.
29762
29763  input_path="$new_path"
29764  # Check if we need to convert this using DOS-style short mode. If the path
29765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29766  # take no chances and rewrite it.
29767  # Note: m4 eats our [], so we need to use [ and ] instead.
29768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29769  if test "x$has_forbidden_chars" != x; then
29770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29774      # Going to short mode and back again did indeed matter. Since short mode is
29775      # case insensitive, let's make it lowercase to improve readability.
29776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29777      # Now convert it back to Unix-style (cygpath)
29778      input_path=`$CYGPATH -u "$shortmode_path"`
29779      new_path="$input_path"
29780    fi
29781  fi
29782
29783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29784  if test "x$test_cygdrive_prefix" = x; then
29785    # As a simple fix, exclude /usr/bin since it's not a real path.
29786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29788      # a path prefixed by /cygdrive for fixpath to work.
29789      new_path="$CYGWIN_ROOT_PATH$input_path"
29790    fi
29791  fi
29792
29793
29794  if test "x$path" != "x$new_path"; then
29795    BOOT_JDK="$new_path"
29796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29798  fi
29799
29800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29801
29802  path="$BOOT_JDK"
29803  has_colon=`$ECHO $path | $GREP ^.:`
29804  new_path="$path"
29805  if test "x$has_colon" = x; then
29806    # Not in mixed or Windows style, start by that.
29807    new_path=`cmd //c echo $path`
29808  fi
29809
29810
29811  input_path="$new_path"
29812  # Check if we need to convert this using DOS-style short mode. If the path
29813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29814  # take no chances and rewrite it.
29815  # Note: m4 eats our [], so we need to use [ and ] instead.
29816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29817  if test "x$has_forbidden_chars" != x; then
29818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29820  fi
29821
29822
29823  windows_path="$new_path"
29824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29825    unix_path=`$CYGPATH -u "$windows_path"`
29826    new_path="$unix_path"
29827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29829    new_path="$unix_path"
29830  fi
29831
29832  if test "x$path" != "x$new_path"; then
29833    BOOT_JDK="$new_path"
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29836  fi
29837
29838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29840
29841    else
29842      # We're on a unix platform. Hooray! :)
29843      path="$BOOT_JDK"
29844      has_space=`$ECHO "$path" | $GREP " "`
29845      if test "x$has_space" != x; then
29846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29849      fi
29850
29851      # Use eval to expand a potential ~
29852      eval path="$path"
29853      if test ! -f "$path" && test ! -d "$path"; then
29854        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29855      fi
29856
29857      if test -d "$path"; then
29858        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29859      else
29860        dir="`$DIRNAME "$path"`"
29861        base="`$BASENAME "$path"`"
29862        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29863      fi
29864    fi
29865  fi
29866
29867            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29868$as_echo_n "checking for Boot JDK... " >&6; }
29869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29870$as_echo "$BOOT_JDK" >&6; }
29871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29872$as_echo_n "checking Boot JDK version... " >&6; }
29873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29875$as_echo "$BOOT_JDK_VERSION" >&6; }
29876          fi # end check jdk version
29877        fi # end check javac
29878      fi # end check java
29879    fi # end check boot jdk found
29880  fi
29881
29882    done
29883  fi
29884
29885
29886    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29887    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29888      # Do we have a bin/java?
29889      if test ! -x "$BOOT_JDK/bin/java"; then
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29892        BOOT_JDK_FOUND=no
29893      else
29894        # Do we have a bin/javac?
29895        if test ! -x "$BOOT_JDK/bin/javac"; then
29896          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29898          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29899$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29900          BOOT_JDK_FOUND=no
29901        else
29902          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29903          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29904
29905          # Extra M4 quote needed to protect [] in grep expression.
29906          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29907          if test "x$FOUND_CORRECT_VERSION" = x; then
29908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29910            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29911$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29912            BOOT_JDK_FOUND=no
29913          else
29914            # We're done! :-)
29915            BOOT_JDK_FOUND=yes
29916
29917  # Only process if variable expands to non-empty
29918
29919  if test "x$BOOT_JDK" != x; then
29920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29921
29922  # Input might be given as Windows format, start by converting to
29923  # unix format.
29924  path="$BOOT_JDK"
29925  new_path=`$CYGPATH -u "$path"`
29926
29927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29930  # "foo.exe" is OK but "foo" is an error.
29931  #
29932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29933  # It is also a way to make sure we got the proper file name for the real test later on.
29934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29935  if test "x$test_shortpath" = x; then
29936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29939  fi
29940
29941  # Call helper function which possibly converts this using DOS-style short mode.
29942  # If so, the updated path is stored in $new_path.
29943
29944  input_path="$new_path"
29945  # Check if we need to convert this using DOS-style short mode. If the path
29946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29947  # take no chances and rewrite it.
29948  # Note: m4 eats our [], so we need to use [ and ] instead.
29949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29950  if test "x$has_forbidden_chars" != x; then
29951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29955      # Going to short mode and back again did indeed matter. Since short mode is
29956      # case insensitive, let's make it lowercase to improve readability.
29957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29958      # Now convert it back to Unix-style (cygpath)
29959      input_path=`$CYGPATH -u "$shortmode_path"`
29960      new_path="$input_path"
29961    fi
29962  fi
29963
29964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29965  if test "x$test_cygdrive_prefix" = x; then
29966    # As a simple fix, exclude /usr/bin since it's not a real path.
29967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29969      # a path prefixed by /cygdrive for fixpath to work.
29970      new_path="$CYGWIN_ROOT_PATH$input_path"
29971    fi
29972  fi
29973
29974
29975  if test "x$path" != "x$new_path"; then
29976    BOOT_JDK="$new_path"
29977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29979  fi
29980
29981    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29982
29983  path="$BOOT_JDK"
29984  has_colon=`$ECHO $path | $GREP ^.:`
29985  new_path="$path"
29986  if test "x$has_colon" = x; then
29987    # Not in mixed or Windows style, start by that.
29988    new_path=`cmd //c echo $path`
29989  fi
29990
29991
29992  input_path="$new_path"
29993  # Check if we need to convert this using DOS-style short mode. If the path
29994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29995  # take no chances and rewrite it.
29996  # Note: m4 eats our [], so we need to use [ and ] instead.
29997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29998  if test "x$has_forbidden_chars" != x; then
29999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30001  fi
30002
30003
30004  windows_path="$new_path"
30005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30006    unix_path=`$CYGPATH -u "$windows_path"`
30007    new_path="$unix_path"
30008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30010    new_path="$unix_path"
30011  fi
30012
30013  if test "x$path" != "x$new_path"; then
30014    BOOT_JDK="$new_path"
30015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30017  fi
30018
30019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30021
30022    else
30023      # We're on a unix platform. Hooray! :)
30024      path="$BOOT_JDK"
30025      has_space=`$ECHO "$path" | $GREP " "`
30026      if test "x$has_space" != x; then
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30029        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30030      fi
30031
30032      # Use eval to expand a potential ~
30033      eval path="$path"
30034      if test ! -f "$path" && test ! -d "$path"; then
30035        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30036      fi
30037
30038      if test -d "$path"; then
30039        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30040      else
30041        dir="`$DIRNAME "$path"`"
30042        base="`$BASENAME "$path"`"
30043        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30044      fi
30045    fi
30046  fi
30047
30048            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30049$as_echo_n "checking for Boot JDK... " >&6; }
30050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30051$as_echo "$BOOT_JDK" >&6; }
30052            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30053$as_echo_n "checking Boot JDK version... " >&6; }
30054            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30056$as_echo "$BOOT_JDK_VERSION" >&6; }
30057          fi # end check jdk version
30058        fi # end check javac
30059      fi # end check java
30060    fi # end check boot jdk found
30061  fi
30062
30063  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30064
30065  if test "x$BOOT_JDK_FOUND" = xno; then
30066    # Now execute the test
30067
30068  BOOT_JDK_PREFIX="/usr/lib/jvm"
30069  BOOT_JDK_SUFFIX=""
30070  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30071  if test "x$ALL_JDKS_FOUND" != x; then
30072    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30073
30074  if test "x$BOOT_JDK_FOUND" = xno; then
30075    # Now execute the test
30076
30077        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30078        if test -d "$BOOT_JDK"; then
30079          BOOT_JDK_FOUND=maybe
30080          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30081$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30082        fi
30083
30084
30085    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30086    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30087      # Do we have a bin/java?
30088      if test ! -x "$BOOT_JDK/bin/java"; then
30089        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30091        BOOT_JDK_FOUND=no
30092      else
30093        # Do we have a bin/javac?
30094        if test ! -x "$BOOT_JDK/bin/javac"; then
30095          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30097          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30098$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30099          BOOT_JDK_FOUND=no
30100        else
30101          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30102          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30103
30104          # Extra M4 quote needed to protect [] in grep expression.
30105          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30106          if test "x$FOUND_CORRECT_VERSION" = x; then
30107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30109            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30110$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30111            BOOT_JDK_FOUND=no
30112          else
30113            # We're done! :-)
30114            BOOT_JDK_FOUND=yes
30115
30116  # Only process if variable expands to non-empty
30117
30118  if test "x$BOOT_JDK" != x; then
30119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30120
30121  # Input might be given as Windows format, start by converting to
30122  # unix format.
30123  path="$BOOT_JDK"
30124  new_path=`$CYGPATH -u "$path"`
30125
30126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30129  # "foo.exe" is OK but "foo" is an error.
30130  #
30131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30132  # It is also a way to make sure we got the proper file name for the real test later on.
30133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30134  if test "x$test_shortpath" = x; then
30135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30138  fi
30139
30140  # Call helper function which possibly converts this using DOS-style short mode.
30141  # If so, the updated path is stored in $new_path.
30142
30143  input_path="$new_path"
30144  # Check if we need to convert this using DOS-style short mode. If the path
30145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30146  # take no chances and rewrite it.
30147  # Note: m4 eats our [], so we need to use [ and ] instead.
30148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30149  if test "x$has_forbidden_chars" != x; then
30150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30154      # Going to short mode and back again did indeed matter. Since short mode is
30155      # case insensitive, let's make it lowercase to improve readability.
30156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30157      # Now convert it back to Unix-style (cygpath)
30158      input_path=`$CYGPATH -u "$shortmode_path"`
30159      new_path="$input_path"
30160    fi
30161  fi
30162
30163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30164  if test "x$test_cygdrive_prefix" = x; then
30165    # As a simple fix, exclude /usr/bin since it's not a real path.
30166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30168      # a path prefixed by /cygdrive for fixpath to work.
30169      new_path="$CYGWIN_ROOT_PATH$input_path"
30170    fi
30171  fi
30172
30173
30174  if test "x$path" != "x$new_path"; then
30175    BOOT_JDK="$new_path"
30176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30178  fi
30179
30180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30181
30182  path="$BOOT_JDK"
30183  has_colon=`$ECHO $path | $GREP ^.:`
30184  new_path="$path"
30185  if test "x$has_colon" = x; then
30186    # Not in mixed or Windows style, start by that.
30187    new_path=`cmd //c echo $path`
30188  fi
30189
30190
30191  input_path="$new_path"
30192  # Check if we need to convert this using DOS-style short mode. If the path
30193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30194  # take no chances and rewrite it.
30195  # Note: m4 eats our [], so we need to use [ and ] instead.
30196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30197  if test "x$has_forbidden_chars" != x; then
30198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30200  fi
30201
30202
30203  windows_path="$new_path"
30204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30205    unix_path=`$CYGPATH -u "$windows_path"`
30206    new_path="$unix_path"
30207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30209    new_path="$unix_path"
30210  fi
30211
30212  if test "x$path" != "x$new_path"; then
30213    BOOT_JDK="$new_path"
30214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30216  fi
30217
30218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30220
30221    else
30222      # We're on a unix platform. Hooray! :)
30223      path="$BOOT_JDK"
30224      has_space=`$ECHO "$path" | $GREP " "`
30225      if test "x$has_space" != x; then
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30229      fi
30230
30231      # Use eval to expand a potential ~
30232      eval path="$path"
30233      if test ! -f "$path" && test ! -d "$path"; then
30234        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30235      fi
30236
30237      if test -d "$path"; then
30238        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30239      else
30240        dir="`$DIRNAME "$path"`"
30241        base="`$BASENAME "$path"`"
30242        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30243      fi
30244    fi
30245  fi
30246
30247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30248$as_echo_n "checking for Boot JDK... " >&6; }
30249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30250$as_echo "$BOOT_JDK" >&6; }
30251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30252$as_echo_n "checking Boot JDK version... " >&6; }
30253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30255$as_echo "$BOOT_JDK_VERSION" >&6; }
30256          fi # end check jdk version
30257        fi # end check javac
30258      fi # end check java
30259    fi # end check boot jdk found
30260  fi
30261
30262    done
30263  fi
30264
30265
30266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30268      # Do we have a bin/java?
30269      if test ! -x "$BOOT_JDK/bin/java"; then
30270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30272        BOOT_JDK_FOUND=no
30273      else
30274        # Do we have a bin/javac?
30275        if test ! -x "$BOOT_JDK/bin/javac"; then
30276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30280          BOOT_JDK_FOUND=no
30281        else
30282          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30283          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30284
30285          # Extra M4 quote needed to protect [] in grep expression.
30286          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30287          if test "x$FOUND_CORRECT_VERSION" = x; then
30288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30290            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30291$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30292            BOOT_JDK_FOUND=no
30293          else
30294            # We're done! :-)
30295            BOOT_JDK_FOUND=yes
30296
30297  # Only process if variable expands to non-empty
30298
30299  if test "x$BOOT_JDK" != x; then
30300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30301
30302  # Input might be given as Windows format, start by converting to
30303  # unix format.
30304  path="$BOOT_JDK"
30305  new_path=`$CYGPATH -u "$path"`
30306
30307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30310  # "foo.exe" is OK but "foo" is an error.
30311  #
30312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30313  # It is also a way to make sure we got the proper file name for the real test later on.
30314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30315  if test "x$test_shortpath" = x; then
30316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30319  fi
30320
30321  # Call helper function which possibly converts this using DOS-style short mode.
30322  # If so, the updated path is stored in $new_path.
30323
30324  input_path="$new_path"
30325  # Check if we need to convert this using DOS-style short mode. If the path
30326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30327  # take no chances and rewrite it.
30328  # Note: m4 eats our [], so we need to use [ and ] instead.
30329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30330  if test "x$has_forbidden_chars" != x; then
30331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30335      # Going to short mode and back again did indeed matter. Since short mode is
30336      # case insensitive, let's make it lowercase to improve readability.
30337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30338      # Now convert it back to Unix-style (cygpath)
30339      input_path=`$CYGPATH -u "$shortmode_path"`
30340      new_path="$input_path"
30341    fi
30342  fi
30343
30344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30345  if test "x$test_cygdrive_prefix" = x; then
30346    # As a simple fix, exclude /usr/bin since it's not a real path.
30347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30349      # a path prefixed by /cygdrive for fixpath to work.
30350      new_path="$CYGWIN_ROOT_PATH$input_path"
30351    fi
30352  fi
30353
30354
30355  if test "x$path" != "x$new_path"; then
30356    BOOT_JDK="$new_path"
30357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30359  fi
30360
30361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30362
30363  path="$BOOT_JDK"
30364  has_colon=`$ECHO $path | $GREP ^.:`
30365  new_path="$path"
30366  if test "x$has_colon" = x; then
30367    # Not in mixed or Windows style, start by that.
30368    new_path=`cmd //c echo $path`
30369  fi
30370
30371
30372  input_path="$new_path"
30373  # Check if we need to convert this using DOS-style short mode. If the path
30374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30375  # take no chances and rewrite it.
30376  # Note: m4 eats our [], so we need to use [ and ] instead.
30377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30378  if test "x$has_forbidden_chars" != x; then
30379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30381  fi
30382
30383
30384  windows_path="$new_path"
30385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30386    unix_path=`$CYGPATH -u "$windows_path"`
30387    new_path="$unix_path"
30388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30390    new_path="$unix_path"
30391  fi
30392
30393  if test "x$path" != "x$new_path"; then
30394    BOOT_JDK="$new_path"
30395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30397  fi
30398
30399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30401
30402    else
30403      # We're on a unix platform. Hooray! :)
30404      path="$BOOT_JDK"
30405      has_space=`$ECHO "$path" | $GREP " "`
30406      if test "x$has_space" != x; then
30407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30410      fi
30411
30412      # Use eval to expand a potential ~
30413      eval path="$path"
30414      if test ! -f "$path" && test ! -d "$path"; then
30415        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30416      fi
30417
30418      if test -d "$path"; then
30419        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30420      else
30421        dir="`$DIRNAME "$path"`"
30422        base="`$BASENAME "$path"`"
30423        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30424      fi
30425    fi
30426  fi
30427
30428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30429$as_echo_n "checking for Boot JDK... " >&6; }
30430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30431$as_echo "$BOOT_JDK" >&6; }
30432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30433$as_echo_n "checking Boot JDK version... " >&6; }
30434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30436$as_echo "$BOOT_JDK_VERSION" >&6; }
30437          fi # end check jdk version
30438        fi # end check javac
30439      fi # end check java
30440    fi # end check boot jdk found
30441  fi
30442
30443  fi
30444
30445
30446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30448      # Do we have a bin/java?
30449      if test ! -x "$BOOT_JDK/bin/java"; then
30450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30452        BOOT_JDK_FOUND=no
30453      else
30454        # Do we have a bin/javac?
30455        if test ! -x "$BOOT_JDK/bin/javac"; then
30456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30460          BOOT_JDK_FOUND=no
30461        else
30462          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30463          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30464
30465          # Extra M4 quote needed to protect [] in grep expression.
30466          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30467          if test "x$FOUND_CORRECT_VERSION" = x; then
30468            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30470            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30471$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30472            BOOT_JDK_FOUND=no
30473          else
30474            # We're done! :-)
30475            BOOT_JDK_FOUND=yes
30476
30477  # Only process if variable expands to non-empty
30478
30479  if test "x$BOOT_JDK" != x; then
30480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30481
30482  # Input might be given as Windows format, start by converting to
30483  # unix format.
30484  path="$BOOT_JDK"
30485  new_path=`$CYGPATH -u "$path"`
30486
30487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30490  # "foo.exe" is OK but "foo" is an error.
30491  #
30492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30493  # It is also a way to make sure we got the proper file name for the real test later on.
30494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30495  if test "x$test_shortpath" = x; then
30496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30498    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30499  fi
30500
30501  # Call helper function which possibly converts this using DOS-style short mode.
30502  # If so, the updated path is stored in $new_path.
30503
30504  input_path="$new_path"
30505  # Check if we need to convert this using DOS-style short mode. If the path
30506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30507  # take no chances and rewrite it.
30508  # Note: m4 eats our [], so we need to use [ and ] instead.
30509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30510  if test "x$has_forbidden_chars" != x; then
30511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30515      # Going to short mode and back again did indeed matter. Since short mode is
30516      # case insensitive, let's make it lowercase to improve readability.
30517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30518      # Now convert it back to Unix-style (cygpath)
30519      input_path=`$CYGPATH -u "$shortmode_path"`
30520      new_path="$input_path"
30521    fi
30522  fi
30523
30524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30525  if test "x$test_cygdrive_prefix" = x; then
30526    # As a simple fix, exclude /usr/bin since it's not a real path.
30527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30529      # a path prefixed by /cygdrive for fixpath to work.
30530      new_path="$CYGWIN_ROOT_PATH$input_path"
30531    fi
30532  fi
30533
30534
30535  if test "x$path" != "x$new_path"; then
30536    BOOT_JDK="$new_path"
30537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30539  fi
30540
30541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30542
30543  path="$BOOT_JDK"
30544  has_colon=`$ECHO $path | $GREP ^.:`
30545  new_path="$path"
30546  if test "x$has_colon" = x; then
30547    # Not in mixed or Windows style, start by that.
30548    new_path=`cmd //c echo $path`
30549  fi
30550
30551
30552  input_path="$new_path"
30553  # Check if we need to convert this using DOS-style short mode. If the path
30554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30555  # take no chances and rewrite it.
30556  # Note: m4 eats our [], so we need to use [ and ] instead.
30557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30558  if test "x$has_forbidden_chars" != x; then
30559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30561  fi
30562
30563
30564  windows_path="$new_path"
30565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30566    unix_path=`$CYGPATH -u "$windows_path"`
30567    new_path="$unix_path"
30568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30570    new_path="$unix_path"
30571  fi
30572
30573  if test "x$path" != "x$new_path"; then
30574    BOOT_JDK="$new_path"
30575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30577  fi
30578
30579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30581
30582    else
30583      # We're on a unix platform. Hooray! :)
30584      path="$BOOT_JDK"
30585      has_space=`$ECHO "$path" | $GREP " "`
30586      if test "x$has_space" != x; then
30587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30590      fi
30591
30592      # Use eval to expand a potential ~
30593      eval path="$path"
30594      if test ! -f "$path" && test ! -d "$path"; then
30595        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30596      fi
30597
30598      if test -d "$path"; then
30599        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30600      else
30601        dir="`$DIRNAME "$path"`"
30602        base="`$BASENAME "$path"`"
30603        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30604      fi
30605    fi
30606  fi
30607
30608            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30609$as_echo_n "checking for Boot JDK... " >&6; }
30610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30611$as_echo "$BOOT_JDK" >&6; }
30612            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30613$as_echo_n "checking Boot JDK version... " >&6; }
30614            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30616$as_echo "$BOOT_JDK_VERSION" >&6; }
30617          fi # end check jdk version
30618        fi # end check javac
30619      fi # end check java
30620    fi # end check boot jdk found
30621  fi
30622
30623
30624  # If we haven't found anything yet, we've truly lost. Give up.
30625  if test "x$BOOT_JDK_FOUND" = xno; then
30626
30627  # Print a helpful message on how to acquire the necessary build dependency.
30628  # openjdk is the help tag: freetype, cups, alsa etc
30629  MISSING_DEPENDENCY=openjdk
30630
30631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30632    cygwin_help $MISSING_DEPENDENCY
30633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30634    msys_help $MISSING_DEPENDENCY
30635  else
30636    PKGHANDLER_COMMAND=
30637
30638    case $PKGHANDLER in
30639      apt-get)
30640        apt_help     $MISSING_DEPENDENCY ;;
30641      yum)
30642        yum_help     $MISSING_DEPENDENCY ;;
30643      brew)
30644        brew_help    $MISSING_DEPENDENCY ;;
30645      port)
30646        port_help    $MISSING_DEPENDENCY ;;
30647      pkgutil)
30648        pkgutil_help $MISSING_DEPENDENCY ;;
30649      pkgadd)
30650        pkgadd_help  $MISSING_DEPENDENCY ;;
30651    esac
30652
30653    if test "x$PKGHANDLER_COMMAND" != x; then
30654      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30655    fi
30656  fi
30657
30658    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30659$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30660    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30661$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30662    as_fn_error $? "Cannot continue" "$LINENO" 5
30663  fi
30664
30665
30666
30667  # Setup tools from the Boot JDK.
30668
30669  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30670
30671  # Publish this variable in the help.
30672
30673
30674  if [ -z "${JAVA+x}" ]; then
30675    # The variable is not set by user, try to locate tool using the code snippet
30676
30677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30678$as_echo_n "checking for java in Boot JDK... " >&6; }
30679      JAVA=$BOOT_JDK/bin/java
30680      if test ! -x $JAVA; then
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30682$as_echo "not found" >&6; }
30683        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30684$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30685        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30686      fi
30687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30688$as_echo "ok" >&6; }
30689
30690
30691  else
30692    # The variable is set, but is it from the command line or the environment?
30693
30694    # Try to remove the string !JAVA! from our list.
30695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30697      # If it failed, the variable was not from the command line. Ignore it,
30698      # but warn the user (except for BASH, which is always set by the calling BASH).
30699      if test "xJAVA" != xBASH; then
30700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30701$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30702      fi
30703      # Try to locate tool using the code snippet
30704
30705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30706$as_echo_n "checking for java in Boot JDK... " >&6; }
30707      JAVA=$BOOT_JDK/bin/java
30708      if test ! -x $JAVA; then
30709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30710$as_echo "not found" >&6; }
30711        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30712$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30713        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30714      fi
30715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30716$as_echo "ok" >&6; }
30717
30718
30719    else
30720      # If it succeeded, then it was overridden by the user. We will use it
30721      # for the tool.
30722
30723      # First remove it from the list of overridden variables, so we can test
30724      # for unknown variables in the end.
30725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30726
30727      # Check if we try to supply an empty value
30728      if test "x$JAVA" = x; then
30729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30730$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30732$as_echo_n "checking for JAVA... " >&6; }
30733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30734$as_echo "disabled" >&6; }
30735      else
30736        # Check if the provided tool contains a complete path.
30737        tool_specified="$JAVA"
30738        tool_basename="${tool_specified##*/}"
30739        if test "x$tool_basename" = "x$tool_specified"; then
30740          # A command without a complete path is provided, search $PATH.
30741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30742$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30743          # Extract the first word of "$tool_basename", so it can be a program name with args.
30744set dummy $tool_basename; ac_word=$2
30745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30746$as_echo_n "checking for $ac_word... " >&6; }
30747if ${ac_cv_path_JAVA+:} false; then :
30748  $as_echo_n "(cached) " >&6
30749else
30750  case $JAVA in
30751  [\\/]* | ?:[\\/]*)
30752  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30753  ;;
30754  *)
30755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30756for as_dir in $PATH
30757do
30758  IFS=$as_save_IFS
30759  test -z "$as_dir" && as_dir=.
30760    for ac_exec_ext in '' $ac_executable_extensions; do
30761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30762    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30764    break 2
30765  fi
30766done
30767  done
30768IFS=$as_save_IFS
30769
30770  ;;
30771esac
30772fi
30773JAVA=$ac_cv_path_JAVA
30774if test -n "$JAVA"; then
30775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30776$as_echo "$JAVA" >&6; }
30777else
30778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30779$as_echo "no" >&6; }
30780fi
30781
30782
30783          if test "x$JAVA" = x; then
30784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30785          fi
30786        else
30787          # Otherwise we believe it is a complete path. Use it as it is.
30788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30789$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30791$as_echo_n "checking for JAVA... " >&6; }
30792          if test ! -x "$tool_specified"; then
30793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30794$as_echo "not found" >&6; }
30795            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30796          fi
30797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30798$as_echo "$tool_specified" >&6; }
30799        fi
30800      fi
30801    fi
30802
30803  fi
30804
30805
30806
30807  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30808
30809  # Publish this variable in the help.
30810
30811
30812  if [ -z "${JAVAC+x}" ]; then
30813    # The variable is not set by user, try to locate tool using the code snippet
30814
30815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30816$as_echo_n "checking for javac in Boot JDK... " >&6; }
30817      JAVAC=$BOOT_JDK/bin/javac
30818      if test ! -x $JAVAC; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30820$as_echo "not found" >&6; }
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30822$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30823        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30824      fi
30825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30826$as_echo "ok" >&6; }
30827
30828
30829  else
30830    # The variable is set, but is it from the command line or the environment?
30831
30832    # Try to remove the string !JAVAC! from our list.
30833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30835      # If it failed, the variable was not from the command line. Ignore it,
30836      # but warn the user (except for BASH, which is always set by the calling BASH).
30837      if test "xJAVAC" != xBASH; then
30838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30839$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30840      fi
30841      # Try to locate tool using the code snippet
30842
30843      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30844$as_echo_n "checking for javac in Boot JDK... " >&6; }
30845      JAVAC=$BOOT_JDK/bin/javac
30846      if test ! -x $JAVAC; then
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30848$as_echo "not found" >&6; }
30849        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30850$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30851        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30852      fi
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30854$as_echo "ok" >&6; }
30855
30856
30857    else
30858      # If it succeeded, then it was overridden by the user. We will use it
30859      # for the tool.
30860
30861      # First remove it from the list of overridden variables, so we can test
30862      # for unknown variables in the end.
30863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30864
30865      # Check if we try to supply an empty value
30866      if test "x$JAVAC" = x; then
30867        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30868$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30870$as_echo_n "checking for JAVAC... " >&6; }
30871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30872$as_echo "disabled" >&6; }
30873      else
30874        # Check if the provided tool contains a complete path.
30875        tool_specified="$JAVAC"
30876        tool_basename="${tool_specified##*/}"
30877        if test "x$tool_basename" = "x$tool_specified"; then
30878          # A command without a complete path is provided, search $PATH.
30879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30880$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30881          # Extract the first word of "$tool_basename", so it can be a program name with args.
30882set dummy $tool_basename; ac_word=$2
30883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30884$as_echo_n "checking for $ac_word... " >&6; }
30885if ${ac_cv_path_JAVAC+:} false; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888  case $JAVAC in
30889  [\\/]* | ?:[\\/]*)
30890  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30891  ;;
30892  *)
30893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30894for as_dir in $PATH
30895do
30896  IFS=$as_save_IFS
30897  test -z "$as_dir" && as_dir=.
30898    for ac_exec_ext in '' $ac_executable_extensions; do
30899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30900    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30902    break 2
30903  fi
30904done
30905  done
30906IFS=$as_save_IFS
30907
30908  ;;
30909esac
30910fi
30911JAVAC=$ac_cv_path_JAVAC
30912if test -n "$JAVAC"; then
30913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30914$as_echo "$JAVAC" >&6; }
30915else
30916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30917$as_echo "no" >&6; }
30918fi
30919
30920
30921          if test "x$JAVAC" = x; then
30922            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30923          fi
30924        else
30925          # Otherwise we believe it is a complete path. Use it as it is.
30926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30927$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30929$as_echo_n "checking for JAVAC... " >&6; }
30930          if test ! -x "$tool_specified"; then
30931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30932$as_echo "not found" >&6; }
30933            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30934          fi
30935          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30936$as_echo "$tool_specified" >&6; }
30937        fi
30938      fi
30939    fi
30940
30941  fi
30942
30943
30944
30945  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30946
30947  # Publish this variable in the help.
30948
30949
30950  if [ -z "${JAVAH+x}" ]; then
30951    # The variable is not set by user, try to locate tool using the code snippet
30952
30953      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30954$as_echo_n "checking for javah in Boot JDK... " >&6; }
30955      JAVAH=$BOOT_JDK/bin/javah
30956      if test ! -x $JAVAH; then
30957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30958$as_echo "not found" >&6; }
30959        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30960$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30961        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30962      fi
30963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30964$as_echo "ok" >&6; }
30965
30966
30967  else
30968    # The variable is set, but is it from the command line or the environment?
30969
30970    # Try to remove the string !JAVAH! from our list.
30971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30973      # If it failed, the variable was not from the command line. Ignore it,
30974      # but warn the user (except for BASH, which is always set by the calling BASH).
30975      if test "xJAVAH" != xBASH; then
30976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30977$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30978      fi
30979      # Try to locate tool using the code snippet
30980
30981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30982$as_echo_n "checking for javah in Boot JDK... " >&6; }
30983      JAVAH=$BOOT_JDK/bin/javah
30984      if test ! -x $JAVAH; then
30985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30986$as_echo "not found" >&6; }
30987        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30988$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30989        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30990      fi
30991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30992$as_echo "ok" >&6; }
30993
30994
30995    else
30996      # If it succeeded, then it was overridden by the user. We will use it
30997      # for the tool.
30998
30999      # First remove it from the list of overridden variables, so we can test
31000      # for unknown variables in the end.
31001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31002
31003      # Check if we try to supply an empty value
31004      if test "x$JAVAH" = x; then
31005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31006$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31008$as_echo_n "checking for JAVAH... " >&6; }
31009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31010$as_echo "disabled" >&6; }
31011      else
31012        # Check if the provided tool contains a complete path.
31013        tool_specified="$JAVAH"
31014        tool_basename="${tool_specified##*/}"
31015        if test "x$tool_basename" = "x$tool_specified"; then
31016          # A command without a complete path is provided, search $PATH.
31017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31018$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31019          # Extract the first word of "$tool_basename", so it can be a program name with args.
31020set dummy $tool_basename; ac_word=$2
31021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31022$as_echo_n "checking for $ac_word... " >&6; }
31023if ${ac_cv_path_JAVAH+:} false; then :
31024  $as_echo_n "(cached) " >&6
31025else
31026  case $JAVAH in
31027  [\\/]* | ?:[\\/]*)
31028  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31029  ;;
31030  *)
31031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31032for as_dir in $PATH
31033do
31034  IFS=$as_save_IFS
31035  test -z "$as_dir" && as_dir=.
31036    for ac_exec_ext in '' $ac_executable_extensions; do
31037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31038    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31040    break 2
31041  fi
31042done
31043  done
31044IFS=$as_save_IFS
31045
31046  ;;
31047esac
31048fi
31049JAVAH=$ac_cv_path_JAVAH
31050if test -n "$JAVAH"; then
31051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31052$as_echo "$JAVAH" >&6; }
31053else
31054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31055$as_echo "no" >&6; }
31056fi
31057
31058
31059          if test "x$JAVAH" = x; then
31060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31061          fi
31062        else
31063          # Otherwise we believe it is a complete path. Use it as it is.
31064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31065$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31067$as_echo_n "checking for JAVAH... " >&6; }
31068          if test ! -x "$tool_specified"; then
31069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31070$as_echo "not found" >&6; }
31071            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31072          fi
31073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31074$as_echo "$tool_specified" >&6; }
31075        fi
31076      fi
31077    fi
31078
31079  fi
31080
31081
31082
31083  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31084
31085  # Publish this variable in the help.
31086
31087
31088  if [ -z "${JAR+x}" ]; then
31089    # The variable is not set by user, try to locate tool using the code snippet
31090
31091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31092$as_echo_n "checking for jar in Boot JDK... " >&6; }
31093      JAR=$BOOT_JDK/bin/jar
31094      if test ! -x $JAR; then
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31096$as_echo "not found" >&6; }
31097        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31098$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31099        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31100      fi
31101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31102$as_echo "ok" >&6; }
31103
31104
31105  else
31106    # The variable is set, but is it from the command line or the environment?
31107
31108    # Try to remove the string !JAR! from our list.
31109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31111      # If it failed, the variable was not from the command line. Ignore it,
31112      # but warn the user (except for BASH, which is always set by the calling BASH).
31113      if test "xJAR" != xBASH; then
31114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31115$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31116      fi
31117      # Try to locate tool using the code snippet
31118
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31120$as_echo_n "checking for jar in Boot JDK... " >&6; }
31121      JAR=$BOOT_JDK/bin/jar
31122      if test ! -x $JAR; then
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31124$as_echo "not found" >&6; }
31125        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31126$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31127        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31128      fi
31129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31130$as_echo "ok" >&6; }
31131
31132
31133    else
31134      # If it succeeded, then it was overridden by the user. We will use it
31135      # for the tool.
31136
31137      # First remove it from the list of overridden variables, so we can test
31138      # for unknown variables in the end.
31139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31140
31141      # Check if we try to supply an empty value
31142      if test "x$JAR" = x; then
31143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31144$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31146$as_echo_n "checking for JAR... " >&6; }
31147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31148$as_echo "disabled" >&6; }
31149      else
31150        # Check if the provided tool contains a complete path.
31151        tool_specified="$JAR"
31152        tool_basename="${tool_specified##*/}"
31153        if test "x$tool_basename" = "x$tool_specified"; then
31154          # A command without a complete path is provided, search $PATH.
31155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31156$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31157          # Extract the first word of "$tool_basename", so it can be a program name with args.
31158set dummy $tool_basename; ac_word=$2
31159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31160$as_echo_n "checking for $ac_word... " >&6; }
31161if ${ac_cv_path_JAR+:} false; then :
31162  $as_echo_n "(cached) " >&6
31163else
31164  case $JAR in
31165  [\\/]* | ?:[\\/]*)
31166  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31167  ;;
31168  *)
31169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31170for as_dir in $PATH
31171do
31172  IFS=$as_save_IFS
31173  test -z "$as_dir" && as_dir=.
31174    for ac_exec_ext in '' $ac_executable_extensions; do
31175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31176    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31178    break 2
31179  fi
31180done
31181  done
31182IFS=$as_save_IFS
31183
31184  ;;
31185esac
31186fi
31187JAR=$ac_cv_path_JAR
31188if test -n "$JAR"; then
31189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31190$as_echo "$JAR" >&6; }
31191else
31192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31193$as_echo "no" >&6; }
31194fi
31195
31196
31197          if test "x$JAR" = x; then
31198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31199          fi
31200        else
31201          # Otherwise we believe it is a complete path. Use it as it is.
31202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31203$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31205$as_echo_n "checking for JAR... " >&6; }
31206          if test ! -x "$tool_specified"; then
31207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31208$as_echo "not found" >&6; }
31209            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31210          fi
31211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31212$as_echo "$tool_specified" >&6; }
31213        fi
31214      fi
31215    fi
31216
31217  fi
31218
31219
31220
31221  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31222
31223  # Publish this variable in the help.
31224
31225
31226  if [ -z "${JARSIGNER+x}" ]; then
31227    # The variable is not set by user, try to locate tool using the code snippet
31228
31229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31230$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31231      JARSIGNER=$BOOT_JDK/bin/jarsigner
31232      if test ! -x $JARSIGNER; then
31233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31234$as_echo "not found" >&6; }
31235        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31236$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31237        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31238      fi
31239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31240$as_echo "ok" >&6; }
31241
31242
31243  else
31244    # The variable is set, but is it from the command line or the environment?
31245
31246    # Try to remove the string !JARSIGNER! from our list.
31247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31249      # If it failed, the variable was not from the command line. Ignore it,
31250      # but warn the user (except for BASH, which is always set by the calling BASH).
31251      if test "xJARSIGNER" != xBASH; then
31252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31253$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31254      fi
31255      # Try to locate tool using the code snippet
31256
31257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31258$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31259      JARSIGNER=$BOOT_JDK/bin/jarsigner
31260      if test ! -x $JARSIGNER; then
31261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31262$as_echo "not found" >&6; }
31263        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31264$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31265        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31266      fi
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31268$as_echo "ok" >&6; }
31269
31270
31271    else
31272      # If it succeeded, then it was overridden by the user. We will use it
31273      # for the tool.
31274
31275      # First remove it from the list of overridden variables, so we can test
31276      # for unknown variables in the end.
31277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31278
31279      # Check if we try to supply an empty value
31280      if test "x$JARSIGNER" = x; then
31281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31282$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31284$as_echo_n "checking for JARSIGNER... " >&6; }
31285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31286$as_echo "disabled" >&6; }
31287      else
31288        # Check if the provided tool contains a complete path.
31289        tool_specified="$JARSIGNER"
31290        tool_basename="${tool_specified##*/}"
31291        if test "x$tool_basename" = "x$tool_specified"; then
31292          # A command without a complete path is provided, search $PATH.
31293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31294$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31295          # Extract the first word of "$tool_basename", so it can be a program name with args.
31296set dummy $tool_basename; ac_word=$2
31297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31298$as_echo_n "checking for $ac_word... " >&6; }
31299if ${ac_cv_path_JARSIGNER+:} false; then :
31300  $as_echo_n "(cached) " >&6
31301else
31302  case $JARSIGNER in
31303  [\\/]* | ?:[\\/]*)
31304  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31305  ;;
31306  *)
31307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31308for as_dir in $PATH
31309do
31310  IFS=$as_save_IFS
31311  test -z "$as_dir" && as_dir=.
31312    for ac_exec_ext in '' $ac_executable_extensions; do
31313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31314    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31316    break 2
31317  fi
31318done
31319  done
31320IFS=$as_save_IFS
31321
31322  ;;
31323esac
31324fi
31325JARSIGNER=$ac_cv_path_JARSIGNER
31326if test -n "$JARSIGNER"; then
31327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31328$as_echo "$JARSIGNER" >&6; }
31329else
31330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31331$as_echo "no" >&6; }
31332fi
31333
31334
31335          if test "x$JARSIGNER" = x; then
31336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31337          fi
31338        else
31339          # Otherwise we believe it is a complete path. Use it as it is.
31340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31341$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31343$as_echo_n "checking for JARSIGNER... " >&6; }
31344          if test ! -x "$tool_specified"; then
31345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31346$as_echo "not found" >&6; }
31347            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31348          fi
31349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31350$as_echo "$tool_specified" >&6; }
31351        fi
31352      fi
31353    fi
31354
31355  fi
31356
31357
31358
31359  # Finally, set some other options...
31360
31361  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31362  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31363
31364
31365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31366$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31367  if "$JAVA" --list-modules > /dev/null 2>&1; then
31368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31369$as_echo "yes" >&6; }
31370    BOOT_JDK_MODULAR="true"
31371  else
31372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31373$as_echo "no" >&6; }
31374    BOOT_JDK_MODULAR="false"
31375  fi
31376
31377
31378
31379
31380  # Check if the boot jdk is 32 or 64 bit
31381  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31382    BOOT_JDK_BITS="64"
31383  else
31384    BOOT_JDK_BITS="32"
31385  fi
31386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31387$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31389$as_echo "$BOOT_JDK_BITS" >&6; }
31390
31391
31392
31393# Check whether --with-build-jdk was given.
31394if test "${with_build_jdk+set}" = set; then :
31395  withval=$with_build_jdk;
31396fi
31397
31398
31399  CREATE_BUILDJDK=false
31400  EXTERNAL_BUILDJDK=false
31401  BUILD_JDK_FOUND="no"
31402  if test "x$with_build_jdk" != "x"; then
31403
31404  if test "x$BUILD_JDK_FOUND" = xno; then
31405    # Execute the test
31406
31407       if test "x$with_build_jdk" != x; then
31408         BUILD_JDK=$with_build_jdk
31409         BUILD_JDK_FOUND=maybe
31410         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31411$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31412       fi
31413
31414    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31415    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31416      # Do we have a bin/java?
31417      if test ! -x "$BUILD_JDK/bin/java"; then
31418        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31419$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31420        BUILD_JDK_FOUND=no
31421      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31422        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31423$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31424        BUILD_JDK_FOUND=no
31425      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31427$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31428        BUILD_JDK_FOUND=no
31429      elif test ! -x "$BUILD_JDK/bin/javac"; then
31430        # Do we have a bin/javac?
31431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31432$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31433        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31434$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31435        BUILD_JDK_FOUND=no
31436      else
31437        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31438        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31439
31440        # Extra M4 quote needed to protect [] in grep expression.
31441        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31442        if test "x$FOUND_CORRECT_VERSION" = x; then
31443          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31444$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31445          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31446$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31447          BUILD_JDK_FOUND=no
31448        else
31449          # We're done!
31450          BUILD_JDK_FOUND=yes
31451
31452  # Only process if variable expands to non-empty
31453
31454  if test "x$BUILD_JDK" != x; then
31455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31456
31457  # Input might be given as Windows format, start by converting to
31458  # unix format.
31459  path="$BUILD_JDK"
31460  new_path=`$CYGPATH -u "$path"`
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 precense.
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    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31472$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31473    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31474  fi
31475
31476  # Call helper function which possibly converts this using DOS-style short mode.
31477  # If so, the updated path is stored in $new_path.
31478
31479  input_path="$new_path"
31480  # Check if we need to convert this using DOS-style short mode. If the path
31481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31482  # take no chances and rewrite it.
31483  # Note: m4 eats our [], so we need to use [ and ] instead.
31484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31485  if test "x$has_forbidden_chars" != x; then
31486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31490      # Going to short mode and back again did indeed matter. Since short mode is
31491      # case insensitive, let's make it lowercase to improve readability.
31492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31493      # Now convert it back to Unix-style (cygpath)
31494      input_path=`$CYGPATH -u "$shortmode_path"`
31495      new_path="$input_path"
31496    fi
31497  fi
31498
31499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31500  if test "x$test_cygdrive_prefix" = x; then
31501    # As a simple fix, exclude /usr/bin since it's not a real path.
31502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31504      # a path prefixed by /cygdrive for fixpath to work.
31505      new_path="$CYGWIN_ROOT_PATH$input_path"
31506    fi
31507  fi
31508
31509
31510  if test "x$path" != "x$new_path"; then
31511    BUILD_JDK="$new_path"
31512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31513$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31514  fi
31515
31516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31517
31518  path="$BUILD_JDK"
31519  has_colon=`$ECHO $path | $GREP ^.:`
31520  new_path="$path"
31521  if test "x$has_colon" = x; then
31522    # Not in mixed or Windows style, start by that.
31523    new_path=`cmd //c echo $path`
31524  fi
31525
31526
31527  input_path="$new_path"
31528  # Check if we need to convert this using DOS-style short mode. If the path
31529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31530  # take no chances and rewrite it.
31531  # Note: m4 eats our [], so we need to use [ and ] instead.
31532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31533  if test "x$has_forbidden_chars" != x; then
31534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31536  fi
31537
31538
31539  windows_path="$new_path"
31540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31541    unix_path=`$CYGPATH -u "$windows_path"`
31542    new_path="$unix_path"
31543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31545    new_path="$unix_path"
31546  fi
31547
31548  if test "x$path" != "x$new_path"; then
31549    BUILD_JDK="$new_path"
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31551$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31552  fi
31553
31554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31556
31557    else
31558      # We're on a unix platform. Hooray! :)
31559      path="$BUILD_JDK"
31560      has_space=`$ECHO "$path" | $GREP " "`
31561      if test "x$has_space" != x; then
31562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31563$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31565      fi
31566
31567      # Use eval to expand a potential ~
31568      eval path="$path"
31569      if test ! -f "$path" && test ! -d "$path"; then
31570        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31571      fi
31572
31573      if test -d "$path"; then
31574        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31575      else
31576        dir="`$DIRNAME "$path"`"
31577        base="`$BASENAME "$path"`"
31578        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31579      fi
31580    fi
31581  fi
31582
31583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31584$as_echo_n "checking for Build JDK... " >&6; }
31585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31586$as_echo "$BUILD_JDK" >&6; }
31587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31588$as_echo_n "checking Build JDK version... " >&6; }
31589          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31591$as_echo "$BUILD_JDK_VERSION" >&6; }
31592        fi # end check jdk version
31593      fi # end check java
31594    fi # end check build jdk found
31595  fi
31596
31597    EXTERNAL_BUILDJDK=true
31598  else
31599    if test "x$COMPILE_TYPE" = "xcross"; then
31600      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31601      BUILD_JDK_FOUND=yes
31602      CREATE_BUILDJDK=true
31603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31604$as_echo_n "checking for Build JDK... " >&6; }
31605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31606$as_echo "yes, will build it for the host platform" >&6; }
31607    else
31608      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31609      BUILD_JDK_FOUND=yes
31610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31611$as_echo_n "checking for Build JDK... " >&6; }
31612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31613$as_echo "yes, will use output dir" >&6; }
31614    fi
31615  fi
31616
31617  JMOD="$BUILD_JDK/bin/jmod"
31618  JLINK="$BUILD_JDK/bin/jlink"
31619
31620
31621
31622  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31624$as_echo_n "checking for Build JDK... " >&6; }
31625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31628  fi
31629
31630
31631
31632
31633
31634
31635###############################################################################
31636#
31637# Configure the sources to use. We can add or override individual directories.
31638#
31639###############################################################################
31640
31641
31642  # Where are the sources.
31643  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31644  CORBA_TOPDIR="$SRC_ROOT/corba"
31645  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31646  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31647  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31648  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31649  JDK_TOPDIR="$SRC_ROOT/jdk"
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659  # This feature is no longer supported.
31660
31661
31662
31663# Check whether --with-add-source-root was given.
31664if test "${with_add_source_root+set}" = set; then :
31665  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
31666$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31667fi
31668
31669
31670
31671
31672# Check whether --with-override-source-root was given.
31673if test "${with_override_source_root+set}" = set; then :
31674  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
31675$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31676fi
31677
31678
31679
31680
31681# Check whether --with-adds-and-overrides was given.
31682if test "${with_adds_and_overrides+set}" = set; then :
31683  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
31684$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31685fi
31686
31687
31688
31689
31690# Check whether --with-override-langtools was given.
31691if test "${with_override_langtools+set}" = set; then :
31692  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31693$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31694fi
31695
31696
31697
31698
31699# Check whether --with-override-corba was given.
31700if test "${with_override_corba+set}" = set; then :
31701  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31702$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31703fi
31704
31705
31706
31707
31708# Check whether --with-override-jaxp was given.
31709if test "${with_override_jaxp+set}" = set; then :
31710  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31711$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31712fi
31713
31714
31715
31716
31717# Check whether --with-override-jaxws was given.
31718if test "${with_override_jaxws+set}" = set; then :
31719  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31720$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31721fi
31722
31723
31724
31725
31726# Check whether --with-override-hotspot was given.
31727if test "${with_override_hotspot+set}" = set; then :
31728  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31729$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31730fi
31731
31732
31733
31734
31735# Check whether --with-override-nashorn was given.
31736if test "${with_override_nashorn+set}" = set; then :
31737  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31738$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31739fi
31740
31741
31742
31743
31744# Check whether --with-override-jdk was given.
31745if test "${with_override_jdk+set}" = set; then :
31746  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31747$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31748fi
31749
31750
31751
31752
31753  BUILD_OUTPUT="$OUTPUT_ROOT"
31754
31755  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31756
31757
31758
31759# Check whether --with-import_hotspot was given.
31760if test "${with_import_hotspot+set}" = set; then :
31761  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31762$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31763fi
31764
31765
31766
31767
31768
31769
31770# Check whether --with-import-modules was given.
31771if test "${with_import_modules+set}" = set; then :
31772  withval=$with_import_modules;
31773fi
31774
31775
31776  if test "x$with_import_modules" != x \
31777      && test "x$with_import_modules" != "xno"; then
31778    if test -d "$with_import_modules"; then
31779      IMPORT_MODULES_TOPDIR="$with_import_modules"
31780
31781  # Only process if variable expands to non-empty
31782
31783  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785
31786  # Input might be given as Windows format, start by converting to
31787  # unix format.
31788  path="$IMPORT_MODULES_TOPDIR"
31789  new_path=`$CYGPATH -u "$path"`
31790
31791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31794  # "foo.exe" is OK but "foo" is an error.
31795  #
31796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31797  # It is also a way to make sure we got the proper file name for the real test later on.
31798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31799  if test "x$test_shortpath" = x; then
31800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31801$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31802    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31803  fi
31804
31805  # Call helper function which possibly converts this using DOS-style short mode.
31806  # If so, the updated path is stored in $new_path.
31807
31808  input_path="$new_path"
31809  # Check if we need to convert this using DOS-style short mode. If the path
31810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31811  # take no chances and rewrite it.
31812  # Note: m4 eats our [], so we need to use [ and ] instead.
31813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31814  if test "x$has_forbidden_chars" != x; then
31815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31819      # Going to short mode and back again did indeed matter. Since short mode is
31820      # case insensitive, let's make it lowercase to improve readability.
31821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31822      # Now convert it back to Unix-style (cygpath)
31823      input_path=`$CYGPATH -u "$shortmode_path"`
31824      new_path="$input_path"
31825    fi
31826  fi
31827
31828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31829  if test "x$test_cygdrive_prefix" = x; then
31830    # As a simple fix, exclude /usr/bin since it's not a real path.
31831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31833      # a path prefixed by /cygdrive for fixpath to work.
31834      new_path="$CYGWIN_ROOT_PATH$input_path"
31835    fi
31836  fi
31837
31838
31839  if test "x$path" != "x$new_path"; then
31840    IMPORT_MODULES_TOPDIR="$new_path"
31841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31842$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31843  fi
31844
31845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31846
31847  path="$IMPORT_MODULES_TOPDIR"
31848  has_colon=`$ECHO $path | $GREP ^.:`
31849  new_path="$path"
31850  if test "x$has_colon" = x; then
31851    # Not in mixed or Windows style, start by that.
31852    new_path=`cmd //c echo $path`
31853  fi
31854
31855
31856  input_path="$new_path"
31857  # Check if we need to convert this using DOS-style short mode. If the path
31858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31859  # take no chances and rewrite it.
31860  # Note: m4 eats our [], so we need to use [ and ] instead.
31861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31862  if test "x$has_forbidden_chars" != x; then
31863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31865  fi
31866
31867
31868  windows_path="$new_path"
31869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870    unix_path=`$CYGPATH -u "$windows_path"`
31871    new_path="$unix_path"
31872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874    new_path="$unix_path"
31875  fi
31876
31877  if test "x$path" != "x$new_path"; then
31878    IMPORT_MODULES_TOPDIR="$new_path"
31879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31880$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31881  fi
31882
31883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31885
31886    else
31887      # We're on a unix platform. Hooray! :)
31888      path="$IMPORT_MODULES_TOPDIR"
31889      has_space=`$ECHO "$path" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31892$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31894      fi
31895
31896      # Use eval to expand a potential ~
31897      eval path="$path"
31898      if test ! -f "$path" && test ! -d "$path"; then
31899        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31900      fi
31901
31902      if test -d "$path"; then
31903        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31904      else
31905        dir="`$DIRNAME "$path"`"
31906        base="`$BASENAME "$path"`"
31907        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31908      fi
31909    fi
31910  fi
31911
31912    elif test -e "$with_import_modules"; then
31913      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31914      $RM -rf "$IMPORT_MODULES_TOPDIR"
31915      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31916      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31917        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31918      fi
31919    else
31920      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31921    fi
31922  fi
31923
31924  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31925    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31926  fi
31927  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31928    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31929  fi
31930  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31931    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31932  fi
31933  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31934    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31935  fi
31936  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31937    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31938  fi
31939  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31940    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31941  fi
31942  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31943    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31944  fi
31945  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31946    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31947  fi
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959###############################################################################
31960#
31961# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31962# native code.
31963#
31964###############################################################################
31965
31966# See if we are doing a complete static build or not
31967
31968  # Check whether --enable-static-build was given.
31969if test "${enable_static_build+set}" = set; then :
31970  enableval=$enable_static_build;
31971fi
31972
31973  STATIC_BUILD=false
31974  if test "x$enable_static_build" = "xyes"; then
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31976$as_echo_n "checking if static build is enabled... " >&6; }
31977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31978$as_echo "yes" >&6; }
31979    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31980      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31981    fi
31982    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31983    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31984    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31985    STATIC_BUILD=true
31986  elif test "x$enable_static_build" = "xno"; then
31987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31988$as_echo_n "checking if static build is enabled... " >&6; }
31989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31990$as_echo "no" >&6; }
31991  elif test "x$enable_static_build" != "x"; then
31992    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31993  fi
31994
31995
31996
31997
31998# First determine the toolchain type (compiler family)
31999
32000
32001# Check whether --with-toolchain-type was given.
32002if test "${with_toolchain_type+set}" = set; then :
32003  withval=$with_toolchain_type;
32004fi
32005
32006
32007  # Use indirect variable referencing
32008  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32009  VALID_TOOLCHAINS=${!toolchain_var_name}
32010
32011  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32012    if test -n "$XCODEBUILD"; then
32013      # On Mac OS X, default toolchain to clang after Xcode 5
32014      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32015      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32016      if test $? -ne 0; then
32017        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32018      fi
32019      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32020          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32021          $CUT -f 1 -d .`
32022      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32023$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32024      if test $XCODE_MAJOR_VERSION -ge 5; then
32025          DEFAULT_TOOLCHAIN="clang"
32026      else
32027          DEFAULT_TOOLCHAIN="gcc"
32028      fi
32029    else
32030      # If Xcode is not installed, but the command line tools are
32031      # then we can't run xcodebuild. On these systems we should
32032      # default to clang
32033      DEFAULT_TOOLCHAIN="clang"
32034    fi
32035  else
32036    # First toolchain type in the list is the default
32037    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32038  fi
32039
32040  if test "x$with_toolchain_type" = xlist; then
32041    # List all toolchains
32042    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32043$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32044    for toolchain in $VALID_TOOLCHAINS; do
32045      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32046      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32047      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32048    done
32049
32050    exit 0
32051  elif test "x$with_toolchain_type" != x; then
32052    # User override; check that it is valid
32053    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32054      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32055$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32057$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32058      as_fn_error $? "Cannot continue." "$LINENO" 5
32059    fi
32060    TOOLCHAIN_TYPE=$with_toolchain_type
32061  else
32062    # No flag given, use default
32063    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32064  fi
32065
32066
32067  TOOLCHAIN_CC_BINARY_clang="clang"
32068  TOOLCHAIN_CC_BINARY_gcc="gcc"
32069  TOOLCHAIN_CC_BINARY_microsoft="cl"
32070  TOOLCHAIN_CC_BINARY_solstudio="cc"
32071  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32072
32073  TOOLCHAIN_CXX_BINARY_clang="clang++"
32074  TOOLCHAIN_CXX_BINARY_gcc="g++"
32075  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32076  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32077  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32078
32079  # Use indirect variable referencing
32080  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32081  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32082  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32083  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32084  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32085  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32086  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32087  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32088
32089
32090  # Define filename patterns
32091  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32092    LIBRARY_PREFIX=
32093    SHARED_LIBRARY_SUFFIX='.dll'
32094    STATIC_LIBRARY_SUFFIX='.lib'
32095    SHARED_LIBRARY='$1.dll'
32096    STATIC_LIBRARY='$1.lib'
32097    OBJ_SUFFIX='.obj'
32098    EXE_SUFFIX='.exe'
32099  else
32100    LIBRARY_PREFIX=lib
32101    SHARED_LIBRARY_SUFFIX='.so'
32102    STATIC_LIBRARY_SUFFIX='.a'
32103    SHARED_LIBRARY='lib$1.so'
32104    STATIC_LIBRARY='lib$1.a'
32105    OBJ_SUFFIX='.o'
32106    EXE_SUFFIX=''
32107    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32108      # For full static builds, we're overloading the SHARED_LIBRARY
32109      # variables in order to limit the amount of changes required.
32110      # It would be better to remove SHARED and just use LIBRARY and
32111      # LIBRARY_SUFFIX for libraries that can be built either
32112      # shared or static and use STATIC_* for libraries that are
32113      # always built statically.
32114      if test "x$STATIC_BUILD" = xtrue; then
32115        SHARED_LIBRARY='lib$1.a'
32116        SHARED_LIBRARY_SUFFIX='.a'
32117      else
32118        SHARED_LIBRARY='lib$1.dylib'
32119        SHARED_LIBRARY_SUFFIX='.dylib'
32120      fi
32121    fi
32122  fi
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32134    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32135$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32136  else
32137    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32138$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32139  fi
32140
32141
32142# User supplied flags should be used when configure detects compilers
32143
32144  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32146$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32147  fi
32148
32149  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32151$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32152  fi
32153
32154  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32156$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32157  fi
32158
32159
32160# Check whether --with-extra-cflags was given.
32161if test "${with_extra_cflags+set}" = set; then :
32162  withval=$with_extra_cflags;
32163fi
32164
32165
32166
32167# Check whether --with-extra-cxxflags was given.
32168if test "${with_extra_cxxflags+set}" = set; then :
32169  withval=$with_extra_cxxflags;
32170fi
32171
32172
32173
32174# Check whether --with-extra-ldflags was given.
32175if test "${with_extra_ldflags+set}" = set; then :
32176  withval=$with_extra_ldflags;
32177fi
32178
32179
32180  EXTRA_CFLAGS="$with_extra_cflags"
32181  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32182  EXTRA_LDFLAGS="$with_extra_ldflags"
32183
32184
32185
32186
32187
32188  # The global CFLAGS and LDLAGS variables are used by configure tests and
32189  # should include the extra parameters
32190  CFLAGS="$EXTRA_CFLAGS"
32191  CXXFLAGS="$EXTRA_CXXFLAGS"
32192  LDFLAGS="$EXTRA_LDFLAGS"
32193  CPPFLAGS=""
32194
32195# The sysroot cflags are needed for configure to be able to run the compilers
32196
32197  if test "x$SYSROOT" != "x"; then
32198    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32199      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32200        # Solaris Studio does not have a concept of sysroot. Instead we must
32201        # make sure the default include and lib dirs are appended to each
32202        # compile and link command line. Must also add -I-xbuiltin to enable
32203        # inlining of system functions and intrinsics.
32204        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32205        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32206            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32207      fi
32208    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32209      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32210      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32211    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32212      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32213      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32214    fi
32215    # The global CFLAGS and LDFLAGS variables need these for configure to function
32216    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32217    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32218    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32219    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32220  fi
32221
32222  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32223    # We also need -iframework<path>/System/Library/Frameworks
32224    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32225    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32226    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32227    # set this here so it doesn't have to be peppered throughout the forest
32228    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32229    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32230  fi
32231
32232
32233
32234
32235
32236# Then detect the actual binaries needed
32237
32238  # FIXME: Is this needed?
32239  ac_ext=cpp
32240ac_cpp='$CXXCPP $CPPFLAGS'
32241ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32242ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32243ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32244
32245
32246  # Store the CFLAGS etc passed to the configure script.
32247  ORG_CFLAGS="$CFLAGS"
32248  ORG_CXXFLAGS="$CXXFLAGS"
32249
32250  # autoconf magic only relies on PATH, so update it if tools dir is specified
32251  OLD_PATH="$PATH"
32252
32253  # On Windows, we need to detect the visual studio installation first.
32254  # This will change the PATH, but we need to keep that new PATH even
32255  # after toolchain detection is done, since the compiler (on x86) uses
32256  # it for DLL resolution in runtime.
32257  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32258      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32259
32260  # Store path to cygwin link.exe to help excluding it when searching for
32261  # VS linker. This must be done before changing the PATH when looking for VS.
32262  # Extract the first word of "link", so it can be a program name with args.
32263set dummy link; ac_word=$2
32264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32265$as_echo_n "checking for $ac_word... " >&6; }
32266if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32267  $as_echo_n "(cached) " >&6
32268else
32269  case $CYGWIN_LINK in
32270  [\\/]* | ?:[\\/]*)
32271  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32272  ;;
32273  *)
32274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32275for as_dir in $PATH
32276do
32277  IFS=$as_save_IFS
32278  test -z "$as_dir" && as_dir=.
32279    for ac_exec_ext in '' $ac_executable_extensions; do
32280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32281    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32283    break 2
32284  fi
32285done
32286  done
32287IFS=$as_save_IFS
32288
32289  ;;
32290esac
32291fi
32292CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32293if test -n "$CYGWIN_LINK"; then
32294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32295$as_echo "$CYGWIN_LINK" >&6; }
32296else
32297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32298$as_echo "no" >&6; }
32299fi
32300
32301
32302  if test "x$CYGWIN_LINK" != x; then
32303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32304$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32305    "$CYGWIN_LINK" --version > /dev/null
32306    if test $? -eq 0 ; then
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32308$as_echo "yes" >&6; }
32309    else
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32311$as_echo "no" >&6; }
32312      # This might be the VS linker. Don't exclude it later on.
32313      CYGWIN_LINK=""
32314    fi
32315  fi
32316
32317  # First-hand choice is to locate and run the vsvars bat file.
32318
32319
32320# Check whether --with-toolchain-version was given.
32321if test "${with_toolchain_version+set}" = set; then :
32322  withval=$with_toolchain_version;
32323fi
32324
32325
32326  if test "x$with_toolchain_version" = xlist; then
32327    # List all toolchains
32328    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32329$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32330    for version in $VALID_VS_VERSIONS; do
32331      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32332      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32333    done
32334
32335    exit 0
32336  elif test "x$DEVKIT_VS_VERSION" != x; then
32337    VS_VERSION=$DEVKIT_VS_VERSION
32338    TOOLCHAIN_VERSION=$VS_VERSION
32339    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32340    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32341    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32342    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32343    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32344    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32345
32346    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32347    # can still be exported as INCLUDE for compiler invocations without
32348    # SYSROOT_CFLAGS
32349    OLDIFS="$IFS"
32350    IFS=";"
32351    for i in $DEVKIT_VS_INCLUDE; do
32352      ipath=$i
32353
32354  unix_path="$ipath"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    windows_path=`$CYGPATH -m "$unix_path"`
32357    ipath="$windows_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    windows_path=`cmd //c echo $unix_path`
32360    ipath="$windows_path"
32361  fi
32362
32363      VS_INCLUDE="$VS_INCLUDE;$ipath"
32364    done
32365    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32366    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32367    for i in $DEVKIT_VS_LIB; do
32368      libpath=$i
32369
32370  unix_path="$libpath"
32371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32372    windows_path=`$CYGPATH -m "$unix_path"`
32373    libpath="$windows_path"
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375    windows_path=`cmd //c echo $unix_path`
32376    libpath="$windows_path"
32377  fi
32378
32379      VS_LIB="$VS_LIB;$libpath"
32380    done
32381    IFS="$OLDIFS"
32382
32383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32384$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32385
32386  elif test "x$with_toolchain_version" != x; then
32387    # User override; check that it is valid
32388    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32389      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32390$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32391      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32392$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32393      as_fn_error $? "Cannot continue." "$LINENO" 5
32394    fi
32395    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32396  else
32397    # No flag given, use default
32398    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32399  fi
32400
32401  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32402
32403  VS_VERSION="$VS_VERSION"
32404  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32405  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32406  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32407  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32408
32409  # When using --with-tools-dir, assume it points to the correct and default
32410  # version of Visual Studio or that --with-toolchain-version was also set.
32411  if test "x$with_tools_dir" != x; then
32412
32413  if test "x$VS_ENV_CMD" = x; then
32414    VS_VERSION="${VS_VERSION}"
32415    VS_BASE="$with_tools_dir/../.."
32416    METHOD="--with-tools-dir"
32417
32418    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32419      VCVARSFILE="vc/bin/vcvars32.bat"
32420    else
32421      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32422    fi
32423
32424
32425  windows_path="$VS_BASE"
32426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32427    unix_path=`$CYGPATH -u "$windows_path"`
32428    VS_BASE="$unix_path"
32429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32431    VS_BASE="$unix_path"
32432  fi
32433
32434    if test -d "$VS_BASE"; then
32435      if test -f "$VS_BASE/$VCVARSFILE"; then
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32437$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32438        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32439        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32440        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32441        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32442      else
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32444$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32445        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32446$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32447      fi
32448    fi
32449  fi
32450
32451
32452  if test "x$VS_ENV_CMD" = x; then
32453    VS_VERSION="${VS_VERSION}"
32454    VS_BASE="$with_tools_dir/../../.."
32455    METHOD="--with-tools-dir"
32456
32457    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32458      VCVARSFILE="vc/bin/vcvars32.bat"
32459    else
32460      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32461    fi
32462
32463
32464  windows_path="$VS_BASE"
32465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32466    unix_path=`$CYGPATH -u "$windows_path"`
32467    VS_BASE="$unix_path"
32468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32470    VS_BASE="$unix_path"
32471  fi
32472
32473    if test -d "$VS_BASE"; then
32474      if test -f "$VS_BASE/$VCVARSFILE"; then
32475        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32476$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32477        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32478        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32479        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32480        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32481      else
32482        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32483$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32484        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32485$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32486      fi
32487    fi
32488  fi
32489
32490    if test "x$VS_ENV_CMD" = x; then
32491      # Having specified an argument which is incorrect will produce an instant failure;
32492      # we should not go on looking
32493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32494$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32495      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32496$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32497      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32498$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32499      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32500    fi
32501  fi
32502
32503  VS_ENV_CMD=""
32504  VS_ENV_ARGS=""
32505
32506  if test "x$VS_COMNTOOLS" != x; then
32507
32508  if test "x$VS_ENV_CMD" = x; then
32509    VS_VERSION="${VS_VERSION}"
32510    VS_BASE="$VS_COMNTOOLS/../.."
32511    METHOD="$VS_COMNTOOLS_VAR variable"
32512
32513    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32514      VCVARSFILE="vc/bin/vcvars32.bat"
32515    else
32516      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32517    fi
32518
32519
32520  windows_path="$VS_BASE"
32521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32522    unix_path=`$CYGPATH -u "$windows_path"`
32523    VS_BASE="$unix_path"
32524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32526    VS_BASE="$unix_path"
32527  fi
32528
32529    if test -d "$VS_BASE"; then
32530      if test -f "$VS_BASE/$VCVARSFILE"; then
32531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32532$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32533        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32534        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32535        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32536        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32537      else
32538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32539$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32540        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32541$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32542      fi
32543    fi
32544  fi
32545
32546  fi
32547  if test "x$PROGRAMFILES" != x; then
32548
32549  if test "x$VS_ENV_CMD" = x; then
32550    VS_VERSION="${VS_VERSION}"
32551    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32552    METHOD="well-known name"
32553
32554    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32555      VCVARSFILE="vc/bin/vcvars32.bat"
32556    else
32557      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32558    fi
32559
32560
32561  windows_path="$VS_BASE"
32562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32563    unix_path=`$CYGPATH -u "$windows_path"`
32564    VS_BASE="$unix_path"
32565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32567    VS_BASE="$unix_path"
32568  fi
32569
32570    if test -d "$VS_BASE"; then
32571      if test -f "$VS_BASE/$VCVARSFILE"; then
32572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32573$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32574        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32575        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32576        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32577        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32578      else
32579        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32580$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32581        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32582$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32583      fi
32584    fi
32585  fi
32586
32587  fi
32588  # Work around the insanely named ProgramFiles(x86) env variable
32589  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32590  if test "x$PROGRAMFILES_X86" != x; then
32591
32592  if test "x$VS_ENV_CMD" = x; then
32593    VS_VERSION="${VS_VERSION}"
32594    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32595    METHOD="well-known name"
32596
32597    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32598      VCVARSFILE="vc/bin/vcvars32.bat"
32599    else
32600      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32601    fi
32602
32603
32604  windows_path="$VS_BASE"
32605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32606    unix_path=`$CYGPATH -u "$windows_path"`
32607    VS_BASE="$unix_path"
32608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32610    VS_BASE="$unix_path"
32611  fi
32612
32613    if test -d "$VS_BASE"; then
32614      if test -f "$VS_BASE/$VCVARSFILE"; then
32615        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32616$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32617        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32618        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32619        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32620        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32621      else
32622        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32623$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32624        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32625$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32626      fi
32627    fi
32628  fi
32629
32630  fi
32631
32632  if test "x$VS_ENV_CMD" = x; then
32633    VS_VERSION="${VS_VERSION}"
32634    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32635    METHOD="well-known name"
32636
32637    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32638      VCVARSFILE="vc/bin/vcvars32.bat"
32639    else
32640      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32641    fi
32642
32643
32644  windows_path="$VS_BASE"
32645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32646    unix_path=`$CYGPATH -u "$windows_path"`
32647    VS_BASE="$unix_path"
32648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32650    VS_BASE="$unix_path"
32651  fi
32652
32653    if test -d "$VS_BASE"; then
32654      if test -f "$VS_BASE/$VCVARSFILE"; then
32655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32656$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32657        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32658        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32659        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32660        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32661      else
32662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32663$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32665$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32666      fi
32667    fi
32668  fi
32669
32670
32671  if test "x$VS_ENV_CMD" = x; then
32672    VS_VERSION="${VS_VERSION}"
32673    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32674    METHOD="well-known name"
32675
32676    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32677      VCVARSFILE="vc/bin/vcvars32.bat"
32678    else
32679      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32680    fi
32681
32682
32683  windows_path="$VS_BASE"
32684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32685    unix_path=`$CYGPATH -u "$windows_path"`
32686    VS_BASE="$unix_path"
32687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32689    VS_BASE="$unix_path"
32690  fi
32691
32692    if test -d "$VS_BASE"; then
32693      if test -f "$VS_BASE/$VCVARSFILE"; then
32694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32695$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32696        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32697        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32698        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32699        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32700      else
32701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32702$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32705      fi
32706    fi
32707  fi
32708
32709
32710  if test "x$SDK_INSTALL_DIR" != x; then
32711    if test "x$ProgramW6432" != x; then
32712
32713  if test "x$VS_ENV_CMD" = x; then
32714    VS_VERSION="${VS_VERSION}"
32715    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32716    METHOD="well-known name"
32717
32718  windows_path="$WIN_SDK_BASE"
32719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32720    unix_path=`$CYGPATH -u "$windows_path"`
32721    WIN_SDK_BASE="$unix_path"
32722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32724    WIN_SDK_BASE="$unix_path"
32725  fi
32726
32727    if test -d "$WIN_SDK_BASE"; then
32728      # There have been cases of partial or broken SDK installations. A missing
32729      # lib dir is not going to work.
32730      if test ! -d "$WIN_SDK_BASE/lib"; then
32731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32732$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32734$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32735      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32737$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32738        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32739        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32740          VS_ENV_ARGS="/x86"
32741        else
32742          VS_ENV_ARGS="/x64"
32743        fi
32744        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32745        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32746        # TODO: improve detection for other versions of SDK
32747        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32748      else
32749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32750$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32751        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32752$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32753      fi
32754    fi
32755  fi
32756
32757    fi
32758    if test "x$PROGRAMW6432" != x; then
32759
32760  if test "x$VS_ENV_CMD" = x; then
32761    VS_VERSION="${VS_VERSION}"
32762    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32763    METHOD="well-known name"
32764
32765  windows_path="$WIN_SDK_BASE"
32766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32767    unix_path=`$CYGPATH -u "$windows_path"`
32768    WIN_SDK_BASE="$unix_path"
32769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32771    WIN_SDK_BASE="$unix_path"
32772  fi
32773
32774    if test -d "$WIN_SDK_BASE"; then
32775      # There have been cases of partial or broken SDK installations. A missing
32776      # lib dir is not going to work.
32777      if test ! -d "$WIN_SDK_BASE/lib"; then
32778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32779$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32780        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32781$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32782      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32784$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32785        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32786        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32787          VS_ENV_ARGS="/x86"
32788        else
32789          VS_ENV_ARGS="/x64"
32790        fi
32791        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32792        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32793        # TODO: improve detection for other versions of SDK
32794        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32795      else
32796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32797$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32799$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32800      fi
32801    fi
32802  fi
32803
32804    fi
32805    if test "x$PROGRAMFILES" != x; then
32806
32807  if test "x$VS_ENV_CMD" = x; then
32808    VS_VERSION="${VS_VERSION}"
32809    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32810    METHOD="well-known name"
32811
32812  windows_path="$WIN_SDK_BASE"
32813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32814    unix_path=`$CYGPATH -u "$windows_path"`
32815    WIN_SDK_BASE="$unix_path"
32816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32818    WIN_SDK_BASE="$unix_path"
32819  fi
32820
32821    if test -d "$WIN_SDK_BASE"; then
32822      # There have been cases of partial or broken SDK installations. A missing
32823      # lib dir is not going to work.
32824      if test ! -d "$WIN_SDK_BASE/lib"; then
32825        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32826$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32827        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32828$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32829      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32830        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32831$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32832        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32833        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32834          VS_ENV_ARGS="/x86"
32835        else
32836          VS_ENV_ARGS="/x64"
32837        fi
32838        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32839        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32840        # TODO: improve detection for other versions of SDK
32841        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32842      else
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32844$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32846$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32847      fi
32848    fi
32849  fi
32850
32851    fi
32852
32853  if test "x$VS_ENV_CMD" = x; then
32854    VS_VERSION="${VS_VERSION}"
32855    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32856    METHOD="well-known name"
32857
32858  windows_path="$WIN_SDK_BASE"
32859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32860    unix_path=`$CYGPATH -u "$windows_path"`
32861    WIN_SDK_BASE="$unix_path"
32862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32864    WIN_SDK_BASE="$unix_path"
32865  fi
32866
32867    if test -d "$WIN_SDK_BASE"; then
32868      # There have been cases of partial or broken SDK installations. A missing
32869      # lib dir is not going to work.
32870      if test ! -d "$WIN_SDK_BASE/lib"; then
32871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32872$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32874$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32875      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32877$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32878        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32879        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32880          VS_ENV_ARGS="/x86"
32881        else
32882          VS_ENV_ARGS="/x64"
32883        fi
32884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32886        # TODO: improve detection for other versions of SDK
32887        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32888      else
32889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32892$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32893      fi
32894    fi
32895  fi
32896
32897
32898  if test "x$VS_ENV_CMD" = x; then
32899    VS_VERSION="${VS_VERSION}"
32900    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32901    METHOD="well-known name"
32902
32903  windows_path="$WIN_SDK_BASE"
32904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32905    unix_path=`$CYGPATH -u "$windows_path"`
32906    WIN_SDK_BASE="$unix_path"
32907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32909    WIN_SDK_BASE="$unix_path"
32910  fi
32911
32912    if test -d "$WIN_SDK_BASE"; then
32913      # There have been cases of partial or broken SDK installations. A missing
32914      # lib dir is not going to work.
32915      if test ! -d "$WIN_SDK_BASE/lib"; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32917$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32919$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32920      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32923        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32924        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32925          VS_ENV_ARGS="/x86"
32926        else
32927          VS_ENV_ARGS="/x64"
32928        fi
32929        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32930        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32931        # TODO: improve detection for other versions of SDK
32932        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32933      else
32934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32937$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32938      fi
32939    fi
32940  fi
32941
32942  fi
32943
32944    if test "x$VS_ENV_CMD" != x; then
32945      TOOLCHAIN_VERSION=$VS_VERSION
32946      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32947      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32948      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32949      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32950      # The rest of the variables are already evaled while probing
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32952$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32953      break
32954    fi
32955  done
32956
32957
32958  # If we have a devkit, skip all of the below.
32959  if test "x$DEVKIT_VS_VERSION" = x; then
32960    if test "x$VS_ENV_CMD" != x; then
32961      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32962
32963  # Only process if variable expands to non-empty
32964
32965  if test "x$VS_ENV_CMD" != x; then
32966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32967
32968  # First separate the path from the arguments. This will split at the first
32969  # space.
32970  complete="$VS_ENV_CMD"
32971  path="${complete%% *}"
32972  tmp="$complete EOL"
32973  arguments="${tmp#* }"
32974
32975  # Input might be given as Windows format, start by converting to
32976  # unix format.
32977  new_path=`$CYGPATH -u "$path"`
32978
32979  # Now try to locate executable using which
32980  new_path=`$WHICH "$new_path" 2> /dev/null`
32981  # bat and cmd files are not always considered executable in cygwin causing which
32982  # to not find them
32983  if test "x$new_path" = x \
32984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32986    new_path=`$CYGPATH -u "$path"`
32987  fi
32988  if test "x$new_path" = x; then
32989    # Oops. Which didn't find the executable.
32990    # The splitting of arguments from the executable at a space might have been incorrect,
32991    # since paths with space are more likely in Windows. Give it another try with the whole
32992    # argument.
32993    path="$complete"
32994    arguments="EOL"
32995    new_path=`$CYGPATH -u "$path"`
32996    new_path=`$WHICH "$new_path" 2> /dev/null`
32997    # bat and cmd files are not always considered executable in cygwin causing which
32998    # to not find them
32999    if test "x$new_path" = x \
33000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33002      new_path=`$CYGPATH -u "$path"`
33003    fi
33004    if test "x$new_path" = x; then
33005      # It's still not found. Now this is an unrecoverable error.
33006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33007$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33008      has_space=`$ECHO "$complete" | $GREP " "`
33009      if test "x$has_space" != x; then
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33012      fi
33013      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33014    fi
33015  fi
33016
33017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33020  # "foo.exe" is OK but "foo" is an error.
33021  #
33022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33023  # It is also a way to make sure we got the proper file name for the real test later on.
33024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33025  if test "x$test_shortpath" = x; then
33026    # Short path failed, file does not exist as specified.
33027    # Try adding .exe or .cmd
33028    if test -f "${new_path}.exe"; then
33029      input_to_shortpath="${new_path}.exe"
33030    elif test -f "${new_path}.cmd"; then
33031      input_to_shortpath="${new_path}.cmd"
33032    else
33033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33034$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33037      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33038    fi
33039  else
33040    input_to_shortpath="$new_path"
33041  fi
33042
33043  # Call helper function which possibly converts this using DOS-style short mode.
33044  # If so, the updated path is stored in $new_path.
33045  new_path="$input_to_shortpath"
33046
33047  input_path="$input_to_shortpath"
33048  # Check if we need to convert this using DOS-style short mode. If the path
33049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33050  # take no chances and rewrite it.
33051  # Note: m4 eats our [], so we need to use [ and ] instead.
33052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33053  if test "x$has_forbidden_chars" != x; then
33054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33058      # Going to short mode and back again did indeed matter. Since short mode is
33059      # case insensitive, let's make it lowercase to improve readability.
33060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33061      # Now convert it back to Unix-style (cygpath)
33062      input_path=`$CYGPATH -u "$shortmode_path"`
33063      new_path="$input_path"
33064    fi
33065  fi
33066
33067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33068  if test "x$test_cygdrive_prefix" = x; then
33069    # As a simple fix, exclude /usr/bin since it's not a real path.
33070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33072      # a path prefixed by /cygdrive for fixpath to work.
33073      new_path="$CYGWIN_ROOT_PATH$input_path"
33074    fi
33075  fi
33076
33077  # remove trailing .exe if any
33078  new_path="${new_path/%.exe/}"
33079
33080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33081
33082  # First separate the path from the arguments. This will split at the first
33083  # space.
33084  complete="$VS_ENV_CMD"
33085  path="${complete%% *}"
33086  tmp="$complete EOL"
33087  arguments="${tmp#* }"
33088
33089  # Input might be given as Windows format, start by converting to
33090  # unix format.
33091  new_path="$path"
33092
33093  windows_path="$new_path"
33094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33095    unix_path=`$CYGPATH -u "$windows_path"`
33096    new_path="$unix_path"
33097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33099    new_path="$unix_path"
33100  fi
33101
33102
33103  # Now try to locate executable using which
33104  new_path=`$WHICH "$new_path" 2> /dev/null`
33105
33106  if test "x$new_path" = x; then
33107    # Oops. Which didn't find the executable.
33108    # The splitting of arguments from the executable at a space might have been incorrect,
33109    # since paths with space are more likely in Windows. Give it another try with the whole
33110    # argument.
33111    path="$complete"
33112    arguments="EOL"
33113    new_path="$path"
33114
33115  windows_path="$new_path"
33116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33117    unix_path=`$CYGPATH -u "$windows_path"`
33118    new_path="$unix_path"
33119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33121    new_path="$unix_path"
33122  fi
33123
33124
33125    new_path=`$WHICH "$new_path" 2> /dev/null`
33126    # bat and cmd files are not always considered executable in MSYS causing which
33127    # to not find them
33128    if test "x$new_path" = x \
33129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33131      new_path="$path"
33132
33133  windows_path="$new_path"
33134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33135    unix_path=`$CYGPATH -u "$windows_path"`
33136    new_path="$unix_path"
33137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33139    new_path="$unix_path"
33140  fi
33141
33142    fi
33143
33144    if test "x$new_path" = x; then
33145      # It's still not found. Now this is an unrecoverable error.
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33147$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33148      has_space=`$ECHO "$complete" | $GREP " "`
33149      if test "x$has_space" != x; then
33150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33152      fi
33153      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33154    fi
33155  fi
33156
33157  # Now new_path has a complete unix path to the binary
33158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33159    # Keep paths in /bin as-is, but remove trailing .exe if any
33160    new_path="${new_path/%.exe/}"
33161    # Do not save /bin paths to all_fixpath_prefixes!
33162  else
33163    # Not in mixed or Windows style, start by that.
33164    new_path=`cmd //c echo $new_path`
33165
33166  input_path="$new_path"
33167  # Check if we need to convert this using DOS-style short mode. If the path
33168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33169  # take no chances and rewrite it.
33170  # Note: m4 eats our [], so we need to use [ and ] instead.
33171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33172  if test "x$has_forbidden_chars" != x; then
33173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33175  fi
33176
33177    # Output is in $new_path
33178
33179  windows_path="$new_path"
33180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33181    unix_path=`$CYGPATH -u "$windows_path"`
33182    new_path="$unix_path"
33183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33185    new_path="$unix_path"
33186  fi
33187
33188    # remove trailing .exe if any
33189    new_path="${new_path/%.exe/}"
33190
33191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33193  fi
33194
33195    else
33196      # We're on a unix platform. Hooray! :)
33197      # First separate the path from the arguments. This will split at the first
33198      # space.
33199      complete="$VS_ENV_CMD"
33200      path="${complete%% *}"
33201      tmp="$complete EOL"
33202      arguments="${tmp#* }"
33203
33204      # Cannot rely on the command "which" here since it doesn't always work.
33205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33206      if test -z "$is_absolute_path"; then
33207        # Path to executable is not absolute. Find it.
33208        IFS_save="$IFS"
33209        IFS=:
33210        for p in $PATH; do
33211          if test -f "$p/$path" && test -x "$p/$path"; then
33212            new_path="$p/$path"
33213            break
33214          fi
33215        done
33216        IFS="$IFS_save"
33217      else
33218        # This is an absolute path, we can use it without further modifications.
33219        new_path="$path"
33220      fi
33221
33222      if test "x$new_path" = x; then
33223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33224$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33225        has_space=`$ECHO "$complete" | $GREP " "`
33226        if test "x$has_space" != x; then
33227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33229        fi
33230        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33231      fi
33232    fi
33233
33234    # Now join together the path and the arguments once again
33235    if test "x$arguments" != xEOL; then
33236      new_complete="$new_path ${arguments% *}"
33237    else
33238      new_complete="$new_path"
33239    fi
33240
33241    if test "x$complete" != "x$new_complete"; then
33242      VS_ENV_CMD="$new_complete"
33243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33244$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33245    fi
33246  fi
33247
33248
33249      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33250      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33251$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33252
33253      # We need to create a couple of temporary files.
33254      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33255      $MKDIR -p $VS_ENV_TMP_DIR
33256
33257      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33258      # Instead create a shell script which will set the relevant variables when run.
33259      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33260
33261  unix_path="$WINPATH_VS_ENV_CMD"
33262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33263    windows_path=`$CYGPATH -m "$unix_path"`
33264    WINPATH_VS_ENV_CMD="$windows_path"
33265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33266    windows_path=`cmd //c echo $unix_path`
33267    WINPATH_VS_ENV_CMD="$windows_path"
33268  fi
33269
33270      WINPATH_BASH="$BASH"
33271
33272  unix_path="$WINPATH_BASH"
33273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33274    windows_path=`$CYGPATH -m "$unix_path"`
33275    WINPATH_BASH="$windows_path"
33276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33277    windows_path=`cmd //c echo $unix_path`
33278    WINPATH_BASH="$windows_path"
33279  fi
33280
33281
33282      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33283      # script (executable by bash) that will setup the important variables.
33284      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33285      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33286      # This will end up something like:
33287      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33288      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33289      # These will end up something like:
33290      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33291      # The trailing space for everyone except PATH is no typo, but is needed due
33292      # to trailing \ in the Windows paths. These will be stripped later.
33293      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33294          >> $EXTRACT_VC_ENV_BAT_FILE
33295      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33296          >> $EXTRACT_VC_ENV_BAT_FILE
33297      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33298          >> $EXTRACT_VC_ENV_BAT_FILE
33299      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33300          >> $EXTRACT_VC_ENV_BAT_FILE
33301      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33302          >> $EXTRACT_VC_ENV_BAT_FILE
33303      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33304          >> $EXTRACT_VC_ENV_BAT_FILE
33305
33306      # Now execute the newly created bat file.
33307      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33308      # Change directory so we don't need to mess with Windows paths in redirects.
33309      cd $VS_ENV_TMP_DIR
33310      cmd /c extract-vs-env.bat | $CAT
33311      cd $CURDIR
33312
33313      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33314        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33315$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33316        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33317$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33318        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33319$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33320        as_fn_error $? "Cannot continue" "$LINENO" 5
33321      fi
33322
33323      # Now set all paths and other env variables. This will allow the rest of
33324      # the configure script to find and run the compiler in the proper way.
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33326$as_echo "$as_me: Setting extracted environment variables" >&6;}
33327      . $VS_ENV_TMP_DIR/set-vs-env.sh
33328      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33329      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33330    else
33331      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33332      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33333$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33334    fi
33335  fi
33336
33337  # At this point, we should have correct variables in the environment, or we can't continue.
33338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33339$as_echo_n "checking for Visual Studio variables... " >&6; }
33340
33341  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33342      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33343    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33345$as_echo "present but broken" >&6; }
33346      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33347    else
33348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33349$as_echo "ok" >&6; }
33350      # Remove any trailing "\" ";" and " " from the variables.
33351      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33352      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33353      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33354      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33355      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33356      # Remove any paths containing # (typically F#) as that messes up make. This
33357      # is needed if visual studio was installed with F# support.
33358      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33359
33360
33361
33362
33363
33364      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33365      OLDIFS="$IFS"
33366      IFS=";"
33367      for i in $VS_INCLUDE; do
33368        ipath=$i
33369        # Only process non-empty elements
33370        if test "x$ipath" != x; then
33371          IFS="$OLDIFS"
33372          # Check that directory exists before calling fixup_path
33373          testpath=$ipath
33374
33375  windows_path="$testpath"
33376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33377    unix_path=`$CYGPATH -u "$windows_path"`
33378    testpath="$unix_path"
33379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33381    testpath="$unix_path"
33382  fi
33383
33384          if test -d "$testpath"; then
33385
33386  # Only process if variable expands to non-empty
33387
33388  if test "x$ipath" != x; then
33389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390
33391  # Input might be given as Windows format, start by converting to
33392  # unix format.
33393  path="$ipath"
33394  new_path=`$CYGPATH -u "$path"`
33395
33396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33399  # "foo.exe" is OK but "foo" is an error.
33400  #
33401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33402  # It is also a way to make sure we got the proper file name for the real test later on.
33403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33404  if test "x$test_shortpath" = x; then
33405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33406$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33407    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33408  fi
33409
33410  # Call helper function which possibly converts this using DOS-style short mode.
33411  # If so, the updated path is stored in $new_path.
33412
33413  input_path="$new_path"
33414  # Check if we need to convert this using DOS-style short mode. If the path
33415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33416  # take no chances and rewrite it.
33417  # Note: m4 eats our [], so we need to use [ and ] instead.
33418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33419  if test "x$has_forbidden_chars" != x; then
33420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33424      # Going to short mode and back again did indeed matter. Since short mode is
33425      # case insensitive, let's make it lowercase to improve readability.
33426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33427      # Now convert it back to Unix-style (cygpath)
33428      input_path=`$CYGPATH -u "$shortmode_path"`
33429      new_path="$input_path"
33430    fi
33431  fi
33432
33433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33434  if test "x$test_cygdrive_prefix" = x; then
33435    # As a simple fix, exclude /usr/bin since it's not a real path.
33436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33438      # a path prefixed by /cygdrive for fixpath to work.
33439      new_path="$CYGWIN_ROOT_PATH$input_path"
33440    fi
33441  fi
33442
33443
33444  if test "x$path" != "x$new_path"; then
33445    ipath="$new_path"
33446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33447$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33448  fi
33449
33450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33451
33452  path="$ipath"
33453  has_colon=`$ECHO $path | $GREP ^.:`
33454  new_path="$path"
33455  if test "x$has_colon" = x; then
33456    # Not in mixed or Windows style, start by that.
33457    new_path=`cmd //c echo $path`
33458  fi
33459
33460
33461  input_path="$new_path"
33462  # Check if we need to convert this using DOS-style short mode. If the path
33463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33464  # take no chances and rewrite it.
33465  # Note: m4 eats our [], so we need to use [ and ] instead.
33466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33467  if test "x$has_forbidden_chars" != x; then
33468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33470  fi
33471
33472
33473  windows_path="$new_path"
33474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33475    unix_path=`$CYGPATH -u "$windows_path"`
33476    new_path="$unix_path"
33477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33479    new_path="$unix_path"
33480  fi
33481
33482  if test "x$path" != "x$new_path"; then
33483    ipath="$new_path"
33484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33485$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33486  fi
33487
33488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33490
33491    else
33492      # We're on a unix platform. Hooray! :)
33493      path="$ipath"
33494      has_space=`$ECHO "$path" | $GREP " "`
33495      if test "x$has_space" != x; then
33496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33497$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33499      fi
33500
33501      # Use eval to expand a potential ~
33502      eval path="$path"
33503      if test ! -f "$path" && test ! -d "$path"; then
33504        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33505      fi
33506
33507      if test -d "$path"; then
33508        ipath="`cd "$path"; $THEPWDCMD -L`"
33509      else
33510        dir="`$DIRNAME "$path"`"
33511        base="`$BASENAME "$path"`"
33512        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33513      fi
33514    fi
33515  fi
33516
33517            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33518          fi
33519          IFS=";"
33520        fi
33521      done
33522      # Convert VS_LIB into SYSROOT_LDFLAGS
33523      for i in $VS_LIB; do
33524        libpath=$i
33525        # Only process non-empty elements
33526        if test "x$libpath" != x; then
33527          IFS="$OLDIFS"
33528          # Check that directory exists before calling fixup_path
33529          testpath=$libpath
33530
33531  windows_path="$testpath"
33532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33533    unix_path=`$CYGPATH -u "$windows_path"`
33534    testpath="$unix_path"
33535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33537    testpath="$unix_path"
33538  fi
33539
33540          if test -d "$testpath"; then
33541
33542  # Only process if variable expands to non-empty
33543
33544  if test "x$libpath" != x; then
33545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33546
33547  # Input might be given as Windows format, start by converting to
33548  # unix format.
33549  path="$libpath"
33550  new_path=`$CYGPATH -u "$path"`
33551
33552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33555  # "foo.exe" is OK but "foo" is an error.
33556  #
33557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33558  # It is also a way to make sure we got the proper file name for the real test later on.
33559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33560  if test "x$test_shortpath" = x; then
33561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33562$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33563    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33564  fi
33565
33566  # Call helper function which possibly converts this using DOS-style short mode.
33567  # If so, the updated path is stored in $new_path.
33568
33569  input_path="$new_path"
33570  # Check if we need to convert this using DOS-style short mode. If the path
33571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33572  # take no chances and rewrite it.
33573  # Note: m4 eats our [], so we need to use [ and ] instead.
33574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33575  if test "x$has_forbidden_chars" != x; then
33576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33580      # Going to short mode and back again did indeed matter. Since short mode is
33581      # case insensitive, let's make it lowercase to improve readability.
33582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33583      # Now convert it back to Unix-style (cygpath)
33584      input_path=`$CYGPATH -u "$shortmode_path"`
33585      new_path="$input_path"
33586    fi
33587  fi
33588
33589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33590  if test "x$test_cygdrive_prefix" = x; then
33591    # As a simple fix, exclude /usr/bin since it's not a real path.
33592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33594      # a path prefixed by /cygdrive for fixpath to work.
33595      new_path="$CYGWIN_ROOT_PATH$input_path"
33596    fi
33597  fi
33598
33599
33600  if test "x$path" != "x$new_path"; then
33601    libpath="$new_path"
33602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33603$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33604  fi
33605
33606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33607
33608  path="$libpath"
33609  has_colon=`$ECHO $path | $GREP ^.:`
33610  new_path="$path"
33611  if test "x$has_colon" = x; then
33612    # Not in mixed or Windows style, start by that.
33613    new_path=`cmd //c echo $path`
33614  fi
33615
33616
33617  input_path="$new_path"
33618  # Check if we need to convert this using DOS-style short mode. If the path
33619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33620  # take no chances and rewrite it.
33621  # Note: m4 eats our [], so we need to use [ and ] instead.
33622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33623  if test "x$has_forbidden_chars" != x; then
33624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33626  fi
33627
33628
33629  windows_path="$new_path"
33630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33631    unix_path=`$CYGPATH -u "$windows_path"`
33632    new_path="$unix_path"
33633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33635    new_path="$unix_path"
33636  fi
33637
33638  if test "x$path" != "x$new_path"; then
33639    libpath="$new_path"
33640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33641$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33642  fi
33643
33644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33646
33647    else
33648      # We're on a unix platform. Hooray! :)
33649      path="$libpath"
33650      has_space=`$ECHO "$path" | $GREP " "`
33651      if test "x$has_space" != x; then
33652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33653$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33655      fi
33656
33657      # Use eval to expand a potential ~
33658      eval path="$path"
33659      if test ! -f "$path" && test ! -d "$path"; then
33660        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33661      fi
33662
33663      if test -d "$path"; then
33664        libpath="`cd "$path"; $THEPWDCMD -L`"
33665      else
33666        dir="`$DIRNAME "$path"`"
33667        base="`$BASENAME "$path"`"
33668        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33669      fi
33670    fi
33671  fi
33672
33673            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33674          fi
33675          IFS=";"
33676        fi
33677      done
33678      IFS="$OLDIFS"
33679    fi
33680  else
33681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33682$as_echo "not found" >&6; }
33683
33684    if test "x$VS_ENV_CMD" = x; then
33685      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33686$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33688$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33689    else
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33691$as_echo "$as_me: Running the extraction script failed." >&6;}
33692    fi
33693    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33694$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33695    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33696$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33697    as_fn_error $? "Cannot continue" "$LINENO" 5
33698  fi
33699
33700    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33701    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33702    PATH="$VS_PATH"
33703    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33704    export INCLUDE="$VS_INCLUDE"
33705    export LIB="$VS_LIB"
33706  else
33707    if test "x$XCODE_VERSION_OUTPUT" != x; then
33708      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33709      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33710      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33711    else
33712      # Currently we do not define this for other toolchains. This might change as the need arise.
33713      TOOLCHAIN_VERSION=
33714    fi
33715  fi
33716
33717
33718  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33719  # override all other locations.
33720  if test "x$TOOLCHAIN_PATH" != x; then
33721    PATH=$TOOLCHAIN_PATH:$PATH
33722  fi
33723
33724
33725  #
33726  # Setup the compilers (CC and CXX)
33727  #
33728
33729  COMPILER_NAME=C
33730  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33731
33732  if test "x$CC" != x; then
33733    # User has supplied compiler name already, always let that override.
33734    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33735$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33736    if test "x`basename $CC`" = "x$CC"; then
33737      # A command without a complete path is provided, search $PATH.
33738
33739      for ac_prog in $CC
33740do
33741  # Extract the first word of "$ac_prog", so it can be a program name with args.
33742set dummy $ac_prog; ac_word=$2
33743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33744$as_echo_n "checking for $ac_word... " >&6; }
33745if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33746  $as_echo_n "(cached) " >&6
33747else
33748  case $POTENTIAL_CC in
33749  [\\/]* | ?:[\\/]*)
33750  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33751  ;;
33752  *)
33753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33754for as_dir in $PATH
33755do
33756  IFS=$as_save_IFS
33757  test -z "$as_dir" && as_dir=.
33758    for ac_exec_ext in '' $ac_executable_extensions; do
33759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33760    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33762    break 2
33763  fi
33764done
33765  done
33766IFS=$as_save_IFS
33767
33768  ;;
33769esac
33770fi
33771POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33772if test -n "$POTENTIAL_CC"; then
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33774$as_echo "$POTENTIAL_CC" >&6; }
33775else
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33777$as_echo "no" >&6; }
33778fi
33779
33780
33781  test -n "$POTENTIAL_CC" && break
33782done
33783
33784      if test "x$POTENTIAL_CC" != x; then
33785        CC=$POTENTIAL_CC
33786      else
33787        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33788      fi
33789    else
33790      # Otherwise it might already be a complete path
33791      if test ! -x "$CC"; then
33792        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33793      fi
33794    fi
33795  else
33796    # No user supplied value. Locate compiler ourselves.
33797
33798    # If we are cross compiling, assume cross compilation tools follows the
33799    # cross compilation standard where they are prefixed with the autoconf
33800    # standard name for the target. For example the binary
33801    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33802    # If we are not cross compiling, then the default compiler name will be
33803    # used.
33804
33805    CC=
33806    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33807    # before checking the rest of the PATH.
33808    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33809    # step, this should not be necessary.
33810    if test -n "$TOOLCHAIN_PATH"; then
33811      PATH_save="$PATH"
33812      PATH="$TOOLCHAIN_PATH"
33813      if test -n "$ac_tool_prefix"; then
33814  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33815set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33817$as_echo_n "checking for $ac_word... " >&6; }
33818if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33819  $as_echo_n "(cached) " >&6
33820else
33821  case $TOOLCHAIN_PATH_CC in
33822  [\\/]* | ?:[\\/]*)
33823  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33824  ;;
33825  *)
33826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33827for as_dir in $PATH
33828do
33829  IFS=$as_save_IFS
33830  test -z "$as_dir" && as_dir=.
33831    for ac_exec_ext in '' $ac_executable_extensions; do
33832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33833    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33835    break 2
33836  fi
33837done
33838  done
33839IFS=$as_save_IFS
33840
33841  ;;
33842esac
33843fi
33844TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33845if test -n "$TOOLCHAIN_PATH_CC"; then
33846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33847$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33848else
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33850$as_echo "no" >&6; }
33851fi
33852
33853
33854fi
33855if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33856  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33857  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33858set dummy $SEARCH_LIST; ac_word=$2
33859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33860$as_echo_n "checking for $ac_word... " >&6; }
33861if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33862  $as_echo_n "(cached) " >&6
33863else
33864  case $ac_pt_TOOLCHAIN_PATH_CC in
33865  [\\/]* | ?:[\\/]*)
33866  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33867  ;;
33868  *)
33869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33870for as_dir in $PATH
33871do
33872  IFS=$as_save_IFS
33873  test -z "$as_dir" && as_dir=.
33874    for ac_exec_ext in '' $ac_executable_extensions; do
33875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33876    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33878    break 2
33879  fi
33880done
33881  done
33882IFS=$as_save_IFS
33883
33884  ;;
33885esac
33886fi
33887ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33888if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33890$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33891else
33892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33893$as_echo "no" >&6; }
33894fi
33895
33896  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33897    TOOLCHAIN_PATH_CC=""
33898  else
33899    case $cross_compiling:$ac_tool_warned in
33900yes:)
33901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33903ac_tool_warned=yes ;;
33904esac
33905    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33906  fi
33907else
33908  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33909fi
33910
33911      CC=$TOOLCHAIN_PATH_CC
33912      PATH="$PATH_save"
33913    fi
33914
33915    # AC_PATH_TOOL can't be run multiple times with the same variable,
33916    # so create a new name for this run.
33917    if test "x$CC" = x; then
33918      if test -n "$ac_tool_prefix"; then
33919  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33920set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33922$as_echo_n "checking for $ac_word... " >&6; }
33923if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33924  $as_echo_n "(cached) " >&6
33925else
33926  case $POTENTIAL_CC in
33927  [\\/]* | ?:[\\/]*)
33928  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33929  ;;
33930  *)
33931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33932for as_dir in $PATH
33933do
33934  IFS=$as_save_IFS
33935  test -z "$as_dir" && as_dir=.
33936    for ac_exec_ext in '' $ac_executable_extensions; do
33937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33938    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33940    break 2
33941  fi
33942done
33943  done
33944IFS=$as_save_IFS
33945
33946  ;;
33947esac
33948fi
33949POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33950if test -n "$POTENTIAL_CC"; then
33951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33952$as_echo "$POTENTIAL_CC" >&6; }
33953else
33954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33955$as_echo "no" >&6; }
33956fi
33957
33958
33959fi
33960if test -z "$ac_cv_path_POTENTIAL_CC"; then
33961  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33962  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33963set dummy $SEARCH_LIST; ac_word=$2
33964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33965$as_echo_n "checking for $ac_word... " >&6; }
33966if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33967  $as_echo_n "(cached) " >&6
33968else
33969  case $ac_pt_POTENTIAL_CC in
33970  [\\/]* | ?:[\\/]*)
33971  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33972  ;;
33973  *)
33974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33975for as_dir in $PATH
33976do
33977  IFS=$as_save_IFS
33978  test -z "$as_dir" && as_dir=.
33979    for ac_exec_ext in '' $ac_executable_extensions; do
33980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33981    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33983    break 2
33984  fi
33985done
33986  done
33987IFS=$as_save_IFS
33988
33989  ;;
33990esac
33991fi
33992ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33993if test -n "$ac_pt_POTENTIAL_CC"; then
33994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33995$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33996else
33997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33998$as_echo "no" >&6; }
33999fi
34000
34001  if test "x$ac_pt_POTENTIAL_CC" = x; then
34002    POTENTIAL_CC=""
34003  else
34004    case $cross_compiling:$ac_tool_warned in
34005yes:)
34006{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34007$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34008ac_tool_warned=yes ;;
34009esac
34010    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34011  fi
34012else
34013  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34014fi
34015
34016      CC=$POTENTIAL_CC
34017    fi
34018
34019    if test "x$CC" = x; then
34020
34021  # Print a helpful message on how to acquire the necessary build dependency.
34022  # devkit is the help tag: freetype, cups, alsa etc
34023  MISSING_DEPENDENCY=devkit
34024
34025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34026    cygwin_help $MISSING_DEPENDENCY
34027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34028    msys_help $MISSING_DEPENDENCY
34029  else
34030    PKGHANDLER_COMMAND=
34031
34032    case $PKGHANDLER in
34033      apt-get)
34034        apt_help     $MISSING_DEPENDENCY ;;
34035      yum)
34036        yum_help     $MISSING_DEPENDENCY ;;
34037      brew)
34038        brew_help    $MISSING_DEPENDENCY ;;
34039      port)
34040        port_help    $MISSING_DEPENDENCY ;;
34041      pkgutil)
34042        pkgutil_help $MISSING_DEPENDENCY ;;
34043      pkgadd)
34044        pkgadd_help  $MISSING_DEPENDENCY ;;
34045    esac
34046
34047    if test "x$PKGHANDLER_COMMAND" != x; then
34048      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34049    fi
34050  fi
34051
34052      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34053    fi
34054  fi
34055
34056  # Now we have a compiler binary in CC. Make sure it's okay.
34057
34058  # Only process if variable expands to non-empty
34059
34060  if test "x$CC" != x; then
34061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34062
34063  # First separate the path from the arguments. This will split at the first
34064  # space.
34065  complete="$CC"
34066  path="${complete%% *}"
34067  tmp="$complete EOL"
34068  arguments="${tmp#* }"
34069
34070  # Input might be given as Windows format, start by converting to
34071  # unix format.
34072  new_path=`$CYGPATH -u "$path"`
34073
34074  # Now try to locate executable using which
34075  new_path=`$WHICH "$new_path" 2> /dev/null`
34076  # bat and cmd files are not always considered executable in cygwin causing which
34077  # to not find them
34078  if test "x$new_path" = x \
34079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34081    new_path=`$CYGPATH -u "$path"`
34082  fi
34083  if test "x$new_path" = x; then
34084    # Oops. Which didn't find the executable.
34085    # The splitting of arguments from the executable at a space might have been incorrect,
34086    # since paths with space are more likely in Windows. Give it another try with the whole
34087    # argument.
34088    path="$complete"
34089    arguments="EOL"
34090    new_path=`$CYGPATH -u "$path"`
34091    new_path=`$WHICH "$new_path" 2> /dev/null`
34092    # bat and cmd files are not always considered executable in cygwin causing which
34093    # to not find them
34094    if test "x$new_path" = x \
34095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34097      new_path=`$CYGPATH -u "$path"`
34098    fi
34099    if test "x$new_path" = x; then
34100      # It's still not found. Now this is an unrecoverable error.
34101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34102$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34103      has_space=`$ECHO "$complete" | $GREP " "`
34104      if test "x$has_space" != x; then
34105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34107      fi
34108      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34109    fi
34110  fi
34111
34112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34115  # "foo.exe" is OK but "foo" is an error.
34116  #
34117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34118  # It is also a way to make sure we got the proper file name for the real test later on.
34119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34120  if test "x$test_shortpath" = x; then
34121    # Short path failed, file does not exist as specified.
34122    # Try adding .exe or .cmd
34123    if test -f "${new_path}.exe"; then
34124      input_to_shortpath="${new_path}.exe"
34125    elif test -f "${new_path}.cmd"; then
34126      input_to_shortpath="${new_path}.cmd"
34127    else
34128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34129$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34132      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34133    fi
34134  else
34135    input_to_shortpath="$new_path"
34136  fi
34137
34138  # Call helper function which possibly converts this using DOS-style short mode.
34139  # If so, the updated path is stored in $new_path.
34140  new_path="$input_to_shortpath"
34141
34142  input_path="$input_to_shortpath"
34143  # Check if we need to convert this using DOS-style short mode. If the path
34144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34145  # take no chances and rewrite it.
34146  # Note: m4 eats our [], so we need to use [ and ] instead.
34147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34148  if test "x$has_forbidden_chars" != x; then
34149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34153      # Going to short mode and back again did indeed matter. Since short mode is
34154      # case insensitive, let's make it lowercase to improve readability.
34155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34156      # Now convert it back to Unix-style (cygpath)
34157      input_path=`$CYGPATH -u "$shortmode_path"`
34158      new_path="$input_path"
34159    fi
34160  fi
34161
34162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34163  if test "x$test_cygdrive_prefix" = x; then
34164    # As a simple fix, exclude /usr/bin since it's not a real path.
34165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34167      # a path prefixed by /cygdrive for fixpath to work.
34168      new_path="$CYGWIN_ROOT_PATH$input_path"
34169    fi
34170  fi
34171
34172  # remove trailing .exe if any
34173  new_path="${new_path/%.exe/}"
34174
34175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34176
34177  # First separate the path from the arguments. This will split at the first
34178  # space.
34179  complete="$CC"
34180  path="${complete%% *}"
34181  tmp="$complete EOL"
34182  arguments="${tmp#* }"
34183
34184  # Input might be given as Windows format, start by converting to
34185  # unix format.
34186  new_path="$path"
34187
34188  windows_path="$new_path"
34189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34190    unix_path=`$CYGPATH -u "$windows_path"`
34191    new_path="$unix_path"
34192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34194    new_path="$unix_path"
34195  fi
34196
34197
34198  # Now try to locate executable using which
34199  new_path=`$WHICH "$new_path" 2> /dev/null`
34200
34201  if test "x$new_path" = x; then
34202    # Oops. Which didn't find the executable.
34203    # The splitting of arguments from the executable at a space might have been incorrect,
34204    # since paths with space are more likely in Windows. Give it another try with the whole
34205    # argument.
34206    path="$complete"
34207    arguments="EOL"
34208    new_path="$path"
34209
34210  windows_path="$new_path"
34211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34212    unix_path=`$CYGPATH -u "$windows_path"`
34213    new_path="$unix_path"
34214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34216    new_path="$unix_path"
34217  fi
34218
34219
34220    new_path=`$WHICH "$new_path" 2> /dev/null`
34221    # bat and cmd files are not always considered executable in MSYS causing which
34222    # to not find them
34223    if test "x$new_path" = x \
34224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34226      new_path="$path"
34227
34228  windows_path="$new_path"
34229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34230    unix_path=`$CYGPATH -u "$windows_path"`
34231    new_path="$unix_path"
34232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34234    new_path="$unix_path"
34235  fi
34236
34237    fi
34238
34239    if test "x$new_path" = x; then
34240      # It's still not found. Now this is an unrecoverable error.
34241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34242$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34243      has_space=`$ECHO "$complete" | $GREP " "`
34244      if test "x$has_space" != x; then
34245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34247      fi
34248      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34249    fi
34250  fi
34251
34252  # Now new_path has a complete unix path to the binary
34253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34254    # Keep paths in /bin as-is, but remove trailing .exe if any
34255    new_path="${new_path/%.exe/}"
34256    # Do not save /bin paths to all_fixpath_prefixes!
34257  else
34258    # Not in mixed or Windows style, start by that.
34259    new_path=`cmd //c echo $new_path`
34260
34261  input_path="$new_path"
34262  # Check if we need to convert this using DOS-style short mode. If the path
34263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34264  # take no chances and rewrite it.
34265  # Note: m4 eats our [], so we need to use [ and ] instead.
34266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34267  if test "x$has_forbidden_chars" != x; then
34268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34270  fi
34271
34272    # Output is in $new_path
34273
34274  windows_path="$new_path"
34275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34276    unix_path=`$CYGPATH -u "$windows_path"`
34277    new_path="$unix_path"
34278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34280    new_path="$unix_path"
34281  fi
34282
34283    # remove trailing .exe if any
34284    new_path="${new_path/%.exe/}"
34285
34286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34288  fi
34289
34290    else
34291      # We're on a unix platform. Hooray! :)
34292      # First separate the path from the arguments. This will split at the first
34293      # space.
34294      complete="$CC"
34295      path="${complete%% *}"
34296      tmp="$complete EOL"
34297      arguments="${tmp#* }"
34298
34299      # Cannot rely on the command "which" here since it doesn't always work.
34300      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34301      if test -z "$is_absolute_path"; then
34302        # Path to executable is not absolute. Find it.
34303        IFS_save="$IFS"
34304        IFS=:
34305        for p in $PATH; do
34306          if test -f "$p/$path" && test -x "$p/$path"; then
34307            new_path="$p/$path"
34308            break
34309          fi
34310        done
34311        IFS="$IFS_save"
34312      else
34313        # This is an absolute path, we can use it without further modifications.
34314        new_path="$path"
34315      fi
34316
34317      if test "x$new_path" = x; then
34318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34319$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34320        has_space=`$ECHO "$complete" | $GREP " "`
34321        if test "x$has_space" != x; then
34322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34324        fi
34325        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34326      fi
34327    fi
34328
34329    # Now join together the path and the arguments once again
34330    if test "x$arguments" != xEOL; then
34331      new_complete="$new_path ${arguments% *}"
34332    else
34333      new_complete="$new_path"
34334    fi
34335
34336    if test "x$complete" != "x$new_complete"; then
34337      CC="$new_complete"
34338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34339$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34340    fi
34341  fi
34342
34343  TEST_COMPILER="$CC"
34344
34345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34346$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34347  SYMLINK_ORIGINAL="$TEST_COMPILER"
34348
34349  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34350    # Follow a chain of symbolic links. Use readlink
34351    # where it exists, else fall back to horribly
34352    # complicated shell code.
34353    if test "x$READLINK_TESTED" != yes; then
34354      # On MacOSX there is a readlink tool with a different
34355      # purpose than the GNU readlink tool. Check the found readlink.
34356      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34357      if test "x$ISGNU" = x; then
34358        # A readlink that we do not know how to use.
34359        # Are there other non-GNU readlinks out there?
34360        READLINK_TESTED=yes
34361        READLINK=
34362      fi
34363    fi
34364
34365    if test "x$READLINK" != x; then
34366      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34367    else
34368      # Save the current directory for restoring afterwards
34369      STARTDIR=$PWD
34370      COUNTER=0
34371      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34372      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34373      cd $sym_link_dir
34374      # Use -P flag to resolve symlinks in directories.
34375      cd `$THEPWDCMD -P`
34376      sym_link_dir=`$THEPWDCMD -P`
34377      # Resolve file symlinks
34378      while test $COUNTER -lt 20; do
34379        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34380        if test "x$ISLINK" == x; then
34381          # This is not a symbolic link! We are done!
34382          break
34383        fi
34384        # Again resolve directory symlinks since the target of the just found
34385        # link could be in a different directory
34386        cd `$DIRNAME $ISLINK`
34387        sym_link_dir=`$THEPWDCMD -P`
34388        sym_link_file=`$BASENAME $ISLINK`
34389        let COUNTER=COUNTER+1
34390      done
34391      cd $STARTDIR
34392      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34393    fi
34394  fi
34395
34396  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34398$as_echo "no symlink" >&6; }
34399  else
34400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34401$as_echo "$SYMLINK_ORIGINAL" >&6; }
34402
34403    # We can't handle ccache by gcc wrappers, since we need to know if we're
34404    # using ccache. Instead ccache usage must be controlled by a configure option.
34405    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34406    if test "x$COMPILER_BASENAME" = "xccache"; then
34407      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34408$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34409      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34410    fi
34411  fi
34412
34413
34414  COMPILER=$CC
34415  COMPILER_NAME=$COMPILER_NAME
34416
34417  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34418    # cc -V output typically looks like
34419    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34420    # or
34421    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34422    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34423    # Check that this is likely to be the Solaris Studio cc.
34424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34425    if test $? -ne 0; then
34426      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34427      { $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
34428$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34429      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34430$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34432$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34434    fi
34435    # Remove usage instructions (if present), and
34436    # collapse compiler output into a single line
34437    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34438        $SED -e 's/ *[Uu]sage:.*//'`
34439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34440        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34441  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34442    # xlc -qversion output typically looks like
34443    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34444    #     Version: 11.01.0000.0015
34445    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34446    # Check that this is likely to be the IBM XL C compiler.
34447    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34448    if test $? -ne 0; then
34449      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34450      { $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
34451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34453$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34455$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34456      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34457    fi
34458    # Collapse compiler output into a single line
34459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34460    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34462  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34463    # There is no specific version flag, but all output starts with a version string.
34464    # First line typically looks something like:
34465    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34466    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34467    # Check that this is likely to be Microsoft CL.EXE.
34468    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34469    if test $? -ne 0; then
34470      { $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
34471$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34473$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34474      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34475    fi
34476    # Collapse compiler output into a single line
34477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34478    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34479        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34480  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34481    # gcc --version output typically looks like
34482    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34483    #     Copyright (C) 2013 Free Software Foundation, Inc.
34484    #     This is free software; see the source for copying conditions.  There is NO
34485    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34486    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34487    # Check that this is likely to be GCC.
34488    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34489    if test $? -ne 0; then
34490      { $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
34491$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34493$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34495    fi
34496    # Remove Copyright and legalese from version string, and
34497    # collapse into a single line
34498    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34499        $SED -e 's/ *Copyright .*//'`
34500    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34501        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34502  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34503    # clang --version output typically looks like
34504    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34505    #    clang version 3.3 (tags/RELEASE_33/final)
34506    # or
34507    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34508    #    Target: x86_64-pc-linux-gnu
34509    #    Thread model: posix
34510    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34511    # Check that this is likely to be clang
34512    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34513    if test $? -ne 0; then
34514      { $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
34515$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34517$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34518      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34519    fi
34520    # Collapse compiler output into a single line
34521    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34522    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34523        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34524  else
34525      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34526  fi
34527  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34528  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34529  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34530  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34531
34532  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34533$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34534
34535
34536  # Now that we have resolved CC ourself, let autoconf have its go at it
34537  ac_ext=c
34538ac_cpp='$CPP $CPPFLAGS'
34539ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34540ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34541ac_compiler_gnu=$ac_cv_c_compiler_gnu
34542if test -n "$ac_tool_prefix"; then
34543  for ac_prog in $CC
34544  do
34545    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34546set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34548$as_echo_n "checking for $ac_word... " >&6; }
34549if ${ac_cv_prog_CC+:} false; then :
34550  $as_echo_n "(cached) " >&6
34551else
34552  if test -n "$CC"; then
34553  ac_cv_prog_CC="$CC" # Let the user override the test.
34554else
34555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34556for as_dir in $PATH
34557do
34558  IFS=$as_save_IFS
34559  test -z "$as_dir" && as_dir=.
34560    for ac_exec_ext in '' $ac_executable_extensions; do
34561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34562    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34564    break 2
34565  fi
34566done
34567  done
34568IFS=$as_save_IFS
34569
34570fi
34571fi
34572CC=$ac_cv_prog_CC
34573if test -n "$CC"; then
34574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34575$as_echo "$CC" >&6; }
34576else
34577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34578$as_echo "no" >&6; }
34579fi
34580
34581
34582    test -n "$CC" && break
34583  done
34584fi
34585if test -z "$CC"; then
34586  ac_ct_CC=$CC
34587  for ac_prog in $CC
34588do
34589  # Extract the first word of "$ac_prog", so it can be a program name with args.
34590set dummy $ac_prog; ac_word=$2
34591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34592$as_echo_n "checking for $ac_word... " >&6; }
34593if ${ac_cv_prog_ac_ct_CC+:} false; then :
34594  $as_echo_n "(cached) " >&6
34595else
34596  if test -n "$ac_ct_CC"; then
34597  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34598else
34599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34600for as_dir in $PATH
34601do
34602  IFS=$as_save_IFS
34603  test -z "$as_dir" && as_dir=.
34604    for ac_exec_ext in '' $ac_executable_extensions; do
34605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34606    ac_cv_prog_ac_ct_CC="$ac_prog"
34607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34608    break 2
34609  fi
34610done
34611  done
34612IFS=$as_save_IFS
34613
34614fi
34615fi
34616ac_ct_CC=$ac_cv_prog_ac_ct_CC
34617if test -n "$ac_ct_CC"; then
34618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34619$as_echo "$ac_ct_CC" >&6; }
34620else
34621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34622$as_echo "no" >&6; }
34623fi
34624
34625
34626  test -n "$ac_ct_CC" && break
34627done
34628
34629  if test "x$ac_ct_CC" = x; then
34630    CC=""
34631  else
34632    case $cross_compiling:$ac_tool_warned in
34633yes:)
34634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34636ac_tool_warned=yes ;;
34637esac
34638    CC=$ac_ct_CC
34639  fi
34640fi
34641
34642
34643test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34645as_fn_error $? "no acceptable C compiler found in \$PATH
34646See \`config.log' for more details" "$LINENO" 5; }
34647
34648# Provide some information about the compiler.
34649$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34650set X $ac_compile
34651ac_compiler=$2
34652for ac_option in --version -v -V -qversion; do
34653  { { ac_try="$ac_compiler $ac_option >&5"
34654case "(($ac_try" in
34655  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34656  *) ac_try_echo=$ac_try;;
34657esac
34658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34659$as_echo "$ac_try_echo"; } >&5
34660  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34661  ac_status=$?
34662  if test -s conftest.err; then
34663    sed '10a\
34664... rest of stderr output deleted ...
34665         10q' conftest.err >conftest.er1
34666    cat conftest.er1 >&5
34667  fi
34668  rm -f conftest.er1 conftest.err
34669  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34670  test $ac_status = 0; }
34671done
34672
34673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34674/* end confdefs.h.  */
34675
34676int
34677main ()
34678{
34679
34680  ;
34681  return 0;
34682}
34683_ACEOF
34684ac_clean_files_save=$ac_clean_files
34685ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34686# Try to create an executable without -o first, disregard a.out.
34687# It will help us diagnose broken compilers, and finding out an intuition
34688# of exeext.
34689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34690$as_echo_n "checking whether the C compiler works... " >&6; }
34691ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34692
34693# The possible output files:
34694ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34695
34696ac_rmfiles=
34697for ac_file in $ac_files
34698do
34699  case $ac_file in
34700    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34701    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34702  esac
34703done
34704rm -f $ac_rmfiles
34705
34706if { { ac_try="$ac_link_default"
34707case "(($ac_try" in
34708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34709  *) ac_try_echo=$ac_try;;
34710esac
34711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34712$as_echo "$ac_try_echo"; } >&5
34713  (eval "$ac_link_default") 2>&5
34714  ac_status=$?
34715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34716  test $ac_status = 0; }; then :
34717  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34718# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34719# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34720# so that the user can short-circuit this test for compilers unknown to
34721# Autoconf.
34722for ac_file in $ac_files ''
34723do
34724  test -f "$ac_file" || continue
34725  case $ac_file in
34726    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34727	;;
34728    [ab].out )
34729	# We found the default executable, but exeext='' is most
34730	# certainly right.
34731	break;;
34732    *.* )
34733	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34734	then :; else
34735	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34736	fi
34737	# We set ac_cv_exeext here because the later test for it is not
34738	# safe: cross compilers may not add the suffix if given an `-o'
34739	# argument, so we may need to know it at that point already.
34740	# Even if this section looks crufty: it has the advantage of
34741	# actually working.
34742	break;;
34743    * )
34744	break;;
34745  esac
34746done
34747test "$ac_cv_exeext" = no && ac_cv_exeext=
34748
34749else
34750  ac_file=''
34751fi
34752if test -z "$ac_file"; then :
34753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34754$as_echo "no" >&6; }
34755$as_echo "$as_me: failed program was:" >&5
34756sed 's/^/| /' conftest.$ac_ext >&5
34757
34758{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34760as_fn_error 77 "C compiler cannot create executables
34761See \`config.log' for more details" "$LINENO" 5; }
34762else
34763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34764$as_echo "yes" >&6; }
34765fi
34766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34767$as_echo_n "checking for C compiler default output file name... " >&6; }
34768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34769$as_echo "$ac_file" >&6; }
34770ac_exeext=$ac_cv_exeext
34771
34772rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34773ac_clean_files=$ac_clean_files_save
34774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34775$as_echo_n "checking for suffix of executables... " >&6; }
34776if { { ac_try="$ac_link"
34777case "(($ac_try" in
34778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34779  *) ac_try_echo=$ac_try;;
34780esac
34781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34782$as_echo "$ac_try_echo"; } >&5
34783  (eval "$ac_link") 2>&5
34784  ac_status=$?
34785  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34786  test $ac_status = 0; }; then :
34787  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34788# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34789# work properly (i.e., refer to `conftest.exe'), while it won't with
34790# `rm'.
34791for ac_file in conftest.exe conftest conftest.*; do
34792  test -f "$ac_file" || continue
34793  case $ac_file in
34794    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34795    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34796	  break;;
34797    * ) break;;
34798  esac
34799done
34800else
34801  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34803as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34804See \`config.log' for more details" "$LINENO" 5; }
34805fi
34806rm -f conftest conftest$ac_cv_exeext
34807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34808$as_echo "$ac_cv_exeext" >&6; }
34809
34810rm -f conftest.$ac_ext
34811EXEEXT=$ac_cv_exeext
34812ac_exeext=$EXEEXT
34813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34814/* end confdefs.h.  */
34815#include <stdio.h>
34816int
34817main ()
34818{
34819FILE *f = fopen ("conftest.out", "w");
34820 return ferror (f) || fclose (f) != 0;
34821
34822  ;
34823  return 0;
34824}
34825_ACEOF
34826ac_clean_files="$ac_clean_files conftest.out"
34827# Check that the compiler produces executables we can run.  If not, either
34828# the compiler is broken, or we cross compile.
34829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34830$as_echo_n "checking whether we are cross compiling... " >&6; }
34831if test "$cross_compiling" != yes; then
34832  { { ac_try="$ac_link"
34833case "(($ac_try" in
34834  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34835  *) ac_try_echo=$ac_try;;
34836esac
34837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34838$as_echo "$ac_try_echo"; } >&5
34839  (eval "$ac_link") 2>&5
34840  ac_status=$?
34841  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34842  test $ac_status = 0; }
34843  if { ac_try='./conftest$ac_cv_exeext'
34844  { { case "(($ac_try" in
34845  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34846  *) ac_try_echo=$ac_try;;
34847esac
34848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34849$as_echo "$ac_try_echo"; } >&5
34850  (eval "$ac_try") 2>&5
34851  ac_status=$?
34852  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34853  test $ac_status = 0; }; }; then
34854    cross_compiling=no
34855  else
34856    if test "$cross_compiling" = maybe; then
34857	cross_compiling=yes
34858    else
34859	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34861as_fn_error $? "cannot run C compiled programs.
34862If you meant to cross compile, use \`--host'.
34863See \`config.log' for more details" "$LINENO" 5; }
34864    fi
34865  fi
34866fi
34867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34868$as_echo "$cross_compiling" >&6; }
34869
34870rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34871ac_clean_files=$ac_clean_files_save
34872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34873$as_echo_n "checking for suffix of object files... " >&6; }
34874if ${ac_cv_objext+:} false; then :
34875  $as_echo_n "(cached) " >&6
34876else
34877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34878/* end confdefs.h.  */
34879
34880int
34881main ()
34882{
34883
34884  ;
34885  return 0;
34886}
34887_ACEOF
34888rm -f conftest.o conftest.obj
34889if { { ac_try="$ac_compile"
34890case "(($ac_try" in
34891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34892  *) ac_try_echo=$ac_try;;
34893esac
34894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34895$as_echo "$ac_try_echo"; } >&5
34896  (eval "$ac_compile") 2>&5
34897  ac_status=$?
34898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34899  test $ac_status = 0; }; then :
34900  for ac_file in conftest.o conftest.obj conftest.*; do
34901  test -f "$ac_file" || continue;
34902  case $ac_file in
34903    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34904    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34905       break;;
34906  esac
34907done
34908else
34909  $as_echo "$as_me: failed program was:" >&5
34910sed 's/^/| /' conftest.$ac_ext >&5
34911
34912{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34914as_fn_error $? "cannot compute suffix of object files: cannot compile
34915See \`config.log' for more details" "$LINENO" 5; }
34916fi
34917rm -f conftest.$ac_cv_objext conftest.$ac_ext
34918fi
34919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34920$as_echo "$ac_cv_objext" >&6; }
34921OBJEXT=$ac_cv_objext
34922ac_objext=$OBJEXT
34923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34924$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34925if ${ac_cv_c_compiler_gnu+:} false; then :
34926  $as_echo_n "(cached) " >&6
34927else
34928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34929/* end confdefs.h.  */
34930
34931int
34932main ()
34933{
34934#ifndef __GNUC__
34935       choke me
34936#endif
34937
34938  ;
34939  return 0;
34940}
34941_ACEOF
34942if ac_fn_c_try_compile "$LINENO"; then :
34943  ac_compiler_gnu=yes
34944else
34945  ac_compiler_gnu=no
34946fi
34947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34948ac_cv_c_compiler_gnu=$ac_compiler_gnu
34949
34950fi
34951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34952$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34953if test $ac_compiler_gnu = yes; then
34954  GCC=yes
34955else
34956  GCC=
34957fi
34958ac_test_CFLAGS=${CFLAGS+set}
34959ac_save_CFLAGS=$CFLAGS
34960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34961$as_echo_n "checking whether $CC accepts -g... " >&6; }
34962if ${ac_cv_prog_cc_g+:} false; then :
34963  $as_echo_n "(cached) " >&6
34964else
34965  ac_save_c_werror_flag=$ac_c_werror_flag
34966   ac_c_werror_flag=yes
34967   ac_cv_prog_cc_g=no
34968   CFLAGS="-g"
34969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34970/* end confdefs.h.  */
34971
34972int
34973main ()
34974{
34975
34976  ;
34977  return 0;
34978}
34979_ACEOF
34980if ac_fn_c_try_compile "$LINENO"; then :
34981  ac_cv_prog_cc_g=yes
34982else
34983  CFLAGS=""
34984      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34985/* end confdefs.h.  */
34986
34987int
34988main ()
34989{
34990
34991  ;
34992  return 0;
34993}
34994_ACEOF
34995if ac_fn_c_try_compile "$LINENO"; then :
34996
34997else
34998  ac_c_werror_flag=$ac_save_c_werror_flag
34999	 CFLAGS="-g"
35000	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35001/* end confdefs.h.  */
35002
35003int
35004main ()
35005{
35006
35007  ;
35008  return 0;
35009}
35010_ACEOF
35011if ac_fn_c_try_compile "$LINENO"; then :
35012  ac_cv_prog_cc_g=yes
35013fi
35014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35015fi
35016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35017fi
35018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35019   ac_c_werror_flag=$ac_save_c_werror_flag
35020fi
35021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35022$as_echo "$ac_cv_prog_cc_g" >&6; }
35023if test "$ac_test_CFLAGS" = set; then
35024  CFLAGS=$ac_save_CFLAGS
35025elif test $ac_cv_prog_cc_g = yes; then
35026  if test "$GCC" = yes; then
35027    CFLAGS="-g -O2"
35028  else
35029    CFLAGS="-g"
35030  fi
35031else
35032  if test "$GCC" = yes; then
35033    CFLAGS="-O2"
35034  else
35035    CFLAGS=
35036  fi
35037fi
35038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35039$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35040if ${ac_cv_prog_cc_c89+:} false; then :
35041  $as_echo_n "(cached) " >&6
35042else
35043  ac_cv_prog_cc_c89=no
35044ac_save_CC=$CC
35045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35046/* end confdefs.h.  */
35047#include <stdarg.h>
35048#include <stdio.h>
35049struct stat;
35050/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35051struct buf { int x; };
35052FILE * (*rcsopen) (struct buf *, struct stat *, int);
35053static char *e (p, i)
35054     char **p;
35055     int i;
35056{
35057  return p[i];
35058}
35059static char *f (char * (*g) (char **, int), char **p, ...)
35060{
35061  char *s;
35062  va_list v;
35063  va_start (v,p);
35064  s = g (p, va_arg (v,int));
35065  va_end (v);
35066  return s;
35067}
35068
35069/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35070   function prototypes and stuff, but not '\xHH' hex character constants.
35071   These don't provoke an error unfortunately, instead are silently treated
35072   as 'x'.  The following induces an error, until -std is added to get
35073   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35074   array size at least.  It's necessary to write '\x00'==0 to get something
35075   that's true only with -std.  */
35076int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35077
35078/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35079   inside strings and character constants.  */
35080#define FOO(x) 'x'
35081int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35082
35083int test (int i, double x);
35084struct s1 {int (*f) (int a);};
35085struct s2 {int (*f) (double a);};
35086int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35087int argc;
35088char **argv;
35089int
35090main ()
35091{
35092return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35093  ;
35094  return 0;
35095}
35096_ACEOF
35097for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35098	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35099do
35100  CC="$ac_save_CC $ac_arg"
35101  if ac_fn_c_try_compile "$LINENO"; then :
35102  ac_cv_prog_cc_c89=$ac_arg
35103fi
35104rm -f core conftest.err conftest.$ac_objext
35105  test "x$ac_cv_prog_cc_c89" != "xno" && break
35106done
35107rm -f conftest.$ac_ext
35108CC=$ac_save_CC
35109
35110fi
35111# AC_CACHE_VAL
35112case "x$ac_cv_prog_cc_c89" in
35113  x)
35114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35115$as_echo "none needed" >&6; } ;;
35116  xno)
35117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35118$as_echo "unsupported" >&6; } ;;
35119  *)
35120    CC="$CC $ac_cv_prog_cc_c89"
35121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35122$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35123esac
35124if test "x$ac_cv_prog_cc_c89" != xno; then :
35125
35126fi
35127
35128ac_ext=cpp
35129ac_cpp='$CXXCPP $CPPFLAGS'
35130ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35131ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35132ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35133
35134
35135
35136  COMPILER_NAME=C++
35137  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35138
35139  if test "x$CXX" != x; then
35140    # User has supplied compiler name already, always let that override.
35141    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35142$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35143    if test "x`basename $CXX`" = "x$CXX"; then
35144      # A command without a complete path is provided, search $PATH.
35145
35146      for ac_prog in $CXX
35147do
35148  # Extract the first word of "$ac_prog", so it can be a program name with args.
35149set dummy $ac_prog; ac_word=$2
35150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35151$as_echo_n "checking for $ac_word... " >&6; }
35152if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35153  $as_echo_n "(cached) " >&6
35154else
35155  case $POTENTIAL_CXX in
35156  [\\/]* | ?:[\\/]*)
35157  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35158  ;;
35159  *)
35160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35161for as_dir in $PATH
35162do
35163  IFS=$as_save_IFS
35164  test -z "$as_dir" && as_dir=.
35165    for ac_exec_ext in '' $ac_executable_extensions; do
35166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35167    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35169    break 2
35170  fi
35171done
35172  done
35173IFS=$as_save_IFS
35174
35175  ;;
35176esac
35177fi
35178POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35179if test -n "$POTENTIAL_CXX"; then
35180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35181$as_echo "$POTENTIAL_CXX" >&6; }
35182else
35183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35184$as_echo "no" >&6; }
35185fi
35186
35187
35188  test -n "$POTENTIAL_CXX" && break
35189done
35190
35191      if test "x$POTENTIAL_CXX" != x; then
35192        CXX=$POTENTIAL_CXX
35193      else
35194        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35195      fi
35196    else
35197      # Otherwise it might already be a complete path
35198      if test ! -x "$CXX"; then
35199        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35200      fi
35201    fi
35202  else
35203    # No user supplied value. Locate compiler ourselves.
35204
35205    # If we are cross compiling, assume cross compilation tools follows the
35206    # cross compilation standard where they are prefixed with the autoconf
35207    # standard name for the target. For example the binary
35208    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35209    # If we are not cross compiling, then the default compiler name will be
35210    # used.
35211
35212    CXX=
35213    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35214    # before checking the rest of the PATH.
35215    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35216    # step, this should not be necessary.
35217    if test -n "$TOOLCHAIN_PATH"; then
35218      PATH_save="$PATH"
35219      PATH="$TOOLCHAIN_PATH"
35220      if test -n "$ac_tool_prefix"; then
35221  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35222set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35224$as_echo_n "checking for $ac_word... " >&6; }
35225if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35226  $as_echo_n "(cached) " >&6
35227else
35228  case $TOOLCHAIN_PATH_CXX in
35229  [\\/]* | ?:[\\/]*)
35230  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35231  ;;
35232  *)
35233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35234for as_dir in $PATH
35235do
35236  IFS=$as_save_IFS
35237  test -z "$as_dir" && as_dir=.
35238    for ac_exec_ext in '' $ac_executable_extensions; do
35239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35240    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35242    break 2
35243  fi
35244done
35245  done
35246IFS=$as_save_IFS
35247
35248  ;;
35249esac
35250fi
35251TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35252if test -n "$TOOLCHAIN_PATH_CXX"; then
35253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35254$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35255else
35256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35257$as_echo "no" >&6; }
35258fi
35259
35260
35261fi
35262if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35263  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35264  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35265set dummy $SEARCH_LIST; ac_word=$2
35266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35267$as_echo_n "checking for $ac_word... " >&6; }
35268if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35269  $as_echo_n "(cached) " >&6
35270else
35271  case $ac_pt_TOOLCHAIN_PATH_CXX in
35272  [\\/]* | ?:[\\/]*)
35273  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35274  ;;
35275  *)
35276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35277for as_dir in $PATH
35278do
35279  IFS=$as_save_IFS
35280  test -z "$as_dir" && as_dir=.
35281    for ac_exec_ext in '' $ac_executable_extensions; do
35282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35283    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35285    break 2
35286  fi
35287done
35288  done
35289IFS=$as_save_IFS
35290
35291  ;;
35292esac
35293fi
35294ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35295if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35297$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35298else
35299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35300$as_echo "no" >&6; }
35301fi
35302
35303  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35304    TOOLCHAIN_PATH_CXX=""
35305  else
35306    case $cross_compiling:$ac_tool_warned in
35307yes:)
35308{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35310ac_tool_warned=yes ;;
35311esac
35312    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35313  fi
35314else
35315  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35316fi
35317
35318      CXX=$TOOLCHAIN_PATH_CXX
35319      PATH="$PATH_save"
35320    fi
35321
35322    # AC_PATH_TOOL can't be run multiple times with the same variable,
35323    # so create a new name for this run.
35324    if test "x$CXX" = x; then
35325      if test -n "$ac_tool_prefix"; then
35326  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35327set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35329$as_echo_n "checking for $ac_word... " >&6; }
35330if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35331  $as_echo_n "(cached) " >&6
35332else
35333  case $POTENTIAL_CXX in
35334  [\\/]* | ?:[\\/]*)
35335  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35336  ;;
35337  *)
35338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35339for as_dir in $PATH
35340do
35341  IFS=$as_save_IFS
35342  test -z "$as_dir" && as_dir=.
35343    for ac_exec_ext in '' $ac_executable_extensions; do
35344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35345    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35347    break 2
35348  fi
35349done
35350  done
35351IFS=$as_save_IFS
35352
35353  ;;
35354esac
35355fi
35356POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35357if test -n "$POTENTIAL_CXX"; then
35358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35359$as_echo "$POTENTIAL_CXX" >&6; }
35360else
35361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35362$as_echo "no" >&6; }
35363fi
35364
35365
35366fi
35367if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35368  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35369  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35370set dummy $SEARCH_LIST; ac_word=$2
35371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35372$as_echo_n "checking for $ac_word... " >&6; }
35373if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35374  $as_echo_n "(cached) " >&6
35375else
35376  case $ac_pt_POTENTIAL_CXX in
35377  [\\/]* | ?:[\\/]*)
35378  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35379  ;;
35380  *)
35381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35382for as_dir in $PATH
35383do
35384  IFS=$as_save_IFS
35385  test -z "$as_dir" && as_dir=.
35386    for ac_exec_ext in '' $ac_executable_extensions; do
35387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35388    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35390    break 2
35391  fi
35392done
35393  done
35394IFS=$as_save_IFS
35395
35396  ;;
35397esac
35398fi
35399ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35400if test -n "$ac_pt_POTENTIAL_CXX"; then
35401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35402$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35403else
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35405$as_echo "no" >&6; }
35406fi
35407
35408  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35409    POTENTIAL_CXX=""
35410  else
35411    case $cross_compiling:$ac_tool_warned in
35412yes:)
35413{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35414$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35415ac_tool_warned=yes ;;
35416esac
35417    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35418  fi
35419else
35420  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35421fi
35422
35423      CXX=$POTENTIAL_CXX
35424    fi
35425
35426    if test "x$CXX" = x; then
35427
35428  # Print a helpful message on how to acquire the necessary build dependency.
35429  # devkit is the help tag: freetype, cups, alsa etc
35430  MISSING_DEPENDENCY=devkit
35431
35432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35433    cygwin_help $MISSING_DEPENDENCY
35434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35435    msys_help $MISSING_DEPENDENCY
35436  else
35437    PKGHANDLER_COMMAND=
35438
35439    case $PKGHANDLER in
35440      apt-get)
35441        apt_help     $MISSING_DEPENDENCY ;;
35442      yum)
35443        yum_help     $MISSING_DEPENDENCY ;;
35444      brew)
35445        brew_help    $MISSING_DEPENDENCY ;;
35446      port)
35447        port_help    $MISSING_DEPENDENCY ;;
35448      pkgutil)
35449        pkgutil_help $MISSING_DEPENDENCY ;;
35450      pkgadd)
35451        pkgadd_help  $MISSING_DEPENDENCY ;;
35452    esac
35453
35454    if test "x$PKGHANDLER_COMMAND" != x; then
35455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35456    fi
35457  fi
35458
35459      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35460    fi
35461  fi
35462
35463  # Now we have a compiler binary in CXX. Make sure it's okay.
35464
35465  # Only process if variable expands to non-empty
35466
35467  if test "x$CXX" != x; then
35468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35469
35470  # First separate the path from the arguments. This will split at the first
35471  # space.
35472  complete="$CXX"
35473  path="${complete%% *}"
35474  tmp="$complete EOL"
35475  arguments="${tmp#* }"
35476
35477  # Input might be given as Windows format, start by converting to
35478  # unix format.
35479  new_path=`$CYGPATH -u "$path"`
35480
35481  # Now try to locate executable using which
35482  new_path=`$WHICH "$new_path" 2> /dev/null`
35483  # bat and cmd files are not always considered executable in cygwin causing which
35484  # to not find them
35485  if test "x$new_path" = x \
35486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35488    new_path=`$CYGPATH -u "$path"`
35489  fi
35490  if test "x$new_path" = x; then
35491    # Oops. Which didn't find the executable.
35492    # The splitting of arguments from the executable at a space might have been incorrect,
35493    # since paths with space are more likely in Windows. Give it another try with the whole
35494    # argument.
35495    path="$complete"
35496    arguments="EOL"
35497    new_path=`$CYGPATH -u "$path"`
35498    new_path=`$WHICH "$new_path" 2> /dev/null`
35499    # bat and cmd files are not always considered executable in cygwin causing which
35500    # to not find them
35501    if test "x$new_path" = x \
35502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35504      new_path=`$CYGPATH -u "$path"`
35505    fi
35506    if test "x$new_path" = x; then
35507      # It's still not found. Now this is an unrecoverable error.
35508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35509$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35510      has_space=`$ECHO "$complete" | $GREP " "`
35511      if test "x$has_space" != x; then
35512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35514      fi
35515      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35516    fi
35517  fi
35518
35519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35522  # "foo.exe" is OK but "foo" is an error.
35523  #
35524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35525  # It is also a way to make sure we got the proper file name for the real test later on.
35526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35527  if test "x$test_shortpath" = x; then
35528    # Short path failed, file does not exist as specified.
35529    # Try adding .exe or .cmd
35530    if test -f "${new_path}.exe"; then
35531      input_to_shortpath="${new_path}.exe"
35532    elif test -f "${new_path}.cmd"; then
35533      input_to_shortpath="${new_path}.cmd"
35534    else
35535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35536$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35539      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35540    fi
35541  else
35542    input_to_shortpath="$new_path"
35543  fi
35544
35545  # Call helper function which possibly converts this using DOS-style short mode.
35546  # If so, the updated path is stored in $new_path.
35547  new_path="$input_to_shortpath"
35548
35549  input_path="$input_to_shortpath"
35550  # Check if we need to convert this using DOS-style short mode. If the path
35551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35552  # take no chances and rewrite it.
35553  # Note: m4 eats our [], so we need to use [ and ] instead.
35554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35555  if test "x$has_forbidden_chars" != x; then
35556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35560      # Going to short mode and back again did indeed matter. Since short mode is
35561      # case insensitive, let's make it lowercase to improve readability.
35562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35563      # Now convert it back to Unix-style (cygpath)
35564      input_path=`$CYGPATH -u "$shortmode_path"`
35565      new_path="$input_path"
35566    fi
35567  fi
35568
35569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35570  if test "x$test_cygdrive_prefix" = x; then
35571    # As a simple fix, exclude /usr/bin since it's not a real path.
35572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35574      # a path prefixed by /cygdrive for fixpath to work.
35575      new_path="$CYGWIN_ROOT_PATH$input_path"
35576    fi
35577  fi
35578
35579  # remove trailing .exe if any
35580  new_path="${new_path/%.exe/}"
35581
35582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35583
35584  # First separate the path from the arguments. This will split at the first
35585  # space.
35586  complete="$CXX"
35587  path="${complete%% *}"
35588  tmp="$complete EOL"
35589  arguments="${tmp#* }"
35590
35591  # Input might be given as Windows format, start by converting to
35592  # unix format.
35593  new_path="$path"
35594
35595  windows_path="$new_path"
35596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35597    unix_path=`$CYGPATH -u "$windows_path"`
35598    new_path="$unix_path"
35599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35601    new_path="$unix_path"
35602  fi
35603
35604
35605  # Now try to locate executable using which
35606  new_path=`$WHICH "$new_path" 2> /dev/null`
35607
35608  if test "x$new_path" = x; then
35609    # Oops. Which didn't find the executable.
35610    # The splitting of arguments from the executable at a space might have been incorrect,
35611    # since paths with space are more likely in Windows. Give it another try with the whole
35612    # argument.
35613    path="$complete"
35614    arguments="EOL"
35615    new_path="$path"
35616
35617  windows_path="$new_path"
35618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35619    unix_path=`$CYGPATH -u "$windows_path"`
35620    new_path="$unix_path"
35621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35623    new_path="$unix_path"
35624  fi
35625
35626
35627    new_path=`$WHICH "$new_path" 2> /dev/null`
35628    # bat and cmd files are not always considered executable in MSYS causing which
35629    # to not find them
35630    if test "x$new_path" = x \
35631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35633      new_path="$path"
35634
35635  windows_path="$new_path"
35636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35637    unix_path=`$CYGPATH -u "$windows_path"`
35638    new_path="$unix_path"
35639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35641    new_path="$unix_path"
35642  fi
35643
35644    fi
35645
35646    if test "x$new_path" = x; then
35647      # It's still not found. Now this is an unrecoverable error.
35648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35649$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35650      has_space=`$ECHO "$complete" | $GREP " "`
35651      if test "x$has_space" != x; then
35652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35654      fi
35655      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35656    fi
35657  fi
35658
35659  # Now new_path has a complete unix path to the binary
35660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35661    # Keep paths in /bin as-is, but remove trailing .exe if any
35662    new_path="${new_path/%.exe/}"
35663    # Do not save /bin paths to all_fixpath_prefixes!
35664  else
35665    # Not in mixed or Windows style, start by that.
35666    new_path=`cmd //c echo $new_path`
35667
35668  input_path="$new_path"
35669  # Check if we need to convert this using DOS-style short mode. If the path
35670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35671  # take no chances and rewrite it.
35672  # Note: m4 eats our [], so we need to use [ and ] instead.
35673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35674  if test "x$has_forbidden_chars" != x; then
35675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35677  fi
35678
35679    # Output is in $new_path
35680
35681  windows_path="$new_path"
35682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35683    unix_path=`$CYGPATH -u "$windows_path"`
35684    new_path="$unix_path"
35685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35687    new_path="$unix_path"
35688  fi
35689
35690    # remove trailing .exe if any
35691    new_path="${new_path/%.exe/}"
35692
35693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35695  fi
35696
35697    else
35698      # We're on a unix platform. Hooray! :)
35699      # First separate the path from the arguments. This will split at the first
35700      # space.
35701      complete="$CXX"
35702      path="${complete%% *}"
35703      tmp="$complete EOL"
35704      arguments="${tmp#* }"
35705
35706      # Cannot rely on the command "which" here since it doesn't always work.
35707      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35708      if test -z "$is_absolute_path"; then
35709        # Path to executable is not absolute. Find it.
35710        IFS_save="$IFS"
35711        IFS=:
35712        for p in $PATH; do
35713          if test -f "$p/$path" && test -x "$p/$path"; then
35714            new_path="$p/$path"
35715            break
35716          fi
35717        done
35718        IFS="$IFS_save"
35719      else
35720        # This is an absolute path, we can use it without further modifications.
35721        new_path="$path"
35722      fi
35723
35724      if test "x$new_path" = x; then
35725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35726$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35727        has_space=`$ECHO "$complete" | $GREP " "`
35728        if test "x$has_space" != x; then
35729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35731        fi
35732        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35733      fi
35734    fi
35735
35736    # Now join together the path and the arguments once again
35737    if test "x$arguments" != xEOL; then
35738      new_complete="$new_path ${arguments% *}"
35739    else
35740      new_complete="$new_path"
35741    fi
35742
35743    if test "x$complete" != "x$new_complete"; then
35744      CXX="$new_complete"
35745      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35746$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35747    fi
35748  fi
35749
35750  TEST_COMPILER="$CXX"
35751
35752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35753$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35754  SYMLINK_ORIGINAL="$TEST_COMPILER"
35755
35756  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35757    # Follow a chain of symbolic links. Use readlink
35758    # where it exists, else fall back to horribly
35759    # complicated shell code.
35760    if test "x$READLINK_TESTED" != yes; then
35761      # On MacOSX there is a readlink tool with a different
35762      # purpose than the GNU readlink tool. Check the found readlink.
35763      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35764      if test "x$ISGNU" = x; then
35765        # A readlink that we do not know how to use.
35766        # Are there other non-GNU readlinks out there?
35767        READLINK_TESTED=yes
35768        READLINK=
35769      fi
35770    fi
35771
35772    if test "x$READLINK" != x; then
35773      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35774    else
35775      # Save the current directory for restoring afterwards
35776      STARTDIR=$PWD
35777      COUNTER=0
35778      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35779      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35780      cd $sym_link_dir
35781      # Use -P flag to resolve symlinks in directories.
35782      cd `$THEPWDCMD -P`
35783      sym_link_dir=`$THEPWDCMD -P`
35784      # Resolve file symlinks
35785      while test $COUNTER -lt 20; do
35786        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35787        if test "x$ISLINK" == x; then
35788          # This is not a symbolic link! We are done!
35789          break
35790        fi
35791        # Again resolve directory symlinks since the target of the just found
35792        # link could be in a different directory
35793        cd `$DIRNAME $ISLINK`
35794        sym_link_dir=`$THEPWDCMD -P`
35795        sym_link_file=`$BASENAME $ISLINK`
35796        let COUNTER=COUNTER+1
35797      done
35798      cd $STARTDIR
35799      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35800    fi
35801  fi
35802
35803  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35805$as_echo "no symlink" >&6; }
35806  else
35807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35808$as_echo "$SYMLINK_ORIGINAL" >&6; }
35809
35810    # We can't handle ccache by gcc wrappers, since we need to know if we're
35811    # using ccache. Instead ccache usage must be controlled by a configure option.
35812    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35813    if test "x$COMPILER_BASENAME" = "xccache"; then
35814      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35815$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35816      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35817    fi
35818  fi
35819
35820
35821  COMPILER=$CXX
35822  COMPILER_NAME=$COMPILER_NAME
35823
35824  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35825    # cc -V output typically looks like
35826    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35827    # or
35828    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35829    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35830    # Check that this is likely to be the Solaris Studio cc.
35831    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35832    if test $? -ne 0; then
35833      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35834      { $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
35835$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35836      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35837$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35838      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35839$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35840      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35841    fi
35842    # Remove usage instructions (if present), and
35843    # collapse compiler output into a single line
35844    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35845        $SED -e 's/ *[Uu]sage:.*//'`
35846    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35847        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35848  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35849    # xlc -qversion output typically looks like
35850    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35851    #     Version: 11.01.0000.0015
35852    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35853    # Check that this is likely to be the IBM XL C compiler.
35854    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35855    if test $? -ne 0; then
35856      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35857      { $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
35858$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35859      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35860$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35862$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35863      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35864    fi
35865    # Collapse compiler output into a single line
35866    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35867    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35868        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35869  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35870    # There is no specific version flag, but all output starts with a version string.
35871    # First line typically looks something like:
35872    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35873    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35874    # Check that this is likely to be Microsoft CL.EXE.
35875    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35876    if test $? -ne 0; then
35877      { $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
35878$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35879      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35880$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35881      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35882    fi
35883    # Collapse compiler output into a single line
35884    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35885    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35886        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35887  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35888    # gcc --version output typically looks like
35889    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35890    #     Copyright (C) 2013 Free Software Foundation, Inc.
35891    #     This is free software; see the source for copying conditions.  There is NO
35892    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35893    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35894    # Check that this is likely to be GCC.
35895    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35896    if test $? -ne 0; then
35897      { $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
35898$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35899      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35900$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35901      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35902    fi
35903    # Remove Copyright and legalese from version string, and
35904    # collapse into a single line
35905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35906        $SED -e 's/ *Copyright .*//'`
35907    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35908        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35909  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35910    # clang --version output typically looks like
35911    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35912    #    clang version 3.3 (tags/RELEASE_33/final)
35913    # or
35914    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35915    #    Target: x86_64-pc-linux-gnu
35916    #    Thread model: posix
35917    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35918    # Check that this is likely to be clang
35919    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35920    if test $? -ne 0; then
35921      { $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
35922$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35923      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35924$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35925      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35926    fi
35927    # Collapse compiler output into a single line
35928    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35929    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35930        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35931  else
35932      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35933  fi
35934  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35935  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35936  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35937  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35938
35939  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35940$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35941
35942
35943  # Now that we have resolved CXX ourself, let autoconf have its go at it
35944  ac_ext=cpp
35945ac_cpp='$CXXCPP $CPPFLAGS'
35946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35949if test -z "$CXX"; then
35950  if test -n "$CCC"; then
35951    CXX=$CCC
35952  else
35953    if test -n "$ac_tool_prefix"; then
35954  for ac_prog in $CXX
35955  do
35956    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35959$as_echo_n "checking for $ac_word... " >&6; }
35960if ${ac_cv_prog_CXX+:} false; then :
35961  $as_echo_n "(cached) " >&6
35962else
35963  if test -n "$CXX"; then
35964  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35965else
35966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35967for as_dir in $PATH
35968do
35969  IFS=$as_save_IFS
35970  test -z "$as_dir" && as_dir=.
35971    for ac_exec_ext in '' $ac_executable_extensions; do
35972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35973    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35975    break 2
35976  fi
35977done
35978  done
35979IFS=$as_save_IFS
35980
35981fi
35982fi
35983CXX=$ac_cv_prog_CXX
35984if test -n "$CXX"; then
35985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35986$as_echo "$CXX" >&6; }
35987else
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35989$as_echo "no" >&6; }
35990fi
35991
35992
35993    test -n "$CXX" && break
35994  done
35995fi
35996if test -z "$CXX"; then
35997  ac_ct_CXX=$CXX
35998  for ac_prog in $CXX
35999do
36000  # Extract the first word of "$ac_prog", so it can be a program name with args.
36001set dummy $ac_prog; ac_word=$2
36002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36003$as_echo_n "checking for $ac_word... " >&6; }
36004if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36005  $as_echo_n "(cached) " >&6
36006else
36007  if test -n "$ac_ct_CXX"; then
36008  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36009else
36010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36011for as_dir in $PATH
36012do
36013  IFS=$as_save_IFS
36014  test -z "$as_dir" && as_dir=.
36015    for ac_exec_ext in '' $ac_executable_extensions; do
36016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36017    ac_cv_prog_ac_ct_CXX="$ac_prog"
36018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36019    break 2
36020  fi
36021done
36022  done
36023IFS=$as_save_IFS
36024
36025fi
36026fi
36027ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36028if test -n "$ac_ct_CXX"; then
36029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36030$as_echo "$ac_ct_CXX" >&6; }
36031else
36032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36033$as_echo "no" >&6; }
36034fi
36035
36036
36037  test -n "$ac_ct_CXX" && break
36038done
36039
36040  if test "x$ac_ct_CXX" = x; then
36041    CXX="g++"
36042  else
36043    case $cross_compiling:$ac_tool_warned in
36044yes:)
36045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36047ac_tool_warned=yes ;;
36048esac
36049    CXX=$ac_ct_CXX
36050  fi
36051fi
36052
36053  fi
36054fi
36055# Provide some information about the compiler.
36056$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36057set X $ac_compile
36058ac_compiler=$2
36059for ac_option in --version -v -V -qversion; do
36060  { { ac_try="$ac_compiler $ac_option >&5"
36061case "(($ac_try" in
36062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36063  *) ac_try_echo=$ac_try;;
36064esac
36065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36066$as_echo "$ac_try_echo"; } >&5
36067  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36068  ac_status=$?
36069  if test -s conftest.err; then
36070    sed '10a\
36071... rest of stderr output deleted ...
36072         10q' conftest.err >conftest.er1
36073    cat conftest.er1 >&5
36074  fi
36075  rm -f conftest.er1 conftest.err
36076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36077  test $ac_status = 0; }
36078done
36079
36080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36081$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36082if ${ac_cv_cxx_compiler_gnu+:} false; then :
36083  $as_echo_n "(cached) " >&6
36084else
36085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36086/* end confdefs.h.  */
36087
36088int
36089main ()
36090{
36091#ifndef __GNUC__
36092       choke me
36093#endif
36094
36095  ;
36096  return 0;
36097}
36098_ACEOF
36099if ac_fn_cxx_try_compile "$LINENO"; then :
36100  ac_compiler_gnu=yes
36101else
36102  ac_compiler_gnu=no
36103fi
36104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36105ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36106
36107fi
36108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36109$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36110if test $ac_compiler_gnu = yes; then
36111  GXX=yes
36112else
36113  GXX=
36114fi
36115ac_test_CXXFLAGS=${CXXFLAGS+set}
36116ac_save_CXXFLAGS=$CXXFLAGS
36117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36118$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36119if ${ac_cv_prog_cxx_g+:} false; then :
36120  $as_echo_n "(cached) " >&6
36121else
36122  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36123   ac_cxx_werror_flag=yes
36124   ac_cv_prog_cxx_g=no
36125   CXXFLAGS="-g"
36126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36127/* end confdefs.h.  */
36128
36129int
36130main ()
36131{
36132
36133  ;
36134  return 0;
36135}
36136_ACEOF
36137if ac_fn_cxx_try_compile "$LINENO"; then :
36138  ac_cv_prog_cxx_g=yes
36139else
36140  CXXFLAGS=""
36141      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36142/* end confdefs.h.  */
36143
36144int
36145main ()
36146{
36147
36148  ;
36149  return 0;
36150}
36151_ACEOF
36152if ac_fn_cxx_try_compile "$LINENO"; then :
36153
36154else
36155  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36156	 CXXFLAGS="-g"
36157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36158/* end confdefs.h.  */
36159
36160int
36161main ()
36162{
36163
36164  ;
36165  return 0;
36166}
36167_ACEOF
36168if ac_fn_cxx_try_compile "$LINENO"; then :
36169  ac_cv_prog_cxx_g=yes
36170fi
36171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36172fi
36173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36174fi
36175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36176   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36177fi
36178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36179$as_echo "$ac_cv_prog_cxx_g" >&6; }
36180if test "$ac_test_CXXFLAGS" = set; then
36181  CXXFLAGS=$ac_save_CXXFLAGS
36182elif test $ac_cv_prog_cxx_g = yes; then
36183  if test "$GXX" = yes; then
36184    CXXFLAGS="-g -O2"
36185  else
36186    CXXFLAGS="-g"
36187  fi
36188else
36189  if test "$GXX" = yes; then
36190    CXXFLAGS="-O2"
36191  else
36192    CXXFLAGS=
36193  fi
36194fi
36195ac_ext=cpp
36196ac_cpp='$CXXCPP $CPPFLAGS'
36197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36200
36201
36202  # This is the compiler version number on the form X.Y[.Z]
36203
36204
36205
36206
36207  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36208    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36209$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36210    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36211$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36212  fi
36213
36214  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36215  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36217$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36218  fi
36219
36220  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36221    { $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
36222$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36223  fi
36224
36225  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36226
36227
36228  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278    # Execute function body
36279
36280  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36281  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36282
36283  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36284    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36285  fi
36286
36287  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36288    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36289  fi
36290
36291  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36292  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36293
36294  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36295    :
36296
36297  else
36298    :
36299
36300          { $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
36301$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36302
36303
36304  fi
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319  fi
36320
36321  #
36322  # Setup the preprocessor (CPP and CXXCPP)
36323  #
36324  ac_ext=c
36325ac_cpp='$CPP $CPPFLAGS'
36326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36328ac_compiler_gnu=$ac_cv_c_compiler_gnu
36329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36330$as_echo_n "checking how to run the C preprocessor... " >&6; }
36331# On Suns, sometimes $CPP names a directory.
36332if test -n "$CPP" && test -d "$CPP"; then
36333  CPP=
36334fi
36335if test -z "$CPP"; then
36336  if ${ac_cv_prog_CPP+:} false; then :
36337  $as_echo_n "(cached) " >&6
36338else
36339      # Double quotes because CPP needs to be expanded
36340    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36341    do
36342      ac_preproc_ok=false
36343for ac_c_preproc_warn_flag in '' yes
36344do
36345  # Use a header file that comes with gcc, so configuring glibc
36346  # with a fresh cross-compiler works.
36347  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36348  # <limits.h> exists even on freestanding compilers.
36349  # On the NeXT, cc -E runs the code through the compiler's parser,
36350  # not just through cpp. "Syntax error" is here to catch this case.
36351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36352/* end confdefs.h.  */
36353#ifdef __STDC__
36354# include <limits.h>
36355#else
36356# include <assert.h>
36357#endif
36358		     Syntax error
36359_ACEOF
36360if ac_fn_c_try_cpp "$LINENO"; then :
36361
36362else
36363  # Broken: fails on valid input.
36364continue
36365fi
36366rm -f conftest.err conftest.i conftest.$ac_ext
36367
36368  # OK, works on sane cases.  Now check whether nonexistent headers
36369  # can be detected and how.
36370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36371/* end confdefs.h.  */
36372#include <ac_nonexistent.h>
36373_ACEOF
36374if ac_fn_c_try_cpp "$LINENO"; then :
36375  # Broken: success on invalid input.
36376continue
36377else
36378  # Passes both tests.
36379ac_preproc_ok=:
36380break
36381fi
36382rm -f conftest.err conftest.i conftest.$ac_ext
36383
36384done
36385# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36386rm -f conftest.i conftest.err conftest.$ac_ext
36387if $ac_preproc_ok; then :
36388  break
36389fi
36390
36391    done
36392    ac_cv_prog_CPP=$CPP
36393
36394fi
36395  CPP=$ac_cv_prog_CPP
36396else
36397  ac_cv_prog_CPP=$CPP
36398fi
36399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36400$as_echo "$CPP" >&6; }
36401ac_preproc_ok=false
36402for ac_c_preproc_warn_flag in '' yes
36403do
36404  # Use a header file that comes with gcc, so configuring glibc
36405  # with a fresh cross-compiler works.
36406  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36407  # <limits.h> exists even on freestanding compilers.
36408  # On the NeXT, cc -E runs the code through the compiler's parser,
36409  # not just through cpp. "Syntax error" is here to catch this case.
36410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36411/* end confdefs.h.  */
36412#ifdef __STDC__
36413# include <limits.h>
36414#else
36415# include <assert.h>
36416#endif
36417		     Syntax error
36418_ACEOF
36419if ac_fn_c_try_cpp "$LINENO"; then :
36420
36421else
36422  # Broken: fails on valid input.
36423continue
36424fi
36425rm -f conftest.err conftest.i conftest.$ac_ext
36426
36427  # OK, works on sane cases.  Now check whether nonexistent headers
36428  # can be detected and how.
36429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36430/* end confdefs.h.  */
36431#include <ac_nonexistent.h>
36432_ACEOF
36433if ac_fn_c_try_cpp "$LINENO"; then :
36434  # Broken: success on invalid input.
36435continue
36436else
36437  # Passes both tests.
36438ac_preproc_ok=:
36439break
36440fi
36441rm -f conftest.err conftest.i conftest.$ac_ext
36442
36443done
36444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36445rm -f conftest.i conftest.err conftest.$ac_ext
36446if $ac_preproc_ok; then :
36447
36448else
36449  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36451as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36452See \`config.log' for more details" "$LINENO" 5; }
36453fi
36454
36455ac_ext=cpp
36456ac_cpp='$CXXCPP $CPPFLAGS'
36457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36460
36461
36462  # Only process if variable expands to non-empty
36463
36464  if test "x$CPP" != x; then
36465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36466
36467  # First separate the path from the arguments. This will split at the first
36468  # space.
36469  complete="$CPP"
36470  path="${complete%% *}"
36471  tmp="$complete EOL"
36472  arguments="${tmp#* }"
36473
36474  # Input might be given as Windows format, start by converting to
36475  # unix format.
36476  new_path=`$CYGPATH -u "$path"`
36477
36478  # Now try to locate executable using which
36479  new_path=`$WHICH "$new_path" 2> /dev/null`
36480  # bat and cmd files are not always considered executable in cygwin causing which
36481  # to not find them
36482  if test "x$new_path" = x \
36483      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36484      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36485    new_path=`$CYGPATH -u "$path"`
36486  fi
36487  if test "x$new_path" = x; then
36488    # Oops. Which didn't find the executable.
36489    # The splitting of arguments from the executable at a space might have been incorrect,
36490    # since paths with space are more likely in Windows. Give it another try with the whole
36491    # argument.
36492    path="$complete"
36493    arguments="EOL"
36494    new_path=`$CYGPATH -u "$path"`
36495    new_path=`$WHICH "$new_path" 2> /dev/null`
36496    # bat and cmd files are not always considered executable in cygwin causing which
36497    # to not find them
36498    if test "x$new_path" = x \
36499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36501      new_path=`$CYGPATH -u "$path"`
36502    fi
36503    if test "x$new_path" = x; then
36504      # It's still not found. Now this is an unrecoverable error.
36505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36506$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36507      has_space=`$ECHO "$complete" | $GREP " "`
36508      if test "x$has_space" != x; then
36509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36511      fi
36512      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36513    fi
36514  fi
36515
36516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36519  # "foo.exe" is OK but "foo" is an error.
36520  #
36521  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36522  # It is also a way to make sure we got the proper file name for the real test later on.
36523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36524  if test "x$test_shortpath" = x; then
36525    # Short path failed, file does not exist as specified.
36526    # Try adding .exe or .cmd
36527    if test -f "${new_path}.exe"; then
36528      input_to_shortpath="${new_path}.exe"
36529    elif test -f "${new_path}.cmd"; then
36530      input_to_shortpath="${new_path}.cmd"
36531    else
36532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36533$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36534      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36535$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36536      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36537    fi
36538  else
36539    input_to_shortpath="$new_path"
36540  fi
36541
36542  # Call helper function which possibly converts this using DOS-style short mode.
36543  # If so, the updated path is stored in $new_path.
36544  new_path="$input_to_shortpath"
36545
36546  input_path="$input_to_shortpath"
36547  # Check if we need to convert this using DOS-style short mode. If the path
36548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36549  # take no chances and rewrite it.
36550  # Note: m4 eats our [], so we need to use [ and ] instead.
36551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36552  if test "x$has_forbidden_chars" != x; then
36553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36557      # Going to short mode and back again did indeed matter. Since short mode is
36558      # case insensitive, let's make it lowercase to improve readability.
36559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36560      # Now convert it back to Unix-style (cygpath)
36561      input_path=`$CYGPATH -u "$shortmode_path"`
36562      new_path="$input_path"
36563    fi
36564  fi
36565
36566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36567  if test "x$test_cygdrive_prefix" = x; then
36568    # As a simple fix, exclude /usr/bin since it's not a real path.
36569    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36571      # a path prefixed by /cygdrive for fixpath to work.
36572      new_path="$CYGWIN_ROOT_PATH$input_path"
36573    fi
36574  fi
36575
36576  # remove trailing .exe if any
36577  new_path="${new_path/%.exe/}"
36578
36579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36580
36581  # First separate the path from the arguments. This will split at the first
36582  # space.
36583  complete="$CPP"
36584  path="${complete%% *}"
36585  tmp="$complete EOL"
36586  arguments="${tmp#* }"
36587
36588  # Input might be given as Windows format, start by converting to
36589  # unix format.
36590  new_path="$path"
36591
36592  windows_path="$new_path"
36593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36594    unix_path=`$CYGPATH -u "$windows_path"`
36595    new_path="$unix_path"
36596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36598    new_path="$unix_path"
36599  fi
36600
36601
36602  # Now try to locate executable using which
36603  new_path=`$WHICH "$new_path" 2> /dev/null`
36604
36605  if test "x$new_path" = x; then
36606    # Oops. Which didn't find the executable.
36607    # The splitting of arguments from the executable at a space might have been incorrect,
36608    # since paths with space are more likely in Windows. Give it another try with the whole
36609    # argument.
36610    path="$complete"
36611    arguments="EOL"
36612    new_path="$path"
36613
36614  windows_path="$new_path"
36615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36616    unix_path=`$CYGPATH -u "$windows_path"`
36617    new_path="$unix_path"
36618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36620    new_path="$unix_path"
36621  fi
36622
36623
36624    new_path=`$WHICH "$new_path" 2> /dev/null`
36625    # bat and cmd files are not always considered executable in MSYS causing which
36626    # to not find them
36627    if test "x$new_path" = x \
36628        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36629        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36630      new_path="$path"
36631
36632  windows_path="$new_path"
36633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36634    unix_path=`$CYGPATH -u "$windows_path"`
36635    new_path="$unix_path"
36636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36638    new_path="$unix_path"
36639  fi
36640
36641    fi
36642
36643    if test "x$new_path" = x; then
36644      # It's still not found. Now this is an unrecoverable error.
36645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36646$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36647      has_space=`$ECHO "$complete" | $GREP " "`
36648      if test "x$has_space" != x; then
36649        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36650$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36651      fi
36652      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36653    fi
36654  fi
36655
36656  # Now new_path has a complete unix path to the binary
36657  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36658    # Keep paths in /bin as-is, but remove trailing .exe if any
36659    new_path="${new_path/%.exe/}"
36660    # Do not save /bin paths to all_fixpath_prefixes!
36661  else
36662    # Not in mixed or Windows style, start by that.
36663    new_path=`cmd //c echo $new_path`
36664
36665  input_path="$new_path"
36666  # Check if we need to convert this using DOS-style short mode. If the path
36667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36668  # take no chances and rewrite it.
36669  # Note: m4 eats our [], so we need to use [ and ] instead.
36670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36671  if test "x$has_forbidden_chars" != x; then
36672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36674  fi
36675
36676    # Output is in $new_path
36677
36678  windows_path="$new_path"
36679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36680    unix_path=`$CYGPATH -u "$windows_path"`
36681    new_path="$unix_path"
36682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36684    new_path="$unix_path"
36685  fi
36686
36687    # remove trailing .exe if any
36688    new_path="${new_path/%.exe/}"
36689
36690    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36691    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36692  fi
36693
36694    else
36695      # We're on a unix platform. Hooray! :)
36696      # First separate the path from the arguments. This will split at the first
36697      # space.
36698      complete="$CPP"
36699      path="${complete%% *}"
36700      tmp="$complete EOL"
36701      arguments="${tmp#* }"
36702
36703      # Cannot rely on the command "which" here since it doesn't always work.
36704      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36705      if test -z "$is_absolute_path"; then
36706        # Path to executable is not absolute. Find it.
36707        IFS_save="$IFS"
36708        IFS=:
36709        for p in $PATH; do
36710          if test -f "$p/$path" && test -x "$p/$path"; then
36711            new_path="$p/$path"
36712            break
36713          fi
36714        done
36715        IFS="$IFS_save"
36716      else
36717        # This is an absolute path, we can use it without further modifications.
36718        new_path="$path"
36719      fi
36720
36721      if test "x$new_path" = x; then
36722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36723$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36724        has_space=`$ECHO "$complete" | $GREP " "`
36725        if test "x$has_space" != x; then
36726          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36727$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36728        fi
36729        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36730      fi
36731    fi
36732
36733    # Now join together the path and the arguments once again
36734    if test "x$arguments" != xEOL; then
36735      new_complete="$new_path ${arguments% *}"
36736    else
36737      new_complete="$new_path"
36738    fi
36739
36740    if test "x$complete" != "x$new_complete"; then
36741      CPP="$new_complete"
36742      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36743$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36744    fi
36745  fi
36746
36747  ac_ext=cpp
36748ac_cpp='$CXXCPP $CPPFLAGS'
36749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36753$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36754if test -z "$CXXCPP"; then
36755  if ${ac_cv_prog_CXXCPP+:} false; then :
36756  $as_echo_n "(cached) " >&6
36757else
36758      # Double quotes because CXXCPP needs to be expanded
36759    for CXXCPP in "$CXX -E" "/lib/cpp"
36760    do
36761      ac_preproc_ok=false
36762for ac_cxx_preproc_warn_flag in '' yes
36763do
36764  # Use a header file that comes with gcc, so configuring glibc
36765  # with a fresh cross-compiler works.
36766  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36767  # <limits.h> exists even on freestanding compilers.
36768  # On the NeXT, cc -E runs the code through the compiler's parser,
36769  # not just through cpp. "Syntax error" is here to catch this case.
36770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36771/* end confdefs.h.  */
36772#ifdef __STDC__
36773# include <limits.h>
36774#else
36775# include <assert.h>
36776#endif
36777		     Syntax error
36778_ACEOF
36779if ac_fn_cxx_try_cpp "$LINENO"; then :
36780
36781else
36782  # Broken: fails on valid input.
36783continue
36784fi
36785rm -f conftest.err conftest.i conftest.$ac_ext
36786
36787  # OK, works on sane cases.  Now check whether nonexistent headers
36788  # can be detected and how.
36789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36790/* end confdefs.h.  */
36791#include <ac_nonexistent.h>
36792_ACEOF
36793if ac_fn_cxx_try_cpp "$LINENO"; then :
36794  # Broken: success on invalid input.
36795continue
36796else
36797  # Passes both tests.
36798ac_preproc_ok=:
36799break
36800fi
36801rm -f conftest.err conftest.i conftest.$ac_ext
36802
36803done
36804# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36805rm -f conftest.i conftest.err conftest.$ac_ext
36806if $ac_preproc_ok; then :
36807  break
36808fi
36809
36810    done
36811    ac_cv_prog_CXXCPP=$CXXCPP
36812
36813fi
36814  CXXCPP=$ac_cv_prog_CXXCPP
36815else
36816  ac_cv_prog_CXXCPP=$CXXCPP
36817fi
36818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36819$as_echo "$CXXCPP" >&6; }
36820ac_preproc_ok=false
36821for ac_cxx_preproc_warn_flag in '' yes
36822do
36823  # Use a header file that comes with gcc, so configuring glibc
36824  # with a fresh cross-compiler works.
36825  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36826  # <limits.h> exists even on freestanding compilers.
36827  # On the NeXT, cc -E runs the code through the compiler's parser,
36828  # not just through cpp. "Syntax error" is here to catch this case.
36829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36830/* end confdefs.h.  */
36831#ifdef __STDC__
36832# include <limits.h>
36833#else
36834# include <assert.h>
36835#endif
36836		     Syntax error
36837_ACEOF
36838if ac_fn_cxx_try_cpp "$LINENO"; then :
36839
36840else
36841  # Broken: fails on valid input.
36842continue
36843fi
36844rm -f conftest.err conftest.i conftest.$ac_ext
36845
36846  # OK, works on sane cases.  Now check whether nonexistent headers
36847  # can be detected and how.
36848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36849/* end confdefs.h.  */
36850#include <ac_nonexistent.h>
36851_ACEOF
36852if ac_fn_cxx_try_cpp "$LINENO"; then :
36853  # Broken: success on invalid input.
36854continue
36855else
36856  # Passes both tests.
36857ac_preproc_ok=:
36858break
36859fi
36860rm -f conftest.err conftest.i conftest.$ac_ext
36861
36862done
36863# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36864rm -f conftest.i conftest.err conftest.$ac_ext
36865if $ac_preproc_ok; then :
36866
36867else
36868  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36870as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36871See \`config.log' for more details" "$LINENO" 5; }
36872fi
36873
36874ac_ext=cpp
36875ac_cpp='$CXXCPP $CPPFLAGS'
36876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36879
36880
36881  # Only process if variable expands to non-empty
36882
36883  if test "x$CXXCPP" != x; then
36884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36885
36886  # First separate the path from the arguments. This will split at the first
36887  # space.
36888  complete="$CXXCPP"
36889  path="${complete%% *}"
36890  tmp="$complete EOL"
36891  arguments="${tmp#* }"
36892
36893  # Input might be given as Windows format, start by converting to
36894  # unix format.
36895  new_path=`$CYGPATH -u "$path"`
36896
36897  # Now try to locate executable using which
36898  new_path=`$WHICH "$new_path" 2> /dev/null`
36899  # bat and cmd files are not always considered executable in cygwin causing which
36900  # to not find them
36901  if test "x$new_path" = x \
36902      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36903      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36904    new_path=`$CYGPATH -u "$path"`
36905  fi
36906  if test "x$new_path" = x; then
36907    # Oops. Which didn't find the executable.
36908    # The splitting of arguments from the executable at a space might have been incorrect,
36909    # since paths with space are more likely in Windows. Give it another try with the whole
36910    # argument.
36911    path="$complete"
36912    arguments="EOL"
36913    new_path=`$CYGPATH -u "$path"`
36914    new_path=`$WHICH "$new_path" 2> /dev/null`
36915    # bat and cmd files are not always considered executable in cygwin causing which
36916    # to not find them
36917    if test "x$new_path" = x \
36918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36920      new_path=`$CYGPATH -u "$path"`
36921    fi
36922    if test "x$new_path" = x; then
36923      # It's still not found. Now this is an unrecoverable error.
36924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36925$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36926      has_space=`$ECHO "$complete" | $GREP " "`
36927      if test "x$has_space" != x; then
36928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36930      fi
36931      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36932    fi
36933  fi
36934
36935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36938  # "foo.exe" is OK but "foo" is an error.
36939  #
36940  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36941  # It is also a way to make sure we got the proper file name for the real test later on.
36942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36943  if test "x$test_shortpath" = x; then
36944    # Short path failed, file does not exist as specified.
36945    # Try adding .exe or .cmd
36946    if test -f "${new_path}.exe"; then
36947      input_to_shortpath="${new_path}.exe"
36948    elif test -f "${new_path}.cmd"; then
36949      input_to_shortpath="${new_path}.cmd"
36950    else
36951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36952$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36953      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36954$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36955      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36956    fi
36957  else
36958    input_to_shortpath="$new_path"
36959  fi
36960
36961  # Call helper function which possibly converts this using DOS-style short mode.
36962  # If so, the updated path is stored in $new_path.
36963  new_path="$input_to_shortpath"
36964
36965  input_path="$input_to_shortpath"
36966  # Check if we need to convert this using DOS-style short mode. If the path
36967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36968  # take no chances and rewrite it.
36969  # Note: m4 eats our [], so we need to use [ and ] instead.
36970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36971  if test "x$has_forbidden_chars" != x; then
36972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36976      # Going to short mode and back again did indeed matter. Since short mode is
36977      # case insensitive, let's make it lowercase to improve readability.
36978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36979      # Now convert it back to Unix-style (cygpath)
36980      input_path=`$CYGPATH -u "$shortmode_path"`
36981      new_path="$input_path"
36982    fi
36983  fi
36984
36985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36986  if test "x$test_cygdrive_prefix" = x; then
36987    # As a simple fix, exclude /usr/bin since it's not a real path.
36988    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36990      # a path prefixed by /cygdrive for fixpath to work.
36991      new_path="$CYGWIN_ROOT_PATH$input_path"
36992    fi
36993  fi
36994
36995  # remove trailing .exe if any
36996  new_path="${new_path/%.exe/}"
36997
36998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36999
37000  # First separate the path from the arguments. This will split at the first
37001  # space.
37002  complete="$CXXCPP"
37003  path="${complete%% *}"
37004  tmp="$complete EOL"
37005  arguments="${tmp#* }"
37006
37007  # Input might be given as Windows format, start by converting to
37008  # unix format.
37009  new_path="$path"
37010
37011  windows_path="$new_path"
37012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37013    unix_path=`$CYGPATH -u "$windows_path"`
37014    new_path="$unix_path"
37015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37017    new_path="$unix_path"
37018  fi
37019
37020
37021  # Now try to locate executable using which
37022  new_path=`$WHICH "$new_path" 2> /dev/null`
37023
37024  if test "x$new_path" = x; then
37025    # Oops. Which didn't find the executable.
37026    # The splitting of arguments from the executable at a space might have been incorrect,
37027    # since paths with space are more likely in Windows. Give it another try with the whole
37028    # argument.
37029    path="$complete"
37030    arguments="EOL"
37031    new_path="$path"
37032
37033  windows_path="$new_path"
37034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37035    unix_path=`$CYGPATH -u "$windows_path"`
37036    new_path="$unix_path"
37037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37039    new_path="$unix_path"
37040  fi
37041
37042
37043    new_path=`$WHICH "$new_path" 2> /dev/null`
37044    # bat and cmd files are not always considered executable in MSYS causing which
37045    # to not find them
37046    if test "x$new_path" = x \
37047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37049      new_path="$path"
37050
37051  windows_path="$new_path"
37052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37053    unix_path=`$CYGPATH -u "$windows_path"`
37054    new_path="$unix_path"
37055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37057    new_path="$unix_path"
37058  fi
37059
37060    fi
37061
37062    if test "x$new_path" = x; then
37063      # It's still not found. Now this is an unrecoverable error.
37064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37065$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37066      has_space=`$ECHO "$complete" | $GREP " "`
37067      if test "x$has_space" != x; then
37068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37070      fi
37071      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37072    fi
37073  fi
37074
37075  # Now new_path has a complete unix path to the binary
37076  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37077    # Keep paths in /bin as-is, but remove trailing .exe if any
37078    new_path="${new_path/%.exe/}"
37079    # Do not save /bin paths to all_fixpath_prefixes!
37080  else
37081    # Not in mixed or Windows style, start by that.
37082    new_path=`cmd //c echo $new_path`
37083
37084  input_path="$new_path"
37085  # Check if we need to convert this using DOS-style short mode. If the path
37086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37087  # take no chances and rewrite it.
37088  # Note: m4 eats our [], so we need to use [ and ] instead.
37089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37090  if test "x$has_forbidden_chars" != x; then
37091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37093  fi
37094
37095    # Output is in $new_path
37096
37097  windows_path="$new_path"
37098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37099    unix_path=`$CYGPATH -u "$windows_path"`
37100    new_path="$unix_path"
37101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37103    new_path="$unix_path"
37104  fi
37105
37106    # remove trailing .exe if any
37107    new_path="${new_path/%.exe/}"
37108
37109    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37110    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37111  fi
37112
37113    else
37114      # We're on a unix platform. Hooray! :)
37115      # First separate the path from the arguments. This will split at the first
37116      # space.
37117      complete="$CXXCPP"
37118      path="${complete%% *}"
37119      tmp="$complete EOL"
37120      arguments="${tmp#* }"
37121
37122      # Cannot rely on the command "which" here since it doesn't always work.
37123      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37124      if test -z "$is_absolute_path"; then
37125        # Path to executable is not absolute. Find it.
37126        IFS_save="$IFS"
37127        IFS=:
37128        for p in $PATH; do
37129          if test -f "$p/$path" && test -x "$p/$path"; then
37130            new_path="$p/$path"
37131            break
37132          fi
37133        done
37134        IFS="$IFS_save"
37135      else
37136        # This is an absolute path, we can use it without further modifications.
37137        new_path="$path"
37138      fi
37139
37140      if test "x$new_path" = x; then
37141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37142$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37143        has_space=`$ECHO "$complete" | $GREP " "`
37144        if test "x$has_space" != x; then
37145          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37146$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37147        fi
37148        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37149      fi
37150    fi
37151
37152    # Now join together the path and the arguments once again
37153    if test "x$arguments" != xEOL; then
37154      new_complete="$new_path ${arguments% *}"
37155    else
37156      new_complete="$new_path"
37157    fi
37158
37159    if test "x$complete" != "x$new_complete"; then
37160      CXXCPP="$new_complete"
37161      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37162$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37163    fi
37164  fi
37165
37166
37167  #
37168  # Setup the linker (LD)
37169  #
37170  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37171    # In the Microsoft toolchain we have a separate LD command "link".
37172    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37173    # a cygwin program for something completely different.
37174    # Extract the first word of "link", so it can be a program name with args.
37175set dummy link; ac_word=$2
37176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37177$as_echo_n "checking for $ac_word... " >&6; }
37178if ${ac_cv_prog_LD+:} false; then :
37179  $as_echo_n "(cached) " >&6
37180else
37181  if test -n "$LD"; then
37182  ac_cv_prog_LD="$LD" # Let the user override the test.
37183else
37184  ac_prog_rejected=no
37185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37186for as_dir in $PATH
37187do
37188  IFS=$as_save_IFS
37189  test -z "$as_dir" && as_dir=.
37190    for ac_exec_ext in '' $ac_executable_extensions; do
37191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37192    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37193       ac_prog_rejected=yes
37194       continue
37195     fi
37196    ac_cv_prog_LD="link"
37197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198    break 2
37199  fi
37200done
37201  done
37202IFS=$as_save_IFS
37203
37204if test $ac_prog_rejected = yes; then
37205  # We found a bogon in the path, so make sure we never use it.
37206  set dummy $ac_cv_prog_LD
37207  shift
37208  if test $# != 0; then
37209    # We chose a different compiler from the bogus one.
37210    # However, it has the same basename, so the bogon will be chosen
37211    # first if we set LD to just the basename; use the full file name.
37212    shift
37213    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37214  fi
37215fi
37216fi
37217fi
37218LD=$ac_cv_prog_LD
37219if test -n "$LD"; then
37220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37221$as_echo "$LD" >&6; }
37222else
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37224$as_echo "no" >&6; }
37225fi
37226
37227
37228
37229  # Only process if variable expands to non-empty
37230
37231  if test "x$LD" != x; then
37232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37233
37234  # First separate the path from the arguments. This will split at the first
37235  # space.
37236  complete="$LD"
37237  path="${complete%% *}"
37238  tmp="$complete EOL"
37239  arguments="${tmp#* }"
37240
37241  # Input might be given as Windows format, start by converting to
37242  # unix format.
37243  new_path=`$CYGPATH -u "$path"`
37244
37245  # Now try to locate executable using which
37246  new_path=`$WHICH "$new_path" 2> /dev/null`
37247  # bat and cmd files are not always considered executable in cygwin causing which
37248  # to not find them
37249  if test "x$new_path" = x \
37250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37252    new_path=`$CYGPATH -u "$path"`
37253  fi
37254  if test "x$new_path" = x; then
37255    # Oops. Which didn't find the executable.
37256    # The splitting of arguments from the executable at a space might have been incorrect,
37257    # since paths with space are more likely in Windows. Give it another try with the whole
37258    # argument.
37259    path="$complete"
37260    arguments="EOL"
37261    new_path=`$CYGPATH -u "$path"`
37262    new_path=`$WHICH "$new_path" 2> /dev/null`
37263    # bat and cmd files are not always considered executable in cygwin causing which
37264    # to not find them
37265    if test "x$new_path" = x \
37266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37268      new_path=`$CYGPATH -u "$path"`
37269    fi
37270    if test "x$new_path" = x; then
37271      # It's still not found. Now this is an unrecoverable error.
37272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37273$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37274      has_space=`$ECHO "$complete" | $GREP " "`
37275      if test "x$has_space" != x; then
37276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37278      fi
37279      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37280    fi
37281  fi
37282
37283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37286  # "foo.exe" is OK but "foo" is an error.
37287  #
37288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37289  # It is also a way to make sure we got the proper file name for the real test later on.
37290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37291  if test "x$test_shortpath" = x; then
37292    # Short path failed, file does not exist as specified.
37293    # Try adding .exe or .cmd
37294    if test -f "${new_path}.exe"; then
37295      input_to_shortpath="${new_path}.exe"
37296    elif test -f "${new_path}.cmd"; then
37297      input_to_shortpath="${new_path}.cmd"
37298    else
37299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37300$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37303      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37304    fi
37305  else
37306    input_to_shortpath="$new_path"
37307  fi
37308
37309  # Call helper function which possibly converts this using DOS-style short mode.
37310  # If so, the updated path is stored in $new_path.
37311  new_path="$input_to_shortpath"
37312
37313  input_path="$input_to_shortpath"
37314  # Check if we need to convert this using DOS-style short mode. If the path
37315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37316  # take no chances and rewrite it.
37317  # Note: m4 eats our [], so we need to use [ and ] instead.
37318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37319  if test "x$has_forbidden_chars" != x; then
37320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37324      # Going to short mode and back again did indeed matter. Since short mode is
37325      # case insensitive, let's make it lowercase to improve readability.
37326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37327      # Now convert it back to Unix-style (cygpath)
37328      input_path=`$CYGPATH -u "$shortmode_path"`
37329      new_path="$input_path"
37330    fi
37331  fi
37332
37333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37334  if test "x$test_cygdrive_prefix" = x; then
37335    # As a simple fix, exclude /usr/bin since it's not a real path.
37336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37338      # a path prefixed by /cygdrive for fixpath to work.
37339      new_path="$CYGWIN_ROOT_PATH$input_path"
37340    fi
37341  fi
37342
37343  # remove trailing .exe if any
37344  new_path="${new_path/%.exe/}"
37345
37346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37347
37348  # First separate the path from the arguments. This will split at the first
37349  # space.
37350  complete="$LD"
37351  path="${complete%% *}"
37352  tmp="$complete EOL"
37353  arguments="${tmp#* }"
37354
37355  # Input might be given as Windows format, start by converting to
37356  # unix format.
37357  new_path="$path"
37358
37359  windows_path="$new_path"
37360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37361    unix_path=`$CYGPATH -u "$windows_path"`
37362    new_path="$unix_path"
37363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37365    new_path="$unix_path"
37366  fi
37367
37368
37369  # Now try to locate executable using which
37370  new_path=`$WHICH "$new_path" 2> /dev/null`
37371
37372  if test "x$new_path" = x; then
37373    # Oops. Which didn't find the executable.
37374    # The splitting of arguments from the executable at a space might have been incorrect,
37375    # since paths with space are more likely in Windows. Give it another try with the whole
37376    # argument.
37377    path="$complete"
37378    arguments="EOL"
37379    new_path="$path"
37380
37381  windows_path="$new_path"
37382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37383    unix_path=`$CYGPATH -u "$windows_path"`
37384    new_path="$unix_path"
37385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37387    new_path="$unix_path"
37388  fi
37389
37390
37391    new_path=`$WHICH "$new_path" 2> /dev/null`
37392    # bat and cmd files are not always considered executable in MSYS causing which
37393    # to not find them
37394    if test "x$new_path" = x \
37395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37397      new_path="$path"
37398
37399  windows_path="$new_path"
37400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37401    unix_path=`$CYGPATH -u "$windows_path"`
37402    new_path="$unix_path"
37403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37405    new_path="$unix_path"
37406  fi
37407
37408    fi
37409
37410    if test "x$new_path" = x; then
37411      # It's still not found. Now this is an unrecoverable error.
37412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37413$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37414      has_space=`$ECHO "$complete" | $GREP " "`
37415      if test "x$has_space" != x; then
37416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37418      fi
37419      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37420    fi
37421  fi
37422
37423  # Now new_path has a complete unix path to the binary
37424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37425    # Keep paths in /bin as-is, but remove trailing .exe if any
37426    new_path="${new_path/%.exe/}"
37427    # Do not save /bin paths to all_fixpath_prefixes!
37428  else
37429    # Not in mixed or Windows style, start by that.
37430    new_path=`cmd //c echo $new_path`
37431
37432  input_path="$new_path"
37433  # Check if we need to convert this using DOS-style short mode. If the path
37434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37435  # take no chances and rewrite it.
37436  # Note: m4 eats our [], so we need to use [ and ] instead.
37437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37438  if test "x$has_forbidden_chars" != x; then
37439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37441  fi
37442
37443    # Output is in $new_path
37444
37445  windows_path="$new_path"
37446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37447    unix_path=`$CYGPATH -u "$windows_path"`
37448    new_path="$unix_path"
37449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37451    new_path="$unix_path"
37452  fi
37453
37454    # remove trailing .exe if any
37455    new_path="${new_path/%.exe/}"
37456
37457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37459  fi
37460
37461    else
37462      # We're on a unix platform. Hooray! :)
37463      # First separate the path from the arguments. This will split at the first
37464      # space.
37465      complete="$LD"
37466      path="${complete%% *}"
37467      tmp="$complete EOL"
37468      arguments="${tmp#* }"
37469
37470      # Cannot rely on the command "which" here since it doesn't always work.
37471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37472      if test -z "$is_absolute_path"; then
37473        # Path to executable is not absolute. Find it.
37474        IFS_save="$IFS"
37475        IFS=:
37476        for p in $PATH; do
37477          if test -f "$p/$path" && test -x "$p/$path"; then
37478            new_path="$p/$path"
37479            break
37480          fi
37481        done
37482        IFS="$IFS_save"
37483      else
37484        # This is an absolute path, we can use it without further modifications.
37485        new_path="$path"
37486      fi
37487
37488      if test "x$new_path" = x; then
37489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37490$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37491        has_space=`$ECHO "$complete" | $GREP " "`
37492        if test "x$has_space" != x; then
37493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37495        fi
37496        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37497      fi
37498    fi
37499
37500    # Now join together the path and the arguments once again
37501    if test "x$arguments" != xEOL; then
37502      new_complete="$new_path ${arguments% *}"
37503    else
37504      new_complete="$new_path"
37505    fi
37506
37507    if test "x$complete" != "x$new_complete"; then
37508      LD="$new_complete"
37509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37510$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37511    fi
37512  fi
37513
37514    # Verify that we indeed succeeded with this trick.
37515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37516$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37517    "$LD" --version > /dev/null
37518    if test $? -eq 0 ; then
37519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37520$as_echo "no" >&6; }
37521      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37522    else
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37524$as_echo "yes" >&6; }
37525    fi
37526    LDCXX="$LD"
37527  else
37528    # All other toolchains use the compiler to link.
37529    LD="$CC"
37530    LDCXX="$CXX"
37531  fi
37532
37533  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37534
37535
37536  #
37537  # Setup the assembler (AS)
37538  #
37539  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37540
37541
37542  # Publish this variable in the help.
37543
37544
37545  if [ -z "${AS+x}" ]; then
37546    # The variable is not set by user, try to locate tool using the code snippet
37547    for ac_prog in as
37548do
37549  # Extract the first word of "$ac_prog", so it can be a program name with args.
37550set dummy $ac_prog; ac_word=$2
37551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37552$as_echo_n "checking for $ac_word... " >&6; }
37553if ${ac_cv_path_AS+:} false; then :
37554  $as_echo_n "(cached) " >&6
37555else
37556  case $AS in
37557  [\\/]* | ?:[\\/]*)
37558  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37559  ;;
37560  *)
37561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37562for as_dir in $PATH
37563do
37564  IFS=$as_save_IFS
37565  test -z "$as_dir" && as_dir=.
37566    for ac_exec_ext in '' $ac_executable_extensions; do
37567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37568    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37570    break 2
37571  fi
37572done
37573  done
37574IFS=$as_save_IFS
37575
37576  ;;
37577esac
37578fi
37579AS=$ac_cv_path_AS
37580if test -n "$AS"; then
37581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37582$as_echo "$AS" >&6; }
37583else
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37585$as_echo "no" >&6; }
37586fi
37587
37588
37589  test -n "$AS" && break
37590done
37591
37592  else
37593    # The variable is set, but is it from the command line or the environment?
37594
37595    # Try to remove the string !AS! from our list.
37596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37598      # If it failed, the variable was not from the command line. Ignore it,
37599      # but warn the user (except for BASH, which is always set by the calling BASH).
37600      if test "xAS" != xBASH; then
37601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37602$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37603      fi
37604      # Try to locate tool using the code snippet
37605      for ac_prog in as
37606do
37607  # Extract the first word of "$ac_prog", so it can be a program name with args.
37608set dummy $ac_prog; ac_word=$2
37609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37610$as_echo_n "checking for $ac_word... " >&6; }
37611if ${ac_cv_path_AS+:} false; then :
37612  $as_echo_n "(cached) " >&6
37613else
37614  case $AS in
37615  [\\/]* | ?:[\\/]*)
37616  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37617  ;;
37618  *)
37619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37620for as_dir in $PATH
37621do
37622  IFS=$as_save_IFS
37623  test -z "$as_dir" && as_dir=.
37624    for ac_exec_ext in '' $ac_executable_extensions; do
37625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37626    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37628    break 2
37629  fi
37630done
37631  done
37632IFS=$as_save_IFS
37633
37634  ;;
37635esac
37636fi
37637AS=$ac_cv_path_AS
37638if test -n "$AS"; then
37639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37640$as_echo "$AS" >&6; }
37641else
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37643$as_echo "no" >&6; }
37644fi
37645
37646
37647  test -n "$AS" && break
37648done
37649
37650    else
37651      # If it succeeded, then it was overridden by the user. We will use it
37652      # for the tool.
37653
37654      # First remove it from the list of overridden variables, so we can test
37655      # for unknown variables in the end.
37656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37657
37658      # Check if we try to supply an empty value
37659      if test "x$AS" = x; then
37660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37661$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37663$as_echo_n "checking for AS... " >&6; }
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37665$as_echo "disabled" >&6; }
37666      else
37667        # Check if the provided tool contains a complete path.
37668        tool_specified="$AS"
37669        tool_basename="${tool_specified##*/}"
37670        if test "x$tool_basename" = "x$tool_specified"; then
37671          # A command without a complete path is provided, search $PATH.
37672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37673$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37674          # Extract the first word of "$tool_basename", so it can be a program name with args.
37675set dummy $tool_basename; ac_word=$2
37676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37677$as_echo_n "checking for $ac_word... " >&6; }
37678if ${ac_cv_path_AS+:} false; then :
37679  $as_echo_n "(cached) " >&6
37680else
37681  case $AS in
37682  [\\/]* | ?:[\\/]*)
37683  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37684  ;;
37685  *)
37686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37687for as_dir in $PATH
37688do
37689  IFS=$as_save_IFS
37690  test -z "$as_dir" && as_dir=.
37691    for ac_exec_ext in '' $ac_executable_extensions; do
37692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37693    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37695    break 2
37696  fi
37697done
37698  done
37699IFS=$as_save_IFS
37700
37701  ;;
37702esac
37703fi
37704AS=$ac_cv_path_AS
37705if test -n "$AS"; then
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37707$as_echo "$AS" >&6; }
37708else
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710$as_echo "no" >&6; }
37711fi
37712
37713
37714          if test "x$AS" = x; then
37715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37716          fi
37717        else
37718          # Otherwise we believe it is a complete path. Use it as it is.
37719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37720$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37722$as_echo_n "checking for AS... " >&6; }
37723          if test ! -x "$tool_specified"; then
37724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37725$as_echo "not found" >&6; }
37726            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37727          fi
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37729$as_echo "$tool_specified" >&6; }
37730        fi
37731      fi
37732    fi
37733
37734  fi
37735
37736
37737
37738  # Only process if variable expands to non-empty
37739
37740  if test "x$AS" != x; then
37741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37742
37743  # First separate the path from the arguments. This will split at the first
37744  # space.
37745  complete="$AS"
37746  path="${complete%% *}"
37747  tmp="$complete EOL"
37748  arguments="${tmp#* }"
37749
37750  # Input might be given as Windows format, start by converting to
37751  # unix format.
37752  new_path=`$CYGPATH -u "$path"`
37753
37754  # Now try to locate executable using which
37755  new_path=`$WHICH "$new_path" 2> /dev/null`
37756  # bat and cmd files are not always considered executable in cygwin causing which
37757  # to not find them
37758  if test "x$new_path" = x \
37759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37761    new_path=`$CYGPATH -u "$path"`
37762  fi
37763  if test "x$new_path" = x; then
37764    # Oops. Which didn't find the executable.
37765    # The splitting of arguments from the executable at a space might have been incorrect,
37766    # since paths with space are more likely in Windows. Give it another try with the whole
37767    # argument.
37768    path="$complete"
37769    arguments="EOL"
37770    new_path=`$CYGPATH -u "$path"`
37771    new_path=`$WHICH "$new_path" 2> /dev/null`
37772    # bat and cmd files are not always considered executable in cygwin causing which
37773    # to not find them
37774    if test "x$new_path" = x \
37775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37777      new_path=`$CYGPATH -u "$path"`
37778    fi
37779    if test "x$new_path" = x; then
37780      # It's still not found. Now this is an unrecoverable error.
37781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37782$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37783      has_space=`$ECHO "$complete" | $GREP " "`
37784      if test "x$has_space" != x; then
37785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37787      fi
37788      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37789    fi
37790  fi
37791
37792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37795  # "foo.exe" is OK but "foo" is an error.
37796  #
37797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37798  # It is also a way to make sure we got the proper file name for the real test later on.
37799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37800  if test "x$test_shortpath" = x; then
37801    # Short path failed, file does not exist as specified.
37802    # Try adding .exe or .cmd
37803    if test -f "${new_path}.exe"; then
37804      input_to_shortpath="${new_path}.exe"
37805    elif test -f "${new_path}.cmd"; then
37806      input_to_shortpath="${new_path}.cmd"
37807    else
37808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37809$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37812      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37813    fi
37814  else
37815    input_to_shortpath="$new_path"
37816  fi
37817
37818  # Call helper function which possibly converts this using DOS-style short mode.
37819  # If so, the updated path is stored in $new_path.
37820  new_path="$input_to_shortpath"
37821
37822  input_path="$input_to_shortpath"
37823  # Check if we need to convert this using DOS-style short mode. If the path
37824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37825  # take no chances and rewrite it.
37826  # Note: m4 eats our [], so we need to use [ and ] instead.
37827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37828  if test "x$has_forbidden_chars" != x; then
37829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37833      # Going to short mode and back again did indeed matter. Since short mode is
37834      # case insensitive, let's make it lowercase to improve readability.
37835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37836      # Now convert it back to Unix-style (cygpath)
37837      input_path=`$CYGPATH -u "$shortmode_path"`
37838      new_path="$input_path"
37839    fi
37840  fi
37841
37842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37843  if test "x$test_cygdrive_prefix" = x; then
37844    # As a simple fix, exclude /usr/bin since it's not a real path.
37845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37847      # a path prefixed by /cygdrive for fixpath to work.
37848      new_path="$CYGWIN_ROOT_PATH$input_path"
37849    fi
37850  fi
37851
37852  # remove trailing .exe if any
37853  new_path="${new_path/%.exe/}"
37854
37855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37856
37857  # First separate the path from the arguments. This will split at the first
37858  # space.
37859  complete="$AS"
37860  path="${complete%% *}"
37861  tmp="$complete EOL"
37862  arguments="${tmp#* }"
37863
37864  # Input might be given as Windows format, start by converting to
37865  # unix format.
37866  new_path="$path"
37867
37868  windows_path="$new_path"
37869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37870    unix_path=`$CYGPATH -u "$windows_path"`
37871    new_path="$unix_path"
37872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37874    new_path="$unix_path"
37875  fi
37876
37877
37878  # Now try to locate executable using which
37879  new_path=`$WHICH "$new_path" 2> /dev/null`
37880
37881  if test "x$new_path" = x; then
37882    # Oops. Which didn't find the executable.
37883    # The splitting of arguments from the executable at a space might have been incorrect,
37884    # since paths with space are more likely in Windows. Give it another try with the whole
37885    # argument.
37886    path="$complete"
37887    arguments="EOL"
37888    new_path="$path"
37889
37890  windows_path="$new_path"
37891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37892    unix_path=`$CYGPATH -u "$windows_path"`
37893    new_path="$unix_path"
37894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37896    new_path="$unix_path"
37897  fi
37898
37899
37900    new_path=`$WHICH "$new_path" 2> /dev/null`
37901    # bat and cmd files are not always considered executable in MSYS causing which
37902    # to not find them
37903    if test "x$new_path" = x \
37904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37906      new_path="$path"
37907
37908  windows_path="$new_path"
37909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37910    unix_path=`$CYGPATH -u "$windows_path"`
37911    new_path="$unix_path"
37912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37914    new_path="$unix_path"
37915  fi
37916
37917    fi
37918
37919    if test "x$new_path" = x; then
37920      # It's still not found. Now this is an unrecoverable error.
37921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37922$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37923      has_space=`$ECHO "$complete" | $GREP " "`
37924      if test "x$has_space" != x; then
37925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37927      fi
37928      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37929    fi
37930  fi
37931
37932  # Now new_path has a complete unix path to the binary
37933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37934    # Keep paths in /bin as-is, but remove trailing .exe if any
37935    new_path="${new_path/%.exe/}"
37936    # Do not save /bin paths to all_fixpath_prefixes!
37937  else
37938    # Not in mixed or Windows style, start by that.
37939    new_path=`cmd //c echo $new_path`
37940
37941  input_path="$new_path"
37942  # Check if we need to convert this using DOS-style short mode. If the path
37943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37944  # take no chances and rewrite it.
37945  # Note: m4 eats our [], so we need to use [ and ] instead.
37946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37947  if test "x$has_forbidden_chars" != x; then
37948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37950  fi
37951
37952    # Output is in $new_path
37953
37954  windows_path="$new_path"
37955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37956    unix_path=`$CYGPATH -u "$windows_path"`
37957    new_path="$unix_path"
37958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37960    new_path="$unix_path"
37961  fi
37962
37963    # remove trailing .exe if any
37964    new_path="${new_path/%.exe/}"
37965
37966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37968  fi
37969
37970    else
37971      # We're on a unix platform. Hooray! :)
37972      # First separate the path from the arguments. This will split at the first
37973      # space.
37974      complete="$AS"
37975      path="${complete%% *}"
37976      tmp="$complete EOL"
37977      arguments="${tmp#* }"
37978
37979      # Cannot rely on the command "which" here since it doesn't always work.
37980      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37981      if test -z "$is_absolute_path"; then
37982        # Path to executable is not absolute. Find it.
37983        IFS_save="$IFS"
37984        IFS=:
37985        for p in $PATH; do
37986          if test -f "$p/$path" && test -x "$p/$path"; then
37987            new_path="$p/$path"
37988            break
37989          fi
37990        done
37991        IFS="$IFS_save"
37992      else
37993        # This is an absolute path, we can use it without further modifications.
37994        new_path="$path"
37995      fi
37996
37997      if test "x$new_path" = x; then
37998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37999$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38000        has_space=`$ECHO "$complete" | $GREP " "`
38001        if test "x$has_space" != x; then
38002          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38004        fi
38005        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38006      fi
38007    fi
38008
38009    # Now join together the path and the arguments once again
38010    if test "x$arguments" != xEOL; then
38011      new_complete="$new_path ${arguments% *}"
38012    else
38013      new_complete="$new_path"
38014    fi
38015
38016    if test "x$complete" != "x$new_complete"; then
38017      AS="$new_complete"
38018      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38019$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38020    fi
38021  fi
38022
38023    if test "x$AS" = x; then
38024      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38025    fi
38026  else
38027    # FIXME: is this correct for microsoft?
38028    AS="$CC -c"
38029  fi
38030
38031
38032  #
38033  # Setup the archiver (AR)
38034  #
38035  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38036    # The corresponding ar tool is lib.exe (used to create static libraries)
38037    # Extract the first word of "lib", so it can be a program name with args.
38038set dummy lib; ac_word=$2
38039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38040$as_echo_n "checking for $ac_word... " >&6; }
38041if ${ac_cv_prog_AR+:} false; then :
38042  $as_echo_n "(cached) " >&6
38043else
38044  if test -n "$AR"; then
38045  ac_cv_prog_AR="$AR" # Let the user override the test.
38046else
38047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38048for as_dir in $PATH
38049do
38050  IFS=$as_save_IFS
38051  test -z "$as_dir" && as_dir=.
38052    for ac_exec_ext in '' $ac_executable_extensions; do
38053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38054    ac_cv_prog_AR="lib"
38055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38056    break 2
38057  fi
38058done
38059  done
38060IFS=$as_save_IFS
38061
38062fi
38063fi
38064AR=$ac_cv_prog_AR
38065if test -n "$AR"; then
38066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38067$as_echo "$AR" >&6; }
38068else
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38070$as_echo "no" >&6; }
38071fi
38072
38073
38074  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38075
38076
38077  # Publish this variable in the help.
38078
38079
38080  if [ -z "${AR+x}" ]; then
38081    # The variable is not set by user, try to locate tool using the code snippet
38082    if test -n "$ac_tool_prefix"; then
38083  for ac_prog in ar gcc-ar
38084  do
38085    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38088$as_echo_n "checking for $ac_word... " >&6; }
38089if ${ac_cv_prog_AR+:} false; then :
38090  $as_echo_n "(cached) " >&6
38091else
38092  if test -n "$AR"; then
38093  ac_cv_prog_AR="$AR" # Let the user override the test.
38094else
38095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38096for as_dir in $PATH
38097do
38098  IFS=$as_save_IFS
38099  test -z "$as_dir" && as_dir=.
38100    for ac_exec_ext in '' $ac_executable_extensions; do
38101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38102    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38104    break 2
38105  fi
38106done
38107  done
38108IFS=$as_save_IFS
38109
38110fi
38111fi
38112AR=$ac_cv_prog_AR
38113if test -n "$AR"; then
38114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38115$as_echo "$AR" >&6; }
38116else
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38118$as_echo "no" >&6; }
38119fi
38120
38121
38122    test -n "$AR" && break
38123  done
38124fi
38125if test -z "$AR"; then
38126  ac_ct_AR=$AR
38127  for ac_prog in ar gcc-ar
38128do
38129  # Extract the first word of "$ac_prog", so it can be a program name with args.
38130set dummy $ac_prog; ac_word=$2
38131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38132$as_echo_n "checking for $ac_word... " >&6; }
38133if ${ac_cv_prog_ac_ct_AR+:} false; then :
38134  $as_echo_n "(cached) " >&6
38135else
38136  if test -n "$ac_ct_AR"; then
38137  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38138else
38139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38140for as_dir in $PATH
38141do
38142  IFS=$as_save_IFS
38143  test -z "$as_dir" && as_dir=.
38144    for ac_exec_ext in '' $ac_executable_extensions; do
38145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38146    ac_cv_prog_ac_ct_AR="$ac_prog"
38147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38148    break 2
38149  fi
38150done
38151  done
38152IFS=$as_save_IFS
38153
38154fi
38155fi
38156ac_ct_AR=$ac_cv_prog_ac_ct_AR
38157if test -n "$ac_ct_AR"; then
38158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38159$as_echo "$ac_ct_AR" >&6; }
38160else
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38162$as_echo "no" >&6; }
38163fi
38164
38165
38166  test -n "$ac_ct_AR" && break
38167done
38168
38169  if test "x$ac_ct_AR" = x; then
38170    AR=""
38171  else
38172    case $cross_compiling:$ac_tool_warned in
38173yes:)
38174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38176ac_tool_warned=yes ;;
38177esac
38178    AR=$ac_ct_AR
38179  fi
38180fi
38181
38182  else
38183    # The variable is set, but is it from the command line or the environment?
38184
38185    # Try to remove the string !AR! from our list.
38186    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38187    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38188      # If it failed, the variable was not from the command line. Ignore it,
38189      # but warn the user (except for BASH, which is always set by the calling BASH).
38190      if test "xAR" != xBASH; then
38191        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38192$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38193      fi
38194      # Try to locate tool using the code snippet
38195      if test -n "$ac_tool_prefix"; then
38196  for ac_prog in ar gcc-ar
38197  do
38198    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38199set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38201$as_echo_n "checking for $ac_word... " >&6; }
38202if ${ac_cv_prog_AR+:} false; then :
38203  $as_echo_n "(cached) " >&6
38204else
38205  if test -n "$AR"; then
38206  ac_cv_prog_AR="$AR" # Let the user override the test.
38207else
38208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38209for as_dir in $PATH
38210do
38211  IFS=$as_save_IFS
38212  test -z "$as_dir" && as_dir=.
38213    for ac_exec_ext in '' $ac_executable_extensions; do
38214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38215    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38217    break 2
38218  fi
38219done
38220  done
38221IFS=$as_save_IFS
38222
38223fi
38224fi
38225AR=$ac_cv_prog_AR
38226if test -n "$AR"; then
38227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38228$as_echo "$AR" >&6; }
38229else
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38231$as_echo "no" >&6; }
38232fi
38233
38234
38235    test -n "$AR" && break
38236  done
38237fi
38238if test -z "$AR"; then
38239  ac_ct_AR=$AR
38240  for ac_prog in ar gcc-ar
38241do
38242  # Extract the first word of "$ac_prog", so it can be a program name with args.
38243set dummy $ac_prog; ac_word=$2
38244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38245$as_echo_n "checking for $ac_word... " >&6; }
38246if ${ac_cv_prog_ac_ct_AR+:} false; then :
38247  $as_echo_n "(cached) " >&6
38248else
38249  if test -n "$ac_ct_AR"; then
38250  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38251else
38252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38253for as_dir in $PATH
38254do
38255  IFS=$as_save_IFS
38256  test -z "$as_dir" && as_dir=.
38257    for ac_exec_ext in '' $ac_executable_extensions; do
38258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38259    ac_cv_prog_ac_ct_AR="$ac_prog"
38260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38261    break 2
38262  fi
38263done
38264  done
38265IFS=$as_save_IFS
38266
38267fi
38268fi
38269ac_ct_AR=$ac_cv_prog_ac_ct_AR
38270if test -n "$ac_ct_AR"; then
38271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38272$as_echo "$ac_ct_AR" >&6; }
38273else
38274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38275$as_echo "no" >&6; }
38276fi
38277
38278
38279  test -n "$ac_ct_AR" && break
38280done
38281
38282  if test "x$ac_ct_AR" = x; then
38283    AR=""
38284  else
38285    case $cross_compiling:$ac_tool_warned in
38286yes:)
38287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38289ac_tool_warned=yes ;;
38290esac
38291    AR=$ac_ct_AR
38292  fi
38293fi
38294
38295    else
38296      # If it succeeded, then it was overridden by the user. We will use it
38297      # for the tool.
38298
38299      # First remove it from the list of overridden variables, so we can test
38300      # for unknown variables in the end.
38301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38302
38303      # Check if we try to supply an empty value
38304      if test "x$AR" = x; then
38305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38306$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38308$as_echo_n "checking for AR... " >&6; }
38309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38310$as_echo "disabled" >&6; }
38311      else
38312        # Check if the provided tool contains a complete path.
38313        tool_specified="$AR"
38314        tool_basename="${tool_specified##*/}"
38315        if test "x$tool_basename" = "x$tool_specified"; then
38316          # A command without a complete path is provided, search $PATH.
38317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38318$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38319          # Extract the first word of "$tool_basename", so it can be a program name with args.
38320set dummy $tool_basename; ac_word=$2
38321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38322$as_echo_n "checking for $ac_word... " >&6; }
38323if ${ac_cv_path_AR+:} false; then :
38324  $as_echo_n "(cached) " >&6
38325else
38326  case $AR in
38327  [\\/]* | ?:[\\/]*)
38328  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38329  ;;
38330  *)
38331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38332for as_dir in $PATH
38333do
38334  IFS=$as_save_IFS
38335  test -z "$as_dir" && as_dir=.
38336    for ac_exec_ext in '' $ac_executable_extensions; do
38337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38338    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38340    break 2
38341  fi
38342done
38343  done
38344IFS=$as_save_IFS
38345
38346  ;;
38347esac
38348fi
38349AR=$ac_cv_path_AR
38350if test -n "$AR"; then
38351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38352$as_echo "$AR" >&6; }
38353else
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38355$as_echo "no" >&6; }
38356fi
38357
38358
38359          if test "x$AR" = x; then
38360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38361          fi
38362        else
38363          # Otherwise we believe it is a complete path. Use it as it is.
38364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38365$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38367$as_echo_n "checking for AR... " >&6; }
38368          if test ! -x "$tool_specified"; then
38369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38370$as_echo "not found" >&6; }
38371            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38372          fi
38373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38374$as_echo "$tool_specified" >&6; }
38375        fi
38376      fi
38377    fi
38378
38379  fi
38380
38381
38382  else
38383
38384
38385  # Publish this variable in the help.
38386
38387
38388  if [ -z "${AR+x}" ]; then
38389    # The variable is not set by user, try to locate tool using the code snippet
38390    if test -n "$ac_tool_prefix"; then
38391  for ac_prog in ar
38392  do
38393    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38396$as_echo_n "checking for $ac_word... " >&6; }
38397if ${ac_cv_prog_AR+:} false; then :
38398  $as_echo_n "(cached) " >&6
38399else
38400  if test -n "$AR"; then
38401  ac_cv_prog_AR="$AR" # Let the user override the test.
38402else
38403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38404for as_dir in $PATH
38405do
38406  IFS=$as_save_IFS
38407  test -z "$as_dir" && as_dir=.
38408    for ac_exec_ext in '' $ac_executable_extensions; do
38409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38410    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38412    break 2
38413  fi
38414done
38415  done
38416IFS=$as_save_IFS
38417
38418fi
38419fi
38420AR=$ac_cv_prog_AR
38421if test -n "$AR"; then
38422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38423$as_echo "$AR" >&6; }
38424else
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38426$as_echo "no" >&6; }
38427fi
38428
38429
38430    test -n "$AR" && break
38431  done
38432fi
38433if test -z "$AR"; then
38434  ac_ct_AR=$AR
38435  for ac_prog in ar
38436do
38437  # Extract the first word of "$ac_prog", so it can be a program name with args.
38438set dummy $ac_prog; ac_word=$2
38439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38440$as_echo_n "checking for $ac_word... " >&6; }
38441if ${ac_cv_prog_ac_ct_AR+:} false; then :
38442  $as_echo_n "(cached) " >&6
38443else
38444  if test -n "$ac_ct_AR"; then
38445  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38446else
38447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38448for as_dir in $PATH
38449do
38450  IFS=$as_save_IFS
38451  test -z "$as_dir" && as_dir=.
38452    for ac_exec_ext in '' $ac_executable_extensions; do
38453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38454    ac_cv_prog_ac_ct_AR="$ac_prog"
38455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38456    break 2
38457  fi
38458done
38459  done
38460IFS=$as_save_IFS
38461
38462fi
38463fi
38464ac_ct_AR=$ac_cv_prog_ac_ct_AR
38465if test -n "$ac_ct_AR"; then
38466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38467$as_echo "$ac_ct_AR" >&6; }
38468else
38469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38470$as_echo "no" >&6; }
38471fi
38472
38473
38474  test -n "$ac_ct_AR" && break
38475done
38476
38477  if test "x$ac_ct_AR" = x; then
38478    AR=""
38479  else
38480    case $cross_compiling:$ac_tool_warned in
38481yes:)
38482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38484ac_tool_warned=yes ;;
38485esac
38486    AR=$ac_ct_AR
38487  fi
38488fi
38489
38490  else
38491    # The variable is set, but is it from the command line or the environment?
38492
38493    # Try to remove the string !AR! from our list.
38494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38496      # If it failed, the variable was not from the command line. Ignore it,
38497      # but warn the user (except for BASH, which is always set by the calling BASH).
38498      if test "xAR" != xBASH; then
38499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38500$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38501      fi
38502      # Try to locate tool using the code snippet
38503      if test -n "$ac_tool_prefix"; then
38504  for ac_prog in ar
38505  do
38506    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38507set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38509$as_echo_n "checking for $ac_word... " >&6; }
38510if ${ac_cv_prog_AR+:} false; then :
38511  $as_echo_n "(cached) " >&6
38512else
38513  if test -n "$AR"; then
38514  ac_cv_prog_AR="$AR" # Let the user override the test.
38515else
38516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38517for as_dir in $PATH
38518do
38519  IFS=$as_save_IFS
38520  test -z "$as_dir" && as_dir=.
38521    for ac_exec_ext in '' $ac_executable_extensions; do
38522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38523    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38525    break 2
38526  fi
38527done
38528  done
38529IFS=$as_save_IFS
38530
38531fi
38532fi
38533AR=$ac_cv_prog_AR
38534if test -n "$AR"; then
38535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38536$as_echo "$AR" >&6; }
38537else
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38539$as_echo "no" >&6; }
38540fi
38541
38542
38543    test -n "$AR" && break
38544  done
38545fi
38546if test -z "$AR"; then
38547  ac_ct_AR=$AR
38548  for ac_prog in ar
38549do
38550  # Extract the first word of "$ac_prog", so it can be a program name with args.
38551set dummy $ac_prog; ac_word=$2
38552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38553$as_echo_n "checking for $ac_word... " >&6; }
38554if ${ac_cv_prog_ac_ct_AR+:} false; then :
38555  $as_echo_n "(cached) " >&6
38556else
38557  if test -n "$ac_ct_AR"; then
38558  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38559else
38560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38561for as_dir in $PATH
38562do
38563  IFS=$as_save_IFS
38564  test -z "$as_dir" && as_dir=.
38565    for ac_exec_ext in '' $ac_executable_extensions; do
38566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38567    ac_cv_prog_ac_ct_AR="$ac_prog"
38568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38569    break 2
38570  fi
38571done
38572  done
38573IFS=$as_save_IFS
38574
38575fi
38576fi
38577ac_ct_AR=$ac_cv_prog_ac_ct_AR
38578if test -n "$ac_ct_AR"; then
38579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38580$as_echo "$ac_ct_AR" >&6; }
38581else
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38583$as_echo "no" >&6; }
38584fi
38585
38586
38587  test -n "$ac_ct_AR" && break
38588done
38589
38590  if test "x$ac_ct_AR" = x; then
38591    AR=""
38592  else
38593    case $cross_compiling:$ac_tool_warned in
38594yes:)
38595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38597ac_tool_warned=yes ;;
38598esac
38599    AR=$ac_ct_AR
38600  fi
38601fi
38602
38603    else
38604      # If it succeeded, then it was overridden by the user. We will use it
38605      # for the tool.
38606
38607      # First remove it from the list of overridden variables, so we can test
38608      # for unknown variables in the end.
38609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38610
38611      # Check if we try to supply an empty value
38612      if test "x$AR" = x; then
38613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38614$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38616$as_echo_n "checking for AR... " >&6; }
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38618$as_echo "disabled" >&6; }
38619      else
38620        # Check if the provided tool contains a complete path.
38621        tool_specified="$AR"
38622        tool_basename="${tool_specified##*/}"
38623        if test "x$tool_basename" = "x$tool_specified"; then
38624          # A command without a complete path is provided, search $PATH.
38625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38626$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38627          # Extract the first word of "$tool_basename", so it can be a program name with args.
38628set dummy $tool_basename; ac_word=$2
38629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38630$as_echo_n "checking for $ac_word... " >&6; }
38631if ${ac_cv_path_AR+:} false; then :
38632  $as_echo_n "(cached) " >&6
38633else
38634  case $AR in
38635  [\\/]* | ?:[\\/]*)
38636  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38637  ;;
38638  *)
38639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38640for as_dir in $PATH
38641do
38642  IFS=$as_save_IFS
38643  test -z "$as_dir" && as_dir=.
38644    for ac_exec_ext in '' $ac_executable_extensions; do
38645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38646    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38648    break 2
38649  fi
38650done
38651  done
38652IFS=$as_save_IFS
38653
38654  ;;
38655esac
38656fi
38657AR=$ac_cv_path_AR
38658if test -n "$AR"; then
38659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38660$as_echo "$AR" >&6; }
38661else
38662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38663$as_echo "no" >&6; }
38664fi
38665
38666
38667          if test "x$AR" = x; then
38668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38669          fi
38670        else
38671          # Otherwise we believe it is a complete path. Use it as it is.
38672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38673$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38675$as_echo_n "checking for AR... " >&6; }
38676          if test ! -x "$tool_specified"; then
38677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38678$as_echo "not found" >&6; }
38679            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38680          fi
38681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38682$as_echo "$tool_specified" >&6; }
38683        fi
38684      fi
38685    fi
38686
38687  fi
38688
38689
38690  fi
38691
38692  # Only process if variable expands to non-empty
38693
38694  if test "x$AR" != x; then
38695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38696
38697  # First separate the path from the arguments. This will split at the first
38698  # space.
38699  complete="$AR"
38700  path="${complete%% *}"
38701  tmp="$complete EOL"
38702  arguments="${tmp#* }"
38703
38704  # Input might be given as Windows format, start by converting to
38705  # unix format.
38706  new_path=`$CYGPATH -u "$path"`
38707
38708  # Now try to locate executable using which
38709  new_path=`$WHICH "$new_path" 2> /dev/null`
38710  # bat and cmd files are not always considered executable in cygwin causing which
38711  # to not find them
38712  if test "x$new_path" = x \
38713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38715    new_path=`$CYGPATH -u "$path"`
38716  fi
38717  if test "x$new_path" = x; then
38718    # Oops. Which didn't find the executable.
38719    # The splitting of arguments from the executable at a space might have been incorrect,
38720    # since paths with space are more likely in Windows. Give it another try with the whole
38721    # argument.
38722    path="$complete"
38723    arguments="EOL"
38724    new_path=`$CYGPATH -u "$path"`
38725    new_path=`$WHICH "$new_path" 2> /dev/null`
38726    # bat and cmd files are not always considered executable in cygwin causing which
38727    # to not find them
38728    if test "x$new_path" = x \
38729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38731      new_path=`$CYGPATH -u "$path"`
38732    fi
38733    if test "x$new_path" = x; then
38734      # It's still not found. Now this is an unrecoverable error.
38735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38736$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38737      has_space=`$ECHO "$complete" | $GREP " "`
38738      if test "x$has_space" != x; then
38739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38741      fi
38742      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38743    fi
38744  fi
38745
38746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38749  # "foo.exe" is OK but "foo" is an error.
38750  #
38751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38752  # It is also a way to make sure we got the proper file name for the real test later on.
38753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38754  if test "x$test_shortpath" = x; then
38755    # Short path failed, file does not exist as specified.
38756    # Try adding .exe or .cmd
38757    if test -f "${new_path}.exe"; then
38758      input_to_shortpath="${new_path}.exe"
38759    elif test -f "${new_path}.cmd"; then
38760      input_to_shortpath="${new_path}.cmd"
38761    else
38762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38763$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38766      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38767    fi
38768  else
38769    input_to_shortpath="$new_path"
38770  fi
38771
38772  # Call helper function which possibly converts this using DOS-style short mode.
38773  # If so, the updated path is stored in $new_path.
38774  new_path="$input_to_shortpath"
38775
38776  input_path="$input_to_shortpath"
38777  # Check if we need to convert this using DOS-style short mode. If the path
38778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38779  # take no chances and rewrite it.
38780  # Note: m4 eats our [], so we need to use [ and ] instead.
38781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38782  if test "x$has_forbidden_chars" != x; then
38783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38787      # Going to short mode and back again did indeed matter. Since short mode is
38788      # case insensitive, let's make it lowercase to improve readability.
38789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38790      # Now convert it back to Unix-style (cygpath)
38791      input_path=`$CYGPATH -u "$shortmode_path"`
38792      new_path="$input_path"
38793    fi
38794  fi
38795
38796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38797  if test "x$test_cygdrive_prefix" = x; then
38798    # As a simple fix, exclude /usr/bin since it's not a real path.
38799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38801      # a path prefixed by /cygdrive for fixpath to work.
38802      new_path="$CYGWIN_ROOT_PATH$input_path"
38803    fi
38804  fi
38805
38806  # remove trailing .exe if any
38807  new_path="${new_path/%.exe/}"
38808
38809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38810
38811  # First separate the path from the arguments. This will split at the first
38812  # space.
38813  complete="$AR"
38814  path="${complete%% *}"
38815  tmp="$complete EOL"
38816  arguments="${tmp#* }"
38817
38818  # Input might be given as Windows format, start by converting to
38819  # unix format.
38820  new_path="$path"
38821
38822  windows_path="$new_path"
38823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38824    unix_path=`$CYGPATH -u "$windows_path"`
38825    new_path="$unix_path"
38826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38828    new_path="$unix_path"
38829  fi
38830
38831
38832  # Now try to locate executable using which
38833  new_path=`$WHICH "$new_path" 2> /dev/null`
38834
38835  if test "x$new_path" = x; then
38836    # Oops. Which didn't find the executable.
38837    # The splitting of arguments from the executable at a space might have been incorrect,
38838    # since paths with space are more likely in Windows. Give it another try with the whole
38839    # argument.
38840    path="$complete"
38841    arguments="EOL"
38842    new_path="$path"
38843
38844  windows_path="$new_path"
38845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38846    unix_path=`$CYGPATH -u "$windows_path"`
38847    new_path="$unix_path"
38848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38850    new_path="$unix_path"
38851  fi
38852
38853
38854    new_path=`$WHICH "$new_path" 2> /dev/null`
38855    # bat and cmd files are not always considered executable in MSYS causing which
38856    # to not find them
38857    if test "x$new_path" = x \
38858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38860      new_path="$path"
38861
38862  windows_path="$new_path"
38863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38864    unix_path=`$CYGPATH -u "$windows_path"`
38865    new_path="$unix_path"
38866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38868    new_path="$unix_path"
38869  fi
38870
38871    fi
38872
38873    if test "x$new_path" = x; then
38874      # It's still not found. Now this is an unrecoverable error.
38875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38876$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38877      has_space=`$ECHO "$complete" | $GREP " "`
38878      if test "x$has_space" != x; then
38879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38881      fi
38882      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38883    fi
38884  fi
38885
38886  # Now new_path has a complete unix path to the binary
38887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38888    # Keep paths in /bin as-is, but remove trailing .exe if any
38889    new_path="${new_path/%.exe/}"
38890    # Do not save /bin paths to all_fixpath_prefixes!
38891  else
38892    # Not in mixed or Windows style, start by that.
38893    new_path=`cmd //c echo $new_path`
38894
38895  input_path="$new_path"
38896  # Check if we need to convert this using DOS-style short mode. If the path
38897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38898  # take no chances and rewrite it.
38899  # Note: m4 eats our [], so we need to use [ and ] instead.
38900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38901  if test "x$has_forbidden_chars" != x; then
38902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38904  fi
38905
38906    # Output is in $new_path
38907
38908  windows_path="$new_path"
38909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38910    unix_path=`$CYGPATH -u "$windows_path"`
38911    new_path="$unix_path"
38912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38914    new_path="$unix_path"
38915  fi
38916
38917    # remove trailing .exe if any
38918    new_path="${new_path/%.exe/}"
38919
38920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38922  fi
38923
38924    else
38925      # We're on a unix platform. Hooray! :)
38926      # First separate the path from the arguments. This will split at the first
38927      # space.
38928      complete="$AR"
38929      path="${complete%% *}"
38930      tmp="$complete EOL"
38931      arguments="${tmp#* }"
38932
38933      # Cannot rely on the command "which" here since it doesn't always work.
38934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38935      if test -z "$is_absolute_path"; then
38936        # Path to executable is not absolute. Find it.
38937        IFS_save="$IFS"
38938        IFS=:
38939        for p in $PATH; do
38940          if test -f "$p/$path" && test -x "$p/$path"; then
38941            new_path="$p/$path"
38942            break
38943          fi
38944        done
38945        IFS="$IFS_save"
38946      else
38947        # This is an absolute path, we can use it without further modifications.
38948        new_path="$path"
38949      fi
38950
38951      if test "x$new_path" = x; then
38952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38953$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38954        has_space=`$ECHO "$complete" | $GREP " "`
38955        if test "x$has_space" != x; then
38956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38958        fi
38959        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38960      fi
38961    fi
38962
38963    # Now join together the path and the arguments once again
38964    if test "x$arguments" != xEOL; then
38965      new_complete="$new_path ${arguments% *}"
38966    else
38967      new_complete="$new_path"
38968    fi
38969
38970    if test "x$complete" != "x$new_complete"; then
38971      AR="$new_complete"
38972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38973$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38974    fi
38975  fi
38976
38977
38978
38979  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38980
38981
38982  # Publish this variable in the help.
38983
38984
38985  if [ -z "${LIPO+x}" ]; then
38986    # The variable is not set by user, try to locate tool using the code snippet
38987    for ac_prog in lipo
38988do
38989  # Extract the first word of "$ac_prog", so it can be a program name with args.
38990set dummy $ac_prog; ac_word=$2
38991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38992$as_echo_n "checking for $ac_word... " >&6; }
38993if ${ac_cv_path_LIPO+:} false; then :
38994  $as_echo_n "(cached) " >&6
38995else
38996  case $LIPO in
38997  [\\/]* | ?:[\\/]*)
38998  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38999  ;;
39000  *)
39001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39002for as_dir in $PATH
39003do
39004  IFS=$as_save_IFS
39005  test -z "$as_dir" && as_dir=.
39006    for ac_exec_ext in '' $ac_executable_extensions; do
39007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39008    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39010    break 2
39011  fi
39012done
39013  done
39014IFS=$as_save_IFS
39015
39016  ;;
39017esac
39018fi
39019LIPO=$ac_cv_path_LIPO
39020if test -n "$LIPO"; then
39021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39022$as_echo "$LIPO" >&6; }
39023else
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025$as_echo "no" >&6; }
39026fi
39027
39028
39029  test -n "$LIPO" && break
39030done
39031
39032  else
39033    # The variable is set, but is it from the command line or the environment?
39034
39035    # Try to remove the string !LIPO! from our list.
39036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39038      # If it failed, the variable was not from the command line. Ignore it,
39039      # but warn the user (except for BASH, which is always set by the calling BASH).
39040      if test "xLIPO" != xBASH; then
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39042$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39043      fi
39044      # Try to locate tool using the code snippet
39045      for ac_prog in lipo
39046do
39047  # Extract the first word of "$ac_prog", so it can be a program name with args.
39048set dummy $ac_prog; ac_word=$2
39049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39050$as_echo_n "checking for $ac_word... " >&6; }
39051if ${ac_cv_path_LIPO+:} false; then :
39052  $as_echo_n "(cached) " >&6
39053else
39054  case $LIPO in
39055  [\\/]* | ?:[\\/]*)
39056  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39057  ;;
39058  *)
39059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39060for as_dir in $PATH
39061do
39062  IFS=$as_save_IFS
39063  test -z "$as_dir" && as_dir=.
39064    for ac_exec_ext in '' $ac_executable_extensions; do
39065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39066    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39068    break 2
39069  fi
39070done
39071  done
39072IFS=$as_save_IFS
39073
39074  ;;
39075esac
39076fi
39077LIPO=$ac_cv_path_LIPO
39078if test -n "$LIPO"; then
39079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39080$as_echo "$LIPO" >&6; }
39081else
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39083$as_echo "no" >&6; }
39084fi
39085
39086
39087  test -n "$LIPO" && break
39088done
39089
39090    else
39091      # If it succeeded, then it was overridden by the user. We will use it
39092      # for the tool.
39093
39094      # First remove it from the list of overridden variables, so we can test
39095      # for unknown variables in the end.
39096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39097
39098      # Check if we try to supply an empty value
39099      if test "x$LIPO" = x; then
39100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39101$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39103$as_echo_n "checking for LIPO... " >&6; }
39104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39105$as_echo "disabled" >&6; }
39106      else
39107        # Check if the provided tool contains a complete path.
39108        tool_specified="$LIPO"
39109        tool_basename="${tool_specified##*/}"
39110        if test "x$tool_basename" = "x$tool_specified"; then
39111          # A command without a complete path is provided, search $PATH.
39112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39113$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39114          # Extract the first word of "$tool_basename", so it can be a program name with args.
39115set dummy $tool_basename; ac_word=$2
39116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39117$as_echo_n "checking for $ac_word... " >&6; }
39118if ${ac_cv_path_LIPO+:} false; then :
39119  $as_echo_n "(cached) " >&6
39120else
39121  case $LIPO in
39122  [\\/]* | ?:[\\/]*)
39123  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39124  ;;
39125  *)
39126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39127for as_dir in $PATH
39128do
39129  IFS=$as_save_IFS
39130  test -z "$as_dir" && as_dir=.
39131    for ac_exec_ext in '' $ac_executable_extensions; do
39132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39133    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39135    break 2
39136  fi
39137done
39138  done
39139IFS=$as_save_IFS
39140
39141  ;;
39142esac
39143fi
39144LIPO=$ac_cv_path_LIPO
39145if test -n "$LIPO"; then
39146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39147$as_echo "$LIPO" >&6; }
39148else
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39150$as_echo "no" >&6; }
39151fi
39152
39153
39154          if test "x$LIPO" = x; then
39155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39156          fi
39157        else
39158          # Otherwise we believe it is a complete path. Use it as it is.
39159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39160$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39162$as_echo_n "checking for LIPO... " >&6; }
39163          if test ! -x "$tool_specified"; then
39164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39165$as_echo "not found" >&6; }
39166            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39167          fi
39168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39169$as_echo "$tool_specified" >&6; }
39170        fi
39171      fi
39172    fi
39173
39174  fi
39175
39176
39177
39178  # Only process if variable expands to non-empty
39179
39180  if test "x$LIPO" != x; then
39181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39182
39183  # First separate the path from the arguments. This will split at the first
39184  # space.
39185  complete="$LIPO"
39186  path="${complete%% *}"
39187  tmp="$complete EOL"
39188  arguments="${tmp#* }"
39189
39190  # Input might be given as Windows format, start by converting to
39191  # unix format.
39192  new_path=`$CYGPATH -u "$path"`
39193
39194  # Now try to locate executable using which
39195  new_path=`$WHICH "$new_path" 2> /dev/null`
39196  # bat and cmd files are not always considered executable in cygwin causing which
39197  # to not find them
39198  if test "x$new_path" = x \
39199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39201    new_path=`$CYGPATH -u "$path"`
39202  fi
39203  if test "x$new_path" = x; then
39204    # Oops. Which didn't find the executable.
39205    # The splitting of arguments from the executable at a space might have been incorrect,
39206    # since paths with space are more likely in Windows. Give it another try with the whole
39207    # argument.
39208    path="$complete"
39209    arguments="EOL"
39210    new_path=`$CYGPATH -u "$path"`
39211    new_path=`$WHICH "$new_path" 2> /dev/null`
39212    # bat and cmd files are not always considered executable in cygwin causing which
39213    # to not find them
39214    if test "x$new_path" = x \
39215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39217      new_path=`$CYGPATH -u "$path"`
39218    fi
39219    if test "x$new_path" = x; then
39220      # It's still not found. Now this is an unrecoverable error.
39221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39222$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39223      has_space=`$ECHO "$complete" | $GREP " "`
39224      if test "x$has_space" != x; then
39225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39227      fi
39228      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39229    fi
39230  fi
39231
39232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39235  # "foo.exe" is OK but "foo" is an error.
39236  #
39237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39238  # It is also a way to make sure we got the proper file name for the real test later on.
39239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39240  if test "x$test_shortpath" = x; then
39241    # Short path failed, file does not exist as specified.
39242    # Try adding .exe or .cmd
39243    if test -f "${new_path}.exe"; then
39244      input_to_shortpath="${new_path}.exe"
39245    elif test -f "${new_path}.cmd"; then
39246      input_to_shortpath="${new_path}.cmd"
39247    else
39248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39249$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39252      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39253    fi
39254  else
39255    input_to_shortpath="$new_path"
39256  fi
39257
39258  # Call helper function which possibly converts this using DOS-style short mode.
39259  # If so, the updated path is stored in $new_path.
39260  new_path="$input_to_shortpath"
39261
39262  input_path="$input_to_shortpath"
39263  # Check if we need to convert this using DOS-style short mode. If the path
39264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39265  # take no chances and rewrite it.
39266  # Note: m4 eats our [], so we need to use [ and ] instead.
39267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39268  if test "x$has_forbidden_chars" != x; then
39269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39273      # Going to short mode and back again did indeed matter. Since short mode is
39274      # case insensitive, let's make it lowercase to improve readability.
39275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39276      # Now convert it back to Unix-style (cygpath)
39277      input_path=`$CYGPATH -u "$shortmode_path"`
39278      new_path="$input_path"
39279    fi
39280  fi
39281
39282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39283  if test "x$test_cygdrive_prefix" = x; then
39284    # As a simple fix, exclude /usr/bin since it's not a real path.
39285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39287      # a path prefixed by /cygdrive for fixpath to work.
39288      new_path="$CYGWIN_ROOT_PATH$input_path"
39289    fi
39290  fi
39291
39292  # remove trailing .exe if any
39293  new_path="${new_path/%.exe/}"
39294
39295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39296
39297  # First separate the path from the arguments. This will split at the first
39298  # space.
39299  complete="$LIPO"
39300  path="${complete%% *}"
39301  tmp="$complete EOL"
39302  arguments="${tmp#* }"
39303
39304  # Input might be given as Windows format, start by converting to
39305  # unix format.
39306  new_path="$path"
39307
39308  windows_path="$new_path"
39309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39310    unix_path=`$CYGPATH -u "$windows_path"`
39311    new_path="$unix_path"
39312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39314    new_path="$unix_path"
39315  fi
39316
39317
39318  # Now try to locate executable using which
39319  new_path=`$WHICH "$new_path" 2> /dev/null`
39320
39321  if test "x$new_path" = x; then
39322    # Oops. Which didn't find the executable.
39323    # The splitting of arguments from the executable at a space might have been incorrect,
39324    # since paths with space are more likely in Windows. Give it another try with the whole
39325    # argument.
39326    path="$complete"
39327    arguments="EOL"
39328    new_path="$path"
39329
39330  windows_path="$new_path"
39331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39332    unix_path=`$CYGPATH -u "$windows_path"`
39333    new_path="$unix_path"
39334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39336    new_path="$unix_path"
39337  fi
39338
39339
39340    new_path=`$WHICH "$new_path" 2> /dev/null`
39341    # bat and cmd files are not always considered executable in MSYS causing which
39342    # to not find them
39343    if test "x$new_path" = x \
39344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39346      new_path="$path"
39347
39348  windows_path="$new_path"
39349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39350    unix_path=`$CYGPATH -u "$windows_path"`
39351    new_path="$unix_path"
39352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39354    new_path="$unix_path"
39355  fi
39356
39357    fi
39358
39359    if test "x$new_path" = x; then
39360      # It's still not found. Now this is an unrecoverable error.
39361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39362$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39363      has_space=`$ECHO "$complete" | $GREP " "`
39364      if test "x$has_space" != x; then
39365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39367      fi
39368      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39369    fi
39370  fi
39371
39372  # Now new_path has a complete unix path to the binary
39373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39374    # Keep paths in /bin as-is, but remove trailing .exe if any
39375    new_path="${new_path/%.exe/}"
39376    # Do not save /bin paths to all_fixpath_prefixes!
39377  else
39378    # Not in mixed or Windows style, start by that.
39379    new_path=`cmd //c echo $new_path`
39380
39381  input_path="$new_path"
39382  # Check if we need to convert this using DOS-style short mode. If the path
39383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39384  # take no chances and rewrite it.
39385  # Note: m4 eats our [], so we need to use [ and ] instead.
39386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39387  if test "x$has_forbidden_chars" != x; then
39388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39390  fi
39391
39392    # Output is in $new_path
39393
39394  windows_path="$new_path"
39395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39396    unix_path=`$CYGPATH -u "$windows_path"`
39397    new_path="$unix_path"
39398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39400    new_path="$unix_path"
39401  fi
39402
39403    # remove trailing .exe if any
39404    new_path="${new_path/%.exe/}"
39405
39406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39408  fi
39409
39410    else
39411      # We're on a unix platform. Hooray! :)
39412      # First separate the path from the arguments. This will split at the first
39413      # space.
39414      complete="$LIPO"
39415      path="${complete%% *}"
39416      tmp="$complete EOL"
39417      arguments="${tmp#* }"
39418
39419      # Cannot rely on the command "which" here since it doesn't always work.
39420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39421      if test -z "$is_absolute_path"; then
39422        # Path to executable is not absolute. Find it.
39423        IFS_save="$IFS"
39424        IFS=:
39425        for p in $PATH; do
39426          if test -f "$p/$path" && test -x "$p/$path"; then
39427            new_path="$p/$path"
39428            break
39429          fi
39430        done
39431        IFS="$IFS_save"
39432      else
39433        # This is an absolute path, we can use it without further modifications.
39434        new_path="$path"
39435      fi
39436
39437      if test "x$new_path" = x; then
39438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39439$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39440        has_space=`$ECHO "$complete" | $GREP " "`
39441        if test "x$has_space" != x; then
39442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39444        fi
39445        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39446      fi
39447    fi
39448
39449    # Now join together the path and the arguments once again
39450    if test "x$arguments" != xEOL; then
39451      new_complete="$new_path ${arguments% *}"
39452    else
39453      new_complete="$new_path"
39454    fi
39455
39456    if test "x$complete" != "x$new_complete"; then
39457      LIPO="$new_complete"
39458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39459$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39460    fi
39461  fi
39462
39463  fi
39464
39465  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39466    # Extract the first word of "mt", so it can be a program name with args.
39467set dummy mt; ac_word=$2
39468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39469$as_echo_n "checking for $ac_word... " >&6; }
39470if ${ac_cv_prog_MT+:} false; then :
39471  $as_echo_n "(cached) " >&6
39472else
39473  if test -n "$MT"; then
39474  ac_cv_prog_MT="$MT" # Let the user override the test.
39475else
39476  ac_prog_rejected=no
39477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39478for as_dir in $PATH
39479do
39480  IFS=$as_save_IFS
39481  test -z "$as_dir" && as_dir=.
39482    for ac_exec_ext in '' $ac_executable_extensions; do
39483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39484    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39485       ac_prog_rejected=yes
39486       continue
39487     fi
39488    ac_cv_prog_MT="mt"
39489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39490    break 2
39491  fi
39492done
39493  done
39494IFS=$as_save_IFS
39495
39496if test $ac_prog_rejected = yes; then
39497  # We found a bogon in the path, so make sure we never use it.
39498  set dummy $ac_cv_prog_MT
39499  shift
39500  if test $# != 0; then
39501    # We chose a different compiler from the bogus one.
39502    # However, it has the same basename, so the bogon will be chosen
39503    # first if we set MT to just the basename; use the full file name.
39504    shift
39505    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39506  fi
39507fi
39508fi
39509fi
39510MT=$ac_cv_prog_MT
39511if test -n "$MT"; then
39512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39513$as_echo "$MT" >&6; }
39514else
39515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39516$as_echo "no" >&6; }
39517fi
39518
39519
39520
39521  # Only process if variable expands to non-empty
39522
39523  if test "x$MT" != x; then
39524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39525
39526  # First separate the path from the arguments. This will split at the first
39527  # space.
39528  complete="$MT"
39529  path="${complete%% *}"
39530  tmp="$complete EOL"
39531  arguments="${tmp#* }"
39532
39533  # Input might be given as Windows format, start by converting to
39534  # unix format.
39535  new_path=`$CYGPATH -u "$path"`
39536
39537  # Now try to locate executable using which
39538  new_path=`$WHICH "$new_path" 2> /dev/null`
39539  # bat and cmd files are not always considered executable in cygwin causing which
39540  # to not find them
39541  if test "x$new_path" = x \
39542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39544    new_path=`$CYGPATH -u "$path"`
39545  fi
39546  if test "x$new_path" = x; then
39547    # Oops. Which didn't find the executable.
39548    # The splitting of arguments from the executable at a space might have been incorrect,
39549    # since paths with space are more likely in Windows. Give it another try with the whole
39550    # argument.
39551    path="$complete"
39552    arguments="EOL"
39553    new_path=`$CYGPATH -u "$path"`
39554    new_path=`$WHICH "$new_path" 2> /dev/null`
39555    # bat and cmd files are not always considered executable in cygwin causing which
39556    # to not find them
39557    if test "x$new_path" = x \
39558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39560      new_path=`$CYGPATH -u "$path"`
39561    fi
39562    if test "x$new_path" = x; then
39563      # It's still not found. Now this is an unrecoverable error.
39564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39565$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39566      has_space=`$ECHO "$complete" | $GREP " "`
39567      if test "x$has_space" != x; then
39568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39570      fi
39571      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39572    fi
39573  fi
39574
39575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39578  # "foo.exe" is OK but "foo" is an error.
39579  #
39580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39581  # It is also a way to make sure we got the proper file name for the real test later on.
39582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39583  if test "x$test_shortpath" = x; then
39584    # Short path failed, file does not exist as specified.
39585    # Try adding .exe or .cmd
39586    if test -f "${new_path}.exe"; then
39587      input_to_shortpath="${new_path}.exe"
39588    elif test -f "${new_path}.cmd"; then
39589      input_to_shortpath="${new_path}.cmd"
39590    else
39591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39592$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39595      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39596    fi
39597  else
39598    input_to_shortpath="$new_path"
39599  fi
39600
39601  # Call helper function which possibly converts this using DOS-style short mode.
39602  # If so, the updated path is stored in $new_path.
39603  new_path="$input_to_shortpath"
39604
39605  input_path="$input_to_shortpath"
39606  # Check if we need to convert this using DOS-style short mode. If the path
39607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39608  # take no chances and rewrite it.
39609  # Note: m4 eats our [], so we need to use [ and ] instead.
39610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39611  if test "x$has_forbidden_chars" != x; then
39612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39616      # Going to short mode and back again did indeed matter. Since short mode is
39617      # case insensitive, let's make it lowercase to improve readability.
39618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39619      # Now convert it back to Unix-style (cygpath)
39620      input_path=`$CYGPATH -u "$shortmode_path"`
39621      new_path="$input_path"
39622    fi
39623  fi
39624
39625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39626  if test "x$test_cygdrive_prefix" = x; then
39627    # As a simple fix, exclude /usr/bin since it's not a real path.
39628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39630      # a path prefixed by /cygdrive for fixpath to work.
39631      new_path="$CYGWIN_ROOT_PATH$input_path"
39632    fi
39633  fi
39634
39635  # remove trailing .exe if any
39636  new_path="${new_path/%.exe/}"
39637
39638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39639
39640  # First separate the path from the arguments. This will split at the first
39641  # space.
39642  complete="$MT"
39643  path="${complete%% *}"
39644  tmp="$complete EOL"
39645  arguments="${tmp#* }"
39646
39647  # Input might be given as Windows format, start by converting to
39648  # unix format.
39649  new_path="$path"
39650
39651  windows_path="$new_path"
39652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39653    unix_path=`$CYGPATH -u "$windows_path"`
39654    new_path="$unix_path"
39655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39657    new_path="$unix_path"
39658  fi
39659
39660
39661  # Now try to locate executable using which
39662  new_path=`$WHICH "$new_path" 2> /dev/null`
39663
39664  if test "x$new_path" = x; then
39665    # Oops. Which didn't find the executable.
39666    # The splitting of arguments from the executable at a space might have been incorrect,
39667    # since paths with space are more likely in Windows. Give it another try with the whole
39668    # argument.
39669    path="$complete"
39670    arguments="EOL"
39671    new_path="$path"
39672
39673  windows_path="$new_path"
39674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39675    unix_path=`$CYGPATH -u "$windows_path"`
39676    new_path="$unix_path"
39677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39679    new_path="$unix_path"
39680  fi
39681
39682
39683    new_path=`$WHICH "$new_path" 2> /dev/null`
39684    # bat and cmd files are not always considered executable in MSYS causing which
39685    # to not find them
39686    if test "x$new_path" = x \
39687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39689      new_path="$path"
39690
39691  windows_path="$new_path"
39692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39693    unix_path=`$CYGPATH -u "$windows_path"`
39694    new_path="$unix_path"
39695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39697    new_path="$unix_path"
39698  fi
39699
39700    fi
39701
39702    if test "x$new_path" = x; then
39703      # It's still not found. Now this is an unrecoverable error.
39704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39705$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39706      has_space=`$ECHO "$complete" | $GREP " "`
39707      if test "x$has_space" != x; then
39708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39710      fi
39711      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39712    fi
39713  fi
39714
39715  # Now new_path has a complete unix path to the binary
39716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39717    # Keep paths in /bin as-is, but remove trailing .exe if any
39718    new_path="${new_path/%.exe/}"
39719    # Do not save /bin paths to all_fixpath_prefixes!
39720  else
39721    # Not in mixed or Windows style, start by that.
39722    new_path=`cmd //c echo $new_path`
39723
39724  input_path="$new_path"
39725  # Check if we need to convert this using DOS-style short mode. If the path
39726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39727  # take no chances and rewrite it.
39728  # Note: m4 eats our [], so we need to use [ and ] instead.
39729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39730  if test "x$has_forbidden_chars" != x; then
39731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39733  fi
39734
39735    # Output is in $new_path
39736
39737  windows_path="$new_path"
39738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39739    unix_path=`$CYGPATH -u "$windows_path"`
39740    new_path="$unix_path"
39741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39743    new_path="$unix_path"
39744  fi
39745
39746    # remove trailing .exe if any
39747    new_path="${new_path/%.exe/}"
39748
39749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39751  fi
39752
39753    else
39754      # We're on a unix platform. Hooray! :)
39755      # First separate the path from the arguments. This will split at the first
39756      # space.
39757      complete="$MT"
39758      path="${complete%% *}"
39759      tmp="$complete EOL"
39760      arguments="${tmp#* }"
39761
39762      # Cannot rely on the command "which" here since it doesn't always work.
39763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39764      if test -z "$is_absolute_path"; then
39765        # Path to executable is not absolute. Find it.
39766        IFS_save="$IFS"
39767        IFS=:
39768        for p in $PATH; do
39769          if test -f "$p/$path" && test -x "$p/$path"; then
39770            new_path="$p/$path"
39771            break
39772          fi
39773        done
39774        IFS="$IFS_save"
39775      else
39776        # This is an absolute path, we can use it without further modifications.
39777        new_path="$path"
39778      fi
39779
39780      if test "x$new_path" = x; then
39781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39782$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39783        has_space=`$ECHO "$complete" | $GREP " "`
39784        if test "x$has_space" != x; then
39785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39787        fi
39788        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39789      fi
39790    fi
39791
39792    # Now join together the path and the arguments once again
39793    if test "x$arguments" != xEOL; then
39794      new_complete="$new_path ${arguments% *}"
39795    else
39796      new_complete="$new_path"
39797    fi
39798
39799    if test "x$complete" != "x$new_complete"; then
39800      MT="$new_complete"
39801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39802$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39803    fi
39804  fi
39805
39806    # Setup the resource compiler (RC)
39807    # Extract the first word of "rc", so it can be a program name with args.
39808set dummy rc; ac_word=$2
39809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39810$as_echo_n "checking for $ac_word... " >&6; }
39811if ${ac_cv_prog_RC+:} false; then :
39812  $as_echo_n "(cached) " >&6
39813else
39814  if test -n "$RC"; then
39815  ac_cv_prog_RC="$RC" # Let the user override the test.
39816else
39817  ac_prog_rejected=no
39818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39819for as_dir in $PATH
39820do
39821  IFS=$as_save_IFS
39822  test -z "$as_dir" && as_dir=.
39823    for ac_exec_ext in '' $ac_executable_extensions; do
39824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39825    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39826       ac_prog_rejected=yes
39827       continue
39828     fi
39829    ac_cv_prog_RC="rc"
39830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39831    break 2
39832  fi
39833done
39834  done
39835IFS=$as_save_IFS
39836
39837if test $ac_prog_rejected = yes; then
39838  # We found a bogon in the path, so make sure we never use it.
39839  set dummy $ac_cv_prog_RC
39840  shift
39841  if test $# != 0; then
39842    # We chose a different compiler from the bogus one.
39843    # However, it has the same basename, so the bogon will be chosen
39844    # first if we set RC to just the basename; use the full file name.
39845    shift
39846    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39847  fi
39848fi
39849fi
39850fi
39851RC=$ac_cv_prog_RC
39852if test -n "$RC"; then
39853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39854$as_echo "$RC" >&6; }
39855else
39856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39857$as_echo "no" >&6; }
39858fi
39859
39860
39861
39862  # Only process if variable expands to non-empty
39863
39864  if test "x$RC" != x; then
39865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39866
39867  # First separate the path from the arguments. This will split at the first
39868  # space.
39869  complete="$RC"
39870  path="${complete%% *}"
39871  tmp="$complete EOL"
39872  arguments="${tmp#* }"
39873
39874  # Input might be given as Windows format, start by converting to
39875  # unix format.
39876  new_path=`$CYGPATH -u "$path"`
39877
39878  # Now try to locate executable using which
39879  new_path=`$WHICH "$new_path" 2> /dev/null`
39880  # bat and cmd files are not always considered executable in cygwin causing which
39881  # to not find them
39882  if test "x$new_path" = x \
39883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39885    new_path=`$CYGPATH -u "$path"`
39886  fi
39887  if test "x$new_path" = x; then
39888    # Oops. Which didn't find the executable.
39889    # The splitting of arguments from the executable at a space might have been incorrect,
39890    # since paths with space are more likely in Windows. Give it another try with the whole
39891    # argument.
39892    path="$complete"
39893    arguments="EOL"
39894    new_path=`$CYGPATH -u "$path"`
39895    new_path=`$WHICH "$new_path" 2> /dev/null`
39896    # bat and cmd files are not always considered executable in cygwin causing which
39897    # to not find them
39898    if test "x$new_path" = x \
39899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39901      new_path=`$CYGPATH -u "$path"`
39902    fi
39903    if test "x$new_path" = x; then
39904      # It's still not found. Now this is an unrecoverable error.
39905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39906$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39907      has_space=`$ECHO "$complete" | $GREP " "`
39908      if test "x$has_space" != x; then
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39911      fi
39912      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39913    fi
39914  fi
39915
39916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39919  # "foo.exe" is OK but "foo" is an error.
39920  #
39921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39922  # It is also a way to make sure we got the proper file name for the real test later on.
39923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39924  if test "x$test_shortpath" = x; then
39925    # Short path failed, file does not exist as specified.
39926    # Try adding .exe or .cmd
39927    if test -f "${new_path}.exe"; then
39928      input_to_shortpath="${new_path}.exe"
39929    elif test -f "${new_path}.cmd"; then
39930      input_to_shortpath="${new_path}.cmd"
39931    else
39932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39933$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39936      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39937    fi
39938  else
39939    input_to_shortpath="$new_path"
39940  fi
39941
39942  # Call helper function which possibly converts this using DOS-style short mode.
39943  # If so, the updated path is stored in $new_path.
39944  new_path="$input_to_shortpath"
39945
39946  input_path="$input_to_shortpath"
39947  # Check if we need to convert this using DOS-style short mode. If the path
39948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39949  # take no chances and rewrite it.
39950  # Note: m4 eats our [], so we need to use [ and ] instead.
39951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39952  if test "x$has_forbidden_chars" != x; then
39953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39957      # Going to short mode and back again did indeed matter. Since short mode is
39958      # case insensitive, let's make it lowercase to improve readability.
39959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39960      # Now convert it back to Unix-style (cygpath)
39961      input_path=`$CYGPATH -u "$shortmode_path"`
39962      new_path="$input_path"
39963    fi
39964  fi
39965
39966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39967  if test "x$test_cygdrive_prefix" = x; then
39968    # As a simple fix, exclude /usr/bin since it's not a real path.
39969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39971      # a path prefixed by /cygdrive for fixpath to work.
39972      new_path="$CYGWIN_ROOT_PATH$input_path"
39973    fi
39974  fi
39975
39976  # remove trailing .exe if any
39977  new_path="${new_path/%.exe/}"
39978
39979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39980
39981  # First separate the path from the arguments. This will split at the first
39982  # space.
39983  complete="$RC"
39984  path="${complete%% *}"
39985  tmp="$complete EOL"
39986  arguments="${tmp#* }"
39987
39988  # Input might be given as Windows format, start by converting to
39989  # unix format.
39990  new_path="$path"
39991
39992  windows_path="$new_path"
39993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39994    unix_path=`$CYGPATH -u "$windows_path"`
39995    new_path="$unix_path"
39996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39998    new_path="$unix_path"
39999  fi
40000
40001
40002  # Now try to locate executable using which
40003  new_path=`$WHICH "$new_path" 2> /dev/null`
40004
40005  if test "x$new_path" = x; then
40006    # Oops. Which didn't find the executable.
40007    # The splitting of arguments from the executable at a space might have been incorrect,
40008    # since paths with space are more likely in Windows. Give it another try with the whole
40009    # argument.
40010    path="$complete"
40011    arguments="EOL"
40012    new_path="$path"
40013
40014  windows_path="$new_path"
40015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40016    unix_path=`$CYGPATH -u "$windows_path"`
40017    new_path="$unix_path"
40018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40020    new_path="$unix_path"
40021  fi
40022
40023
40024    new_path=`$WHICH "$new_path" 2> /dev/null`
40025    # bat and cmd files are not always considered executable in MSYS causing which
40026    # to not find them
40027    if test "x$new_path" = x \
40028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40030      new_path="$path"
40031
40032  windows_path="$new_path"
40033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40034    unix_path=`$CYGPATH -u "$windows_path"`
40035    new_path="$unix_path"
40036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40038    new_path="$unix_path"
40039  fi
40040
40041    fi
40042
40043    if test "x$new_path" = x; then
40044      # It's still not found. Now this is an unrecoverable error.
40045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40046$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40047      has_space=`$ECHO "$complete" | $GREP " "`
40048      if test "x$has_space" != x; then
40049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40051      fi
40052      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40053    fi
40054  fi
40055
40056  # Now new_path has a complete unix path to the binary
40057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40058    # Keep paths in /bin as-is, but remove trailing .exe if any
40059    new_path="${new_path/%.exe/}"
40060    # Do not save /bin paths to all_fixpath_prefixes!
40061  else
40062    # Not in mixed or Windows style, start by that.
40063    new_path=`cmd //c echo $new_path`
40064
40065  input_path="$new_path"
40066  # Check if we need to convert this using DOS-style short mode. If the path
40067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40068  # take no chances and rewrite it.
40069  # Note: m4 eats our [], so we need to use [ and ] instead.
40070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40071  if test "x$has_forbidden_chars" != x; then
40072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40074  fi
40075
40076    # Output is in $new_path
40077
40078  windows_path="$new_path"
40079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40080    unix_path=`$CYGPATH -u "$windows_path"`
40081    new_path="$unix_path"
40082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40084    new_path="$unix_path"
40085  fi
40086
40087    # remove trailing .exe if any
40088    new_path="${new_path/%.exe/}"
40089
40090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40092  fi
40093
40094    else
40095      # We're on a unix platform. Hooray! :)
40096      # First separate the path from the arguments. This will split at the first
40097      # space.
40098      complete="$RC"
40099      path="${complete%% *}"
40100      tmp="$complete EOL"
40101      arguments="${tmp#* }"
40102
40103      # Cannot rely on the command "which" here since it doesn't always work.
40104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40105      if test -z "$is_absolute_path"; then
40106        # Path to executable is not absolute. Find it.
40107        IFS_save="$IFS"
40108        IFS=:
40109        for p in $PATH; do
40110          if test -f "$p/$path" && test -x "$p/$path"; then
40111            new_path="$p/$path"
40112            break
40113          fi
40114        done
40115        IFS="$IFS_save"
40116      else
40117        # This is an absolute path, we can use it without further modifications.
40118        new_path="$path"
40119      fi
40120
40121      if test "x$new_path" = x; then
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40123$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40124        has_space=`$ECHO "$complete" | $GREP " "`
40125        if test "x$has_space" != x; then
40126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40128        fi
40129        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40130      fi
40131    fi
40132
40133    # Now join together the path and the arguments once again
40134    if test "x$arguments" != xEOL; then
40135      new_complete="$new_path ${arguments% *}"
40136    else
40137      new_complete="$new_path"
40138    fi
40139
40140    if test "x$complete" != "x$new_complete"; then
40141      RC="$new_complete"
40142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40143$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40144    fi
40145  fi
40146
40147    # Extract the first word of "dumpbin", so it can be a program name with args.
40148set dummy dumpbin; ac_word=$2
40149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40150$as_echo_n "checking for $ac_word... " >&6; }
40151if ${ac_cv_prog_DUMPBIN+:} false; then :
40152  $as_echo_n "(cached) " >&6
40153else
40154  if test -n "$DUMPBIN"; then
40155  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40156else
40157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40158for as_dir in $PATH
40159do
40160  IFS=$as_save_IFS
40161  test -z "$as_dir" && as_dir=.
40162    for ac_exec_ext in '' $ac_executable_extensions; do
40163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40164    ac_cv_prog_DUMPBIN="dumpbin"
40165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40166    break 2
40167  fi
40168done
40169  done
40170IFS=$as_save_IFS
40171
40172fi
40173fi
40174DUMPBIN=$ac_cv_prog_DUMPBIN
40175if test -n "$DUMPBIN"; then
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40177$as_echo "$DUMPBIN" >&6; }
40178else
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40180$as_echo "no" >&6; }
40181fi
40182
40183
40184
40185  # Only process if variable expands to non-empty
40186
40187  if test "x$DUMPBIN" != x; then
40188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40189
40190  # First separate the path from the arguments. This will split at the first
40191  # space.
40192  complete="$DUMPBIN"
40193  path="${complete%% *}"
40194  tmp="$complete EOL"
40195  arguments="${tmp#* }"
40196
40197  # Input might be given as Windows format, start by converting to
40198  # unix format.
40199  new_path=`$CYGPATH -u "$path"`
40200
40201  # Now try to locate executable using which
40202  new_path=`$WHICH "$new_path" 2> /dev/null`
40203  # bat and cmd files are not always considered executable in cygwin causing which
40204  # to not find them
40205  if test "x$new_path" = x \
40206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40208    new_path=`$CYGPATH -u "$path"`
40209  fi
40210  if test "x$new_path" = x; then
40211    # Oops. Which didn't find the executable.
40212    # The splitting of arguments from the executable at a space might have been incorrect,
40213    # since paths with space are more likely in Windows. Give it another try with the whole
40214    # argument.
40215    path="$complete"
40216    arguments="EOL"
40217    new_path=`$CYGPATH -u "$path"`
40218    new_path=`$WHICH "$new_path" 2> /dev/null`
40219    # bat and cmd files are not always considered executable in cygwin causing which
40220    # to not find them
40221    if test "x$new_path" = x \
40222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40224      new_path=`$CYGPATH -u "$path"`
40225    fi
40226    if test "x$new_path" = x; then
40227      # It's still not found. Now this is an unrecoverable error.
40228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40229$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40230      has_space=`$ECHO "$complete" | $GREP " "`
40231      if test "x$has_space" != x; then
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40234      fi
40235      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40236    fi
40237  fi
40238
40239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40242  # "foo.exe" is OK but "foo" is an error.
40243  #
40244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40245  # It is also a way to make sure we got the proper file name for the real test later on.
40246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40247  if test "x$test_shortpath" = x; then
40248    # Short path failed, file does not exist as specified.
40249    # Try adding .exe or .cmd
40250    if test -f "${new_path}.exe"; then
40251      input_to_shortpath="${new_path}.exe"
40252    elif test -f "${new_path}.cmd"; then
40253      input_to_shortpath="${new_path}.cmd"
40254    else
40255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40256$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40259      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40260    fi
40261  else
40262    input_to_shortpath="$new_path"
40263  fi
40264
40265  # Call helper function which possibly converts this using DOS-style short mode.
40266  # If so, the updated path is stored in $new_path.
40267  new_path="$input_to_shortpath"
40268
40269  input_path="$input_to_shortpath"
40270  # Check if we need to convert this using DOS-style short mode. If the path
40271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40272  # take no chances and rewrite it.
40273  # Note: m4 eats our [], so we need to use [ and ] instead.
40274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40275  if test "x$has_forbidden_chars" != x; then
40276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40280      # Going to short mode and back again did indeed matter. Since short mode is
40281      # case insensitive, let's make it lowercase to improve readability.
40282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40283      # Now convert it back to Unix-style (cygpath)
40284      input_path=`$CYGPATH -u "$shortmode_path"`
40285      new_path="$input_path"
40286    fi
40287  fi
40288
40289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40290  if test "x$test_cygdrive_prefix" = x; then
40291    # As a simple fix, exclude /usr/bin since it's not a real path.
40292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40294      # a path prefixed by /cygdrive for fixpath to work.
40295      new_path="$CYGWIN_ROOT_PATH$input_path"
40296    fi
40297  fi
40298
40299  # remove trailing .exe if any
40300  new_path="${new_path/%.exe/}"
40301
40302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40303
40304  # First separate the path from the arguments. This will split at the first
40305  # space.
40306  complete="$DUMPBIN"
40307  path="${complete%% *}"
40308  tmp="$complete EOL"
40309  arguments="${tmp#* }"
40310
40311  # Input might be given as Windows format, start by converting to
40312  # unix format.
40313  new_path="$path"
40314
40315  windows_path="$new_path"
40316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40317    unix_path=`$CYGPATH -u "$windows_path"`
40318    new_path="$unix_path"
40319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40321    new_path="$unix_path"
40322  fi
40323
40324
40325  # Now try to locate executable using which
40326  new_path=`$WHICH "$new_path" 2> /dev/null`
40327
40328  if test "x$new_path" = x; then
40329    # Oops. Which didn't find the executable.
40330    # The splitting of arguments from the executable at a space might have been incorrect,
40331    # since paths with space are more likely in Windows. Give it another try with the whole
40332    # argument.
40333    path="$complete"
40334    arguments="EOL"
40335    new_path="$path"
40336
40337  windows_path="$new_path"
40338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40339    unix_path=`$CYGPATH -u "$windows_path"`
40340    new_path="$unix_path"
40341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40343    new_path="$unix_path"
40344  fi
40345
40346
40347    new_path=`$WHICH "$new_path" 2> /dev/null`
40348    # bat and cmd files are not always considered executable in MSYS causing which
40349    # to not find them
40350    if test "x$new_path" = x \
40351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40353      new_path="$path"
40354
40355  windows_path="$new_path"
40356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40357    unix_path=`$CYGPATH -u "$windows_path"`
40358    new_path="$unix_path"
40359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40361    new_path="$unix_path"
40362  fi
40363
40364    fi
40365
40366    if test "x$new_path" = x; then
40367      # It's still not found. Now this is an unrecoverable error.
40368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40369$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40370      has_space=`$ECHO "$complete" | $GREP " "`
40371      if test "x$has_space" != x; then
40372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40374      fi
40375      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40376    fi
40377  fi
40378
40379  # Now new_path has a complete unix path to the binary
40380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40381    # Keep paths in /bin as-is, but remove trailing .exe if any
40382    new_path="${new_path/%.exe/}"
40383    # Do not save /bin paths to all_fixpath_prefixes!
40384  else
40385    # Not in mixed or Windows style, start by that.
40386    new_path=`cmd //c echo $new_path`
40387
40388  input_path="$new_path"
40389  # Check if we need to convert this using DOS-style short mode. If the path
40390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40391  # take no chances and rewrite it.
40392  # Note: m4 eats our [], so we need to use [ and ] instead.
40393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40394  if test "x$has_forbidden_chars" != x; then
40395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40397  fi
40398
40399    # Output is in $new_path
40400
40401  windows_path="$new_path"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    unix_path=`$CYGPATH -u "$windows_path"`
40404    new_path="$unix_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40407    new_path="$unix_path"
40408  fi
40409
40410    # remove trailing .exe if any
40411    new_path="${new_path/%.exe/}"
40412
40413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40415  fi
40416
40417    else
40418      # We're on a unix platform. Hooray! :)
40419      # First separate the path from the arguments. This will split at the first
40420      # space.
40421      complete="$DUMPBIN"
40422      path="${complete%% *}"
40423      tmp="$complete EOL"
40424      arguments="${tmp#* }"
40425
40426      # Cannot rely on the command "which" here since it doesn't always work.
40427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40428      if test -z "$is_absolute_path"; then
40429        # Path to executable is not absolute. Find it.
40430        IFS_save="$IFS"
40431        IFS=:
40432        for p in $PATH; do
40433          if test -f "$p/$path" && test -x "$p/$path"; then
40434            new_path="$p/$path"
40435            break
40436          fi
40437        done
40438        IFS="$IFS_save"
40439      else
40440        # This is an absolute path, we can use it without further modifications.
40441        new_path="$path"
40442      fi
40443
40444      if test "x$new_path" = x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40446$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40447        has_space=`$ECHO "$complete" | $GREP " "`
40448        if test "x$has_space" != x; then
40449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40451        fi
40452        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40453      fi
40454    fi
40455
40456    # Now join together the path and the arguments once again
40457    if test "x$arguments" != xEOL; then
40458      new_complete="$new_path ${arguments% *}"
40459    else
40460      new_complete="$new_path"
40461    fi
40462
40463    if test "x$complete" != "x$new_complete"; then
40464      DUMPBIN="$new_complete"
40465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40466$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40467    fi
40468  fi
40469
40470    # We need to check for 'msbuild.exe' because at the place where we expect to
40471    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40472    # won't find the 'msbuild.exe' executable in that case (and the
40473    # 'ac_executable_extensions' is unusable due to performance reasons).
40474    # Notice that we intentionally don't fix up the path to MSBUILD because we
40475    # will call it in a DOS shell during freetype detection on Windows (see
40476    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40477    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40478set dummy msbuild.exe; ac_word=$2
40479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40480$as_echo_n "checking for $ac_word... " >&6; }
40481if ${ac_cv_prog_MSBUILD+:} false; then :
40482  $as_echo_n "(cached) " >&6
40483else
40484  if test -n "$MSBUILD"; then
40485  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40486else
40487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40488for as_dir in $PATH
40489do
40490  IFS=$as_save_IFS
40491  test -z "$as_dir" && as_dir=.
40492    for ac_exec_ext in '' $ac_executable_extensions; do
40493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40494    ac_cv_prog_MSBUILD="msbuild.exe"
40495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40496    break 2
40497  fi
40498done
40499  done
40500IFS=$as_save_IFS
40501
40502fi
40503fi
40504MSBUILD=$ac_cv_prog_MSBUILD
40505if test -n "$MSBUILD"; then
40506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40507$as_echo "$MSBUILD" >&6; }
40508else
40509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40510$as_echo "no" >&6; }
40511fi
40512
40513
40514  fi
40515
40516  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40517
40518
40519  # Publish this variable in the help.
40520
40521
40522  if [ -z "${STRIP+x}" ]; then
40523    # The variable is not set by user, try to locate tool using the code snippet
40524    for ac_prog in strip
40525do
40526  # Extract the first word of "$ac_prog", so it can be a program name with args.
40527set dummy $ac_prog; ac_word=$2
40528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40529$as_echo_n "checking for $ac_word... " >&6; }
40530if ${ac_cv_path_STRIP+:} false; then :
40531  $as_echo_n "(cached) " >&6
40532else
40533  case $STRIP in
40534  [\\/]* | ?:[\\/]*)
40535  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40536  ;;
40537  *)
40538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40539for as_dir in $PATH
40540do
40541  IFS=$as_save_IFS
40542  test -z "$as_dir" && as_dir=.
40543    for ac_exec_ext in '' $ac_executable_extensions; do
40544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40545    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40547    break 2
40548  fi
40549done
40550  done
40551IFS=$as_save_IFS
40552
40553  ;;
40554esac
40555fi
40556STRIP=$ac_cv_path_STRIP
40557if test -n "$STRIP"; then
40558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40559$as_echo "$STRIP" >&6; }
40560else
40561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40562$as_echo "no" >&6; }
40563fi
40564
40565
40566  test -n "$STRIP" && break
40567done
40568
40569  else
40570    # The variable is set, but is it from the command line or the environment?
40571
40572    # Try to remove the string !STRIP! from our list.
40573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40575      # If it failed, the variable was not from the command line. Ignore it,
40576      # but warn the user (except for BASH, which is always set by the calling BASH).
40577      if test "xSTRIP" != xBASH; then
40578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40579$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40580      fi
40581      # Try to locate tool using the code snippet
40582      for ac_prog in strip
40583do
40584  # Extract the first word of "$ac_prog", so it can be a program name with args.
40585set dummy $ac_prog; ac_word=$2
40586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40587$as_echo_n "checking for $ac_word... " >&6; }
40588if ${ac_cv_path_STRIP+:} false; then :
40589  $as_echo_n "(cached) " >&6
40590else
40591  case $STRIP in
40592  [\\/]* | ?:[\\/]*)
40593  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40594  ;;
40595  *)
40596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597for as_dir in $PATH
40598do
40599  IFS=$as_save_IFS
40600  test -z "$as_dir" && as_dir=.
40601    for ac_exec_ext in '' $ac_executable_extensions; do
40602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605    break 2
40606  fi
40607done
40608  done
40609IFS=$as_save_IFS
40610
40611  ;;
40612esac
40613fi
40614STRIP=$ac_cv_path_STRIP
40615if test -n "$STRIP"; then
40616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40617$as_echo "$STRIP" >&6; }
40618else
40619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40620$as_echo "no" >&6; }
40621fi
40622
40623
40624  test -n "$STRIP" && break
40625done
40626
40627    else
40628      # If it succeeded, then it was overridden by the user. We will use it
40629      # for the tool.
40630
40631      # First remove it from the list of overridden variables, so we can test
40632      # for unknown variables in the end.
40633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40634
40635      # Check if we try to supply an empty value
40636      if test "x$STRIP" = x; then
40637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40638$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40640$as_echo_n "checking for STRIP... " >&6; }
40641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40642$as_echo "disabled" >&6; }
40643      else
40644        # Check if the provided tool contains a complete path.
40645        tool_specified="$STRIP"
40646        tool_basename="${tool_specified##*/}"
40647        if test "x$tool_basename" = "x$tool_specified"; then
40648          # A command without a complete path is provided, search $PATH.
40649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40650$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40651          # Extract the first word of "$tool_basename", so it can be a program name with args.
40652set dummy $tool_basename; ac_word=$2
40653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40654$as_echo_n "checking for $ac_word... " >&6; }
40655if ${ac_cv_path_STRIP+:} false; then :
40656  $as_echo_n "(cached) " >&6
40657else
40658  case $STRIP in
40659  [\\/]* | ?:[\\/]*)
40660  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40661  ;;
40662  *)
40663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40664for as_dir in $PATH
40665do
40666  IFS=$as_save_IFS
40667  test -z "$as_dir" && as_dir=.
40668    for ac_exec_ext in '' $ac_executable_extensions; do
40669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40670    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40672    break 2
40673  fi
40674done
40675  done
40676IFS=$as_save_IFS
40677
40678  ;;
40679esac
40680fi
40681STRIP=$ac_cv_path_STRIP
40682if test -n "$STRIP"; then
40683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40684$as_echo "$STRIP" >&6; }
40685else
40686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40687$as_echo "no" >&6; }
40688fi
40689
40690
40691          if test "x$STRIP" = x; then
40692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40693          fi
40694        else
40695          # Otherwise we believe it is a complete path. Use it as it is.
40696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40697$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40699$as_echo_n "checking for STRIP... " >&6; }
40700          if test ! -x "$tool_specified"; then
40701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40702$as_echo "not found" >&6; }
40703            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40704          fi
40705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40706$as_echo "$tool_specified" >&6; }
40707        fi
40708      fi
40709    fi
40710
40711  fi
40712
40713
40714
40715  # Only process if variable expands to non-empty
40716
40717  if test "x$STRIP" != x; then
40718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40719
40720  # First separate the path from the arguments. This will split at the first
40721  # space.
40722  complete="$STRIP"
40723  path="${complete%% *}"
40724  tmp="$complete EOL"
40725  arguments="${tmp#* }"
40726
40727  # Input might be given as Windows format, start by converting to
40728  # unix format.
40729  new_path=`$CYGPATH -u "$path"`
40730
40731  # Now try to locate executable using which
40732  new_path=`$WHICH "$new_path" 2> /dev/null`
40733  # bat and cmd files are not always considered executable in cygwin causing which
40734  # to not find them
40735  if test "x$new_path" = x \
40736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40738    new_path=`$CYGPATH -u "$path"`
40739  fi
40740  if test "x$new_path" = x; then
40741    # Oops. Which didn't find the executable.
40742    # The splitting of arguments from the executable at a space might have been incorrect,
40743    # since paths with space are more likely in Windows. Give it another try with the whole
40744    # argument.
40745    path="$complete"
40746    arguments="EOL"
40747    new_path=`$CYGPATH -u "$path"`
40748    new_path=`$WHICH "$new_path" 2> /dev/null`
40749    # bat and cmd files are not always considered executable in cygwin causing which
40750    # to not find them
40751    if test "x$new_path" = x \
40752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40754      new_path=`$CYGPATH -u "$path"`
40755    fi
40756    if test "x$new_path" = x; then
40757      # It's still not found. Now this is an unrecoverable error.
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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, 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  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40772  # "foo.exe" is OK but "foo" is an error.
40773  #
40774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40775  # It is also a way to make sure we got the proper file name for the real test later on.
40776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40777  if test "x$test_shortpath" = x; then
40778    # Short path failed, file does not exist as specified.
40779    # Try adding .exe or .cmd
40780    if test -f "${new_path}.exe"; then
40781      input_to_shortpath="${new_path}.exe"
40782    elif test -f "${new_path}.cmd"; then
40783      input_to_shortpath="${new_path}.cmd"
40784    else
40785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40786$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40789      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40790    fi
40791  else
40792    input_to_shortpath="$new_path"
40793  fi
40794
40795  # Call helper function which possibly converts this using DOS-style short mode.
40796  # If so, the updated path is stored in $new_path.
40797  new_path="$input_to_shortpath"
40798
40799  input_path="$input_to_shortpath"
40800  # Check if we need to convert this using DOS-style short mode. If the path
40801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40802  # take no chances and rewrite it.
40803  # Note: m4 eats our [], so we need to use [ and ] instead.
40804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40805  if test "x$has_forbidden_chars" != x; then
40806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40810      # Going to short mode and back again did indeed matter. Since short mode is
40811      # case insensitive, let's make it lowercase to improve readability.
40812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40813      # Now convert it back to Unix-style (cygpath)
40814      input_path=`$CYGPATH -u "$shortmode_path"`
40815      new_path="$input_path"
40816    fi
40817  fi
40818
40819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40820  if test "x$test_cygdrive_prefix" = x; then
40821    # As a simple fix, exclude /usr/bin since it's not a real path.
40822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40824      # a path prefixed by /cygdrive for fixpath to work.
40825      new_path="$CYGWIN_ROOT_PATH$input_path"
40826    fi
40827  fi
40828
40829  # remove trailing .exe if any
40830  new_path="${new_path/%.exe/}"
40831
40832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40833
40834  # First separate the path from the arguments. This will split at the first
40835  # space.
40836  complete="$STRIP"
40837  path="${complete%% *}"
40838  tmp="$complete EOL"
40839  arguments="${tmp#* }"
40840
40841  # Input might be given as Windows format, start by converting to
40842  # unix format.
40843  new_path="$path"
40844
40845  windows_path="$new_path"
40846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40847    unix_path=`$CYGPATH -u "$windows_path"`
40848    new_path="$unix_path"
40849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40851    new_path="$unix_path"
40852  fi
40853
40854
40855  # Now try to locate executable using which
40856  new_path=`$WHICH "$new_path" 2> /dev/null`
40857
40858  if test "x$new_path" = x; then
40859    # Oops. Which didn't find the executable.
40860    # The splitting of arguments from the executable at a space might have been incorrect,
40861    # since paths with space are more likely in Windows. Give it another try with the whole
40862    # argument.
40863    path="$complete"
40864    arguments="EOL"
40865    new_path="$path"
40866
40867  windows_path="$new_path"
40868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40869    unix_path=`$CYGPATH -u "$windows_path"`
40870    new_path="$unix_path"
40871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40873    new_path="$unix_path"
40874  fi
40875
40876
40877    new_path=`$WHICH "$new_path" 2> /dev/null`
40878    # bat and cmd files are not always considered executable in MSYS causing which
40879    # to not find them
40880    if test "x$new_path" = x \
40881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40883      new_path="$path"
40884
40885  windows_path="$new_path"
40886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40887    unix_path=`$CYGPATH -u "$windows_path"`
40888    new_path="$unix_path"
40889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40891    new_path="$unix_path"
40892  fi
40893
40894    fi
40895
40896    if test "x$new_path" = x; then
40897      # It's still not found. Now this is an unrecoverable error.
40898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40899$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40900      has_space=`$ECHO "$complete" | $GREP " "`
40901      if test "x$has_space" != x; then
40902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40904      fi
40905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40906    fi
40907  fi
40908
40909  # Now new_path has a complete unix path to the binary
40910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40911    # Keep paths in /bin as-is, but remove trailing .exe if any
40912    new_path="${new_path/%.exe/}"
40913    # Do not save /bin paths to all_fixpath_prefixes!
40914  else
40915    # Not in mixed or Windows style, start by that.
40916    new_path=`cmd //c echo $new_path`
40917
40918  input_path="$new_path"
40919  # Check if we need to convert this using DOS-style short mode. If the path
40920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40921  # take no chances and rewrite it.
40922  # Note: m4 eats our [], so we need to use [ and ] instead.
40923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40924  if test "x$has_forbidden_chars" != x; then
40925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40927  fi
40928
40929    # Output is in $new_path
40930
40931  windows_path="$new_path"
40932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40933    unix_path=`$CYGPATH -u "$windows_path"`
40934    new_path="$unix_path"
40935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40937    new_path="$unix_path"
40938  fi
40939
40940    # remove trailing .exe if any
40941    new_path="${new_path/%.exe/}"
40942
40943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40945  fi
40946
40947    else
40948      # We're on a unix platform. Hooray! :)
40949      # First separate the path from the arguments. This will split at the first
40950      # space.
40951      complete="$STRIP"
40952      path="${complete%% *}"
40953      tmp="$complete EOL"
40954      arguments="${tmp#* }"
40955
40956      # Cannot rely on the command "which" here since it doesn't always work.
40957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40958      if test -z "$is_absolute_path"; then
40959        # Path to executable is not absolute. Find it.
40960        IFS_save="$IFS"
40961        IFS=:
40962        for p in $PATH; do
40963          if test -f "$p/$path" && test -x "$p/$path"; then
40964            new_path="$p/$path"
40965            break
40966          fi
40967        done
40968        IFS="$IFS_save"
40969      else
40970        # This is an absolute path, we can use it without further modifications.
40971        new_path="$path"
40972      fi
40973
40974      if test "x$new_path" = x; then
40975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40976$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40977        has_space=`$ECHO "$complete" | $GREP " "`
40978        if test "x$has_space" != x; then
40979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40981        fi
40982        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40983      fi
40984    fi
40985
40986    # Now join together the path and the arguments once again
40987    if test "x$arguments" != xEOL; then
40988      new_complete="$new_path ${arguments% *}"
40989    else
40990      new_complete="$new_path"
40991    fi
40992
40993    if test "x$complete" != "x$new_complete"; then
40994      STRIP="$new_complete"
40995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40996$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40997    fi
40998  fi
40999
41000
41001
41002  # Publish this variable in the help.
41003
41004
41005  if [ -z "${NM+x}" ]; then
41006    # The variable is not set by user, try to locate tool using the code snippet
41007    for ac_prog in nm
41008do
41009  # Extract the first word of "$ac_prog", so it can be a program name with args.
41010set dummy $ac_prog; ac_word=$2
41011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41012$as_echo_n "checking for $ac_word... " >&6; }
41013if ${ac_cv_path_NM+:} false; then :
41014  $as_echo_n "(cached) " >&6
41015else
41016  case $NM in
41017  [\\/]* | ?:[\\/]*)
41018  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41019  ;;
41020  *)
41021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41022for as_dir in $PATH
41023do
41024  IFS=$as_save_IFS
41025  test -z "$as_dir" && as_dir=.
41026    for ac_exec_ext in '' $ac_executable_extensions; do
41027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41028    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41030    break 2
41031  fi
41032done
41033  done
41034IFS=$as_save_IFS
41035
41036  ;;
41037esac
41038fi
41039NM=$ac_cv_path_NM
41040if test -n "$NM"; then
41041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41042$as_echo "$NM" >&6; }
41043else
41044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41045$as_echo "no" >&6; }
41046fi
41047
41048
41049  test -n "$NM" && break
41050done
41051
41052  else
41053    # The variable is set, but is it from the command line or the environment?
41054
41055    # Try to remove the string !NM! from our list.
41056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41058      # If it failed, the variable was not from the command line. Ignore it,
41059      # but warn the user (except for BASH, which is always set by the calling BASH).
41060      if test "xNM" != xBASH; then
41061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41062$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41063      fi
41064      # Try to locate tool using the code snippet
41065      for ac_prog in nm
41066do
41067  # Extract the first word of "$ac_prog", so it can be a program name with args.
41068set dummy $ac_prog; ac_word=$2
41069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41070$as_echo_n "checking for $ac_word... " >&6; }
41071if ${ac_cv_path_NM+:} false; then :
41072  $as_echo_n "(cached) " >&6
41073else
41074  case $NM in
41075  [\\/]* | ?:[\\/]*)
41076  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41077  ;;
41078  *)
41079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094  ;;
41095esac
41096fi
41097NM=$ac_cv_path_NM
41098if test -n "$NM"; then
41099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41100$as_echo "$NM" >&6; }
41101else
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41103$as_echo "no" >&6; }
41104fi
41105
41106
41107  test -n "$NM" && break
41108done
41109
41110    else
41111      # If it succeeded, then it was overridden by the user. We will use it
41112      # for the tool.
41113
41114      # First remove it from the list of overridden variables, so we can test
41115      # for unknown variables in the end.
41116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41117
41118      # Check if we try to supply an empty value
41119      if test "x$NM" = x; then
41120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41121$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41123$as_echo_n "checking for NM... " >&6; }
41124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41125$as_echo "disabled" >&6; }
41126      else
41127        # Check if the provided tool contains a complete path.
41128        tool_specified="$NM"
41129        tool_basename="${tool_specified##*/}"
41130        if test "x$tool_basename" = "x$tool_specified"; then
41131          # A command without a complete path is provided, search $PATH.
41132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41133$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41134          # Extract the first word of "$tool_basename", so it can be a program name with args.
41135set dummy $tool_basename; ac_word=$2
41136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41137$as_echo_n "checking for $ac_word... " >&6; }
41138if ${ac_cv_path_NM+:} false; then :
41139  $as_echo_n "(cached) " >&6
41140else
41141  case $NM in
41142  [\\/]* | ?:[\\/]*)
41143  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41144  ;;
41145  *)
41146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41147for as_dir in $PATH
41148do
41149  IFS=$as_save_IFS
41150  test -z "$as_dir" && as_dir=.
41151    for ac_exec_ext in '' $ac_executable_extensions; do
41152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41153    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41155    break 2
41156  fi
41157done
41158  done
41159IFS=$as_save_IFS
41160
41161  ;;
41162esac
41163fi
41164NM=$ac_cv_path_NM
41165if test -n "$NM"; then
41166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41167$as_echo "$NM" >&6; }
41168else
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41170$as_echo "no" >&6; }
41171fi
41172
41173
41174          if test "x$NM" = x; then
41175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41176          fi
41177        else
41178          # Otherwise we believe it is a complete path. Use it as it is.
41179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41180$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41182$as_echo_n "checking for NM... " >&6; }
41183          if test ! -x "$tool_specified"; then
41184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41185$as_echo "not found" >&6; }
41186            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41187          fi
41188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41189$as_echo "$tool_specified" >&6; }
41190        fi
41191      fi
41192    fi
41193
41194  fi
41195
41196
41197
41198  # Only process if variable expands to non-empty
41199
41200  if test "x$NM" != x; then
41201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41202
41203  # First separate the path from the arguments. This will split at the first
41204  # space.
41205  complete="$NM"
41206  path="${complete%% *}"
41207  tmp="$complete EOL"
41208  arguments="${tmp#* }"
41209
41210  # Input might be given as Windows format, start by converting to
41211  # unix format.
41212  new_path=`$CYGPATH -u "$path"`
41213
41214  # Now try to locate executable using which
41215  new_path=`$WHICH "$new_path" 2> /dev/null`
41216  # bat and cmd files are not always considered executable in cygwin causing which
41217  # to not find them
41218  if test "x$new_path" = x \
41219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41221    new_path=`$CYGPATH -u "$path"`
41222  fi
41223  if test "x$new_path" = x; then
41224    # Oops. Which didn't find the executable.
41225    # The splitting of arguments from the executable at a space might have been incorrect,
41226    # since paths with space are more likely in Windows. Give it another try with the whole
41227    # argument.
41228    path="$complete"
41229    arguments="EOL"
41230    new_path=`$CYGPATH -u "$path"`
41231    new_path=`$WHICH "$new_path" 2> /dev/null`
41232    # bat and cmd files are not always considered executable in cygwin causing which
41233    # to not find them
41234    if test "x$new_path" = x \
41235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41237      new_path=`$CYGPATH -u "$path"`
41238    fi
41239    if test "x$new_path" = x; then
41240      # It's still not found. Now this is an unrecoverable error.
41241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41242$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41243      has_space=`$ECHO "$complete" | $GREP " "`
41244      if test "x$has_space" != x; then
41245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41247      fi
41248      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41249    fi
41250  fi
41251
41252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41255  # "foo.exe" is OK but "foo" is an error.
41256  #
41257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41258  # It is also a way to make sure we got the proper file name for the real test later on.
41259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41260  if test "x$test_shortpath" = x; then
41261    # Short path failed, file does not exist as specified.
41262    # Try adding .exe or .cmd
41263    if test -f "${new_path}.exe"; then
41264      input_to_shortpath="${new_path}.exe"
41265    elif test -f "${new_path}.cmd"; then
41266      input_to_shortpath="${new_path}.cmd"
41267    else
41268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41269$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41272      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41273    fi
41274  else
41275    input_to_shortpath="$new_path"
41276  fi
41277
41278  # Call helper function which possibly converts this using DOS-style short mode.
41279  # If so, the updated path is stored in $new_path.
41280  new_path="$input_to_shortpath"
41281
41282  input_path="$input_to_shortpath"
41283  # Check if we need to convert this using DOS-style short mode. If the path
41284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41285  # take no chances and rewrite it.
41286  # Note: m4 eats our [], so we need to use [ and ] instead.
41287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41288  if test "x$has_forbidden_chars" != x; then
41289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41293      # Going to short mode and back again did indeed matter. Since short mode is
41294      # case insensitive, let's make it lowercase to improve readability.
41295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41296      # Now convert it back to Unix-style (cygpath)
41297      input_path=`$CYGPATH -u "$shortmode_path"`
41298      new_path="$input_path"
41299    fi
41300  fi
41301
41302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41303  if test "x$test_cygdrive_prefix" = x; then
41304    # As a simple fix, exclude /usr/bin since it's not a real path.
41305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41307      # a path prefixed by /cygdrive for fixpath to work.
41308      new_path="$CYGWIN_ROOT_PATH$input_path"
41309    fi
41310  fi
41311
41312  # remove trailing .exe if any
41313  new_path="${new_path/%.exe/}"
41314
41315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41316
41317  # First separate the path from the arguments. This will split at the first
41318  # space.
41319  complete="$NM"
41320  path="${complete%% *}"
41321  tmp="$complete EOL"
41322  arguments="${tmp#* }"
41323
41324  # Input might be given as Windows format, start by converting to
41325  # unix format.
41326  new_path="$path"
41327
41328  windows_path="$new_path"
41329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41330    unix_path=`$CYGPATH -u "$windows_path"`
41331    new_path="$unix_path"
41332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41334    new_path="$unix_path"
41335  fi
41336
41337
41338  # Now try to locate executable using which
41339  new_path=`$WHICH "$new_path" 2> /dev/null`
41340
41341  if test "x$new_path" = x; then
41342    # Oops. Which didn't find the executable.
41343    # The splitting of arguments from the executable at a space might have been incorrect,
41344    # since paths with space are more likely in Windows. Give it another try with the whole
41345    # argument.
41346    path="$complete"
41347    arguments="EOL"
41348    new_path="$path"
41349
41350  windows_path="$new_path"
41351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41352    unix_path=`$CYGPATH -u "$windows_path"`
41353    new_path="$unix_path"
41354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41356    new_path="$unix_path"
41357  fi
41358
41359
41360    new_path=`$WHICH "$new_path" 2> /dev/null`
41361    # bat and cmd files are not always considered executable in MSYS causing which
41362    # to not find them
41363    if test "x$new_path" = x \
41364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41366      new_path="$path"
41367
41368  windows_path="$new_path"
41369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41370    unix_path=`$CYGPATH -u "$windows_path"`
41371    new_path="$unix_path"
41372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41374    new_path="$unix_path"
41375  fi
41376
41377    fi
41378
41379    if test "x$new_path" = x; then
41380      # It's still not found. Now this is an unrecoverable error.
41381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41382$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41383      has_space=`$ECHO "$complete" | $GREP " "`
41384      if test "x$has_space" != x; then
41385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41387      fi
41388      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41389    fi
41390  fi
41391
41392  # Now new_path has a complete unix path to the binary
41393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41394    # Keep paths in /bin as-is, but remove trailing .exe if any
41395    new_path="${new_path/%.exe/}"
41396    # Do not save /bin paths to all_fixpath_prefixes!
41397  else
41398    # Not in mixed or Windows style, start by that.
41399    new_path=`cmd //c echo $new_path`
41400
41401  input_path="$new_path"
41402  # Check if we need to convert this using DOS-style short mode. If the path
41403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41404  # take no chances and rewrite it.
41405  # Note: m4 eats our [], so we need to use [ and ] instead.
41406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41407  if test "x$has_forbidden_chars" != x; then
41408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41410  fi
41411
41412    # Output is in $new_path
41413
41414  windows_path="$new_path"
41415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41416    unix_path=`$CYGPATH -u "$windows_path"`
41417    new_path="$unix_path"
41418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41420    new_path="$unix_path"
41421  fi
41422
41423    # remove trailing .exe if any
41424    new_path="${new_path/%.exe/}"
41425
41426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41428  fi
41429
41430    else
41431      # We're on a unix platform. Hooray! :)
41432      # First separate the path from the arguments. This will split at the first
41433      # space.
41434      complete="$NM"
41435      path="${complete%% *}"
41436      tmp="$complete EOL"
41437      arguments="${tmp#* }"
41438
41439      # Cannot rely on the command "which" here since it doesn't always work.
41440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41441      if test -z "$is_absolute_path"; then
41442        # Path to executable is not absolute. Find it.
41443        IFS_save="$IFS"
41444        IFS=:
41445        for p in $PATH; do
41446          if test -f "$p/$path" && test -x "$p/$path"; then
41447            new_path="$p/$path"
41448            break
41449          fi
41450        done
41451        IFS="$IFS_save"
41452      else
41453        # This is an absolute path, we can use it without further modifications.
41454        new_path="$path"
41455      fi
41456
41457      if test "x$new_path" = x; then
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41459$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41460        has_space=`$ECHO "$complete" | $GREP " "`
41461        if test "x$has_space" != x; then
41462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41464        fi
41465        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41466      fi
41467    fi
41468
41469    # Now join together the path and the arguments once again
41470    if test "x$arguments" != xEOL; then
41471      new_complete="$new_path ${arguments% *}"
41472    else
41473      new_complete="$new_path"
41474    fi
41475
41476    if test "x$complete" != "x$new_complete"; then
41477      NM="$new_complete"
41478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41479$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41480    fi
41481  fi
41482
41483
41484
41485  # Publish this variable in the help.
41486
41487
41488  if [ -z "${GNM+x}" ]; then
41489    # The variable is not set by user, try to locate tool using the code snippet
41490    for ac_prog in gnm
41491do
41492  # Extract the first word of "$ac_prog", so it can be a program name with args.
41493set dummy $ac_prog; ac_word=$2
41494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41495$as_echo_n "checking for $ac_word... " >&6; }
41496if ${ac_cv_path_GNM+:} false; then :
41497  $as_echo_n "(cached) " >&6
41498else
41499  case $GNM in
41500  [\\/]* | ?:[\\/]*)
41501  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41502  ;;
41503  *)
41504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41505for as_dir in $PATH
41506do
41507  IFS=$as_save_IFS
41508  test -z "$as_dir" && as_dir=.
41509    for ac_exec_ext in '' $ac_executable_extensions; do
41510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41511    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41513    break 2
41514  fi
41515done
41516  done
41517IFS=$as_save_IFS
41518
41519  ;;
41520esac
41521fi
41522GNM=$ac_cv_path_GNM
41523if test -n "$GNM"; then
41524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41525$as_echo "$GNM" >&6; }
41526else
41527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41528$as_echo "no" >&6; }
41529fi
41530
41531
41532  test -n "$GNM" && break
41533done
41534
41535  else
41536    # The variable is set, but is it from the command line or the environment?
41537
41538    # Try to remove the string !GNM! from our list.
41539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41541      # If it failed, the variable was not from the command line. Ignore it,
41542      # but warn the user (except for BASH, which is always set by the calling BASH).
41543      if test "xGNM" != xBASH; then
41544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41545$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41546      fi
41547      # Try to locate tool using the code snippet
41548      for ac_prog in gnm
41549do
41550  # Extract the first word of "$ac_prog", so it can be a program name with args.
41551set dummy $ac_prog; ac_word=$2
41552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41553$as_echo_n "checking for $ac_word... " >&6; }
41554if ${ac_cv_path_GNM+:} false; then :
41555  $as_echo_n "(cached) " >&6
41556else
41557  case $GNM in
41558  [\\/]* | ?:[\\/]*)
41559  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41560  ;;
41561  *)
41562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41563for as_dir in $PATH
41564do
41565  IFS=$as_save_IFS
41566  test -z "$as_dir" && as_dir=.
41567    for ac_exec_ext in '' $ac_executable_extensions; do
41568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41569    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41571    break 2
41572  fi
41573done
41574  done
41575IFS=$as_save_IFS
41576
41577  ;;
41578esac
41579fi
41580GNM=$ac_cv_path_GNM
41581if test -n "$GNM"; then
41582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41583$as_echo "$GNM" >&6; }
41584else
41585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41586$as_echo "no" >&6; }
41587fi
41588
41589
41590  test -n "$GNM" && break
41591done
41592
41593    else
41594      # If it succeeded, then it was overridden by the user. We will use it
41595      # for the tool.
41596
41597      # First remove it from the list of overridden variables, so we can test
41598      # for unknown variables in the end.
41599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41600
41601      # Check if we try to supply an empty value
41602      if test "x$GNM" = x; then
41603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41604$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41606$as_echo_n "checking for GNM... " >&6; }
41607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41608$as_echo "disabled" >&6; }
41609      else
41610        # Check if the provided tool contains a complete path.
41611        tool_specified="$GNM"
41612        tool_basename="${tool_specified##*/}"
41613        if test "x$tool_basename" = "x$tool_specified"; then
41614          # A command without a complete path is provided, search $PATH.
41615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41616$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41617          # Extract the first word of "$tool_basename", so it can be a program name with args.
41618set dummy $tool_basename; ac_word=$2
41619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41620$as_echo_n "checking for $ac_word... " >&6; }
41621if ${ac_cv_path_GNM+:} false; then :
41622  $as_echo_n "(cached) " >&6
41623else
41624  case $GNM in
41625  [\\/]* | ?:[\\/]*)
41626  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41627  ;;
41628  *)
41629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41630for as_dir in $PATH
41631do
41632  IFS=$as_save_IFS
41633  test -z "$as_dir" && as_dir=.
41634    for ac_exec_ext in '' $ac_executable_extensions; do
41635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41636    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41638    break 2
41639  fi
41640done
41641  done
41642IFS=$as_save_IFS
41643
41644  ;;
41645esac
41646fi
41647GNM=$ac_cv_path_GNM
41648if test -n "$GNM"; then
41649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41650$as_echo "$GNM" >&6; }
41651else
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41653$as_echo "no" >&6; }
41654fi
41655
41656
41657          if test "x$GNM" = x; then
41658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41659          fi
41660        else
41661          # Otherwise we believe it is a complete path. Use it as it is.
41662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41663$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41665$as_echo_n "checking for GNM... " >&6; }
41666          if test ! -x "$tool_specified"; then
41667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41668$as_echo "not found" >&6; }
41669            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41670          fi
41671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41672$as_echo "$tool_specified" >&6; }
41673        fi
41674      fi
41675    fi
41676
41677  fi
41678
41679
41680
41681  # Only process if variable expands to non-empty
41682
41683  if test "x$GNM" != x; then
41684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41685
41686  # First separate the path from the arguments. This will split at the first
41687  # space.
41688  complete="$GNM"
41689  path="${complete%% *}"
41690  tmp="$complete EOL"
41691  arguments="${tmp#* }"
41692
41693  # Input might be given as Windows format, start by converting to
41694  # unix format.
41695  new_path=`$CYGPATH -u "$path"`
41696
41697  # Now try to locate executable using which
41698  new_path=`$WHICH "$new_path" 2> /dev/null`
41699  # bat and cmd files are not always considered executable in cygwin causing which
41700  # to not find them
41701  if test "x$new_path" = x \
41702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41704    new_path=`$CYGPATH -u "$path"`
41705  fi
41706  if test "x$new_path" = x; then
41707    # Oops. Which didn't find the executable.
41708    # The splitting of arguments from the executable at a space might have been incorrect,
41709    # since paths with space are more likely in Windows. Give it another try with the whole
41710    # argument.
41711    path="$complete"
41712    arguments="EOL"
41713    new_path=`$CYGPATH -u "$path"`
41714    new_path=`$WHICH "$new_path" 2> /dev/null`
41715    # bat and cmd files are not always considered executable in cygwin causing which
41716    # to not find them
41717    if test "x$new_path" = x \
41718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41720      new_path=`$CYGPATH -u "$path"`
41721    fi
41722    if test "x$new_path" = x; then
41723      # It's still not found. Now this is an unrecoverable error.
41724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41725$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41726      has_space=`$ECHO "$complete" | $GREP " "`
41727      if test "x$has_space" != x; then
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41730      fi
41731      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41732    fi
41733  fi
41734
41735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41738  # "foo.exe" is OK but "foo" is an error.
41739  #
41740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41741  # It is also a way to make sure we got the proper file name for the real test later on.
41742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41743  if test "x$test_shortpath" = x; then
41744    # Short path failed, file does not exist as specified.
41745    # Try adding .exe or .cmd
41746    if test -f "${new_path}.exe"; then
41747      input_to_shortpath="${new_path}.exe"
41748    elif test -f "${new_path}.cmd"; then
41749      input_to_shortpath="${new_path}.cmd"
41750    else
41751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41752$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41755      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41756    fi
41757  else
41758    input_to_shortpath="$new_path"
41759  fi
41760
41761  # Call helper function which possibly converts this using DOS-style short mode.
41762  # If so, the updated path is stored in $new_path.
41763  new_path="$input_to_shortpath"
41764
41765  input_path="$input_to_shortpath"
41766  # Check if we need to convert this using DOS-style short mode. If the path
41767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41768  # take no chances and rewrite it.
41769  # Note: m4 eats our [], so we need to use [ and ] instead.
41770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41771  if test "x$has_forbidden_chars" != x; then
41772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41776      # Going to short mode and back again did indeed matter. Since short mode is
41777      # case insensitive, let's make it lowercase to improve readability.
41778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41779      # Now convert it back to Unix-style (cygpath)
41780      input_path=`$CYGPATH -u "$shortmode_path"`
41781      new_path="$input_path"
41782    fi
41783  fi
41784
41785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41786  if test "x$test_cygdrive_prefix" = x; then
41787    # As a simple fix, exclude /usr/bin since it's not a real path.
41788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41790      # a path prefixed by /cygdrive for fixpath to work.
41791      new_path="$CYGWIN_ROOT_PATH$input_path"
41792    fi
41793  fi
41794
41795  # remove trailing .exe if any
41796  new_path="${new_path/%.exe/}"
41797
41798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41799
41800  # First separate the path from the arguments. This will split at the first
41801  # space.
41802  complete="$GNM"
41803  path="${complete%% *}"
41804  tmp="$complete EOL"
41805  arguments="${tmp#* }"
41806
41807  # Input might be given as Windows format, start by converting to
41808  # unix format.
41809  new_path="$path"
41810
41811  windows_path="$new_path"
41812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41813    unix_path=`$CYGPATH -u "$windows_path"`
41814    new_path="$unix_path"
41815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41817    new_path="$unix_path"
41818  fi
41819
41820
41821  # Now try to locate executable using which
41822  new_path=`$WHICH "$new_path" 2> /dev/null`
41823
41824  if test "x$new_path" = x; then
41825    # Oops. Which didn't find the executable.
41826    # The splitting of arguments from the executable at a space might have been incorrect,
41827    # since paths with space are more likely in Windows. Give it another try with the whole
41828    # argument.
41829    path="$complete"
41830    arguments="EOL"
41831    new_path="$path"
41832
41833  windows_path="$new_path"
41834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41835    unix_path=`$CYGPATH -u "$windows_path"`
41836    new_path="$unix_path"
41837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41839    new_path="$unix_path"
41840  fi
41841
41842
41843    new_path=`$WHICH "$new_path" 2> /dev/null`
41844    # bat and cmd files are not always considered executable in MSYS causing which
41845    # to not find them
41846    if test "x$new_path" = x \
41847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41849      new_path="$path"
41850
41851  windows_path="$new_path"
41852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41853    unix_path=`$CYGPATH -u "$windows_path"`
41854    new_path="$unix_path"
41855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41857    new_path="$unix_path"
41858  fi
41859
41860    fi
41861
41862    if test "x$new_path" = x; then
41863      # It's still not found. Now this is an unrecoverable error.
41864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41865$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41866      has_space=`$ECHO "$complete" | $GREP " "`
41867      if test "x$has_space" != x; then
41868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41870      fi
41871      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41872    fi
41873  fi
41874
41875  # Now new_path has a complete unix path to the binary
41876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41877    # Keep paths in /bin as-is, but remove trailing .exe if any
41878    new_path="${new_path/%.exe/}"
41879    # Do not save /bin paths to all_fixpath_prefixes!
41880  else
41881    # Not in mixed or Windows style, start by that.
41882    new_path=`cmd //c echo $new_path`
41883
41884  input_path="$new_path"
41885  # Check if we need to convert this using DOS-style short mode. If the path
41886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41887  # take no chances and rewrite it.
41888  # Note: m4 eats our [], so we need to use [ and ] instead.
41889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41890  if test "x$has_forbidden_chars" != x; then
41891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41893  fi
41894
41895    # Output is in $new_path
41896
41897  windows_path="$new_path"
41898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41899    unix_path=`$CYGPATH -u "$windows_path"`
41900    new_path="$unix_path"
41901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41903    new_path="$unix_path"
41904  fi
41905
41906    # remove trailing .exe if any
41907    new_path="${new_path/%.exe/}"
41908
41909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41911  fi
41912
41913    else
41914      # We're on a unix platform. Hooray! :)
41915      # First separate the path from the arguments. This will split at the first
41916      # space.
41917      complete="$GNM"
41918      path="${complete%% *}"
41919      tmp="$complete EOL"
41920      arguments="${tmp#* }"
41921
41922      # Cannot rely on the command "which" here since it doesn't always work.
41923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41924      if test -z "$is_absolute_path"; then
41925        # Path to executable is not absolute. Find it.
41926        IFS_save="$IFS"
41927        IFS=:
41928        for p in $PATH; do
41929          if test -f "$p/$path" && test -x "$p/$path"; then
41930            new_path="$p/$path"
41931            break
41932          fi
41933        done
41934        IFS="$IFS_save"
41935      else
41936        # This is an absolute path, we can use it without further modifications.
41937        new_path="$path"
41938      fi
41939
41940      if test "x$new_path" = x; then
41941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41942$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41943        has_space=`$ECHO "$complete" | $GREP " "`
41944        if test "x$has_space" != x; then
41945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41947        fi
41948        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41949      fi
41950    fi
41951
41952    # Now join together the path and the arguments once again
41953    if test "x$arguments" != xEOL; then
41954      new_complete="$new_path ${arguments% *}"
41955    else
41956      new_complete="$new_path"
41957    fi
41958
41959    if test "x$complete" != "x$new_complete"; then
41960      GNM="$new_complete"
41961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41962$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41963    fi
41964  fi
41965
41966  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41967    # FIXME: we should unify this with the solaris case above.
41968
41969
41970  # Publish this variable in the help.
41971
41972
41973  if [ -z "${STRIP+x}" ]; then
41974    # The variable is not set by user, try to locate tool using the code snippet
41975    if test -n "$ac_tool_prefix"; then
41976  for ac_prog in strip
41977  do
41978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41981$as_echo_n "checking for $ac_word... " >&6; }
41982if ${ac_cv_prog_STRIP+:} false; then :
41983  $as_echo_n "(cached) " >&6
41984else
41985  if test -n "$STRIP"; then
41986  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41987else
41988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41989for as_dir in $PATH
41990do
41991  IFS=$as_save_IFS
41992  test -z "$as_dir" && as_dir=.
41993    for ac_exec_ext in '' $ac_executable_extensions; do
41994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41995    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41997    break 2
41998  fi
41999done
42000  done
42001IFS=$as_save_IFS
42002
42003fi
42004fi
42005STRIP=$ac_cv_prog_STRIP
42006if test -n "$STRIP"; then
42007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42008$as_echo "$STRIP" >&6; }
42009else
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42011$as_echo "no" >&6; }
42012fi
42013
42014
42015    test -n "$STRIP" && break
42016  done
42017fi
42018if test -z "$STRIP"; then
42019  ac_ct_STRIP=$STRIP
42020  for ac_prog in strip
42021do
42022  # Extract the first word of "$ac_prog", so it can be a program name with args.
42023set dummy $ac_prog; ac_word=$2
42024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42025$as_echo_n "checking for $ac_word... " >&6; }
42026if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42027  $as_echo_n "(cached) " >&6
42028else
42029  if test -n "$ac_ct_STRIP"; then
42030  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42031else
42032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42033for as_dir in $PATH
42034do
42035  IFS=$as_save_IFS
42036  test -z "$as_dir" && as_dir=.
42037    for ac_exec_ext in '' $ac_executable_extensions; do
42038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42039    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42041    break 2
42042  fi
42043done
42044  done
42045IFS=$as_save_IFS
42046
42047fi
42048fi
42049ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42050if test -n "$ac_ct_STRIP"; then
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42052$as_echo "$ac_ct_STRIP" >&6; }
42053else
42054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42055$as_echo "no" >&6; }
42056fi
42057
42058
42059  test -n "$ac_ct_STRIP" && break
42060done
42061
42062  if test "x$ac_ct_STRIP" = x; then
42063    STRIP=""
42064  else
42065    case $cross_compiling:$ac_tool_warned in
42066yes:)
42067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42069ac_tool_warned=yes ;;
42070esac
42071    STRIP=$ac_ct_STRIP
42072  fi
42073fi
42074
42075  else
42076    # The variable is set, but is it from the command line or the environment?
42077
42078    # Try to remove the string !STRIP! from our list.
42079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42081      # If it failed, the variable was not from the command line. Ignore it,
42082      # but warn the user (except for BASH, which is always set by the calling BASH).
42083      if test "xSTRIP" != xBASH; then
42084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42085$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42086      fi
42087      # Try to locate tool using the code snippet
42088      if test -n "$ac_tool_prefix"; then
42089  for ac_prog in strip
42090  do
42091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42094$as_echo_n "checking for $ac_word... " >&6; }
42095if ${ac_cv_prog_STRIP+:} false; then :
42096  $as_echo_n "(cached) " >&6
42097else
42098  if test -n "$STRIP"; then
42099  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42100else
42101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42102for as_dir in $PATH
42103do
42104  IFS=$as_save_IFS
42105  test -z "$as_dir" && as_dir=.
42106    for ac_exec_ext in '' $ac_executable_extensions; do
42107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42108    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42110    break 2
42111  fi
42112done
42113  done
42114IFS=$as_save_IFS
42115
42116fi
42117fi
42118STRIP=$ac_cv_prog_STRIP
42119if test -n "$STRIP"; then
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42121$as_echo "$STRIP" >&6; }
42122else
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42124$as_echo "no" >&6; }
42125fi
42126
42127
42128    test -n "$STRIP" && break
42129  done
42130fi
42131if test -z "$STRIP"; then
42132  ac_ct_STRIP=$STRIP
42133  for ac_prog in strip
42134do
42135  # Extract the first word of "$ac_prog", so it can be a program name with args.
42136set dummy $ac_prog; ac_word=$2
42137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42138$as_echo_n "checking for $ac_word... " >&6; }
42139if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42140  $as_echo_n "(cached) " >&6
42141else
42142  if test -n "$ac_ct_STRIP"; then
42143  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42144else
42145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42146for as_dir in $PATH
42147do
42148  IFS=$as_save_IFS
42149  test -z "$as_dir" && as_dir=.
42150    for ac_exec_ext in '' $ac_executable_extensions; do
42151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42152    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42154    break 2
42155  fi
42156done
42157  done
42158IFS=$as_save_IFS
42159
42160fi
42161fi
42162ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42163if test -n "$ac_ct_STRIP"; then
42164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42165$as_echo "$ac_ct_STRIP" >&6; }
42166else
42167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42168$as_echo "no" >&6; }
42169fi
42170
42171
42172  test -n "$ac_ct_STRIP" && break
42173done
42174
42175  if test "x$ac_ct_STRIP" = x; then
42176    STRIP=""
42177  else
42178    case $cross_compiling:$ac_tool_warned in
42179yes:)
42180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42182ac_tool_warned=yes ;;
42183esac
42184    STRIP=$ac_ct_STRIP
42185  fi
42186fi
42187
42188    else
42189      # If it succeeded, then it was overridden by the user. We will use it
42190      # for the tool.
42191
42192      # First remove it from the list of overridden variables, so we can test
42193      # for unknown variables in the end.
42194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42195
42196      # Check if we try to supply an empty value
42197      if test "x$STRIP" = x; then
42198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42199$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42201$as_echo_n "checking for STRIP... " >&6; }
42202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42203$as_echo "disabled" >&6; }
42204      else
42205        # Check if the provided tool contains a complete path.
42206        tool_specified="$STRIP"
42207        tool_basename="${tool_specified##*/}"
42208        if test "x$tool_basename" = "x$tool_specified"; then
42209          # A command without a complete path is provided, search $PATH.
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42211$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42212          # Extract the first word of "$tool_basename", so it can be a program name with args.
42213set dummy $tool_basename; ac_word=$2
42214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42215$as_echo_n "checking for $ac_word... " >&6; }
42216if ${ac_cv_path_STRIP+:} false; then :
42217  $as_echo_n "(cached) " >&6
42218else
42219  case $STRIP in
42220  [\\/]* | ?:[\\/]*)
42221  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42222  ;;
42223  *)
42224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42225for as_dir in $PATH
42226do
42227  IFS=$as_save_IFS
42228  test -z "$as_dir" && as_dir=.
42229    for ac_exec_ext in '' $ac_executable_extensions; do
42230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42231    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42233    break 2
42234  fi
42235done
42236  done
42237IFS=$as_save_IFS
42238
42239  ;;
42240esac
42241fi
42242STRIP=$ac_cv_path_STRIP
42243if test -n "$STRIP"; then
42244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42245$as_echo "$STRIP" >&6; }
42246else
42247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42248$as_echo "no" >&6; }
42249fi
42250
42251
42252          if test "x$STRIP" = x; then
42253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42254          fi
42255        else
42256          # Otherwise we believe it is a complete path. Use it as it is.
42257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42258$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42260$as_echo_n "checking for STRIP... " >&6; }
42261          if test ! -x "$tool_specified"; then
42262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42263$as_echo "not found" >&6; }
42264            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42265          fi
42266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42267$as_echo "$tool_specified" >&6; }
42268        fi
42269      fi
42270    fi
42271
42272  fi
42273
42274
42275
42276  # Only process if variable expands to non-empty
42277
42278  if test "x$STRIP" != x; then
42279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42280
42281  # First separate the path from the arguments. This will split at the first
42282  # space.
42283  complete="$STRIP"
42284  path="${complete%% *}"
42285  tmp="$complete EOL"
42286  arguments="${tmp#* }"
42287
42288  # Input might be given as Windows format, start by converting to
42289  # unix format.
42290  new_path=`$CYGPATH -u "$path"`
42291
42292  # Now try to locate executable using which
42293  new_path=`$WHICH "$new_path" 2> /dev/null`
42294  # bat and cmd files are not always considered executable in cygwin causing which
42295  # to not find them
42296  if test "x$new_path" = x \
42297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42299    new_path=`$CYGPATH -u "$path"`
42300  fi
42301  if test "x$new_path" = x; then
42302    # Oops. Which didn't find the executable.
42303    # The splitting of arguments from the executable at a space might have been incorrect,
42304    # since paths with space are more likely in Windows. Give it another try with the whole
42305    # argument.
42306    path="$complete"
42307    arguments="EOL"
42308    new_path=`$CYGPATH -u "$path"`
42309    new_path=`$WHICH "$new_path" 2> /dev/null`
42310    # bat and cmd files are not always considered executable in cygwin causing which
42311    # to not find them
42312    if test "x$new_path" = x \
42313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42315      new_path=`$CYGPATH -u "$path"`
42316    fi
42317    if test "x$new_path" = x; then
42318      # It's still not found. Now this is an unrecoverable error.
42319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42320$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42321      has_space=`$ECHO "$complete" | $GREP " "`
42322      if test "x$has_space" != x; then
42323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42325      fi
42326      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42327    fi
42328  fi
42329
42330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42333  # "foo.exe" is OK but "foo" is an error.
42334  #
42335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42336  # It is also a way to make sure we got the proper file name for the real test later on.
42337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42338  if test "x$test_shortpath" = x; then
42339    # Short path failed, file does not exist as specified.
42340    # Try adding .exe or .cmd
42341    if test -f "${new_path}.exe"; then
42342      input_to_shortpath="${new_path}.exe"
42343    elif test -f "${new_path}.cmd"; then
42344      input_to_shortpath="${new_path}.cmd"
42345    else
42346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42347$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42350      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42351    fi
42352  else
42353    input_to_shortpath="$new_path"
42354  fi
42355
42356  # Call helper function which possibly converts this using DOS-style short mode.
42357  # If so, the updated path is stored in $new_path.
42358  new_path="$input_to_shortpath"
42359
42360  input_path="$input_to_shortpath"
42361  # Check if we need to convert this using DOS-style short mode. If the path
42362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42363  # take no chances and rewrite it.
42364  # Note: m4 eats our [], so we need to use [ and ] instead.
42365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42366  if test "x$has_forbidden_chars" != x; then
42367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42371      # Going to short mode and back again did indeed matter. Since short mode is
42372      # case insensitive, let's make it lowercase to improve readability.
42373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42374      # Now convert it back to Unix-style (cygpath)
42375      input_path=`$CYGPATH -u "$shortmode_path"`
42376      new_path="$input_path"
42377    fi
42378  fi
42379
42380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42381  if test "x$test_cygdrive_prefix" = x; then
42382    # As a simple fix, exclude /usr/bin since it's not a real path.
42383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42385      # a path prefixed by /cygdrive for fixpath to work.
42386      new_path="$CYGWIN_ROOT_PATH$input_path"
42387    fi
42388  fi
42389
42390  # remove trailing .exe if any
42391  new_path="${new_path/%.exe/}"
42392
42393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42394
42395  # First separate the path from the arguments. This will split at the first
42396  # space.
42397  complete="$STRIP"
42398  path="${complete%% *}"
42399  tmp="$complete EOL"
42400  arguments="${tmp#* }"
42401
42402  # Input might be given as Windows format, start by converting to
42403  # unix format.
42404  new_path="$path"
42405
42406  windows_path="$new_path"
42407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42408    unix_path=`$CYGPATH -u "$windows_path"`
42409    new_path="$unix_path"
42410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42412    new_path="$unix_path"
42413  fi
42414
42415
42416  # Now try to locate executable using which
42417  new_path=`$WHICH "$new_path" 2> /dev/null`
42418
42419  if test "x$new_path" = x; then
42420    # Oops. Which didn't find the executable.
42421    # The splitting of arguments from the executable at a space might have been incorrect,
42422    # since paths with space are more likely in Windows. Give it another try with the whole
42423    # argument.
42424    path="$complete"
42425    arguments="EOL"
42426    new_path="$path"
42427
42428  windows_path="$new_path"
42429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42430    unix_path=`$CYGPATH -u "$windows_path"`
42431    new_path="$unix_path"
42432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42434    new_path="$unix_path"
42435  fi
42436
42437
42438    new_path=`$WHICH "$new_path" 2> /dev/null`
42439    # bat and cmd files are not always considered executable in MSYS causing which
42440    # to not find them
42441    if test "x$new_path" = x \
42442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42444      new_path="$path"
42445
42446  windows_path="$new_path"
42447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42448    unix_path=`$CYGPATH -u "$windows_path"`
42449    new_path="$unix_path"
42450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42452    new_path="$unix_path"
42453  fi
42454
42455    fi
42456
42457    if test "x$new_path" = x; then
42458      # It's still not found. Now this is an unrecoverable error.
42459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42460$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42461      has_space=`$ECHO "$complete" | $GREP " "`
42462      if test "x$has_space" != x; then
42463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42465      fi
42466      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42467    fi
42468  fi
42469
42470  # Now new_path has a complete unix path to the binary
42471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42472    # Keep paths in /bin as-is, but remove trailing .exe if any
42473    new_path="${new_path/%.exe/}"
42474    # Do not save /bin paths to all_fixpath_prefixes!
42475  else
42476    # Not in mixed or Windows style, start by that.
42477    new_path=`cmd //c echo $new_path`
42478
42479  input_path="$new_path"
42480  # Check if we need to convert this using DOS-style short mode. If the path
42481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42482  # take no chances and rewrite it.
42483  # Note: m4 eats our [], so we need to use [ and ] instead.
42484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42485  if test "x$has_forbidden_chars" != x; then
42486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42488  fi
42489
42490    # Output is in $new_path
42491
42492  windows_path="$new_path"
42493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42494    unix_path=`$CYGPATH -u "$windows_path"`
42495    new_path="$unix_path"
42496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42498    new_path="$unix_path"
42499  fi
42500
42501    # remove trailing .exe if any
42502    new_path="${new_path/%.exe/}"
42503
42504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42506  fi
42507
42508    else
42509      # We're on a unix platform. Hooray! :)
42510      # First separate the path from the arguments. This will split at the first
42511      # space.
42512      complete="$STRIP"
42513      path="${complete%% *}"
42514      tmp="$complete EOL"
42515      arguments="${tmp#* }"
42516
42517      # Cannot rely on the command "which" here since it doesn't always work.
42518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42519      if test -z "$is_absolute_path"; then
42520        # Path to executable is not absolute. Find it.
42521        IFS_save="$IFS"
42522        IFS=:
42523        for p in $PATH; do
42524          if test -f "$p/$path" && test -x "$p/$path"; then
42525            new_path="$p/$path"
42526            break
42527          fi
42528        done
42529        IFS="$IFS_save"
42530      else
42531        # This is an absolute path, we can use it without further modifications.
42532        new_path="$path"
42533      fi
42534
42535      if test "x$new_path" = x; then
42536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42537$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42538        has_space=`$ECHO "$complete" | $GREP " "`
42539        if test "x$has_space" != x; then
42540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42542        fi
42543        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42544      fi
42545    fi
42546
42547    # Now join together the path and the arguments once again
42548    if test "x$arguments" != xEOL; then
42549      new_complete="$new_path ${arguments% *}"
42550    else
42551      new_complete="$new_path"
42552    fi
42553
42554    if test "x$complete" != "x$new_complete"; then
42555      STRIP="$new_complete"
42556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42557$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42558    fi
42559  fi
42560
42561    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42562
42563
42564  # Publish this variable in the help.
42565
42566
42567  if [ -z "${NM+x}" ]; then
42568    # The variable is not set by user, try to locate tool using the code snippet
42569    if test -n "$ac_tool_prefix"; then
42570  for ac_prog in nm gcc-nm
42571  do
42572    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42575$as_echo_n "checking for $ac_word... " >&6; }
42576if ${ac_cv_prog_NM+:} false; then :
42577  $as_echo_n "(cached) " >&6
42578else
42579  if test -n "$NM"; then
42580  ac_cv_prog_NM="$NM" # Let the user override the test.
42581else
42582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42583for as_dir in $PATH
42584do
42585  IFS=$as_save_IFS
42586  test -z "$as_dir" && as_dir=.
42587    for ac_exec_ext in '' $ac_executable_extensions; do
42588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42589    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42591    break 2
42592  fi
42593done
42594  done
42595IFS=$as_save_IFS
42596
42597fi
42598fi
42599NM=$ac_cv_prog_NM
42600if test -n "$NM"; then
42601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42602$as_echo "$NM" >&6; }
42603else
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42605$as_echo "no" >&6; }
42606fi
42607
42608
42609    test -n "$NM" && break
42610  done
42611fi
42612if test -z "$NM"; then
42613  ac_ct_NM=$NM
42614  for ac_prog in nm gcc-nm
42615do
42616  # Extract the first word of "$ac_prog", so it can be a program name with args.
42617set dummy $ac_prog; ac_word=$2
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619$as_echo_n "checking for $ac_word... " >&6; }
42620if ${ac_cv_prog_ac_ct_NM+:} false; then :
42621  $as_echo_n "(cached) " >&6
42622else
42623  if test -n "$ac_ct_NM"; then
42624  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42625else
42626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627for as_dir in $PATH
42628do
42629  IFS=$as_save_IFS
42630  test -z "$as_dir" && as_dir=.
42631    for ac_exec_ext in '' $ac_executable_extensions; do
42632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633    ac_cv_prog_ac_ct_NM="$ac_prog"
42634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635    break 2
42636  fi
42637done
42638  done
42639IFS=$as_save_IFS
42640
42641fi
42642fi
42643ac_ct_NM=$ac_cv_prog_ac_ct_NM
42644if test -n "$ac_ct_NM"; then
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42646$as_echo "$ac_ct_NM" >&6; }
42647else
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649$as_echo "no" >&6; }
42650fi
42651
42652
42653  test -n "$ac_ct_NM" && break
42654done
42655
42656  if test "x$ac_ct_NM" = x; then
42657    NM=""
42658  else
42659    case $cross_compiling:$ac_tool_warned in
42660yes:)
42661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42663ac_tool_warned=yes ;;
42664esac
42665    NM=$ac_ct_NM
42666  fi
42667fi
42668
42669  else
42670    # The variable is set, but is it from the command line or the environment?
42671
42672    # Try to remove the string !NM! from our list.
42673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42675      # If it failed, the variable was not from the command line. Ignore it,
42676      # but warn the user (except for BASH, which is always set by the calling BASH).
42677      if test "xNM" != xBASH; then
42678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42679$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42680      fi
42681      # Try to locate tool using the code snippet
42682      if test -n "$ac_tool_prefix"; then
42683  for ac_prog in nm gcc-nm
42684  do
42685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688$as_echo_n "checking for $ac_word... " >&6; }
42689if ${ac_cv_prog_NM+:} false; then :
42690  $as_echo_n "(cached) " >&6
42691else
42692  if test -n "$NM"; then
42693  ac_cv_prog_NM="$NM" # Let the user override the test.
42694else
42695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696for as_dir in $PATH
42697do
42698  IFS=$as_save_IFS
42699  test -z "$as_dir" && as_dir=.
42700    for ac_exec_ext in '' $ac_executable_extensions; do
42701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704    break 2
42705  fi
42706done
42707  done
42708IFS=$as_save_IFS
42709
42710fi
42711fi
42712NM=$ac_cv_prog_NM
42713if test -n "$NM"; then
42714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42715$as_echo "$NM" >&6; }
42716else
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718$as_echo "no" >&6; }
42719fi
42720
42721
42722    test -n "$NM" && break
42723  done
42724fi
42725if test -z "$NM"; then
42726  ac_ct_NM=$NM
42727  for ac_prog in nm gcc-nm
42728do
42729  # Extract the first word of "$ac_prog", so it can be a program name with args.
42730set dummy $ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_ac_ct_NM+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$ac_ct_NM"; then
42737  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_ac_ct_NM="$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756ac_ct_NM=$ac_cv_prog_ac_ct_NM
42757if test -n "$ac_ct_NM"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42759$as_echo "$ac_ct_NM" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766  test -n "$ac_ct_NM" && break
42767done
42768
42769  if test "x$ac_ct_NM" = x; then
42770    NM=""
42771  else
42772    case $cross_compiling:$ac_tool_warned in
42773yes:)
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42776ac_tool_warned=yes ;;
42777esac
42778    NM=$ac_ct_NM
42779  fi
42780fi
42781
42782    else
42783      # If it succeeded, then it was overridden by the user. We will use it
42784      # for the tool.
42785
42786      # First remove it from the list of overridden variables, so we can test
42787      # for unknown variables in the end.
42788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42789
42790      # Check if we try to supply an empty value
42791      if test "x$NM" = x; then
42792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42793$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42795$as_echo_n "checking for NM... " >&6; }
42796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42797$as_echo "disabled" >&6; }
42798      else
42799        # Check if the provided tool contains a complete path.
42800        tool_specified="$NM"
42801        tool_basename="${tool_specified##*/}"
42802        if test "x$tool_basename" = "x$tool_specified"; then
42803          # A command without a complete path is provided, search $PATH.
42804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42805$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42806          # Extract the first word of "$tool_basename", so it can be a program name with args.
42807set dummy $tool_basename; ac_word=$2
42808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42809$as_echo_n "checking for $ac_word... " >&6; }
42810if ${ac_cv_path_NM+:} false; then :
42811  $as_echo_n "(cached) " >&6
42812else
42813  case $NM in
42814  [\\/]* | ?:[\\/]*)
42815  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42816  ;;
42817  *)
42818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42819for as_dir in $PATH
42820do
42821  IFS=$as_save_IFS
42822  test -z "$as_dir" && as_dir=.
42823    for ac_exec_ext in '' $ac_executable_extensions; do
42824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42825    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42827    break 2
42828  fi
42829done
42830  done
42831IFS=$as_save_IFS
42832
42833  ;;
42834esac
42835fi
42836NM=$ac_cv_path_NM
42837if test -n "$NM"; then
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42839$as_echo "$NM" >&6; }
42840else
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42842$as_echo "no" >&6; }
42843fi
42844
42845
42846          if test "x$NM" = x; then
42847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42848          fi
42849        else
42850          # Otherwise we believe it is a complete path. Use it as it is.
42851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42852$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42854$as_echo_n "checking for NM... " >&6; }
42855          if test ! -x "$tool_specified"; then
42856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42857$as_echo "not found" >&6; }
42858            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42859          fi
42860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42861$as_echo "$tool_specified" >&6; }
42862        fi
42863      fi
42864    fi
42865
42866  fi
42867
42868
42869    else
42870
42871
42872  # Publish this variable in the help.
42873
42874
42875  if [ -z "${NM+x}" ]; then
42876    # The variable is not set by user, try to locate tool using the code snippet
42877    if test -n "$ac_tool_prefix"; then
42878  for ac_prog in nm
42879  do
42880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42883$as_echo_n "checking for $ac_word... " >&6; }
42884if ${ac_cv_prog_NM+:} false; then :
42885  $as_echo_n "(cached) " >&6
42886else
42887  if test -n "$NM"; then
42888  ac_cv_prog_NM="$NM" # Let the user override the test.
42889else
42890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42891for as_dir in $PATH
42892do
42893  IFS=$as_save_IFS
42894  test -z "$as_dir" && as_dir=.
42895    for ac_exec_ext in '' $ac_executable_extensions; do
42896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42897    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42899    break 2
42900  fi
42901done
42902  done
42903IFS=$as_save_IFS
42904
42905fi
42906fi
42907NM=$ac_cv_prog_NM
42908if test -n "$NM"; then
42909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42910$as_echo "$NM" >&6; }
42911else
42912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42913$as_echo "no" >&6; }
42914fi
42915
42916
42917    test -n "$NM" && break
42918  done
42919fi
42920if test -z "$NM"; then
42921  ac_ct_NM=$NM
42922  for ac_prog in nm
42923do
42924  # Extract the first word of "$ac_prog", so it can be a program name with args.
42925set dummy $ac_prog; ac_word=$2
42926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42927$as_echo_n "checking for $ac_word... " >&6; }
42928if ${ac_cv_prog_ac_ct_NM+:} false; then :
42929  $as_echo_n "(cached) " >&6
42930else
42931  if test -n "$ac_ct_NM"; then
42932  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42933else
42934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42935for as_dir in $PATH
42936do
42937  IFS=$as_save_IFS
42938  test -z "$as_dir" && as_dir=.
42939    for ac_exec_ext in '' $ac_executable_extensions; do
42940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42941    ac_cv_prog_ac_ct_NM="$ac_prog"
42942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42943    break 2
42944  fi
42945done
42946  done
42947IFS=$as_save_IFS
42948
42949fi
42950fi
42951ac_ct_NM=$ac_cv_prog_ac_ct_NM
42952if test -n "$ac_ct_NM"; then
42953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42954$as_echo "$ac_ct_NM" >&6; }
42955else
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42957$as_echo "no" >&6; }
42958fi
42959
42960
42961  test -n "$ac_ct_NM" && break
42962done
42963
42964  if test "x$ac_ct_NM" = x; then
42965    NM=""
42966  else
42967    case $cross_compiling:$ac_tool_warned in
42968yes:)
42969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42971ac_tool_warned=yes ;;
42972esac
42973    NM=$ac_ct_NM
42974  fi
42975fi
42976
42977  else
42978    # The variable is set, but is it from the command line or the environment?
42979
42980    # Try to remove the string !NM! from our list.
42981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42983      # If it failed, the variable was not from the command line. Ignore it,
42984      # but warn the user (except for BASH, which is always set by the calling BASH).
42985      if test "xNM" != xBASH; then
42986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42987$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42988      fi
42989      # Try to locate tool using the code snippet
42990      if test -n "$ac_tool_prefix"; then
42991  for ac_prog in nm
42992  do
42993    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42994set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42996$as_echo_n "checking for $ac_word... " >&6; }
42997if ${ac_cv_prog_NM+:} false; then :
42998  $as_echo_n "(cached) " >&6
42999else
43000  if test -n "$NM"; then
43001  ac_cv_prog_NM="$NM" # Let the user override the test.
43002else
43003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43004for as_dir in $PATH
43005do
43006  IFS=$as_save_IFS
43007  test -z "$as_dir" && as_dir=.
43008    for ac_exec_ext in '' $ac_executable_extensions; do
43009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43010    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43012    break 2
43013  fi
43014done
43015  done
43016IFS=$as_save_IFS
43017
43018fi
43019fi
43020NM=$ac_cv_prog_NM
43021if test -n "$NM"; then
43022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43023$as_echo "$NM" >&6; }
43024else
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43026$as_echo "no" >&6; }
43027fi
43028
43029
43030    test -n "$NM" && break
43031  done
43032fi
43033if test -z "$NM"; then
43034  ac_ct_NM=$NM
43035  for ac_prog in nm
43036do
43037  # Extract the first word of "$ac_prog", so it can be a program name with args.
43038set dummy $ac_prog; ac_word=$2
43039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43040$as_echo_n "checking for $ac_word... " >&6; }
43041if ${ac_cv_prog_ac_ct_NM+:} false; then :
43042  $as_echo_n "(cached) " >&6
43043else
43044  if test -n "$ac_ct_NM"; then
43045  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43046else
43047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43048for as_dir in $PATH
43049do
43050  IFS=$as_save_IFS
43051  test -z "$as_dir" && as_dir=.
43052    for ac_exec_ext in '' $ac_executable_extensions; do
43053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43054    ac_cv_prog_ac_ct_NM="$ac_prog"
43055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43056    break 2
43057  fi
43058done
43059  done
43060IFS=$as_save_IFS
43061
43062fi
43063fi
43064ac_ct_NM=$ac_cv_prog_ac_ct_NM
43065if test -n "$ac_ct_NM"; then
43066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43067$as_echo "$ac_ct_NM" >&6; }
43068else
43069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43070$as_echo "no" >&6; }
43071fi
43072
43073
43074  test -n "$ac_ct_NM" && break
43075done
43076
43077  if test "x$ac_ct_NM" = x; then
43078    NM=""
43079  else
43080    case $cross_compiling:$ac_tool_warned in
43081yes:)
43082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43084ac_tool_warned=yes ;;
43085esac
43086    NM=$ac_ct_NM
43087  fi
43088fi
43089
43090    else
43091      # If it succeeded, then it was overridden by the user. We will use it
43092      # for the tool.
43093
43094      # First remove it from the list of overridden variables, so we can test
43095      # for unknown variables in the end.
43096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43097
43098      # Check if we try to supply an empty value
43099      if test "x$NM" = x; then
43100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43101$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43103$as_echo_n "checking for NM... " >&6; }
43104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43105$as_echo "disabled" >&6; }
43106      else
43107        # Check if the provided tool contains a complete path.
43108        tool_specified="$NM"
43109        tool_basename="${tool_specified##*/}"
43110        if test "x$tool_basename" = "x$tool_specified"; then
43111          # A command without a complete path is provided, search $PATH.
43112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43113$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43114          # Extract the first word of "$tool_basename", so it can be a program name with args.
43115set dummy $tool_basename; ac_word=$2
43116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43117$as_echo_n "checking for $ac_word... " >&6; }
43118if ${ac_cv_path_NM+:} false; then :
43119  $as_echo_n "(cached) " >&6
43120else
43121  case $NM in
43122  [\\/]* | ?:[\\/]*)
43123  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43124  ;;
43125  *)
43126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43127for as_dir in $PATH
43128do
43129  IFS=$as_save_IFS
43130  test -z "$as_dir" && as_dir=.
43131    for ac_exec_ext in '' $ac_executable_extensions; do
43132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43133    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43135    break 2
43136  fi
43137done
43138  done
43139IFS=$as_save_IFS
43140
43141  ;;
43142esac
43143fi
43144NM=$ac_cv_path_NM
43145if test -n "$NM"; then
43146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43147$as_echo "$NM" >&6; }
43148else
43149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43150$as_echo "no" >&6; }
43151fi
43152
43153
43154          if test "x$NM" = x; then
43155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43156          fi
43157        else
43158          # Otherwise we believe it is a complete path. Use it as it is.
43159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43160$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43162$as_echo_n "checking for NM... " >&6; }
43163          if test ! -x "$tool_specified"; then
43164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43165$as_echo "not found" >&6; }
43166            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43167          fi
43168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43169$as_echo "$tool_specified" >&6; }
43170        fi
43171      fi
43172    fi
43173
43174  fi
43175
43176
43177    fi
43178
43179  # Only process if variable expands to non-empty
43180
43181  if test "x$NM" != x; then
43182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43183
43184  # First separate the path from the arguments. This will split at the first
43185  # space.
43186  complete="$NM"
43187  path="${complete%% *}"
43188  tmp="$complete EOL"
43189  arguments="${tmp#* }"
43190
43191  # Input might be given as Windows format, start by converting to
43192  # unix format.
43193  new_path=`$CYGPATH -u "$path"`
43194
43195  # Now try to locate executable using which
43196  new_path=`$WHICH "$new_path" 2> /dev/null`
43197  # bat and cmd files are not always considered executable in cygwin causing which
43198  # to not find them
43199  if test "x$new_path" = x \
43200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43202    new_path=`$CYGPATH -u "$path"`
43203  fi
43204  if test "x$new_path" = x; then
43205    # Oops. Which didn't find the executable.
43206    # The splitting of arguments from the executable at a space might have been incorrect,
43207    # since paths with space are more likely in Windows. Give it another try with the whole
43208    # argument.
43209    path="$complete"
43210    arguments="EOL"
43211    new_path=`$CYGPATH -u "$path"`
43212    new_path=`$WHICH "$new_path" 2> /dev/null`
43213    # bat and cmd files are not always considered executable in cygwin causing which
43214    # to not find them
43215    if test "x$new_path" = x \
43216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43218      new_path=`$CYGPATH -u "$path"`
43219    fi
43220    if test "x$new_path" = x; then
43221      # It's still not found. Now this is an unrecoverable error.
43222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43223$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43224      has_space=`$ECHO "$complete" | $GREP " "`
43225      if test "x$has_space" != x; then
43226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43228      fi
43229      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43230    fi
43231  fi
43232
43233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43236  # "foo.exe" is OK but "foo" is an error.
43237  #
43238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43239  # It is also a way to make sure we got the proper file name for the real test later on.
43240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43241  if test "x$test_shortpath" = x; then
43242    # Short path failed, file does not exist as specified.
43243    # Try adding .exe or .cmd
43244    if test -f "${new_path}.exe"; then
43245      input_to_shortpath="${new_path}.exe"
43246    elif test -f "${new_path}.cmd"; then
43247      input_to_shortpath="${new_path}.cmd"
43248    else
43249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43250$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43253      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43254    fi
43255  else
43256    input_to_shortpath="$new_path"
43257  fi
43258
43259  # Call helper function which possibly converts this using DOS-style short mode.
43260  # If so, the updated path is stored in $new_path.
43261  new_path="$input_to_shortpath"
43262
43263  input_path="$input_to_shortpath"
43264  # Check if we need to convert this using DOS-style short mode. If the path
43265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43266  # take no chances and rewrite it.
43267  # Note: m4 eats our [], so we need to use [ and ] instead.
43268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43269  if test "x$has_forbidden_chars" != x; then
43270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43274      # Going to short mode and back again did indeed matter. Since short mode is
43275      # case insensitive, let's make it lowercase to improve readability.
43276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43277      # Now convert it back to Unix-style (cygpath)
43278      input_path=`$CYGPATH -u "$shortmode_path"`
43279      new_path="$input_path"
43280    fi
43281  fi
43282
43283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43284  if test "x$test_cygdrive_prefix" = x; then
43285    # As a simple fix, exclude /usr/bin since it's not a real path.
43286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43288      # a path prefixed by /cygdrive for fixpath to work.
43289      new_path="$CYGWIN_ROOT_PATH$input_path"
43290    fi
43291  fi
43292
43293  # remove trailing .exe if any
43294  new_path="${new_path/%.exe/}"
43295
43296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43297
43298  # First separate the path from the arguments. This will split at the first
43299  # space.
43300  complete="$NM"
43301  path="${complete%% *}"
43302  tmp="$complete EOL"
43303  arguments="${tmp#* }"
43304
43305  # Input might be given as Windows format, start by converting to
43306  # unix format.
43307  new_path="$path"
43308
43309  windows_path="$new_path"
43310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43311    unix_path=`$CYGPATH -u "$windows_path"`
43312    new_path="$unix_path"
43313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43315    new_path="$unix_path"
43316  fi
43317
43318
43319  # Now try to locate executable using which
43320  new_path=`$WHICH "$new_path" 2> /dev/null`
43321
43322  if test "x$new_path" = x; then
43323    # Oops. Which didn't find the executable.
43324    # The splitting of arguments from the executable at a space might have been incorrect,
43325    # since paths with space are more likely in Windows. Give it another try with the whole
43326    # argument.
43327    path="$complete"
43328    arguments="EOL"
43329    new_path="$path"
43330
43331  windows_path="$new_path"
43332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43333    unix_path=`$CYGPATH -u "$windows_path"`
43334    new_path="$unix_path"
43335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43337    new_path="$unix_path"
43338  fi
43339
43340
43341    new_path=`$WHICH "$new_path" 2> /dev/null`
43342    # bat and cmd files are not always considered executable in MSYS causing which
43343    # to not find them
43344    if test "x$new_path" = x \
43345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43347      new_path="$path"
43348
43349  windows_path="$new_path"
43350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43351    unix_path=`$CYGPATH -u "$windows_path"`
43352    new_path="$unix_path"
43353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43355    new_path="$unix_path"
43356  fi
43357
43358    fi
43359
43360    if test "x$new_path" = x; then
43361      # It's still not found. Now this is an unrecoverable error.
43362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43363$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43364      has_space=`$ECHO "$complete" | $GREP " "`
43365      if test "x$has_space" != x; then
43366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43368      fi
43369      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43370    fi
43371  fi
43372
43373  # Now new_path has a complete unix path to the binary
43374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43375    # Keep paths in /bin as-is, but remove trailing .exe if any
43376    new_path="${new_path/%.exe/}"
43377    # Do not save /bin paths to all_fixpath_prefixes!
43378  else
43379    # Not in mixed or Windows style, start by that.
43380    new_path=`cmd //c echo $new_path`
43381
43382  input_path="$new_path"
43383  # Check if we need to convert this using DOS-style short mode. If the path
43384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43385  # take no chances and rewrite it.
43386  # Note: m4 eats our [], so we need to use [ and ] instead.
43387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43388  if test "x$has_forbidden_chars" != x; then
43389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43391  fi
43392
43393    # Output is in $new_path
43394
43395  windows_path="$new_path"
43396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43397    unix_path=`$CYGPATH -u "$windows_path"`
43398    new_path="$unix_path"
43399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43401    new_path="$unix_path"
43402  fi
43403
43404    # remove trailing .exe if any
43405    new_path="${new_path/%.exe/}"
43406
43407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43409  fi
43410
43411    else
43412      # We're on a unix platform. Hooray! :)
43413      # First separate the path from the arguments. This will split at the first
43414      # space.
43415      complete="$NM"
43416      path="${complete%% *}"
43417      tmp="$complete EOL"
43418      arguments="${tmp#* }"
43419
43420      # Cannot rely on the command "which" here since it doesn't always work.
43421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43422      if test -z "$is_absolute_path"; then
43423        # Path to executable is not absolute. Find it.
43424        IFS_save="$IFS"
43425        IFS=:
43426        for p in $PATH; do
43427          if test -f "$p/$path" && test -x "$p/$path"; then
43428            new_path="$p/$path"
43429            break
43430          fi
43431        done
43432        IFS="$IFS_save"
43433      else
43434        # This is an absolute path, we can use it without further modifications.
43435        new_path="$path"
43436      fi
43437
43438      if test "x$new_path" = x; then
43439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43440$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43441        has_space=`$ECHO "$complete" | $GREP " "`
43442        if test "x$has_space" != x; then
43443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43445        fi
43446        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43447      fi
43448    fi
43449
43450    # Now join together the path and the arguments once again
43451    if test "x$arguments" != xEOL; then
43452      new_complete="$new_path ${arguments% *}"
43453    else
43454      new_complete="$new_path"
43455    fi
43456
43457    if test "x$complete" != "x$new_complete"; then
43458      NM="$new_complete"
43459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43460$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43461    fi
43462  fi
43463
43464    GNM="$NM"
43465
43466  fi
43467
43468  # objcopy is used for moving debug symbols to separate files when
43469  # full debug symbols are enabled.
43470  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43471
43472
43473  # Publish this variable in the help.
43474
43475
43476  if [ -z "${OBJCOPY+x}" ]; then
43477    # The variable is not set by user, try to locate tool using the code snippet
43478    if test -n "$ac_tool_prefix"; then
43479  for ac_prog in gobjcopy objcopy
43480  do
43481    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43482set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43484$as_echo_n "checking for $ac_word... " >&6; }
43485if ${ac_cv_prog_OBJCOPY+:} false; then :
43486  $as_echo_n "(cached) " >&6
43487else
43488  if test -n "$OBJCOPY"; then
43489  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43490else
43491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43492for as_dir in $PATH
43493do
43494  IFS=$as_save_IFS
43495  test -z "$as_dir" && as_dir=.
43496    for ac_exec_ext in '' $ac_executable_extensions; do
43497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43498    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43500    break 2
43501  fi
43502done
43503  done
43504IFS=$as_save_IFS
43505
43506fi
43507fi
43508OBJCOPY=$ac_cv_prog_OBJCOPY
43509if test -n "$OBJCOPY"; then
43510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43511$as_echo "$OBJCOPY" >&6; }
43512else
43513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43514$as_echo "no" >&6; }
43515fi
43516
43517
43518    test -n "$OBJCOPY" && break
43519  done
43520fi
43521if test -z "$OBJCOPY"; then
43522  ac_ct_OBJCOPY=$OBJCOPY
43523  for ac_prog in gobjcopy objcopy
43524do
43525  # Extract the first word of "$ac_prog", so it can be a program name with args.
43526set dummy $ac_prog; ac_word=$2
43527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43528$as_echo_n "checking for $ac_word... " >&6; }
43529if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43530  $as_echo_n "(cached) " >&6
43531else
43532  if test -n "$ac_ct_OBJCOPY"; then
43533  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43534else
43535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43536for as_dir in $PATH
43537do
43538  IFS=$as_save_IFS
43539  test -z "$as_dir" && as_dir=.
43540    for ac_exec_ext in '' $ac_executable_extensions; do
43541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43542    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43544    break 2
43545  fi
43546done
43547  done
43548IFS=$as_save_IFS
43549
43550fi
43551fi
43552ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43553if test -n "$ac_ct_OBJCOPY"; then
43554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43555$as_echo "$ac_ct_OBJCOPY" >&6; }
43556else
43557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43558$as_echo "no" >&6; }
43559fi
43560
43561
43562  test -n "$ac_ct_OBJCOPY" && break
43563done
43564
43565  if test "x$ac_ct_OBJCOPY" = x; then
43566    OBJCOPY=""
43567  else
43568    case $cross_compiling:$ac_tool_warned in
43569yes:)
43570{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43571$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43572ac_tool_warned=yes ;;
43573esac
43574    OBJCOPY=$ac_ct_OBJCOPY
43575  fi
43576fi
43577
43578  else
43579    # The variable is set, but is it from the command line or the environment?
43580
43581    # Try to remove the string !OBJCOPY! from our list.
43582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43584      # If it failed, the variable was not from the command line. Ignore it,
43585      # but warn the user (except for BASH, which is always set by the calling BASH).
43586      if test "xOBJCOPY" != xBASH; then
43587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43588$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43589      fi
43590      # Try to locate tool using the code snippet
43591      if test -n "$ac_tool_prefix"; then
43592  for ac_prog in gobjcopy objcopy
43593  do
43594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43597$as_echo_n "checking for $ac_word... " >&6; }
43598if ${ac_cv_prog_OBJCOPY+:} false; then :
43599  $as_echo_n "(cached) " >&6
43600else
43601  if test -n "$OBJCOPY"; then
43602  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43603else
43604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43605for as_dir in $PATH
43606do
43607  IFS=$as_save_IFS
43608  test -z "$as_dir" && as_dir=.
43609    for ac_exec_ext in '' $ac_executable_extensions; do
43610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43611    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43613    break 2
43614  fi
43615done
43616  done
43617IFS=$as_save_IFS
43618
43619fi
43620fi
43621OBJCOPY=$ac_cv_prog_OBJCOPY
43622if test -n "$OBJCOPY"; then
43623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43624$as_echo "$OBJCOPY" >&6; }
43625else
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43627$as_echo "no" >&6; }
43628fi
43629
43630
43631    test -n "$OBJCOPY" && break
43632  done
43633fi
43634if test -z "$OBJCOPY"; then
43635  ac_ct_OBJCOPY=$OBJCOPY
43636  for ac_prog in gobjcopy objcopy
43637do
43638  # Extract the first word of "$ac_prog", so it can be a program name with args.
43639set dummy $ac_prog; ac_word=$2
43640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43641$as_echo_n "checking for $ac_word... " >&6; }
43642if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43643  $as_echo_n "(cached) " >&6
43644else
43645  if test -n "$ac_ct_OBJCOPY"; then
43646  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43647else
43648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43649for as_dir in $PATH
43650do
43651  IFS=$as_save_IFS
43652  test -z "$as_dir" && as_dir=.
43653    for ac_exec_ext in '' $ac_executable_extensions; do
43654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43655    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43657    break 2
43658  fi
43659done
43660  done
43661IFS=$as_save_IFS
43662
43663fi
43664fi
43665ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43666if test -n "$ac_ct_OBJCOPY"; then
43667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43668$as_echo "$ac_ct_OBJCOPY" >&6; }
43669else
43670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43671$as_echo "no" >&6; }
43672fi
43673
43674
43675  test -n "$ac_ct_OBJCOPY" && break
43676done
43677
43678  if test "x$ac_ct_OBJCOPY" = x; then
43679    OBJCOPY=""
43680  else
43681    case $cross_compiling:$ac_tool_warned in
43682yes:)
43683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43685ac_tool_warned=yes ;;
43686esac
43687    OBJCOPY=$ac_ct_OBJCOPY
43688  fi
43689fi
43690
43691    else
43692      # If it succeeded, then it was overridden by the user. We will use it
43693      # for the tool.
43694
43695      # First remove it from the list of overridden variables, so we can test
43696      # for unknown variables in the end.
43697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43698
43699      # Check if we try to supply an empty value
43700      if test "x$OBJCOPY" = x; then
43701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43702$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43704$as_echo_n "checking for OBJCOPY... " >&6; }
43705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43706$as_echo "disabled" >&6; }
43707      else
43708        # Check if the provided tool contains a complete path.
43709        tool_specified="$OBJCOPY"
43710        tool_basename="${tool_specified##*/}"
43711        if test "x$tool_basename" = "x$tool_specified"; then
43712          # A command without a complete path is provided, search $PATH.
43713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43714$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43715          # Extract the first word of "$tool_basename", so it can be a program name with args.
43716set dummy $tool_basename; ac_word=$2
43717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43718$as_echo_n "checking for $ac_word... " >&6; }
43719if ${ac_cv_path_OBJCOPY+:} false; then :
43720  $as_echo_n "(cached) " >&6
43721else
43722  case $OBJCOPY in
43723  [\\/]* | ?:[\\/]*)
43724  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43725  ;;
43726  *)
43727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43728for as_dir in $PATH
43729do
43730  IFS=$as_save_IFS
43731  test -z "$as_dir" && as_dir=.
43732    for ac_exec_ext in '' $ac_executable_extensions; do
43733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43734    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43736    break 2
43737  fi
43738done
43739  done
43740IFS=$as_save_IFS
43741
43742  ;;
43743esac
43744fi
43745OBJCOPY=$ac_cv_path_OBJCOPY
43746if test -n "$OBJCOPY"; then
43747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43748$as_echo "$OBJCOPY" >&6; }
43749else
43750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43751$as_echo "no" >&6; }
43752fi
43753
43754
43755          if test "x$OBJCOPY" = x; then
43756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43757          fi
43758        else
43759          # Otherwise we believe it is a complete path. Use it as it is.
43760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43761$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43763$as_echo_n "checking for OBJCOPY... " >&6; }
43764          if test ! -x "$tool_specified"; then
43765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43766$as_echo "not found" >&6; }
43767            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43768          fi
43769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43770$as_echo "$tool_specified" >&6; }
43771        fi
43772      fi
43773    fi
43774
43775  fi
43776
43777
43778    # Only call fixup if objcopy was found.
43779    if test -n "$OBJCOPY"; then
43780
43781  # Only process if variable expands to non-empty
43782
43783  if test "x$OBJCOPY" != x; then
43784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43785
43786  # First separate the path from the arguments. This will split at the first
43787  # space.
43788  complete="$OBJCOPY"
43789  path="${complete%% *}"
43790  tmp="$complete EOL"
43791  arguments="${tmp#* }"
43792
43793  # Input might be given as Windows format, start by converting to
43794  # unix format.
43795  new_path=`$CYGPATH -u "$path"`
43796
43797  # Now try to locate executable using which
43798  new_path=`$WHICH "$new_path" 2> /dev/null`
43799  # bat and cmd files are not always considered executable in cygwin causing which
43800  # to not find them
43801  if test "x$new_path" = x \
43802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43804    new_path=`$CYGPATH -u "$path"`
43805  fi
43806  if test "x$new_path" = x; then
43807    # Oops. Which didn't find the executable.
43808    # The splitting of arguments from the executable at a space might have been incorrect,
43809    # since paths with space are more likely in Windows. Give it another try with the whole
43810    # argument.
43811    path="$complete"
43812    arguments="EOL"
43813    new_path=`$CYGPATH -u "$path"`
43814    new_path=`$WHICH "$new_path" 2> /dev/null`
43815    # bat and cmd files are not always considered executable in cygwin causing which
43816    # to not find them
43817    if test "x$new_path" = x \
43818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43820      new_path=`$CYGPATH -u "$path"`
43821    fi
43822    if test "x$new_path" = x; then
43823      # It's still not found. Now this is an unrecoverable error.
43824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43825$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43826      has_space=`$ECHO "$complete" | $GREP " "`
43827      if test "x$has_space" != x; then
43828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43830      fi
43831      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43832    fi
43833  fi
43834
43835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43838  # "foo.exe" is OK but "foo" is an error.
43839  #
43840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43841  # It is also a way to make sure we got the proper file name for the real test later on.
43842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43843  if test "x$test_shortpath" = x; then
43844    # Short path failed, file does not exist as specified.
43845    # Try adding .exe or .cmd
43846    if test -f "${new_path}.exe"; then
43847      input_to_shortpath="${new_path}.exe"
43848    elif test -f "${new_path}.cmd"; then
43849      input_to_shortpath="${new_path}.cmd"
43850    else
43851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43852$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43855      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43856    fi
43857  else
43858    input_to_shortpath="$new_path"
43859  fi
43860
43861  # Call helper function which possibly converts this using DOS-style short mode.
43862  # If so, the updated path is stored in $new_path.
43863  new_path="$input_to_shortpath"
43864
43865  input_path="$input_to_shortpath"
43866  # Check if we need to convert this using DOS-style short mode. If the path
43867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43868  # take no chances and rewrite it.
43869  # Note: m4 eats our [], so we need to use [ and ] instead.
43870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43871  if test "x$has_forbidden_chars" != x; then
43872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43876      # Going to short mode and back again did indeed matter. Since short mode is
43877      # case insensitive, let's make it lowercase to improve readability.
43878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879      # Now convert it back to Unix-style (cygpath)
43880      input_path=`$CYGPATH -u "$shortmode_path"`
43881      new_path="$input_path"
43882    fi
43883  fi
43884
43885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43886  if test "x$test_cygdrive_prefix" = x; then
43887    # As a simple fix, exclude /usr/bin since it's not a real path.
43888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43890      # a path prefixed by /cygdrive for fixpath to work.
43891      new_path="$CYGWIN_ROOT_PATH$input_path"
43892    fi
43893  fi
43894
43895  # remove trailing .exe if any
43896  new_path="${new_path/%.exe/}"
43897
43898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899
43900  # First separate the path from the arguments. This will split at the first
43901  # space.
43902  complete="$OBJCOPY"
43903  path="${complete%% *}"
43904  tmp="$complete EOL"
43905  arguments="${tmp#* }"
43906
43907  # Input might be given as Windows format, start by converting to
43908  # unix format.
43909  new_path="$path"
43910
43911  windows_path="$new_path"
43912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43913    unix_path=`$CYGPATH -u "$windows_path"`
43914    new_path="$unix_path"
43915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43917    new_path="$unix_path"
43918  fi
43919
43920
43921  # Now try to locate executable using which
43922  new_path=`$WHICH "$new_path" 2> /dev/null`
43923
43924  if test "x$new_path" = x; then
43925    # Oops. Which didn't find the executable.
43926    # The splitting of arguments from the executable at a space might have been incorrect,
43927    # since paths with space are more likely in Windows. Give it another try with the whole
43928    # argument.
43929    path="$complete"
43930    arguments="EOL"
43931    new_path="$path"
43932
43933  windows_path="$new_path"
43934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43935    unix_path=`$CYGPATH -u "$windows_path"`
43936    new_path="$unix_path"
43937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43939    new_path="$unix_path"
43940  fi
43941
43942
43943    new_path=`$WHICH "$new_path" 2> /dev/null`
43944    # bat and cmd files are not always considered executable in MSYS causing which
43945    # to not find them
43946    if test "x$new_path" = x \
43947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43949      new_path="$path"
43950
43951  windows_path="$new_path"
43952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43953    unix_path=`$CYGPATH -u "$windows_path"`
43954    new_path="$unix_path"
43955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43957    new_path="$unix_path"
43958  fi
43959
43960    fi
43961
43962    if test "x$new_path" = x; then
43963      # It's still not found. Now this is an unrecoverable error.
43964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43965$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43966      has_space=`$ECHO "$complete" | $GREP " "`
43967      if test "x$has_space" != x; then
43968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43970      fi
43971      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43972    fi
43973  fi
43974
43975  # Now new_path has a complete unix path to the binary
43976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43977    # Keep paths in /bin as-is, but remove trailing .exe if any
43978    new_path="${new_path/%.exe/}"
43979    # Do not save /bin paths to all_fixpath_prefixes!
43980  else
43981    # Not in mixed or Windows style, start by that.
43982    new_path=`cmd //c echo $new_path`
43983
43984  input_path="$new_path"
43985  # Check if we need to convert this using DOS-style short mode. If the path
43986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43987  # take no chances and rewrite it.
43988  # Note: m4 eats our [], so we need to use [ and ] instead.
43989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43990  if test "x$has_forbidden_chars" != x; then
43991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43993  fi
43994
43995    # Output is in $new_path
43996
43997  windows_path="$new_path"
43998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43999    unix_path=`$CYGPATH -u "$windows_path"`
44000    new_path="$unix_path"
44001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44003    new_path="$unix_path"
44004  fi
44005
44006    # remove trailing .exe if any
44007    new_path="${new_path/%.exe/}"
44008
44009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44011  fi
44012
44013    else
44014      # We're on a unix platform. Hooray! :)
44015      # First separate the path from the arguments. This will split at the first
44016      # space.
44017      complete="$OBJCOPY"
44018      path="${complete%% *}"
44019      tmp="$complete EOL"
44020      arguments="${tmp#* }"
44021
44022      # Cannot rely on the command "which" here since it doesn't always work.
44023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44024      if test -z "$is_absolute_path"; then
44025        # Path to executable is not absolute. Find it.
44026        IFS_save="$IFS"
44027        IFS=:
44028        for p in $PATH; do
44029          if test -f "$p/$path" && test -x "$p/$path"; then
44030            new_path="$p/$path"
44031            break
44032          fi
44033        done
44034        IFS="$IFS_save"
44035      else
44036        # This is an absolute path, we can use it without further modifications.
44037        new_path="$path"
44038      fi
44039
44040      if test "x$new_path" = x; then
44041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44042$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44043        has_space=`$ECHO "$complete" | $GREP " "`
44044        if test "x$has_space" != x; then
44045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44047        fi
44048        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44049      fi
44050    fi
44051
44052    # Now join together the path and the arguments once again
44053    if test "x$arguments" != xEOL; then
44054      new_complete="$new_path ${arguments% *}"
44055    else
44056      new_complete="$new_path"
44057    fi
44058
44059    if test "x$complete" != "x$new_complete"; then
44060      OBJCOPY="$new_complete"
44061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44062$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44063    fi
44064  fi
44065
44066      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44067        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44068        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44069        # - version number is last blank separate word on first line
44070        # - version number formats that have been seen:
44071        #   - <major>.<minor>
44072        #   - <major>.<minor>.<micro>
44073        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44074        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44075         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44076              -e 's/.* //' \
44077              -e '/^[01]\./b bad' \
44078              -e '/^2\./{' \
44079              -e '  s/^2\.//' \
44080              -e '  /^[0-9]$/b bad' \
44081              -e '  /^[0-9]\./b bad' \
44082              -e '  /^1[0-9]$/b bad' \
44083              -e '  /^1[0-9]\./b bad' \
44084              -e '  /^20\./b bad' \
44085              -e '  /^21\.0$/b bad' \
44086              -e '  /^21\.0\./b bad' \
44087              -e '}' \
44088              -e ':good' \
44089              -e 's/.*/VALID_VERSION/p' \
44090              -e 'q' \
44091              -e ':bad' \
44092              -e 's/.*/BAD_VERSION/p' \
44093              -e 'q'`
44094        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44095          OBJCOPY=
44096          { $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
44097$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44098          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44099$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44100          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44101$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44102          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44103$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44104          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44105$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44106        fi
44107      fi
44108    fi
44109  fi
44110
44111
44112
44113  # Publish this variable in the help.
44114
44115
44116  if [ -z "${OBJDUMP+x}" ]; then
44117    # The variable is not set by user, try to locate tool using the code snippet
44118    if test -n "$ac_tool_prefix"; then
44119  for ac_prog in gobjdump objdump
44120  do
44121    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44122set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44124$as_echo_n "checking for $ac_word... " >&6; }
44125if ${ac_cv_prog_OBJDUMP+:} false; then :
44126  $as_echo_n "(cached) " >&6
44127else
44128  if test -n "$OBJDUMP"; then
44129  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44130else
44131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44132for as_dir in $PATH
44133do
44134  IFS=$as_save_IFS
44135  test -z "$as_dir" && as_dir=.
44136    for ac_exec_ext in '' $ac_executable_extensions; do
44137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44138    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44140    break 2
44141  fi
44142done
44143  done
44144IFS=$as_save_IFS
44145
44146fi
44147fi
44148OBJDUMP=$ac_cv_prog_OBJDUMP
44149if test -n "$OBJDUMP"; then
44150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44151$as_echo "$OBJDUMP" >&6; }
44152else
44153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44154$as_echo "no" >&6; }
44155fi
44156
44157
44158    test -n "$OBJDUMP" && break
44159  done
44160fi
44161if test -z "$OBJDUMP"; then
44162  ac_ct_OBJDUMP=$OBJDUMP
44163  for ac_prog in gobjdump objdump
44164do
44165  # Extract the first word of "$ac_prog", so it can be a program name with args.
44166set dummy $ac_prog; ac_word=$2
44167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44168$as_echo_n "checking for $ac_word... " >&6; }
44169if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44170  $as_echo_n "(cached) " >&6
44171else
44172  if test -n "$ac_ct_OBJDUMP"; then
44173  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44174else
44175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44176for as_dir in $PATH
44177do
44178  IFS=$as_save_IFS
44179  test -z "$as_dir" && as_dir=.
44180    for ac_exec_ext in '' $ac_executable_extensions; do
44181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44182    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44184    break 2
44185  fi
44186done
44187  done
44188IFS=$as_save_IFS
44189
44190fi
44191fi
44192ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44193if test -n "$ac_ct_OBJDUMP"; then
44194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44195$as_echo "$ac_ct_OBJDUMP" >&6; }
44196else
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44198$as_echo "no" >&6; }
44199fi
44200
44201
44202  test -n "$ac_ct_OBJDUMP" && break
44203done
44204
44205  if test "x$ac_ct_OBJDUMP" = x; then
44206    OBJDUMP=""
44207  else
44208    case $cross_compiling:$ac_tool_warned in
44209yes:)
44210{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44211$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44212ac_tool_warned=yes ;;
44213esac
44214    OBJDUMP=$ac_ct_OBJDUMP
44215  fi
44216fi
44217
44218  else
44219    # The variable is set, but is it from the command line or the environment?
44220
44221    # Try to remove the string !OBJDUMP! from our list.
44222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44224      # If it failed, the variable was not from the command line. Ignore it,
44225      # but warn the user (except for BASH, which is always set by the calling BASH).
44226      if test "xOBJDUMP" != xBASH; then
44227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44228$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44229      fi
44230      # Try to locate tool using the code snippet
44231      if test -n "$ac_tool_prefix"; then
44232  for ac_prog in gobjdump objdump
44233  do
44234    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44237$as_echo_n "checking for $ac_word... " >&6; }
44238if ${ac_cv_prog_OBJDUMP+:} false; then :
44239  $as_echo_n "(cached) " >&6
44240else
44241  if test -n "$OBJDUMP"; then
44242  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44243else
44244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44245for as_dir in $PATH
44246do
44247  IFS=$as_save_IFS
44248  test -z "$as_dir" && as_dir=.
44249    for ac_exec_ext in '' $ac_executable_extensions; do
44250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44251    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44253    break 2
44254  fi
44255done
44256  done
44257IFS=$as_save_IFS
44258
44259fi
44260fi
44261OBJDUMP=$ac_cv_prog_OBJDUMP
44262if test -n "$OBJDUMP"; then
44263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44264$as_echo "$OBJDUMP" >&6; }
44265else
44266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44267$as_echo "no" >&6; }
44268fi
44269
44270
44271    test -n "$OBJDUMP" && break
44272  done
44273fi
44274if test -z "$OBJDUMP"; then
44275  ac_ct_OBJDUMP=$OBJDUMP
44276  for ac_prog in gobjdump objdump
44277do
44278  # Extract the first word of "$ac_prog", so it can be a program name with args.
44279set dummy $ac_prog; ac_word=$2
44280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44281$as_echo_n "checking for $ac_word... " >&6; }
44282if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44283  $as_echo_n "(cached) " >&6
44284else
44285  if test -n "$ac_ct_OBJDUMP"; then
44286  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44287else
44288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44289for as_dir in $PATH
44290do
44291  IFS=$as_save_IFS
44292  test -z "$as_dir" && as_dir=.
44293    for ac_exec_ext in '' $ac_executable_extensions; do
44294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44295    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44297    break 2
44298  fi
44299done
44300  done
44301IFS=$as_save_IFS
44302
44303fi
44304fi
44305ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44306if test -n "$ac_ct_OBJDUMP"; then
44307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44308$as_echo "$ac_ct_OBJDUMP" >&6; }
44309else
44310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44311$as_echo "no" >&6; }
44312fi
44313
44314
44315  test -n "$ac_ct_OBJDUMP" && break
44316done
44317
44318  if test "x$ac_ct_OBJDUMP" = x; then
44319    OBJDUMP=""
44320  else
44321    case $cross_compiling:$ac_tool_warned in
44322yes:)
44323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44325ac_tool_warned=yes ;;
44326esac
44327    OBJDUMP=$ac_ct_OBJDUMP
44328  fi
44329fi
44330
44331    else
44332      # If it succeeded, then it was overridden by the user. We will use it
44333      # for the tool.
44334
44335      # First remove it from the list of overridden variables, so we can test
44336      # for unknown variables in the end.
44337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44338
44339      # Check if we try to supply an empty value
44340      if test "x$OBJDUMP" = x; then
44341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44342$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44344$as_echo_n "checking for OBJDUMP... " >&6; }
44345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44346$as_echo "disabled" >&6; }
44347      else
44348        # Check if the provided tool contains a complete path.
44349        tool_specified="$OBJDUMP"
44350        tool_basename="${tool_specified##*/}"
44351        if test "x$tool_basename" = "x$tool_specified"; then
44352          # A command without a complete path is provided, search $PATH.
44353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44354$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44355          # Extract the first word of "$tool_basename", so it can be a program name with args.
44356set dummy $tool_basename; ac_word=$2
44357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44358$as_echo_n "checking for $ac_word... " >&6; }
44359if ${ac_cv_path_OBJDUMP+:} false; then :
44360  $as_echo_n "(cached) " >&6
44361else
44362  case $OBJDUMP in
44363  [\\/]* | ?:[\\/]*)
44364  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44365  ;;
44366  *)
44367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44368for as_dir in $PATH
44369do
44370  IFS=$as_save_IFS
44371  test -z "$as_dir" && as_dir=.
44372    for ac_exec_ext in '' $ac_executable_extensions; do
44373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44374    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44376    break 2
44377  fi
44378done
44379  done
44380IFS=$as_save_IFS
44381
44382  ;;
44383esac
44384fi
44385OBJDUMP=$ac_cv_path_OBJDUMP
44386if test -n "$OBJDUMP"; then
44387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44388$as_echo "$OBJDUMP" >&6; }
44389else
44390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44391$as_echo "no" >&6; }
44392fi
44393
44394
44395          if test "x$OBJDUMP" = x; then
44396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44397          fi
44398        else
44399          # Otherwise we believe it is a complete path. Use it as it is.
44400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44401$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44403$as_echo_n "checking for OBJDUMP... " >&6; }
44404          if test ! -x "$tool_specified"; then
44405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44406$as_echo "not found" >&6; }
44407            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44408          fi
44409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44410$as_echo "$tool_specified" >&6; }
44411        fi
44412      fi
44413    fi
44414
44415  fi
44416
44417
44418  if test "x$OBJDUMP" != x; then
44419    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44420    # bails if argument is missing.
44421
44422  # Only process if variable expands to non-empty
44423
44424  if test "x$OBJDUMP" != x; then
44425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426
44427  # First separate the path from the arguments. This will split at the first
44428  # space.
44429  complete="$OBJDUMP"
44430  path="${complete%% *}"
44431  tmp="$complete EOL"
44432  arguments="${tmp#* }"
44433
44434  # Input might be given as Windows format, start by converting to
44435  # unix format.
44436  new_path=`$CYGPATH -u "$path"`
44437
44438  # Now try to locate executable using which
44439  new_path=`$WHICH "$new_path" 2> /dev/null`
44440  # bat and cmd files are not always considered executable in cygwin causing which
44441  # to not find them
44442  if test "x$new_path" = x \
44443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44445    new_path=`$CYGPATH -u "$path"`
44446  fi
44447  if test "x$new_path" = x; then
44448    # Oops. Which didn't find the executable.
44449    # The splitting of arguments from the executable at a space might have been incorrect,
44450    # since paths with space are more likely in Windows. Give it another try with the whole
44451    # argument.
44452    path="$complete"
44453    arguments="EOL"
44454    new_path=`$CYGPATH -u "$path"`
44455    new_path=`$WHICH "$new_path" 2> /dev/null`
44456    # bat and cmd files are not always considered executable in cygwin causing which
44457    # to not find them
44458    if test "x$new_path" = x \
44459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44461      new_path=`$CYGPATH -u "$path"`
44462    fi
44463    if test "x$new_path" = x; then
44464      # It's still not found. Now this is an unrecoverable error.
44465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44466$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44467      has_space=`$ECHO "$complete" | $GREP " "`
44468      if test "x$has_space" != x; then
44469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44471      fi
44472      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44473    fi
44474  fi
44475
44476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44479  # "foo.exe" is OK but "foo" is an error.
44480  #
44481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44482  # It is also a way to make sure we got the proper file name for the real test later on.
44483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44484  if test "x$test_shortpath" = x; then
44485    # Short path failed, file does not exist as specified.
44486    # Try adding .exe or .cmd
44487    if test -f "${new_path}.exe"; then
44488      input_to_shortpath="${new_path}.exe"
44489    elif test -f "${new_path}.cmd"; then
44490      input_to_shortpath="${new_path}.cmd"
44491    else
44492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44493$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44496      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44497    fi
44498  else
44499    input_to_shortpath="$new_path"
44500  fi
44501
44502  # Call helper function which possibly converts this using DOS-style short mode.
44503  # If so, the updated path is stored in $new_path.
44504  new_path="$input_to_shortpath"
44505
44506  input_path="$input_to_shortpath"
44507  # Check if we need to convert this using DOS-style short mode. If the path
44508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44509  # take no chances and rewrite it.
44510  # Note: m4 eats our [], so we need to use [ and ] instead.
44511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44512  if test "x$has_forbidden_chars" != x; then
44513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44517      # Going to short mode and back again did indeed matter. Since short mode is
44518      # case insensitive, let's make it lowercase to improve readability.
44519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44520      # Now convert it back to Unix-style (cygpath)
44521      input_path=`$CYGPATH -u "$shortmode_path"`
44522      new_path="$input_path"
44523    fi
44524  fi
44525
44526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44527  if test "x$test_cygdrive_prefix" = x; then
44528    # As a simple fix, exclude /usr/bin since it's not a real path.
44529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44531      # a path prefixed by /cygdrive for fixpath to work.
44532      new_path="$CYGWIN_ROOT_PATH$input_path"
44533    fi
44534  fi
44535
44536  # remove trailing .exe if any
44537  new_path="${new_path/%.exe/}"
44538
44539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540
44541  # First separate the path from the arguments. This will split at the first
44542  # space.
44543  complete="$OBJDUMP"
44544  path="${complete%% *}"
44545  tmp="$complete EOL"
44546  arguments="${tmp#* }"
44547
44548  # Input might be given as Windows format, start by converting to
44549  # unix format.
44550  new_path="$path"
44551
44552  windows_path="$new_path"
44553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44554    unix_path=`$CYGPATH -u "$windows_path"`
44555    new_path="$unix_path"
44556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44558    new_path="$unix_path"
44559  fi
44560
44561
44562  # Now try to locate executable using which
44563  new_path=`$WHICH "$new_path" 2> /dev/null`
44564
44565  if test "x$new_path" = x; then
44566    # Oops. Which didn't find the executable.
44567    # The splitting of arguments from the executable at a space might have been incorrect,
44568    # since paths with space are more likely in Windows. Give it another try with the whole
44569    # argument.
44570    path="$complete"
44571    arguments="EOL"
44572    new_path="$path"
44573
44574  windows_path="$new_path"
44575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44576    unix_path=`$CYGPATH -u "$windows_path"`
44577    new_path="$unix_path"
44578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44580    new_path="$unix_path"
44581  fi
44582
44583
44584    new_path=`$WHICH "$new_path" 2> /dev/null`
44585    # bat and cmd files are not always considered executable in MSYS causing which
44586    # to not find them
44587    if test "x$new_path" = x \
44588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44590      new_path="$path"
44591
44592  windows_path="$new_path"
44593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44594    unix_path=`$CYGPATH -u "$windows_path"`
44595    new_path="$unix_path"
44596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44598    new_path="$unix_path"
44599  fi
44600
44601    fi
44602
44603    if test "x$new_path" = x; then
44604      # It's still not found. Now this is an unrecoverable error.
44605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44606$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44607      has_space=`$ECHO "$complete" | $GREP " "`
44608      if test "x$has_space" != x; then
44609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44611      fi
44612      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44613    fi
44614  fi
44615
44616  # Now new_path has a complete unix path to the binary
44617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44618    # Keep paths in /bin as-is, but remove trailing .exe if any
44619    new_path="${new_path/%.exe/}"
44620    # Do not save /bin paths to all_fixpath_prefixes!
44621  else
44622    # Not in mixed or Windows style, start by that.
44623    new_path=`cmd //c echo $new_path`
44624
44625  input_path="$new_path"
44626  # Check if we need to convert this using DOS-style short mode. If the path
44627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44628  # take no chances and rewrite it.
44629  # Note: m4 eats our [], so we need to use [ and ] instead.
44630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44631  if test "x$has_forbidden_chars" != x; then
44632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44634  fi
44635
44636    # Output is in $new_path
44637
44638  windows_path="$new_path"
44639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44640    unix_path=`$CYGPATH -u "$windows_path"`
44641    new_path="$unix_path"
44642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44644    new_path="$unix_path"
44645  fi
44646
44647    # remove trailing .exe if any
44648    new_path="${new_path/%.exe/}"
44649
44650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44652  fi
44653
44654    else
44655      # We're on a unix platform. Hooray! :)
44656      # First separate the path from the arguments. This will split at the first
44657      # space.
44658      complete="$OBJDUMP"
44659      path="${complete%% *}"
44660      tmp="$complete EOL"
44661      arguments="${tmp#* }"
44662
44663      # Cannot rely on the command "which" here since it doesn't always work.
44664      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44665      if test -z "$is_absolute_path"; then
44666        # Path to executable is not absolute. Find it.
44667        IFS_save="$IFS"
44668        IFS=:
44669        for p in $PATH; do
44670          if test -f "$p/$path" && test -x "$p/$path"; then
44671            new_path="$p/$path"
44672            break
44673          fi
44674        done
44675        IFS="$IFS_save"
44676      else
44677        # This is an absolute path, we can use it without further modifications.
44678        new_path="$path"
44679      fi
44680
44681      if test "x$new_path" = x; then
44682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44683$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44684        has_space=`$ECHO "$complete" | $GREP " "`
44685        if test "x$has_space" != x; then
44686          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44688        fi
44689        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44690      fi
44691    fi
44692
44693    # Now join together the path and the arguments once again
44694    if test "x$arguments" != xEOL; then
44695      new_complete="$new_path ${arguments% *}"
44696    else
44697      new_complete="$new_path"
44698    fi
44699
44700    if test "x$complete" != "x$new_complete"; then
44701      OBJDUMP="$new_complete"
44702      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44703$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44704    fi
44705  fi
44706
44707  fi
44708
44709
44710  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44711  # to remain in place. Otherwise the compiler will not work in some siutations
44712  # in later configure checks.
44713  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44714    PATH="$OLD_PATH"
44715  fi
44716
44717  # Restore the flags to the user specified values.
44718  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44719  CFLAGS="$ORG_CFLAGS"
44720  CXXFLAGS="$ORG_CXXFLAGS"
44721
44722
44723# Finally do some processing after the detection phase
44724
44725  if test "x$COMPILE_TYPE" = "xcross"; then
44726    # Now we need to find a C/C++ compiler that can build executables for the
44727    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44728    # used once. Also, we need to do this without adding a tools dir to the
44729    # path, otherwise we might pick up cross-compilers which don't use standard
44730    # naming.
44731
44732    OLDPATH="$PATH"
44733
44734
44735# Check whether --with-build-devkit was given.
44736if test "${with_build_devkit+set}" = set; then :
44737  withval=$with_build_devkit;
44738fi
44739
44740    if test "x$with_build_devkit" = "xyes"; then
44741      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44742    elif test -n "$with_build_devkit"; then
44743      if test ! -d "$with_build_devkit"; then
44744        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44745      else
44746
44747  # Only process if variable expands to non-empty
44748
44749  if test "x$with_build_devkit" != x; then
44750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44751
44752  # Input might be given as Windows format, start by converting to
44753  # unix format.
44754  path="$with_build_devkit"
44755  new_path=`$CYGPATH -u "$path"`
44756
44757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44760  # "foo.exe" is OK but "foo" is an error.
44761  #
44762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44763  # It is also a way to make sure we got the proper file name for the real test later on.
44764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44765  if test "x$test_shortpath" = x; then
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44767$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44768    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44769  fi
44770
44771  # Call helper function which possibly converts this using DOS-style short mode.
44772  # If so, the updated path is stored in $new_path.
44773
44774  input_path="$new_path"
44775  # Check if we need to convert this using DOS-style short mode. If the path
44776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44777  # take no chances and rewrite it.
44778  # Note: m4 eats our [], so we need to use [ and ] instead.
44779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44780  if test "x$has_forbidden_chars" != x; then
44781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44785      # Going to short mode and back again did indeed matter. Since short mode is
44786      # case insensitive, let's make it lowercase to improve readability.
44787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44788      # Now convert it back to Unix-style (cygpath)
44789      input_path=`$CYGPATH -u "$shortmode_path"`
44790      new_path="$input_path"
44791    fi
44792  fi
44793
44794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44795  if test "x$test_cygdrive_prefix" = x; then
44796    # As a simple fix, exclude /usr/bin since it's not a real path.
44797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44799      # a path prefixed by /cygdrive for fixpath to work.
44800      new_path="$CYGWIN_ROOT_PATH$input_path"
44801    fi
44802  fi
44803
44804
44805  if test "x$path" != "x$new_path"; then
44806    with_build_devkit="$new_path"
44807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44808$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44809  fi
44810
44811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44812
44813  path="$with_build_devkit"
44814  has_colon=`$ECHO $path | $GREP ^.:`
44815  new_path="$path"
44816  if test "x$has_colon" = x; then
44817    # Not in mixed or Windows style, start by that.
44818    new_path=`cmd //c echo $path`
44819  fi
44820
44821
44822  input_path="$new_path"
44823  # Check if we need to convert this using DOS-style short mode. If the path
44824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44825  # take no chances and rewrite it.
44826  # Note: m4 eats our [], so we need to use [ and ] instead.
44827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44828  if test "x$has_forbidden_chars" != x; then
44829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44831  fi
44832
44833
44834  windows_path="$new_path"
44835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44836    unix_path=`$CYGPATH -u "$windows_path"`
44837    new_path="$unix_path"
44838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44840    new_path="$unix_path"
44841  fi
44842
44843  if test "x$path" != "x$new_path"; then
44844    with_build_devkit="$new_path"
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44846$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44847  fi
44848
44849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44851
44852    else
44853      # We're on a unix platform. Hooray! :)
44854      path="$with_build_devkit"
44855      has_space=`$ECHO "$path" | $GREP " "`
44856      if test "x$has_space" != x; then
44857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44858$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44860      fi
44861
44862      # Use eval to expand a potential ~
44863      eval path="$path"
44864      if test ! -f "$path" && test ! -d "$path"; then
44865        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44866      fi
44867
44868      if test -d "$path"; then
44869        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44870      else
44871        dir="`$DIRNAME "$path"`"
44872        base="`$BASENAME "$path"`"
44873        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44874      fi
44875    fi
44876  fi
44877
44878        BUILD_DEVKIT_ROOT="$with_build_devkit"
44879        # Check for a meta data info file in the root of the devkit
44880        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44881          # Process devkit.info so that existing devkit variables are not
44882          # modified by this
44883          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44884              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44885              -e "s/\$host/\$build/g" \
44886              $BUILD_DEVKIT_ROOT/devkit.info \
44887              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44888          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44889          # This potentially sets the following:
44890          # A descriptive name of the devkit
44891
44892  if test "x$BUILD_DEVKIT_NAME" = x; then
44893    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44894  fi
44895
44896          # Corresponds to --with-extra-path
44897
44898  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44899    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44900  fi
44901
44902          # Corresponds to --with-toolchain-path
44903
44904  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44905    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44906  fi
44907
44908          # Corresponds to --with-sysroot
44909
44910  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44911    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44912  fi
44913
44914          # Skip the Window specific parts
44915        fi
44916
44917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44918$as_echo_n "checking for build platform devkit... " >&6; }
44919        if test "x$BUILD_DEVKIT_NAME" != x; then
44920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44921$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44922        else
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44924$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44925        fi
44926
44927        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44928
44929  if test "x$BUILD_SYSROOT" != "x"; then
44930    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44931      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44932        # Solaris Studio does not have a concept of sysroot. Instead we must
44933        # make sure the default include and lib dirs are appended to each
44934        # compile and link command line. Must also add -I-xbuiltin to enable
44935        # inlining of system functions and intrinsics.
44936        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44937        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44938            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44939      fi
44940    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44941      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44942      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44943    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44944      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44945      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44946    fi
44947    # The global CFLAGS and LDFLAGS variables need these for configure to function
44948    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44949    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44950    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44951    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44952  fi
44953
44954  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44955    # We also need -iframework<path>/System/Library/Frameworks
44956    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44957    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44958    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44959    # set this here so it doesn't have to be peppered throughout the forest
44960    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44961    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44962  fi
44963
44964
44965
44966
44967
44968         # Fallback default of just /bin if DEVKIT_PATH is not defined
44969        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44970          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44971        fi
44972        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44973      fi
44974    fi
44975
44976    # FIXME: we should list the discovered compilers as an exclude pattern!
44977    # If we do that, we can do this detection before POST_DETECTION, and still
44978    # find the build compilers in the tools dir, if needed.
44979
44980
44981
44982  # Publish this variable in the help.
44983
44984
44985  if [ -z "${BUILD_CC+x}" ]; then
44986    # The variable is not set by user, try to locate tool using the code snippet
44987    for ac_prog in cl cc gcc
44988do
44989  # Extract the first word of "$ac_prog", so it can be a program name with args.
44990set dummy $ac_prog; ac_word=$2
44991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44992$as_echo_n "checking for $ac_word... " >&6; }
44993if ${ac_cv_path_BUILD_CC+:} false; then :
44994  $as_echo_n "(cached) " >&6
44995else
44996  case $BUILD_CC in
44997  [\\/]* | ?:[\\/]*)
44998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44999  ;;
45000  *)
45001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45002for as_dir in $PATH
45003do
45004  IFS=$as_save_IFS
45005  test -z "$as_dir" && as_dir=.
45006    for ac_exec_ext in '' $ac_executable_extensions; do
45007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45010    break 2
45011  fi
45012done
45013  done
45014IFS=$as_save_IFS
45015
45016  ;;
45017esac
45018fi
45019BUILD_CC=$ac_cv_path_BUILD_CC
45020if test -n "$BUILD_CC"; then
45021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45022$as_echo "$BUILD_CC" >&6; }
45023else
45024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45025$as_echo "no" >&6; }
45026fi
45027
45028
45029  test -n "$BUILD_CC" && break
45030done
45031
45032  else
45033    # The variable is set, but is it from the command line or the environment?
45034
45035    # Try to remove the string !BUILD_CC! from our list.
45036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45038      # If it failed, the variable was not from the command line. Ignore it,
45039      # but warn the user (except for BASH, which is always set by the calling BASH).
45040      if test "xBUILD_CC" != xBASH; then
45041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45042$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45043      fi
45044      # Try to locate tool using the code snippet
45045      for ac_prog in cl cc gcc
45046do
45047  # Extract the first word of "$ac_prog", so it can be a program name with args.
45048set dummy $ac_prog; ac_word=$2
45049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45050$as_echo_n "checking for $ac_word... " >&6; }
45051if ${ac_cv_path_BUILD_CC+:} false; then :
45052  $as_echo_n "(cached) " >&6
45053else
45054  case $BUILD_CC in
45055  [\\/]* | ?:[\\/]*)
45056  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45057  ;;
45058  *)
45059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45060for as_dir in $PATH
45061do
45062  IFS=$as_save_IFS
45063  test -z "$as_dir" && as_dir=.
45064    for ac_exec_ext in '' $ac_executable_extensions; do
45065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45066    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45068    break 2
45069  fi
45070done
45071  done
45072IFS=$as_save_IFS
45073
45074  ;;
45075esac
45076fi
45077BUILD_CC=$ac_cv_path_BUILD_CC
45078if test -n "$BUILD_CC"; then
45079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45080$as_echo "$BUILD_CC" >&6; }
45081else
45082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45083$as_echo "no" >&6; }
45084fi
45085
45086
45087  test -n "$BUILD_CC" && break
45088done
45089
45090    else
45091      # If it succeeded, then it was overridden by the user. We will use it
45092      # for the tool.
45093
45094      # First remove it from the list of overridden variables, so we can test
45095      # for unknown variables in the end.
45096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45097
45098      # Check if we try to supply an empty value
45099      if test "x$BUILD_CC" = x; then
45100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45101$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45103$as_echo_n "checking for BUILD_CC... " >&6; }
45104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45105$as_echo "disabled" >&6; }
45106      else
45107        # Check if the provided tool contains a complete path.
45108        tool_specified="$BUILD_CC"
45109        tool_basename="${tool_specified##*/}"
45110        if test "x$tool_basename" = "x$tool_specified"; then
45111          # A command without a complete path is provided, search $PATH.
45112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45113$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45114          # Extract the first word of "$tool_basename", so it can be a program name with args.
45115set dummy $tool_basename; ac_word=$2
45116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45117$as_echo_n "checking for $ac_word... " >&6; }
45118if ${ac_cv_path_BUILD_CC+:} false; then :
45119  $as_echo_n "(cached) " >&6
45120else
45121  case $BUILD_CC in
45122  [\\/]* | ?:[\\/]*)
45123  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45124  ;;
45125  *)
45126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45127for as_dir in $PATH
45128do
45129  IFS=$as_save_IFS
45130  test -z "$as_dir" && as_dir=.
45131    for ac_exec_ext in '' $ac_executable_extensions; do
45132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45133    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45135    break 2
45136  fi
45137done
45138  done
45139IFS=$as_save_IFS
45140
45141  ;;
45142esac
45143fi
45144BUILD_CC=$ac_cv_path_BUILD_CC
45145if test -n "$BUILD_CC"; then
45146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45147$as_echo "$BUILD_CC" >&6; }
45148else
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45150$as_echo "no" >&6; }
45151fi
45152
45153
45154          if test "x$BUILD_CC" = x; then
45155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45156          fi
45157        else
45158          # Otherwise we believe it is a complete path. Use it as it is.
45159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45160$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45162$as_echo_n "checking for BUILD_CC... " >&6; }
45163          if test ! -x "$tool_specified"; then
45164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45165$as_echo "not found" >&6; }
45166            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45167          fi
45168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45169$as_echo "$tool_specified" >&6; }
45170        fi
45171      fi
45172    fi
45173
45174  fi
45175
45176
45177
45178  if test "x$BUILD_CC" = x; then
45179    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45180  fi
45181
45182
45183
45184  # Only process if variable expands to non-empty
45185
45186  if test "x$BUILD_CC" != x; then
45187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45188
45189  # First separate the path from the arguments. This will split at the first
45190  # space.
45191  complete="$BUILD_CC"
45192  path="${complete%% *}"
45193  tmp="$complete EOL"
45194  arguments="${tmp#* }"
45195
45196  # Input might be given as Windows format, start by converting to
45197  # unix format.
45198  new_path=`$CYGPATH -u "$path"`
45199
45200  # Now try to locate executable using which
45201  new_path=`$WHICH "$new_path" 2> /dev/null`
45202  # bat and cmd files are not always considered executable in cygwin causing which
45203  # to not find them
45204  if test "x$new_path" = x \
45205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45207    new_path=`$CYGPATH -u "$path"`
45208  fi
45209  if test "x$new_path" = x; then
45210    # Oops. Which didn't find the executable.
45211    # The splitting of arguments from the executable at a space might have been incorrect,
45212    # since paths with space are more likely in Windows. Give it another try with the whole
45213    # argument.
45214    path="$complete"
45215    arguments="EOL"
45216    new_path=`$CYGPATH -u "$path"`
45217    new_path=`$WHICH "$new_path" 2> /dev/null`
45218    # bat and cmd files are not always considered executable in cygwin causing which
45219    # to not find them
45220    if test "x$new_path" = x \
45221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45223      new_path=`$CYGPATH -u "$path"`
45224    fi
45225    if test "x$new_path" = x; then
45226      # It's still not found. Now this is an unrecoverable error.
45227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45228$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45229      has_space=`$ECHO "$complete" | $GREP " "`
45230      if test "x$has_space" != x; then
45231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45233      fi
45234      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45235    fi
45236  fi
45237
45238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45241  # "foo.exe" is OK but "foo" is an error.
45242  #
45243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45244  # It is also a way to make sure we got the proper file name for the real test later on.
45245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45246  if test "x$test_shortpath" = x; then
45247    # Short path failed, file does not exist as specified.
45248    # Try adding .exe or .cmd
45249    if test -f "${new_path}.exe"; then
45250      input_to_shortpath="${new_path}.exe"
45251    elif test -f "${new_path}.cmd"; then
45252      input_to_shortpath="${new_path}.cmd"
45253    else
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45255$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45258      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45259    fi
45260  else
45261    input_to_shortpath="$new_path"
45262  fi
45263
45264  # Call helper function which possibly converts this using DOS-style short mode.
45265  # If so, the updated path is stored in $new_path.
45266  new_path="$input_to_shortpath"
45267
45268  input_path="$input_to_shortpath"
45269  # Check if we need to convert this using DOS-style short mode. If the path
45270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45271  # take no chances and rewrite it.
45272  # Note: m4 eats our [], so we need to use [ and ] instead.
45273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45274  if test "x$has_forbidden_chars" != x; then
45275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45279      # Going to short mode and back again did indeed matter. Since short mode is
45280      # case insensitive, let's make it lowercase to improve readability.
45281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45282      # Now convert it back to Unix-style (cygpath)
45283      input_path=`$CYGPATH -u "$shortmode_path"`
45284      new_path="$input_path"
45285    fi
45286  fi
45287
45288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45289  if test "x$test_cygdrive_prefix" = x; then
45290    # As a simple fix, exclude /usr/bin since it's not a real path.
45291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45293      # a path prefixed by /cygdrive for fixpath to work.
45294      new_path="$CYGWIN_ROOT_PATH$input_path"
45295    fi
45296  fi
45297
45298  # remove trailing .exe if any
45299  new_path="${new_path/%.exe/}"
45300
45301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45302
45303  # First separate the path from the arguments. This will split at the first
45304  # space.
45305  complete="$BUILD_CC"
45306  path="${complete%% *}"
45307  tmp="$complete EOL"
45308  arguments="${tmp#* }"
45309
45310  # Input might be given as Windows format, start by converting to
45311  # unix format.
45312  new_path="$path"
45313
45314  windows_path="$new_path"
45315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45316    unix_path=`$CYGPATH -u "$windows_path"`
45317    new_path="$unix_path"
45318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45320    new_path="$unix_path"
45321  fi
45322
45323
45324  # Now try to locate executable using which
45325  new_path=`$WHICH "$new_path" 2> /dev/null`
45326
45327  if test "x$new_path" = x; then
45328    # Oops. Which didn't find the executable.
45329    # The splitting of arguments from the executable at a space might have been incorrect,
45330    # since paths with space are more likely in Windows. Give it another try with the whole
45331    # argument.
45332    path="$complete"
45333    arguments="EOL"
45334    new_path="$path"
45335
45336  windows_path="$new_path"
45337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45338    unix_path=`$CYGPATH -u "$windows_path"`
45339    new_path="$unix_path"
45340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45342    new_path="$unix_path"
45343  fi
45344
45345
45346    new_path=`$WHICH "$new_path" 2> /dev/null`
45347    # bat and cmd files are not always considered executable in MSYS causing which
45348    # to not find them
45349    if test "x$new_path" = x \
45350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45352      new_path="$path"
45353
45354  windows_path="$new_path"
45355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45356    unix_path=`$CYGPATH -u "$windows_path"`
45357    new_path="$unix_path"
45358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45360    new_path="$unix_path"
45361  fi
45362
45363    fi
45364
45365    if test "x$new_path" = x; then
45366      # It's still not found. Now this is an unrecoverable error.
45367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45368$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45369      has_space=`$ECHO "$complete" | $GREP " "`
45370      if test "x$has_space" != x; then
45371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45373      fi
45374      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45375    fi
45376  fi
45377
45378  # Now new_path has a complete unix path to the binary
45379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45380    # Keep paths in /bin as-is, but remove trailing .exe if any
45381    new_path="${new_path/%.exe/}"
45382    # Do not save /bin paths to all_fixpath_prefixes!
45383  else
45384    # Not in mixed or Windows style, start by that.
45385    new_path=`cmd //c echo $new_path`
45386
45387  input_path="$new_path"
45388  # Check if we need to convert this using DOS-style short mode. If the path
45389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45390  # take no chances and rewrite it.
45391  # Note: m4 eats our [], so we need to use [ and ] instead.
45392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45393  if test "x$has_forbidden_chars" != x; then
45394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45396  fi
45397
45398    # Output is in $new_path
45399
45400  windows_path="$new_path"
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402    unix_path=`$CYGPATH -u "$windows_path"`
45403    new_path="$unix_path"
45404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45406    new_path="$unix_path"
45407  fi
45408
45409    # remove trailing .exe if any
45410    new_path="${new_path/%.exe/}"
45411
45412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45414  fi
45415
45416    else
45417      # We're on a unix platform. Hooray! :)
45418      # First separate the path from the arguments. This will split at the first
45419      # space.
45420      complete="$BUILD_CC"
45421      path="${complete%% *}"
45422      tmp="$complete EOL"
45423      arguments="${tmp#* }"
45424
45425      # Cannot rely on the command "which" here since it doesn't always work.
45426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45427      if test -z "$is_absolute_path"; then
45428        # Path to executable is not absolute. Find it.
45429        IFS_save="$IFS"
45430        IFS=:
45431        for p in $PATH; do
45432          if test -f "$p/$path" && test -x "$p/$path"; then
45433            new_path="$p/$path"
45434            break
45435          fi
45436        done
45437        IFS="$IFS_save"
45438      else
45439        # This is an absolute path, we can use it without further modifications.
45440        new_path="$path"
45441      fi
45442
45443      if test "x$new_path" = x; then
45444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45445$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45446        has_space=`$ECHO "$complete" | $GREP " "`
45447        if test "x$has_space" != x; then
45448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45450        fi
45451        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45452      fi
45453    fi
45454
45455    # Now join together the path and the arguments once again
45456    if test "x$arguments" != xEOL; then
45457      new_complete="$new_path ${arguments% *}"
45458    else
45459      new_complete="$new_path"
45460    fi
45461
45462    if test "x$complete" != "x$new_complete"; then
45463      BUILD_CC="$new_complete"
45464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45465$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45466    fi
45467  fi
45468
45469
45470
45471
45472  # Publish this variable in the help.
45473
45474
45475  if [ -z "${BUILD_CXX+x}" ]; then
45476    # The variable is not set by user, try to locate tool using the code snippet
45477    for ac_prog in cl CC g++
45478do
45479  # Extract the first word of "$ac_prog", so it can be a program name with args.
45480set dummy $ac_prog; ac_word=$2
45481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45482$as_echo_n "checking for $ac_word... " >&6; }
45483if ${ac_cv_path_BUILD_CXX+:} false; then :
45484  $as_echo_n "(cached) " >&6
45485else
45486  case $BUILD_CXX in
45487  [\\/]* | ?:[\\/]*)
45488  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45489  ;;
45490  *)
45491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45492for as_dir in $PATH
45493do
45494  IFS=$as_save_IFS
45495  test -z "$as_dir" && as_dir=.
45496    for ac_exec_ext in '' $ac_executable_extensions; do
45497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45498    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45500    break 2
45501  fi
45502done
45503  done
45504IFS=$as_save_IFS
45505
45506  ;;
45507esac
45508fi
45509BUILD_CXX=$ac_cv_path_BUILD_CXX
45510if test -n "$BUILD_CXX"; then
45511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45512$as_echo "$BUILD_CXX" >&6; }
45513else
45514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45515$as_echo "no" >&6; }
45516fi
45517
45518
45519  test -n "$BUILD_CXX" && break
45520done
45521
45522  else
45523    # The variable is set, but is it from the command line or the environment?
45524
45525    # Try to remove the string !BUILD_CXX! from our list.
45526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45528      # If it failed, the variable was not from the command line. Ignore it,
45529      # but warn the user (except for BASH, which is always set by the calling BASH).
45530      if test "xBUILD_CXX" != xBASH; then
45531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45532$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45533      fi
45534      # Try to locate tool using the code snippet
45535      for ac_prog in cl CC g++
45536do
45537  # Extract the first word of "$ac_prog", so it can be a program name with args.
45538set dummy $ac_prog; ac_word=$2
45539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45540$as_echo_n "checking for $ac_word... " >&6; }
45541if ${ac_cv_path_BUILD_CXX+:} false; then :
45542  $as_echo_n "(cached) " >&6
45543else
45544  case $BUILD_CXX in
45545  [\\/]* | ?:[\\/]*)
45546  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45547  ;;
45548  *)
45549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45550for as_dir in $PATH
45551do
45552  IFS=$as_save_IFS
45553  test -z "$as_dir" && as_dir=.
45554    for ac_exec_ext in '' $ac_executable_extensions; do
45555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45556    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45558    break 2
45559  fi
45560done
45561  done
45562IFS=$as_save_IFS
45563
45564  ;;
45565esac
45566fi
45567BUILD_CXX=$ac_cv_path_BUILD_CXX
45568if test -n "$BUILD_CXX"; then
45569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45570$as_echo "$BUILD_CXX" >&6; }
45571else
45572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45573$as_echo "no" >&6; }
45574fi
45575
45576
45577  test -n "$BUILD_CXX" && break
45578done
45579
45580    else
45581      # If it succeeded, then it was overridden by the user. We will use it
45582      # for the tool.
45583
45584      # First remove it from the list of overridden variables, so we can test
45585      # for unknown variables in the end.
45586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45587
45588      # Check if we try to supply an empty value
45589      if test "x$BUILD_CXX" = x; then
45590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45591$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45593$as_echo_n "checking for BUILD_CXX... " >&6; }
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45595$as_echo "disabled" >&6; }
45596      else
45597        # Check if the provided tool contains a complete path.
45598        tool_specified="$BUILD_CXX"
45599        tool_basename="${tool_specified##*/}"
45600        if test "x$tool_basename" = "x$tool_specified"; then
45601          # A command without a complete path is provided, search $PATH.
45602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45603$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45604          # Extract the first word of "$tool_basename", so it can be a program name with args.
45605set dummy $tool_basename; ac_word=$2
45606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45607$as_echo_n "checking for $ac_word... " >&6; }
45608if ${ac_cv_path_BUILD_CXX+:} false; then :
45609  $as_echo_n "(cached) " >&6
45610else
45611  case $BUILD_CXX in
45612  [\\/]* | ?:[\\/]*)
45613  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45614  ;;
45615  *)
45616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45617for as_dir in $PATH
45618do
45619  IFS=$as_save_IFS
45620  test -z "$as_dir" && as_dir=.
45621    for ac_exec_ext in '' $ac_executable_extensions; do
45622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45623    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45625    break 2
45626  fi
45627done
45628  done
45629IFS=$as_save_IFS
45630
45631  ;;
45632esac
45633fi
45634BUILD_CXX=$ac_cv_path_BUILD_CXX
45635if test -n "$BUILD_CXX"; then
45636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45637$as_echo "$BUILD_CXX" >&6; }
45638else
45639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45640$as_echo "no" >&6; }
45641fi
45642
45643
45644          if test "x$BUILD_CXX" = x; then
45645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45646          fi
45647        else
45648          # Otherwise we believe it is a complete path. Use it as it is.
45649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45650$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45652$as_echo_n "checking for BUILD_CXX... " >&6; }
45653          if test ! -x "$tool_specified"; then
45654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45655$as_echo "not found" >&6; }
45656            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45657          fi
45658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45659$as_echo "$tool_specified" >&6; }
45660        fi
45661      fi
45662    fi
45663
45664  fi
45665
45666
45667
45668  if test "x$BUILD_CXX" = x; then
45669    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45670  fi
45671
45672
45673
45674  # Only process if variable expands to non-empty
45675
45676  if test "x$BUILD_CXX" != x; then
45677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45678
45679  # First separate the path from the arguments. This will split at the first
45680  # space.
45681  complete="$BUILD_CXX"
45682  path="${complete%% *}"
45683  tmp="$complete EOL"
45684  arguments="${tmp#* }"
45685
45686  # Input might be given as Windows format, start by converting to
45687  # unix format.
45688  new_path=`$CYGPATH -u "$path"`
45689
45690  # Now try to locate executable using which
45691  new_path=`$WHICH "$new_path" 2> /dev/null`
45692  # bat and cmd files are not always considered executable in cygwin causing which
45693  # to not find them
45694  if test "x$new_path" = x \
45695      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45696      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45697    new_path=`$CYGPATH -u "$path"`
45698  fi
45699  if test "x$new_path" = x; then
45700    # Oops. Which didn't find the executable.
45701    # The splitting of arguments from the executable at a space might have been incorrect,
45702    # since paths with space are more likely in Windows. Give it another try with the whole
45703    # argument.
45704    path="$complete"
45705    arguments="EOL"
45706    new_path=`$CYGPATH -u "$path"`
45707    new_path=`$WHICH "$new_path" 2> /dev/null`
45708    # bat and cmd files are not always considered executable in cygwin causing which
45709    # to not find them
45710    if test "x$new_path" = x \
45711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45713      new_path=`$CYGPATH -u "$path"`
45714    fi
45715    if test "x$new_path" = x; then
45716      # It's still not found. Now this is an unrecoverable error.
45717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45718$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45719      has_space=`$ECHO "$complete" | $GREP " "`
45720      if test "x$has_space" != x; then
45721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45723      fi
45724      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45725    fi
45726  fi
45727
45728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45731  # "foo.exe" is OK but "foo" is an error.
45732  #
45733  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45734  # It is also a way to make sure we got the proper file name for the real test later on.
45735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45736  if test "x$test_shortpath" = x; then
45737    # Short path failed, file does not exist as specified.
45738    # Try adding .exe or .cmd
45739    if test -f "${new_path}.exe"; then
45740      input_to_shortpath="${new_path}.exe"
45741    elif test -f "${new_path}.cmd"; then
45742      input_to_shortpath="${new_path}.cmd"
45743    else
45744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45745$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45748      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45749    fi
45750  else
45751    input_to_shortpath="$new_path"
45752  fi
45753
45754  # Call helper function which possibly converts this using DOS-style short mode.
45755  # If so, the updated path is stored in $new_path.
45756  new_path="$input_to_shortpath"
45757
45758  input_path="$input_to_shortpath"
45759  # Check if we need to convert this using DOS-style short mode. If the path
45760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45761  # take no chances and rewrite it.
45762  # Note: m4 eats our [], so we need to use [ and ] instead.
45763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45764  if test "x$has_forbidden_chars" != x; then
45765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45769      # Going to short mode and back again did indeed matter. Since short mode is
45770      # case insensitive, let's make it lowercase to improve readability.
45771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45772      # Now convert it back to Unix-style (cygpath)
45773      input_path=`$CYGPATH -u "$shortmode_path"`
45774      new_path="$input_path"
45775    fi
45776  fi
45777
45778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45779  if test "x$test_cygdrive_prefix" = x; then
45780    # As a simple fix, exclude /usr/bin since it's not a real path.
45781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45783      # a path prefixed by /cygdrive for fixpath to work.
45784      new_path="$CYGWIN_ROOT_PATH$input_path"
45785    fi
45786  fi
45787
45788  # remove trailing .exe if any
45789  new_path="${new_path/%.exe/}"
45790
45791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45792
45793  # First separate the path from the arguments. This will split at the first
45794  # space.
45795  complete="$BUILD_CXX"
45796  path="${complete%% *}"
45797  tmp="$complete EOL"
45798  arguments="${tmp#* }"
45799
45800  # Input might be given as Windows format, start by converting to
45801  # unix format.
45802  new_path="$path"
45803
45804  windows_path="$new_path"
45805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45806    unix_path=`$CYGPATH -u "$windows_path"`
45807    new_path="$unix_path"
45808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45810    new_path="$unix_path"
45811  fi
45812
45813
45814  # Now try to locate executable using which
45815  new_path=`$WHICH "$new_path" 2> /dev/null`
45816
45817  if test "x$new_path" = x; then
45818    # Oops. Which didn't find the executable.
45819    # The splitting of arguments from the executable at a space might have been incorrect,
45820    # since paths with space are more likely in Windows. Give it another try with the whole
45821    # argument.
45822    path="$complete"
45823    arguments="EOL"
45824    new_path="$path"
45825
45826  windows_path="$new_path"
45827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45828    unix_path=`$CYGPATH -u "$windows_path"`
45829    new_path="$unix_path"
45830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45832    new_path="$unix_path"
45833  fi
45834
45835
45836    new_path=`$WHICH "$new_path" 2> /dev/null`
45837    # bat and cmd files are not always considered executable in MSYS causing which
45838    # to not find them
45839    if test "x$new_path" = x \
45840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45842      new_path="$path"
45843
45844  windows_path="$new_path"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    unix_path=`$CYGPATH -u "$windows_path"`
45847    new_path="$unix_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45850    new_path="$unix_path"
45851  fi
45852
45853    fi
45854
45855    if test "x$new_path" = x; then
45856      # It's still not found. Now this is an unrecoverable error.
45857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45858$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45859      has_space=`$ECHO "$complete" | $GREP " "`
45860      if test "x$has_space" != x; then
45861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45863      fi
45864      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45865    fi
45866  fi
45867
45868  # Now new_path has a complete unix path to the binary
45869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45870    # Keep paths in /bin as-is, but remove trailing .exe if any
45871    new_path="${new_path/%.exe/}"
45872    # Do not save /bin paths to all_fixpath_prefixes!
45873  else
45874    # Not in mixed or Windows style, start by that.
45875    new_path=`cmd //c echo $new_path`
45876
45877  input_path="$new_path"
45878  # Check if we need to convert this using DOS-style short mode. If the path
45879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45880  # take no chances and rewrite it.
45881  # Note: m4 eats our [], so we need to use [ and ] instead.
45882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45883  if test "x$has_forbidden_chars" != x; then
45884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45886  fi
45887
45888    # Output is in $new_path
45889
45890  windows_path="$new_path"
45891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45892    unix_path=`$CYGPATH -u "$windows_path"`
45893    new_path="$unix_path"
45894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45896    new_path="$unix_path"
45897  fi
45898
45899    # remove trailing .exe if any
45900    new_path="${new_path/%.exe/}"
45901
45902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45904  fi
45905
45906    else
45907      # We're on a unix platform. Hooray! :)
45908      # First separate the path from the arguments. This will split at the first
45909      # space.
45910      complete="$BUILD_CXX"
45911      path="${complete%% *}"
45912      tmp="$complete EOL"
45913      arguments="${tmp#* }"
45914
45915      # Cannot rely on the command "which" here since it doesn't always work.
45916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45917      if test -z "$is_absolute_path"; then
45918        # Path to executable is not absolute. Find it.
45919        IFS_save="$IFS"
45920        IFS=:
45921        for p in $PATH; do
45922          if test -f "$p/$path" && test -x "$p/$path"; then
45923            new_path="$p/$path"
45924            break
45925          fi
45926        done
45927        IFS="$IFS_save"
45928      else
45929        # This is an absolute path, we can use it without further modifications.
45930        new_path="$path"
45931      fi
45932
45933      if test "x$new_path" = x; then
45934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45935$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45936        has_space=`$ECHO "$complete" | $GREP " "`
45937        if test "x$has_space" != x; then
45938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45940        fi
45941        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45942      fi
45943    fi
45944
45945    # Now join together the path and the arguments once again
45946    if test "x$arguments" != xEOL; then
45947      new_complete="$new_path ${arguments% *}"
45948    else
45949      new_complete="$new_path"
45950    fi
45951
45952    if test "x$complete" != "x$new_complete"; then
45953      BUILD_CXX="$new_complete"
45954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45955$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45956    fi
45957  fi
45958
45959
45960
45961  # Publish this variable in the help.
45962
45963
45964  if [ -z "${BUILD_NM+x}" ]; then
45965    # The variable is not set by user, try to locate tool using the code snippet
45966    for ac_prog in nm gcc-nm
45967do
45968  # Extract the first word of "$ac_prog", so it can be a program name with args.
45969set dummy $ac_prog; ac_word=$2
45970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45971$as_echo_n "checking for $ac_word... " >&6; }
45972if ${ac_cv_path_BUILD_NM+:} false; then :
45973  $as_echo_n "(cached) " >&6
45974else
45975  case $BUILD_NM in
45976  [\\/]* | ?:[\\/]*)
45977  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45978  ;;
45979  *)
45980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45981for as_dir in $PATH
45982do
45983  IFS=$as_save_IFS
45984  test -z "$as_dir" && as_dir=.
45985    for ac_exec_ext in '' $ac_executable_extensions; do
45986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45987    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45989    break 2
45990  fi
45991done
45992  done
45993IFS=$as_save_IFS
45994
45995  ;;
45996esac
45997fi
45998BUILD_NM=$ac_cv_path_BUILD_NM
45999if test -n "$BUILD_NM"; then
46000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46001$as_echo "$BUILD_NM" >&6; }
46002else
46003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46004$as_echo "no" >&6; }
46005fi
46006
46007
46008  test -n "$BUILD_NM" && break
46009done
46010
46011  else
46012    # The variable is set, but is it from the command line or the environment?
46013
46014    # Try to remove the string !BUILD_NM! from our list.
46015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46017      # If it failed, the variable was not from the command line. Ignore it,
46018      # but warn the user (except for BASH, which is always set by the calling BASH).
46019      if test "xBUILD_NM" != xBASH; then
46020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46021$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46022      fi
46023      # Try to locate tool using the code snippet
46024      for ac_prog in nm gcc-nm
46025do
46026  # Extract the first word of "$ac_prog", so it can be a program name with args.
46027set dummy $ac_prog; ac_word=$2
46028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46029$as_echo_n "checking for $ac_word... " >&6; }
46030if ${ac_cv_path_BUILD_NM+:} false; then :
46031  $as_echo_n "(cached) " >&6
46032else
46033  case $BUILD_NM in
46034  [\\/]* | ?:[\\/]*)
46035  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46036  ;;
46037  *)
46038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46039for as_dir in $PATH
46040do
46041  IFS=$as_save_IFS
46042  test -z "$as_dir" && as_dir=.
46043    for ac_exec_ext in '' $ac_executable_extensions; do
46044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46045    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46047    break 2
46048  fi
46049done
46050  done
46051IFS=$as_save_IFS
46052
46053  ;;
46054esac
46055fi
46056BUILD_NM=$ac_cv_path_BUILD_NM
46057if test -n "$BUILD_NM"; then
46058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46059$as_echo "$BUILD_NM" >&6; }
46060else
46061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46062$as_echo "no" >&6; }
46063fi
46064
46065
46066  test -n "$BUILD_NM" && break
46067done
46068
46069    else
46070      # If it succeeded, then it was overridden by the user. We will use it
46071      # for the tool.
46072
46073      # First remove it from the list of overridden variables, so we can test
46074      # for unknown variables in the end.
46075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46076
46077      # Check if we try to supply an empty value
46078      if test "x$BUILD_NM" = x; then
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46080$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46081        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46082$as_echo_n "checking for BUILD_NM... " >&6; }
46083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46084$as_echo "disabled" >&6; }
46085      else
46086        # Check if the provided tool contains a complete path.
46087        tool_specified="$BUILD_NM"
46088        tool_basename="${tool_specified##*/}"
46089        if test "x$tool_basename" = "x$tool_specified"; then
46090          # A command without a complete path is provided, search $PATH.
46091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46092$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46093          # Extract the first word of "$tool_basename", so it can be a program name with args.
46094set dummy $tool_basename; ac_word=$2
46095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46096$as_echo_n "checking for $ac_word... " >&6; }
46097if ${ac_cv_path_BUILD_NM+:} false; then :
46098  $as_echo_n "(cached) " >&6
46099else
46100  case $BUILD_NM in
46101  [\\/]* | ?:[\\/]*)
46102  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46103  ;;
46104  *)
46105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46106for as_dir in $PATH
46107do
46108  IFS=$as_save_IFS
46109  test -z "$as_dir" && as_dir=.
46110    for ac_exec_ext in '' $ac_executable_extensions; do
46111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46112    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46114    break 2
46115  fi
46116done
46117  done
46118IFS=$as_save_IFS
46119
46120  ;;
46121esac
46122fi
46123BUILD_NM=$ac_cv_path_BUILD_NM
46124if test -n "$BUILD_NM"; then
46125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46126$as_echo "$BUILD_NM" >&6; }
46127else
46128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46129$as_echo "no" >&6; }
46130fi
46131
46132
46133          if test "x$BUILD_NM" = x; then
46134            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46135          fi
46136        else
46137          # Otherwise we believe it is a complete path. Use it as it is.
46138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46139$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46140          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46141$as_echo_n "checking for BUILD_NM... " >&6; }
46142          if test ! -x "$tool_specified"; then
46143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46144$as_echo "not found" >&6; }
46145            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46146          fi
46147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46148$as_echo "$tool_specified" >&6; }
46149        fi
46150      fi
46151    fi
46152
46153  fi
46154
46155
46156
46157  # Only process if variable expands to non-empty
46158
46159  if test "x$BUILD_NM" != x; then
46160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46161
46162  # First separate the path from the arguments. This will split at the first
46163  # space.
46164  complete="$BUILD_NM"
46165  path="${complete%% *}"
46166  tmp="$complete EOL"
46167  arguments="${tmp#* }"
46168
46169  # Input might be given as Windows format, start by converting to
46170  # unix format.
46171  new_path=`$CYGPATH -u "$path"`
46172
46173  # Now try to locate executable using which
46174  new_path=`$WHICH "$new_path" 2> /dev/null`
46175  # bat and cmd files are not always considered executable in cygwin causing which
46176  # to not find them
46177  if test "x$new_path" = x \
46178      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46179      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46180    new_path=`$CYGPATH -u "$path"`
46181  fi
46182  if test "x$new_path" = x; then
46183    # Oops. Which didn't find the executable.
46184    # The splitting of arguments from the executable at a space might have been incorrect,
46185    # since paths with space are more likely in Windows. Give it another try with the whole
46186    # argument.
46187    path="$complete"
46188    arguments="EOL"
46189    new_path=`$CYGPATH -u "$path"`
46190    new_path=`$WHICH "$new_path" 2> /dev/null`
46191    # bat and cmd files are not always considered executable in cygwin causing which
46192    # to not find them
46193    if test "x$new_path" = x \
46194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46196      new_path=`$CYGPATH -u "$path"`
46197    fi
46198    if test "x$new_path" = x; then
46199      # It's still not found. Now this is an unrecoverable error.
46200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46201$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46202      has_space=`$ECHO "$complete" | $GREP " "`
46203      if test "x$has_space" != x; then
46204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46206      fi
46207      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46208    fi
46209  fi
46210
46211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46214  # "foo.exe" is OK but "foo" is an error.
46215  #
46216  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46217  # It is also a way to make sure we got the proper file name for the real test later on.
46218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46219  if test "x$test_shortpath" = x; then
46220    # Short path failed, file does not exist as specified.
46221    # Try adding .exe or .cmd
46222    if test -f "${new_path}.exe"; then
46223      input_to_shortpath="${new_path}.exe"
46224    elif test -f "${new_path}.cmd"; then
46225      input_to_shortpath="${new_path}.cmd"
46226    else
46227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46228$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46229      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46230$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46231      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46232    fi
46233  else
46234    input_to_shortpath="$new_path"
46235  fi
46236
46237  # Call helper function which possibly converts this using DOS-style short mode.
46238  # If so, the updated path is stored in $new_path.
46239  new_path="$input_to_shortpath"
46240
46241  input_path="$input_to_shortpath"
46242  # Check if we need to convert this using DOS-style short mode. If the path
46243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46244  # take no chances and rewrite it.
46245  # Note: m4 eats our [], so we need to use [ and ] instead.
46246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46247  if test "x$has_forbidden_chars" != x; then
46248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46252      # Going to short mode and back again did indeed matter. Since short mode is
46253      # case insensitive, let's make it lowercase to improve readability.
46254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46255      # Now convert it back to Unix-style (cygpath)
46256      input_path=`$CYGPATH -u "$shortmode_path"`
46257      new_path="$input_path"
46258    fi
46259  fi
46260
46261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46262  if test "x$test_cygdrive_prefix" = x; then
46263    # As a simple fix, exclude /usr/bin since it's not a real path.
46264    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46266      # a path prefixed by /cygdrive for fixpath to work.
46267      new_path="$CYGWIN_ROOT_PATH$input_path"
46268    fi
46269  fi
46270
46271  # remove trailing .exe if any
46272  new_path="${new_path/%.exe/}"
46273
46274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46275
46276  # First separate the path from the arguments. This will split at the first
46277  # space.
46278  complete="$BUILD_NM"
46279  path="${complete%% *}"
46280  tmp="$complete EOL"
46281  arguments="${tmp#* }"
46282
46283  # Input might be given as Windows format, start by converting to
46284  # unix format.
46285  new_path="$path"
46286
46287  windows_path="$new_path"
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289    unix_path=`$CYGPATH -u "$windows_path"`
46290    new_path="$unix_path"
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46293    new_path="$unix_path"
46294  fi
46295
46296
46297  # Now try to locate executable using which
46298  new_path=`$WHICH "$new_path" 2> /dev/null`
46299
46300  if test "x$new_path" = x; then
46301    # Oops. Which didn't find the executable.
46302    # The splitting of arguments from the executable at a space might have been incorrect,
46303    # since paths with space are more likely in Windows. Give it another try with the whole
46304    # argument.
46305    path="$complete"
46306    arguments="EOL"
46307    new_path="$path"
46308
46309  windows_path="$new_path"
46310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46311    unix_path=`$CYGPATH -u "$windows_path"`
46312    new_path="$unix_path"
46313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46315    new_path="$unix_path"
46316  fi
46317
46318
46319    new_path=`$WHICH "$new_path" 2> /dev/null`
46320    # bat and cmd files are not always considered executable in MSYS causing which
46321    # to not find them
46322    if test "x$new_path" = x \
46323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46325      new_path="$path"
46326
46327  windows_path="$new_path"
46328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329    unix_path=`$CYGPATH -u "$windows_path"`
46330    new_path="$unix_path"
46331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46333    new_path="$unix_path"
46334  fi
46335
46336    fi
46337
46338    if test "x$new_path" = x; then
46339      # It's still not found. Now this is an unrecoverable error.
46340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46341$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46342      has_space=`$ECHO "$complete" | $GREP " "`
46343      if test "x$has_space" != x; then
46344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46346      fi
46347      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46348    fi
46349  fi
46350
46351  # Now new_path has a complete unix path to the binary
46352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46353    # Keep paths in /bin as-is, but remove trailing .exe if any
46354    new_path="${new_path/%.exe/}"
46355    # Do not save /bin paths to all_fixpath_prefixes!
46356  else
46357    # Not in mixed or Windows style, start by that.
46358    new_path=`cmd //c echo $new_path`
46359
46360  input_path="$new_path"
46361  # Check if we need to convert this using DOS-style short mode. If the path
46362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46363  # take no chances and rewrite it.
46364  # Note: m4 eats our [], so we need to use [ and ] instead.
46365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46366  if test "x$has_forbidden_chars" != x; then
46367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46369  fi
46370
46371    # Output is in $new_path
46372
46373  windows_path="$new_path"
46374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375    unix_path=`$CYGPATH -u "$windows_path"`
46376    new_path="$unix_path"
46377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46379    new_path="$unix_path"
46380  fi
46381
46382    # remove trailing .exe if any
46383    new_path="${new_path/%.exe/}"
46384
46385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46387  fi
46388
46389    else
46390      # We're on a unix platform. Hooray! :)
46391      # First separate the path from the arguments. This will split at the first
46392      # space.
46393      complete="$BUILD_NM"
46394      path="${complete%% *}"
46395      tmp="$complete EOL"
46396      arguments="${tmp#* }"
46397
46398      # Cannot rely on the command "which" here since it doesn't always work.
46399      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46400      if test -z "$is_absolute_path"; then
46401        # Path to executable is not absolute. Find it.
46402        IFS_save="$IFS"
46403        IFS=:
46404        for p in $PATH; do
46405          if test -f "$p/$path" && test -x "$p/$path"; then
46406            new_path="$p/$path"
46407            break
46408          fi
46409        done
46410        IFS="$IFS_save"
46411      else
46412        # This is an absolute path, we can use it without further modifications.
46413        new_path="$path"
46414      fi
46415
46416      if test "x$new_path" = x; then
46417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46418$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46419        has_space=`$ECHO "$complete" | $GREP " "`
46420        if test "x$has_space" != x; then
46421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46423        fi
46424        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46425      fi
46426    fi
46427
46428    # Now join together the path and the arguments once again
46429    if test "x$arguments" != xEOL; then
46430      new_complete="$new_path ${arguments% *}"
46431    else
46432      new_complete="$new_path"
46433    fi
46434
46435    if test "x$complete" != "x$new_complete"; then
46436      BUILD_NM="$new_complete"
46437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46438$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46439    fi
46440  fi
46441
46442
46443
46444  # Publish this variable in the help.
46445
46446
46447  if [ -z "${BUILD_AR+x}" ]; then
46448    # The variable is not set by user, try to locate tool using the code snippet
46449    for ac_prog in ar gcc-ar
46450do
46451  # Extract the first word of "$ac_prog", so it can be a program name with args.
46452set dummy $ac_prog; ac_word=$2
46453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46454$as_echo_n "checking for $ac_word... " >&6; }
46455if ${ac_cv_path_BUILD_AR+:} false; then :
46456  $as_echo_n "(cached) " >&6
46457else
46458  case $BUILD_AR in
46459  [\\/]* | ?:[\\/]*)
46460  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46461  ;;
46462  *)
46463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46464for as_dir in $PATH
46465do
46466  IFS=$as_save_IFS
46467  test -z "$as_dir" && as_dir=.
46468    for ac_exec_ext in '' $ac_executable_extensions; do
46469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46470    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46472    break 2
46473  fi
46474done
46475  done
46476IFS=$as_save_IFS
46477
46478  ;;
46479esac
46480fi
46481BUILD_AR=$ac_cv_path_BUILD_AR
46482if test -n "$BUILD_AR"; then
46483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46484$as_echo "$BUILD_AR" >&6; }
46485else
46486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46487$as_echo "no" >&6; }
46488fi
46489
46490
46491  test -n "$BUILD_AR" && break
46492done
46493
46494  else
46495    # The variable is set, but is it from the command line or the environment?
46496
46497    # Try to remove the string !BUILD_AR! from our list.
46498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46500      # If it failed, the variable was not from the command line. Ignore it,
46501      # but warn the user (except for BASH, which is always set by the calling BASH).
46502      if test "xBUILD_AR" != xBASH; then
46503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46504$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46505      fi
46506      # Try to locate tool using the code snippet
46507      for ac_prog in ar gcc-ar
46508do
46509  # Extract the first word of "$ac_prog", so it can be a program name with args.
46510set dummy $ac_prog; ac_word=$2
46511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46512$as_echo_n "checking for $ac_word... " >&6; }
46513if ${ac_cv_path_BUILD_AR+:} false; then :
46514  $as_echo_n "(cached) " >&6
46515else
46516  case $BUILD_AR in
46517  [\\/]* | ?:[\\/]*)
46518  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46519  ;;
46520  *)
46521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46522for as_dir in $PATH
46523do
46524  IFS=$as_save_IFS
46525  test -z "$as_dir" && as_dir=.
46526    for ac_exec_ext in '' $ac_executable_extensions; do
46527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46528    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46530    break 2
46531  fi
46532done
46533  done
46534IFS=$as_save_IFS
46535
46536  ;;
46537esac
46538fi
46539BUILD_AR=$ac_cv_path_BUILD_AR
46540if test -n "$BUILD_AR"; then
46541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46542$as_echo "$BUILD_AR" >&6; }
46543else
46544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46545$as_echo "no" >&6; }
46546fi
46547
46548
46549  test -n "$BUILD_AR" && break
46550done
46551
46552    else
46553      # If it succeeded, then it was overridden by the user. We will use it
46554      # for the tool.
46555
46556      # First remove it from the list of overridden variables, so we can test
46557      # for unknown variables in the end.
46558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46559
46560      # Check if we try to supply an empty value
46561      if test "x$BUILD_AR" = x; then
46562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46563$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46565$as_echo_n "checking for BUILD_AR... " >&6; }
46566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46567$as_echo "disabled" >&6; }
46568      else
46569        # Check if the provided tool contains a complete path.
46570        tool_specified="$BUILD_AR"
46571        tool_basename="${tool_specified##*/}"
46572        if test "x$tool_basename" = "x$tool_specified"; then
46573          # A command without a complete path is provided, search $PATH.
46574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46575$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46576          # Extract the first word of "$tool_basename", so it can be a program name with args.
46577set dummy $tool_basename; ac_word=$2
46578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46579$as_echo_n "checking for $ac_word... " >&6; }
46580if ${ac_cv_path_BUILD_AR+:} false; then :
46581  $as_echo_n "(cached) " >&6
46582else
46583  case $BUILD_AR in
46584  [\\/]* | ?:[\\/]*)
46585  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46586  ;;
46587  *)
46588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46589for as_dir in $PATH
46590do
46591  IFS=$as_save_IFS
46592  test -z "$as_dir" && as_dir=.
46593    for ac_exec_ext in '' $ac_executable_extensions; do
46594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46595    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46597    break 2
46598  fi
46599done
46600  done
46601IFS=$as_save_IFS
46602
46603  ;;
46604esac
46605fi
46606BUILD_AR=$ac_cv_path_BUILD_AR
46607if test -n "$BUILD_AR"; then
46608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46609$as_echo "$BUILD_AR" >&6; }
46610else
46611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46612$as_echo "no" >&6; }
46613fi
46614
46615
46616          if test "x$BUILD_AR" = x; then
46617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46618          fi
46619        else
46620          # Otherwise we believe it is a complete path. Use it as it is.
46621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46622$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46624$as_echo_n "checking for BUILD_AR... " >&6; }
46625          if test ! -x "$tool_specified"; then
46626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46627$as_echo "not found" >&6; }
46628            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46629          fi
46630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46631$as_echo "$tool_specified" >&6; }
46632        fi
46633      fi
46634    fi
46635
46636  fi
46637
46638
46639
46640  # Only process if variable expands to non-empty
46641
46642  if test "x$BUILD_AR" != x; then
46643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46644
46645  # First separate the path from the arguments. This will split at the first
46646  # space.
46647  complete="$BUILD_AR"
46648  path="${complete%% *}"
46649  tmp="$complete EOL"
46650  arguments="${tmp#* }"
46651
46652  # Input might be given as Windows format, start by converting to
46653  # unix format.
46654  new_path=`$CYGPATH -u "$path"`
46655
46656  # Now try to locate executable using which
46657  new_path=`$WHICH "$new_path" 2> /dev/null`
46658  # bat and cmd files are not always considered executable in cygwin causing which
46659  # to not find them
46660  if test "x$new_path" = x \
46661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46663    new_path=`$CYGPATH -u "$path"`
46664  fi
46665  if test "x$new_path" = x; then
46666    # Oops. Which didn't find the executable.
46667    # The splitting of arguments from the executable at a space might have been incorrect,
46668    # since paths with space are more likely in Windows. Give it another try with the whole
46669    # argument.
46670    path="$complete"
46671    arguments="EOL"
46672    new_path=`$CYGPATH -u "$path"`
46673    new_path=`$WHICH "$new_path" 2> /dev/null`
46674    # bat and cmd files are not always considered executable in cygwin causing which
46675    # to not find them
46676    if test "x$new_path" = x \
46677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46679      new_path=`$CYGPATH -u "$path"`
46680    fi
46681    if test "x$new_path" = x; then
46682      # It's still not found. Now this is an unrecoverable error.
46683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46684$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46685      has_space=`$ECHO "$complete" | $GREP " "`
46686      if test "x$has_space" != x; then
46687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46689      fi
46690      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46691    fi
46692  fi
46693
46694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46697  # "foo.exe" is OK but "foo" is an error.
46698  #
46699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46700  # It is also a way to make sure we got the proper file name for the real test later on.
46701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46702  if test "x$test_shortpath" = x; then
46703    # Short path failed, file does not exist as specified.
46704    # Try adding .exe or .cmd
46705    if test -f "${new_path}.exe"; then
46706      input_to_shortpath="${new_path}.exe"
46707    elif test -f "${new_path}.cmd"; then
46708      input_to_shortpath="${new_path}.cmd"
46709    else
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46711$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46714      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46715    fi
46716  else
46717    input_to_shortpath="$new_path"
46718  fi
46719
46720  # Call helper function which possibly converts this using DOS-style short mode.
46721  # If so, the updated path is stored in $new_path.
46722  new_path="$input_to_shortpath"
46723
46724  input_path="$input_to_shortpath"
46725  # Check if we need to convert this using DOS-style short mode. If the path
46726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46727  # take no chances and rewrite it.
46728  # Note: m4 eats our [], so we need to use [ and ] instead.
46729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46730  if test "x$has_forbidden_chars" != x; then
46731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46735      # Going to short mode and back again did indeed matter. Since short mode is
46736      # case insensitive, let's make it lowercase to improve readability.
46737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46738      # Now convert it back to Unix-style (cygpath)
46739      input_path=`$CYGPATH -u "$shortmode_path"`
46740      new_path="$input_path"
46741    fi
46742  fi
46743
46744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46745  if test "x$test_cygdrive_prefix" = x; then
46746    # As a simple fix, exclude /usr/bin since it's not a real path.
46747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46749      # a path prefixed by /cygdrive for fixpath to work.
46750      new_path="$CYGWIN_ROOT_PATH$input_path"
46751    fi
46752  fi
46753
46754  # remove trailing .exe if any
46755  new_path="${new_path/%.exe/}"
46756
46757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46758
46759  # First separate the path from the arguments. This will split at the first
46760  # space.
46761  complete="$BUILD_AR"
46762  path="${complete%% *}"
46763  tmp="$complete EOL"
46764  arguments="${tmp#* }"
46765
46766  # Input might be given as Windows format, start by converting to
46767  # unix format.
46768  new_path="$path"
46769
46770  windows_path="$new_path"
46771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46772    unix_path=`$CYGPATH -u "$windows_path"`
46773    new_path="$unix_path"
46774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46776    new_path="$unix_path"
46777  fi
46778
46779
46780  # Now try to locate executable using which
46781  new_path=`$WHICH "$new_path" 2> /dev/null`
46782
46783  if test "x$new_path" = x; then
46784    # Oops. Which didn't find the executable.
46785    # The splitting of arguments from the executable at a space might have been incorrect,
46786    # since paths with space are more likely in Windows. Give it another try with the whole
46787    # argument.
46788    path="$complete"
46789    arguments="EOL"
46790    new_path="$path"
46791
46792  windows_path="$new_path"
46793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46794    unix_path=`$CYGPATH -u "$windows_path"`
46795    new_path="$unix_path"
46796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46798    new_path="$unix_path"
46799  fi
46800
46801
46802    new_path=`$WHICH "$new_path" 2> /dev/null`
46803    # bat and cmd files are not always considered executable in MSYS causing which
46804    # to not find them
46805    if test "x$new_path" = x \
46806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46808      new_path="$path"
46809
46810  windows_path="$new_path"
46811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46812    unix_path=`$CYGPATH -u "$windows_path"`
46813    new_path="$unix_path"
46814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46816    new_path="$unix_path"
46817  fi
46818
46819    fi
46820
46821    if test "x$new_path" = x; then
46822      # It's still not found. Now this is an unrecoverable error.
46823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46824$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46825      has_space=`$ECHO "$complete" | $GREP " "`
46826      if test "x$has_space" != x; then
46827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46829      fi
46830      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46831    fi
46832  fi
46833
46834  # Now new_path has a complete unix path to the binary
46835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46836    # Keep paths in /bin as-is, but remove trailing .exe if any
46837    new_path="${new_path/%.exe/}"
46838    # Do not save /bin paths to all_fixpath_prefixes!
46839  else
46840    # Not in mixed or Windows style, start by that.
46841    new_path=`cmd //c echo $new_path`
46842
46843  input_path="$new_path"
46844  # Check if we need to convert this using DOS-style short mode. If the path
46845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46846  # take no chances and rewrite it.
46847  # Note: m4 eats our [], so we need to use [ and ] instead.
46848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46849  if test "x$has_forbidden_chars" != x; then
46850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46852  fi
46853
46854    # Output is in $new_path
46855
46856  windows_path="$new_path"
46857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46858    unix_path=`$CYGPATH -u "$windows_path"`
46859    new_path="$unix_path"
46860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46862    new_path="$unix_path"
46863  fi
46864
46865    # remove trailing .exe if any
46866    new_path="${new_path/%.exe/}"
46867
46868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46870  fi
46871
46872    else
46873      # We're on a unix platform. Hooray! :)
46874      # First separate the path from the arguments. This will split at the first
46875      # space.
46876      complete="$BUILD_AR"
46877      path="${complete%% *}"
46878      tmp="$complete EOL"
46879      arguments="${tmp#* }"
46880
46881      # Cannot rely on the command "which" here since it doesn't always work.
46882      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46883      if test -z "$is_absolute_path"; then
46884        # Path to executable is not absolute. Find it.
46885        IFS_save="$IFS"
46886        IFS=:
46887        for p in $PATH; do
46888          if test -f "$p/$path" && test -x "$p/$path"; then
46889            new_path="$p/$path"
46890            break
46891          fi
46892        done
46893        IFS="$IFS_save"
46894      else
46895        # This is an absolute path, we can use it without further modifications.
46896        new_path="$path"
46897      fi
46898
46899      if test "x$new_path" = x; then
46900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46901$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46902        has_space=`$ECHO "$complete" | $GREP " "`
46903        if test "x$has_space" != x; then
46904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46906        fi
46907        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46908      fi
46909    fi
46910
46911    # Now join together the path and the arguments once again
46912    if test "x$arguments" != xEOL; then
46913      new_complete="$new_path ${arguments% *}"
46914    else
46915      new_complete="$new_path"
46916    fi
46917
46918    if test "x$complete" != "x$new_complete"; then
46919      BUILD_AR="$new_complete"
46920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46921$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46922    fi
46923  fi
46924
46925
46926
46927  # Publish this variable in the help.
46928
46929
46930  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46931    # The variable is not set by user, try to locate tool using the code snippet
46932    for ac_prog in objcopy
46933do
46934  # Extract the first word of "$ac_prog", so it can be a program name with args.
46935set dummy $ac_prog; ac_word=$2
46936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46937$as_echo_n "checking for $ac_word... " >&6; }
46938if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46939  $as_echo_n "(cached) " >&6
46940else
46941  case $BUILD_OBJCOPY in
46942  [\\/]* | ?:[\\/]*)
46943  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46944  ;;
46945  *)
46946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46947for as_dir in $PATH
46948do
46949  IFS=$as_save_IFS
46950  test -z "$as_dir" && as_dir=.
46951    for ac_exec_ext in '' $ac_executable_extensions; do
46952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46953    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46955    break 2
46956  fi
46957done
46958  done
46959IFS=$as_save_IFS
46960
46961  ;;
46962esac
46963fi
46964BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46965if test -n "$BUILD_OBJCOPY"; then
46966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46967$as_echo "$BUILD_OBJCOPY" >&6; }
46968else
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46970$as_echo "no" >&6; }
46971fi
46972
46973
46974  test -n "$BUILD_OBJCOPY" && break
46975done
46976
46977  else
46978    # The variable is set, but is it from the command line or the environment?
46979
46980    # Try to remove the string !BUILD_OBJCOPY! from our list.
46981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46983      # If it failed, the variable was not from the command line. Ignore it,
46984      # but warn the user (except for BASH, which is always set by the calling BASH).
46985      if test "xBUILD_OBJCOPY" != xBASH; then
46986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46987$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46988      fi
46989      # Try to locate tool using the code snippet
46990      for ac_prog in objcopy
46991do
46992  # Extract the first word of "$ac_prog", so it can be a program name with args.
46993set dummy $ac_prog; ac_word=$2
46994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46995$as_echo_n "checking for $ac_word... " >&6; }
46996if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46997  $as_echo_n "(cached) " >&6
46998else
46999  case $BUILD_OBJCOPY in
47000  [\\/]* | ?:[\\/]*)
47001  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47002  ;;
47003  *)
47004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47005for as_dir in $PATH
47006do
47007  IFS=$as_save_IFS
47008  test -z "$as_dir" && as_dir=.
47009    for ac_exec_ext in '' $ac_executable_extensions; do
47010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47011    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47013    break 2
47014  fi
47015done
47016  done
47017IFS=$as_save_IFS
47018
47019  ;;
47020esac
47021fi
47022BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47023if test -n "$BUILD_OBJCOPY"; then
47024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47025$as_echo "$BUILD_OBJCOPY" >&6; }
47026else
47027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47028$as_echo "no" >&6; }
47029fi
47030
47031
47032  test -n "$BUILD_OBJCOPY" && break
47033done
47034
47035    else
47036      # If it succeeded, then it was overridden by the user. We will use it
47037      # for the tool.
47038
47039      # First remove it from the list of overridden variables, so we can test
47040      # for unknown variables in the end.
47041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47042
47043      # Check if we try to supply an empty value
47044      if test "x$BUILD_OBJCOPY" = x; then
47045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47046$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47048$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47050$as_echo "disabled" >&6; }
47051      else
47052        # Check if the provided tool contains a complete path.
47053        tool_specified="$BUILD_OBJCOPY"
47054        tool_basename="${tool_specified##*/}"
47055        if test "x$tool_basename" = "x$tool_specified"; then
47056          # A command without a complete path is provided, search $PATH.
47057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47058$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47059          # Extract the first word of "$tool_basename", so it can be a program name with args.
47060set dummy $tool_basename; ac_word=$2
47061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47062$as_echo_n "checking for $ac_word... " >&6; }
47063if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47064  $as_echo_n "(cached) " >&6
47065else
47066  case $BUILD_OBJCOPY in
47067  [\\/]* | ?:[\\/]*)
47068  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47069  ;;
47070  *)
47071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47072for as_dir in $PATH
47073do
47074  IFS=$as_save_IFS
47075  test -z "$as_dir" && as_dir=.
47076    for ac_exec_ext in '' $ac_executable_extensions; do
47077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47078    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47080    break 2
47081  fi
47082done
47083  done
47084IFS=$as_save_IFS
47085
47086  ;;
47087esac
47088fi
47089BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47090if test -n "$BUILD_OBJCOPY"; then
47091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47092$as_echo "$BUILD_OBJCOPY" >&6; }
47093else
47094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47095$as_echo "no" >&6; }
47096fi
47097
47098
47099          if test "x$BUILD_OBJCOPY" = x; then
47100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47101          fi
47102        else
47103          # Otherwise we believe it is a complete path. Use it as it is.
47104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47105$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47107$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47108          if test ! -x "$tool_specified"; then
47109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47110$as_echo "not found" >&6; }
47111            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47112          fi
47113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47114$as_echo "$tool_specified" >&6; }
47115        fi
47116      fi
47117    fi
47118
47119  fi
47120
47121
47122
47123  # Only process if variable expands to non-empty
47124
47125  if test "x$BUILD_OBJCOPY" != x; then
47126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47127
47128  # First separate the path from the arguments. This will split at the first
47129  # space.
47130  complete="$BUILD_OBJCOPY"
47131  path="${complete%% *}"
47132  tmp="$complete EOL"
47133  arguments="${tmp#* }"
47134
47135  # Input might be given as Windows format, start by converting to
47136  # unix format.
47137  new_path=`$CYGPATH -u "$path"`
47138
47139  # Now try to locate executable using which
47140  new_path=`$WHICH "$new_path" 2> /dev/null`
47141  # bat and cmd files are not always considered executable in cygwin causing which
47142  # to not find them
47143  if test "x$new_path" = x \
47144      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47145      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47146    new_path=`$CYGPATH -u "$path"`
47147  fi
47148  if test "x$new_path" = x; then
47149    # Oops. Which didn't find the executable.
47150    # The splitting of arguments from the executable at a space might have been incorrect,
47151    # since paths with space are more likely in Windows. Give it another try with the whole
47152    # argument.
47153    path="$complete"
47154    arguments="EOL"
47155    new_path=`$CYGPATH -u "$path"`
47156    new_path=`$WHICH "$new_path" 2> /dev/null`
47157    # bat and cmd files are not always considered executable in cygwin causing which
47158    # to not find them
47159    if test "x$new_path" = x \
47160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47162      new_path=`$CYGPATH -u "$path"`
47163    fi
47164    if test "x$new_path" = x; then
47165      # It's still not found. Now this is an unrecoverable error.
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47167$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47168      has_space=`$ECHO "$complete" | $GREP " "`
47169      if test "x$has_space" != x; then
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47172      fi
47173      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47174    fi
47175  fi
47176
47177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47180  # "foo.exe" is OK but "foo" is an error.
47181  #
47182  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47183  # It is also a way to make sure we got the proper file name for the real test later on.
47184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47185  if test "x$test_shortpath" = x; then
47186    # Short path failed, file does not exist as specified.
47187    # Try adding .exe or .cmd
47188    if test -f "${new_path}.exe"; then
47189      input_to_shortpath="${new_path}.exe"
47190    elif test -f "${new_path}.cmd"; then
47191      input_to_shortpath="${new_path}.cmd"
47192    else
47193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47194$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47195      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47196$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47197      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47198    fi
47199  else
47200    input_to_shortpath="$new_path"
47201  fi
47202
47203  # Call helper function which possibly converts this using DOS-style short mode.
47204  # If so, the updated path is stored in $new_path.
47205  new_path="$input_to_shortpath"
47206
47207  input_path="$input_to_shortpath"
47208  # Check if we need to convert this using DOS-style short mode. If the path
47209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47210  # take no chances and rewrite it.
47211  # Note: m4 eats our [], so we need to use [ and ] instead.
47212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47213  if test "x$has_forbidden_chars" != x; then
47214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47218      # Going to short mode and back again did indeed matter. Since short mode is
47219      # case insensitive, let's make it lowercase to improve readability.
47220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47221      # Now convert it back to Unix-style (cygpath)
47222      input_path=`$CYGPATH -u "$shortmode_path"`
47223      new_path="$input_path"
47224    fi
47225  fi
47226
47227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47228  if test "x$test_cygdrive_prefix" = x; then
47229    # As a simple fix, exclude /usr/bin since it's not a real path.
47230    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47232      # a path prefixed by /cygdrive for fixpath to work.
47233      new_path="$CYGWIN_ROOT_PATH$input_path"
47234    fi
47235  fi
47236
47237  # remove trailing .exe if any
47238  new_path="${new_path/%.exe/}"
47239
47240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47241
47242  # First separate the path from the arguments. This will split at the first
47243  # space.
47244  complete="$BUILD_OBJCOPY"
47245  path="${complete%% *}"
47246  tmp="$complete EOL"
47247  arguments="${tmp#* }"
47248
47249  # Input might be given as Windows format, start by converting to
47250  # unix format.
47251  new_path="$path"
47252
47253  windows_path="$new_path"
47254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47255    unix_path=`$CYGPATH -u "$windows_path"`
47256    new_path="$unix_path"
47257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47259    new_path="$unix_path"
47260  fi
47261
47262
47263  # Now try to locate executable using which
47264  new_path=`$WHICH "$new_path" 2> /dev/null`
47265
47266  if test "x$new_path" = x; then
47267    # Oops. Which didn't find the executable.
47268    # The splitting of arguments from the executable at a space might have been incorrect,
47269    # since paths with space are more likely in Windows. Give it another try with the whole
47270    # argument.
47271    path="$complete"
47272    arguments="EOL"
47273    new_path="$path"
47274
47275  windows_path="$new_path"
47276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47277    unix_path=`$CYGPATH -u "$windows_path"`
47278    new_path="$unix_path"
47279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47281    new_path="$unix_path"
47282  fi
47283
47284
47285    new_path=`$WHICH "$new_path" 2> /dev/null`
47286    # bat and cmd files are not always considered executable in MSYS causing which
47287    # to not find them
47288    if test "x$new_path" = x \
47289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47291      new_path="$path"
47292
47293  windows_path="$new_path"
47294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47295    unix_path=`$CYGPATH -u "$windows_path"`
47296    new_path="$unix_path"
47297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47299    new_path="$unix_path"
47300  fi
47301
47302    fi
47303
47304    if test "x$new_path" = x; then
47305      # It's still not found. Now this is an unrecoverable error.
47306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47307$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47308      has_space=`$ECHO "$complete" | $GREP " "`
47309      if test "x$has_space" != x; then
47310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47312      fi
47313      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47314    fi
47315  fi
47316
47317  # Now new_path has a complete unix path to the binary
47318  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47319    # Keep paths in /bin as-is, but remove trailing .exe if any
47320    new_path="${new_path/%.exe/}"
47321    # Do not save /bin paths to all_fixpath_prefixes!
47322  else
47323    # Not in mixed or Windows style, start by that.
47324    new_path=`cmd //c echo $new_path`
47325
47326  input_path="$new_path"
47327  # Check if we need to convert this using DOS-style short mode. If the path
47328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47329  # take no chances and rewrite it.
47330  # Note: m4 eats our [], so we need to use [ and ] instead.
47331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47332  if test "x$has_forbidden_chars" != x; then
47333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47335  fi
47336
47337    # Output is in $new_path
47338
47339  windows_path="$new_path"
47340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47341    unix_path=`$CYGPATH -u "$windows_path"`
47342    new_path="$unix_path"
47343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47345    new_path="$unix_path"
47346  fi
47347
47348    # remove trailing .exe if any
47349    new_path="${new_path/%.exe/}"
47350
47351    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47352    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47353  fi
47354
47355    else
47356      # We're on a unix platform. Hooray! :)
47357      # First separate the path from the arguments. This will split at the first
47358      # space.
47359      complete="$BUILD_OBJCOPY"
47360      path="${complete%% *}"
47361      tmp="$complete EOL"
47362      arguments="${tmp#* }"
47363
47364      # Cannot rely on the command "which" here since it doesn't always work.
47365      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47366      if test -z "$is_absolute_path"; then
47367        # Path to executable is not absolute. Find it.
47368        IFS_save="$IFS"
47369        IFS=:
47370        for p in $PATH; do
47371          if test -f "$p/$path" && test -x "$p/$path"; then
47372            new_path="$p/$path"
47373            break
47374          fi
47375        done
47376        IFS="$IFS_save"
47377      else
47378        # This is an absolute path, we can use it without further modifications.
47379        new_path="$path"
47380      fi
47381
47382      if test "x$new_path" = x; then
47383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47384$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47385        has_space=`$ECHO "$complete" | $GREP " "`
47386        if test "x$has_space" != x; then
47387          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47388$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47389        fi
47390        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47391      fi
47392    fi
47393
47394    # Now join together the path and the arguments once again
47395    if test "x$arguments" != xEOL; then
47396      new_complete="$new_path ${arguments% *}"
47397    else
47398      new_complete="$new_path"
47399    fi
47400
47401    if test "x$complete" != "x$new_complete"; then
47402      BUILD_OBJCOPY="$new_complete"
47403      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47404$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47405    fi
47406  fi
47407
47408
47409
47410  # Publish this variable in the help.
47411
47412
47413  if [ -z "${BUILD_STRIP+x}" ]; then
47414    # The variable is not set by user, try to locate tool using the code snippet
47415    for ac_prog in strip
47416do
47417  # Extract the first word of "$ac_prog", so it can be a program name with args.
47418set dummy $ac_prog; ac_word=$2
47419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47420$as_echo_n "checking for $ac_word... " >&6; }
47421if ${ac_cv_path_BUILD_STRIP+:} false; then :
47422  $as_echo_n "(cached) " >&6
47423else
47424  case $BUILD_STRIP in
47425  [\\/]* | ?:[\\/]*)
47426  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47427  ;;
47428  *)
47429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47430for as_dir in $PATH
47431do
47432  IFS=$as_save_IFS
47433  test -z "$as_dir" && as_dir=.
47434    for ac_exec_ext in '' $ac_executable_extensions; do
47435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47436    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47438    break 2
47439  fi
47440done
47441  done
47442IFS=$as_save_IFS
47443
47444  ;;
47445esac
47446fi
47447BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47448if test -n "$BUILD_STRIP"; then
47449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47450$as_echo "$BUILD_STRIP" >&6; }
47451else
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47453$as_echo "no" >&6; }
47454fi
47455
47456
47457  test -n "$BUILD_STRIP" && break
47458done
47459
47460  else
47461    # The variable is set, but is it from the command line or the environment?
47462
47463    # Try to remove the string !BUILD_STRIP! from our list.
47464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47466      # If it failed, the variable was not from the command line. Ignore it,
47467      # but warn the user (except for BASH, which is always set by the calling BASH).
47468      if test "xBUILD_STRIP" != xBASH; then
47469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47470$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47471      fi
47472      # Try to locate tool using the code snippet
47473      for ac_prog in strip
47474do
47475  # Extract the first word of "$ac_prog", so it can be a program name with args.
47476set dummy $ac_prog; ac_word=$2
47477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47478$as_echo_n "checking for $ac_word... " >&6; }
47479if ${ac_cv_path_BUILD_STRIP+:} false; then :
47480  $as_echo_n "(cached) " >&6
47481else
47482  case $BUILD_STRIP in
47483  [\\/]* | ?:[\\/]*)
47484  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47485  ;;
47486  *)
47487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47488for as_dir in $PATH
47489do
47490  IFS=$as_save_IFS
47491  test -z "$as_dir" && as_dir=.
47492    for ac_exec_ext in '' $ac_executable_extensions; do
47493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47494    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47496    break 2
47497  fi
47498done
47499  done
47500IFS=$as_save_IFS
47501
47502  ;;
47503esac
47504fi
47505BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47506if test -n "$BUILD_STRIP"; then
47507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47508$as_echo "$BUILD_STRIP" >&6; }
47509else
47510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47511$as_echo "no" >&6; }
47512fi
47513
47514
47515  test -n "$BUILD_STRIP" && break
47516done
47517
47518    else
47519      # If it succeeded, then it was overridden by the user. We will use it
47520      # for the tool.
47521
47522      # First remove it from the list of overridden variables, so we can test
47523      # for unknown variables in the end.
47524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47525
47526      # Check if we try to supply an empty value
47527      if test "x$BUILD_STRIP" = x; then
47528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47529$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47531$as_echo_n "checking for BUILD_STRIP... " >&6; }
47532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47533$as_echo "disabled" >&6; }
47534      else
47535        # Check if the provided tool contains a complete path.
47536        tool_specified="$BUILD_STRIP"
47537        tool_basename="${tool_specified##*/}"
47538        if test "x$tool_basename" = "x$tool_specified"; then
47539          # A command without a complete path is provided, search $PATH.
47540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47541$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47542          # Extract the first word of "$tool_basename", so it can be a program name with args.
47543set dummy $tool_basename; ac_word=$2
47544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47545$as_echo_n "checking for $ac_word... " >&6; }
47546if ${ac_cv_path_BUILD_STRIP+:} false; then :
47547  $as_echo_n "(cached) " >&6
47548else
47549  case $BUILD_STRIP in
47550  [\\/]* | ?:[\\/]*)
47551  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47552  ;;
47553  *)
47554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47555for as_dir in $PATH
47556do
47557  IFS=$as_save_IFS
47558  test -z "$as_dir" && as_dir=.
47559    for ac_exec_ext in '' $ac_executable_extensions; do
47560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47561    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47563    break 2
47564  fi
47565done
47566  done
47567IFS=$as_save_IFS
47568
47569  ;;
47570esac
47571fi
47572BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47573if test -n "$BUILD_STRIP"; then
47574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47575$as_echo "$BUILD_STRIP" >&6; }
47576else
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47578$as_echo "no" >&6; }
47579fi
47580
47581
47582          if test "x$BUILD_STRIP" = x; then
47583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47584          fi
47585        else
47586          # Otherwise we believe it is a complete path. Use it as it is.
47587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47588$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47590$as_echo_n "checking for BUILD_STRIP... " >&6; }
47591          if test ! -x "$tool_specified"; then
47592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47593$as_echo "not found" >&6; }
47594            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47595          fi
47596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47597$as_echo "$tool_specified" >&6; }
47598        fi
47599      fi
47600    fi
47601
47602  fi
47603
47604
47605
47606  # Only process if variable expands to non-empty
47607
47608  if test "x$BUILD_STRIP" != x; then
47609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47610
47611  # First separate the path from the arguments. This will split at the first
47612  # space.
47613  complete="$BUILD_STRIP"
47614  path="${complete%% *}"
47615  tmp="$complete EOL"
47616  arguments="${tmp#* }"
47617
47618  # Input might be given as Windows format, start by converting to
47619  # unix format.
47620  new_path=`$CYGPATH -u "$path"`
47621
47622  # Now try to locate executable using which
47623  new_path=`$WHICH "$new_path" 2> /dev/null`
47624  # bat and cmd files are not always considered executable in cygwin causing which
47625  # to not find them
47626  if test "x$new_path" = x \
47627      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47628      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47629    new_path=`$CYGPATH -u "$path"`
47630  fi
47631  if test "x$new_path" = x; then
47632    # Oops. Which didn't find the executable.
47633    # The splitting of arguments from the executable at a space might have been incorrect,
47634    # since paths with space are more likely in Windows. Give it another try with the whole
47635    # argument.
47636    path="$complete"
47637    arguments="EOL"
47638    new_path=`$CYGPATH -u "$path"`
47639    new_path=`$WHICH "$new_path" 2> /dev/null`
47640    # bat and cmd files are not always considered executable in cygwin causing which
47641    # to not find them
47642    if test "x$new_path" = x \
47643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47645      new_path=`$CYGPATH -u "$path"`
47646    fi
47647    if test "x$new_path" = x; then
47648      # It's still not found. Now this is an unrecoverable error.
47649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47650$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47651      has_space=`$ECHO "$complete" | $GREP " "`
47652      if test "x$has_space" != x; then
47653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47655      fi
47656      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47657    fi
47658  fi
47659
47660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47663  # "foo.exe" is OK but "foo" is an error.
47664  #
47665  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47666  # It is also a way to make sure we got the proper file name for the real test later on.
47667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47668  if test "x$test_shortpath" = x; then
47669    # Short path failed, file does not exist as specified.
47670    # Try adding .exe or .cmd
47671    if test -f "${new_path}.exe"; then
47672      input_to_shortpath="${new_path}.exe"
47673    elif test -f "${new_path}.cmd"; then
47674      input_to_shortpath="${new_path}.cmd"
47675    else
47676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47677$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47678      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47679$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47680      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47681    fi
47682  else
47683    input_to_shortpath="$new_path"
47684  fi
47685
47686  # Call helper function which possibly converts this using DOS-style short mode.
47687  # If so, the updated path is stored in $new_path.
47688  new_path="$input_to_shortpath"
47689
47690  input_path="$input_to_shortpath"
47691  # Check if we need to convert this using DOS-style short mode. If the path
47692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47693  # take no chances and rewrite it.
47694  # Note: m4 eats our [], so we need to use [ and ] instead.
47695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47696  if test "x$has_forbidden_chars" != x; then
47697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47701      # Going to short mode and back again did indeed matter. Since short mode is
47702      # case insensitive, let's make it lowercase to improve readability.
47703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47704      # Now convert it back to Unix-style (cygpath)
47705      input_path=`$CYGPATH -u "$shortmode_path"`
47706      new_path="$input_path"
47707    fi
47708  fi
47709
47710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47711  if test "x$test_cygdrive_prefix" = x; then
47712    # As a simple fix, exclude /usr/bin since it's not a real path.
47713    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47715      # a path prefixed by /cygdrive for fixpath to work.
47716      new_path="$CYGWIN_ROOT_PATH$input_path"
47717    fi
47718  fi
47719
47720  # remove trailing .exe if any
47721  new_path="${new_path/%.exe/}"
47722
47723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47724
47725  # First separate the path from the arguments. This will split at the first
47726  # space.
47727  complete="$BUILD_STRIP"
47728  path="${complete%% *}"
47729  tmp="$complete EOL"
47730  arguments="${tmp#* }"
47731
47732  # Input might be given as Windows format, start by converting to
47733  # unix format.
47734  new_path="$path"
47735
47736  windows_path="$new_path"
47737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47738    unix_path=`$CYGPATH -u "$windows_path"`
47739    new_path="$unix_path"
47740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47742    new_path="$unix_path"
47743  fi
47744
47745
47746  # Now try to locate executable using which
47747  new_path=`$WHICH "$new_path" 2> /dev/null`
47748
47749  if test "x$new_path" = x; then
47750    # Oops. Which didn't find the executable.
47751    # The splitting of arguments from the executable at a space might have been incorrect,
47752    # since paths with space are more likely in Windows. Give it another try with the whole
47753    # argument.
47754    path="$complete"
47755    arguments="EOL"
47756    new_path="$path"
47757
47758  windows_path="$new_path"
47759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47760    unix_path=`$CYGPATH -u "$windows_path"`
47761    new_path="$unix_path"
47762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47764    new_path="$unix_path"
47765  fi
47766
47767
47768    new_path=`$WHICH "$new_path" 2> /dev/null`
47769    # bat and cmd files are not always considered executable in MSYS causing which
47770    # to not find them
47771    if test "x$new_path" = x \
47772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47774      new_path="$path"
47775
47776  windows_path="$new_path"
47777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47778    unix_path=`$CYGPATH -u "$windows_path"`
47779    new_path="$unix_path"
47780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47782    new_path="$unix_path"
47783  fi
47784
47785    fi
47786
47787    if test "x$new_path" = x; then
47788      # It's still not found. Now this is an unrecoverable error.
47789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47790$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47791      has_space=`$ECHO "$complete" | $GREP " "`
47792      if test "x$has_space" != x; then
47793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47795      fi
47796      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47797    fi
47798  fi
47799
47800  # Now new_path has a complete unix path to the binary
47801  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47802    # Keep paths in /bin as-is, but remove trailing .exe if any
47803    new_path="${new_path/%.exe/}"
47804    # Do not save /bin paths to all_fixpath_prefixes!
47805  else
47806    # Not in mixed or Windows style, start by that.
47807    new_path=`cmd //c echo $new_path`
47808
47809  input_path="$new_path"
47810  # Check if we need to convert this using DOS-style short mode. If the path
47811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47812  # take no chances and rewrite it.
47813  # Note: m4 eats our [], so we need to use [ and ] instead.
47814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47815  if test "x$has_forbidden_chars" != x; then
47816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47818  fi
47819
47820    # Output is in $new_path
47821
47822  windows_path="$new_path"
47823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47824    unix_path=`$CYGPATH -u "$windows_path"`
47825    new_path="$unix_path"
47826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47828    new_path="$unix_path"
47829  fi
47830
47831    # remove trailing .exe if any
47832    new_path="${new_path/%.exe/}"
47833
47834    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47835    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47836  fi
47837
47838    else
47839      # We're on a unix platform. Hooray! :)
47840      # First separate the path from the arguments. This will split at the first
47841      # space.
47842      complete="$BUILD_STRIP"
47843      path="${complete%% *}"
47844      tmp="$complete EOL"
47845      arguments="${tmp#* }"
47846
47847      # Cannot rely on the command "which" here since it doesn't always work.
47848      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47849      if test -z "$is_absolute_path"; then
47850        # Path to executable is not absolute. Find it.
47851        IFS_save="$IFS"
47852        IFS=:
47853        for p in $PATH; do
47854          if test -f "$p/$path" && test -x "$p/$path"; then
47855            new_path="$p/$path"
47856            break
47857          fi
47858        done
47859        IFS="$IFS_save"
47860      else
47861        # This is an absolute path, we can use it without further modifications.
47862        new_path="$path"
47863      fi
47864
47865      if test "x$new_path" = x; then
47866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47867$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47868        has_space=`$ECHO "$complete" | $GREP " "`
47869        if test "x$has_space" != x; then
47870          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47872        fi
47873        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47874      fi
47875    fi
47876
47877    # Now join together the path and the arguments once again
47878    if test "x$arguments" != xEOL; then
47879      new_complete="$new_path ${arguments% *}"
47880    else
47881      new_complete="$new_path"
47882    fi
47883
47884    if test "x$complete" != "x$new_complete"; then
47885      BUILD_STRIP="$new_complete"
47886      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47887$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47888    fi
47889  fi
47890
47891    # Assume the C compiler is the assembler
47892    BUILD_AS="$BUILD_CC -c"
47893    # Just like for the target compiler, use the compiler as linker
47894    BUILD_LD="$BUILD_CC"
47895    BUILD_LDCXX="$BUILD_CXX"
47896
47897    PATH="$OLDPATH"
47898
47899
47900  COMPILER=$BUILD_CC
47901  COMPILER_NAME=BuildC
47902
47903  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47904    # cc -V output typically looks like
47905    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47906    # or
47907    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47908    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47909    # Check that this is likely to be the Solaris Studio cc.
47910    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47911    if test $? -ne 0; then
47912      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47913      { $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
47914$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47916$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47917      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47918$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47919      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47920    fi
47921    # Remove usage instructions (if present), and
47922    # collapse compiler output into a single line
47923    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47924        $SED -e 's/ *[Uu]sage:.*//'`
47925    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47926        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47927  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47928    # xlc -qversion output typically looks like
47929    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47930    #     Version: 11.01.0000.0015
47931    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47932    # Check that this is likely to be the IBM XL C compiler.
47933    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47934    if test $? -ne 0; then
47935      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47936      { $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
47937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47939$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47941$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47943    fi
47944    # Collapse compiler output into a single line
47945    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47947        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47948  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47949    # There is no specific version flag, but all output starts with a version string.
47950    # First line typically looks something like:
47951    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47952    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47953    # Check that this is likely to be Microsoft CL.EXE.
47954    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47955    if test $? -ne 0; then
47956      { $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
47957$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47958      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47959$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47960      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47961    fi
47962    # Collapse compiler output into a single line
47963    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47964    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47965        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47966  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47967    # gcc --version output typically looks like
47968    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47969    #     Copyright (C) 2013 Free Software Foundation, Inc.
47970    #     This is free software; see the source for copying conditions.  There is NO
47971    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47972    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47973    # Check that this is likely to be GCC.
47974    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47975    if test $? -ne 0; then
47976      { $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
47977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47979$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47980      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47981    fi
47982    # Remove Copyright and legalese from version string, and
47983    # collapse into a single line
47984    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47985        $SED -e 's/ *Copyright .*//'`
47986    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47987        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47988  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47989    # clang --version output typically looks like
47990    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47991    #    clang version 3.3 (tags/RELEASE_33/final)
47992    # or
47993    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47994    #    Target: x86_64-pc-linux-gnu
47995    #    Thread model: posix
47996    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47997    # Check that this is likely to be clang
47998    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47999    if test $? -ne 0; then
48000      { $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
48001$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48002      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48003$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48004      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48005    fi
48006    # Collapse compiler output into a single line
48007    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48008    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48009        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48010  else
48011      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48012  fi
48013  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48014  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48015  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48016  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48017
48018  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48019$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48020
48021
48022  COMPILER=$BUILD_CXX
48023  COMPILER_NAME=BuildC++
48024
48025  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48026    # cc -V output typically looks like
48027    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48028    # or
48029    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48030    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48031    # Check that this is likely to be the Solaris Studio cc.
48032    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48033    if test $? -ne 0; then
48034      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48035      { $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
48036$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48037      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48038$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48039      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48040$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48041      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48042    fi
48043    # Remove usage instructions (if present), and
48044    # collapse compiler output into a single line
48045    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48046        $SED -e 's/ *[Uu]sage:.*//'`
48047    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48048        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48049  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48050    # xlc -qversion output typically looks like
48051    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48052    #     Version: 11.01.0000.0015
48053    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48054    # Check that this is likely to be the IBM XL C compiler.
48055    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48056    if test $? -ne 0; then
48057      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48058      { $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
48059$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48060      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48061$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48063$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48064      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48065    fi
48066    # Collapse compiler output into a single line
48067    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48068    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48069        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48070  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48071    # There is no specific version flag, but all output starts with a version string.
48072    # First line typically looks something like:
48073    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48074    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48075    # Check that this is likely to be Microsoft CL.EXE.
48076    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48077    if test $? -ne 0; then
48078      { $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
48079$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48081$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48083    fi
48084    # Collapse compiler output into a single line
48085    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48086    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48087        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48088  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48089    # gcc --version output typically looks like
48090    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48091    #     Copyright (C) 2013 Free Software Foundation, Inc.
48092    #     This is free software; see the source for copying conditions.  There is NO
48093    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48094    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48095    # Check that this is likely to be GCC.
48096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48097    if test $? -ne 0; then
48098      { $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
48099$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48101$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48103    fi
48104    # Remove Copyright and legalese from version string, and
48105    # collapse into a single line
48106    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48107        $SED -e 's/ *Copyright .*//'`
48108    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48109        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48110  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48111    # clang --version output typically looks like
48112    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48113    #    clang version 3.3 (tags/RELEASE_33/final)
48114    # or
48115    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48116    #    Target: x86_64-pc-linux-gnu
48117    #    Thread model: posix
48118    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48119    # Check that this is likely to be clang
48120    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48121    if test $? -ne 0; then
48122      { $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
48123$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48124      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48125$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48126      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48127    fi
48128    # Collapse compiler output into a single line
48129    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48130    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48131        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48132  else
48133      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48134  fi
48135  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48136  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48137  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48138  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48139
48140  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48141$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48142
48143
48144  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
48146$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48148$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48149  fi
48150
48151  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48152  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48154$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48155  fi
48156
48157  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48159$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48160  fi
48161
48162  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48163
48164  else
48165    # If we are not cross compiling, use the normal target compilers for
48166    # building the build platform executables.
48167    BUILD_CC="$CC"
48168    BUILD_CXX="$CXX"
48169    BUILD_LD="$LD"
48170    BUILD_LDCXX="$LDCXX"
48171    BUILD_NM="$NM"
48172    BUILD_AS="$AS"
48173    BUILD_OBJCOPY="$OBJCOPY"
48174    BUILD_STRIP="$STRIP"
48175    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48176    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48177    BUILD_AR="$AR"
48178
48179
48180  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48181    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48182$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48184$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48185  fi
48186
48187  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48188  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48190$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48191  fi
48192
48193  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48194    { $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
48195$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48196  fi
48197
48198  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48199
48200  fi
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215  # The package path is used only on macosx?
48216  # FIXME: clean this up, and/or move it elsewhere.
48217  PACKAGE_PATH=/opt/local
48218
48219
48220  # Check for extra potential brokenness.
48221  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48222    # On Windows, double-check that we got the right compiler.
48223    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48224    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48225    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48226      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48227        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
48228      fi
48229    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48230      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48231        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48232      fi
48233    fi
48234  fi
48235
48236  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48237    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48238    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48239    # This is later checked when setting flags.
48240
48241    # "-Og" suppported for GCC 4.8 and later
48242    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290    # Execute function body
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339    # Execute function body
48340
48341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48342$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48343  supports=yes
48344
48345  saved_cflags="$CFLAGS"
48346  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48347  ac_ext=c
48348ac_cpp='$CPP $CPPFLAGS'
48349ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48350ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48351ac_compiler_gnu=$ac_cv_c_compiler_gnu
48352
48353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48354/* end confdefs.h.  */
48355int i;
48356_ACEOF
48357if ac_fn_c_try_compile "$LINENO"; then :
48358
48359else
48360  supports=no
48361fi
48362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48363  ac_ext=cpp
48364ac_cpp='$CXXCPP $CPPFLAGS'
48365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48368
48369  CFLAGS="$saved_cflags"
48370
48371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48372$as_echo "$supports" >&6; }
48373  if test "x$supports" = "xyes" ; then
48374    :
48375    C_COMP_SUPPORTS="yes"
48376  else
48377    :
48378    C_COMP_SUPPORTS="no"
48379  fi
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439    # Execute function body
48440
48441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48442$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48443  supports=yes
48444
48445  saved_cxxflags="$CXXFLAGS"
48446  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48447  ac_ext=cpp
48448ac_cpp='$CXXCPP $CPPFLAGS'
48449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48452
48453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48454/* end confdefs.h.  */
48455int i;
48456_ACEOF
48457if ac_fn_cxx_try_compile "$LINENO"; then :
48458
48459else
48460  supports=no
48461fi
48462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48463  ac_ext=cpp
48464ac_cpp='$CXXCPP $CPPFLAGS'
48465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48468
48469  CXXFLAGS="$saved_cxxflags"
48470
48471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48472$as_echo "$supports" >&6; }
48473  if test "x$supports" = "xyes" ; then
48474    :
48475    CXX_COMP_SUPPORTS="yes"
48476  else
48477    :
48478    CXX_COMP_SUPPORTS="no"
48479  fi
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48494$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48495  supports=no
48496  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48497
48498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48499$as_echo "$supports" >&6; }
48500  if test "x$supports" = "xyes" ; then
48501    :
48502    HAS_CFLAG_OPTIMIZE_DEBUG=true
48503  else
48504    :
48505    HAS_CFLAG_OPTIMIZE_DEBUG=false
48506  fi
48507
48508
48509
48510
48511
48512
48513
48514    # "-z relro" supported in GNU binutils 2.17 and later
48515    LINKER_RELRO_FLAG="-Wl,-z,relro"
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563    # Execute function body
48564
48565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48566$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48567  supports=yes
48568
48569  saved_ldflags="$LDFLAGS"
48570  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48571  ac_ext=c
48572ac_cpp='$CPP $CPPFLAGS'
48573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48575ac_compiler_gnu=$ac_cv_c_compiler_gnu
48576
48577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48578/* end confdefs.h.  */
48579
48580int
48581main ()
48582{
48583
48584  ;
48585  return 0;
48586}
48587_ACEOF
48588if ac_fn_c_try_link "$LINENO"; then :
48589
48590else
48591  supports=no
48592fi
48593rm -f core conftest.err conftest.$ac_objext \
48594    conftest$ac_exeext conftest.$ac_ext
48595  ac_ext=cpp
48596ac_cpp='$CXXCPP $CPPFLAGS'
48597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48600
48601  LDFLAGS="$saved_ldflags"
48602
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48604$as_echo "$supports" >&6; }
48605  if test "x$supports" = "xyes" ; then
48606    :
48607    HAS_LINKER_RELRO=true
48608  else
48609    :
48610    HAS_LINKER_RELRO=false
48611  fi
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625    # "-z now" supported in GNU binutils 2.11 and later
48626    LINKER_NOW_FLAG="-Wl,-z,now"
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
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674    # Execute function body
48675
48676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48677$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48678  supports=yes
48679
48680  saved_ldflags="$LDFLAGS"
48681  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48682  ac_ext=c
48683ac_cpp='$CPP $CPPFLAGS'
48684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48686ac_compiler_gnu=$ac_cv_c_compiler_gnu
48687
48688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48689/* end confdefs.h.  */
48690
48691int
48692main ()
48693{
48694
48695  ;
48696  return 0;
48697}
48698_ACEOF
48699if ac_fn_c_try_link "$LINENO"; then :
48700
48701else
48702  supports=no
48703fi
48704rm -f core conftest.err conftest.$ac_objext \
48705    conftest$ac_exeext conftest.$ac_ext
48706  ac_ext=cpp
48707ac_cpp='$CXXCPP $CPPFLAGS'
48708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48711
48712  LDFLAGS="$saved_ldflags"
48713
48714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48715$as_echo "$supports" >&6; }
48716  if test "x$supports" = "xyes" ; then
48717    :
48718    HAS_LINKER_NOW=true
48719  else
48720    :
48721    HAS_LINKER_NOW=false
48722  fi
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735  fi
48736
48737  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48738  # in executable.'
48739  USING_BROKEN_SUSE_LD=no
48740  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48742$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48743    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48744    $ECHO "int main() { }" > main.c
48745    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48747$as_echo "no" >&6; }
48748      USING_BROKEN_SUSE_LD=no
48749    else
48750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48751$as_echo "yes" >&6; }
48752      USING_BROKEN_SUSE_LD=yes
48753    fi
48754    $RM version-script.map main.c a.out
48755  fi
48756
48757
48758  # Setup hotspot lecagy names for toolchains
48759  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48760  if test "x$TOOLCHAIN_TYPE" = xclang; then
48761    HOTSPOT_TOOLCHAIN_TYPE=gcc
48762  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48763    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48764  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48765    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48766  fi
48767
48768
48769
48770# Setup the JTReg Regression Test Harness.
48771
48772
48773# Check whether --with-jtreg was given.
48774if test "${with_jtreg+set}" = set; then :
48775  withval=$with_jtreg;
48776else
48777  with_jtreg=no
48778fi
48779
48780
48781  if test "x$with_jtreg" = xno; then
48782    # jtreg disabled
48783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48784$as_echo_n "checking for jtreg... " >&6; }
48785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48786$as_echo "no" >&6; }
48787  else
48788    if test "x$with_jtreg" != xyes; then
48789      # with path specified.
48790      JT_HOME="$with_jtreg"
48791    fi
48792
48793    if test "x$JT_HOME" != x; then
48794      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48795$as_echo_n "checking for jtreg... " >&6; }
48796
48797      # use JT_HOME enviroment var.
48798
48799  # Only process if variable expands to non-empty
48800
48801  if test "x$JT_HOME" != x; then
48802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48803
48804  # Input might be given as Windows format, start by converting to
48805  # unix format.
48806  path="$JT_HOME"
48807  new_path=`$CYGPATH -u "$path"`
48808
48809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48812  # "foo.exe" is OK but "foo" is an error.
48813  #
48814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48815  # It is also a way to make sure we got the proper file name for the real test later on.
48816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48817  if test "x$test_shortpath" = x; then
48818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48819$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48820    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48821  fi
48822
48823  # Call helper function which possibly converts this using DOS-style short mode.
48824  # If so, the updated path is stored in $new_path.
48825
48826  input_path="$new_path"
48827  # Check if we need to convert this using DOS-style short mode. If the path
48828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48829  # take no chances and rewrite it.
48830  # Note: m4 eats our [], so we need to use [ and ] instead.
48831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48832  if test "x$has_forbidden_chars" != x; then
48833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48837      # Going to short mode and back again did indeed matter. Since short mode is
48838      # case insensitive, let's make it lowercase to improve readability.
48839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48840      # Now convert it back to Unix-style (cygpath)
48841      input_path=`$CYGPATH -u "$shortmode_path"`
48842      new_path="$input_path"
48843    fi
48844  fi
48845
48846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48847  if test "x$test_cygdrive_prefix" = x; then
48848    # As a simple fix, exclude /usr/bin since it's not a real path.
48849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48851      # a path prefixed by /cygdrive for fixpath to work.
48852      new_path="$CYGWIN_ROOT_PATH$input_path"
48853    fi
48854  fi
48855
48856
48857  if test "x$path" != "x$new_path"; then
48858    JT_HOME="$new_path"
48859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48860$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48861  fi
48862
48863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48864
48865  path="$JT_HOME"
48866  has_colon=`$ECHO $path | $GREP ^.:`
48867  new_path="$path"
48868  if test "x$has_colon" = x; then
48869    # Not in mixed or Windows style, start by that.
48870    new_path=`cmd //c echo $path`
48871  fi
48872
48873
48874  input_path="$new_path"
48875  # Check if we need to convert this using DOS-style short mode. If the path
48876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48877  # take no chances and rewrite it.
48878  # Note: m4 eats our [], so we need to use [ and ] instead.
48879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48880  if test "x$has_forbidden_chars" != x; then
48881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48883  fi
48884
48885
48886  windows_path="$new_path"
48887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48888    unix_path=`$CYGPATH -u "$windows_path"`
48889    new_path="$unix_path"
48890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48892    new_path="$unix_path"
48893  fi
48894
48895  if test "x$path" != "x$new_path"; then
48896    JT_HOME="$new_path"
48897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48898$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48899  fi
48900
48901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48903
48904    else
48905      # We're on a unix platform. Hooray! :)
48906      path="$JT_HOME"
48907      has_space=`$ECHO "$path" | $GREP " "`
48908      if test "x$has_space" != x; then
48909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48910$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48912      fi
48913
48914      # Use eval to expand a potential ~
48915      eval path="$path"
48916      if test ! -f "$path" && test ! -d "$path"; then
48917        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48918      fi
48919
48920      if test -d "$path"; then
48921        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48922      else
48923        dir="`$DIRNAME "$path"`"
48924        base="`$BASENAME "$path"`"
48925        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48926      fi
48927    fi
48928  fi
48929
48930
48931      # jtreg win32 script works for everybody
48932      JTREGEXE="$JT_HOME/bin/jtreg"
48933
48934      if test ! -f "$JTREGEXE"; then
48935        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48936      fi
48937
48938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48939$as_echo "$JTREGEXE" >&6; }
48940    else
48941      # try to find jtreg on path
48942
48943
48944
48945  # Publish this variable in the help.
48946
48947
48948  if [ -z "${JTREGEXE+x}" ]; then
48949    # The variable is not set by user, try to locate tool using the code snippet
48950    for ac_prog in jtreg
48951do
48952  # Extract the first word of "$ac_prog", so it can be a program name with args.
48953set dummy $ac_prog; ac_word=$2
48954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48955$as_echo_n "checking for $ac_word... " >&6; }
48956if ${ac_cv_path_JTREGEXE+:} false; then :
48957  $as_echo_n "(cached) " >&6
48958else
48959  case $JTREGEXE in
48960  [\\/]* | ?:[\\/]*)
48961  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48962  ;;
48963  *)
48964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48965for as_dir in $PATH
48966do
48967  IFS=$as_save_IFS
48968  test -z "$as_dir" && as_dir=.
48969    for ac_exec_ext in '' $ac_executable_extensions; do
48970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48971    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48973    break 2
48974  fi
48975done
48976  done
48977IFS=$as_save_IFS
48978
48979  ;;
48980esac
48981fi
48982JTREGEXE=$ac_cv_path_JTREGEXE
48983if test -n "$JTREGEXE"; then
48984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48985$as_echo "$JTREGEXE" >&6; }
48986else
48987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48988$as_echo "no" >&6; }
48989fi
48990
48991
48992  test -n "$JTREGEXE" && break
48993done
48994
48995  else
48996    # The variable is set, but is it from the command line or the environment?
48997
48998    # Try to remove the string !JTREGEXE! from our list.
48999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
49000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49001      # If it failed, the variable was not from the command line. Ignore it,
49002      # but warn the user (except for BASH, which is always set by the calling BASH).
49003      if test "xJTREGEXE" != xBASH; then
49004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49005$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49006      fi
49007      # Try to locate tool using the code snippet
49008      for ac_prog in jtreg
49009do
49010  # Extract the first word of "$ac_prog", so it can be a program name with args.
49011set dummy $ac_prog; ac_word=$2
49012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49013$as_echo_n "checking for $ac_word... " >&6; }
49014if ${ac_cv_path_JTREGEXE+:} false; then :
49015  $as_echo_n "(cached) " >&6
49016else
49017  case $JTREGEXE in
49018  [\\/]* | ?:[\\/]*)
49019  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49020  ;;
49021  *)
49022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49023for as_dir in $PATH
49024do
49025  IFS=$as_save_IFS
49026  test -z "$as_dir" && as_dir=.
49027    for ac_exec_ext in '' $ac_executable_extensions; do
49028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49029    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49031    break 2
49032  fi
49033done
49034  done
49035IFS=$as_save_IFS
49036
49037  ;;
49038esac
49039fi
49040JTREGEXE=$ac_cv_path_JTREGEXE
49041if test -n "$JTREGEXE"; then
49042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49043$as_echo "$JTREGEXE" >&6; }
49044else
49045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49046$as_echo "no" >&6; }
49047fi
49048
49049
49050  test -n "$JTREGEXE" && break
49051done
49052
49053    else
49054      # If it succeeded, then it was overridden by the user. We will use it
49055      # for the tool.
49056
49057      # First remove it from the list of overridden variables, so we can test
49058      # for unknown variables in the end.
49059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49060
49061      # Check if we try to supply an empty value
49062      if test "x$JTREGEXE" = x; then
49063        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49064$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49066$as_echo_n "checking for JTREGEXE... " >&6; }
49067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49068$as_echo "disabled" >&6; }
49069      else
49070        # Check if the provided tool contains a complete path.
49071        tool_specified="$JTREGEXE"
49072        tool_basename="${tool_specified##*/}"
49073        if test "x$tool_basename" = "x$tool_specified"; then
49074          # A command without a complete path is provided, search $PATH.
49075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49076$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49077          # Extract the first word of "$tool_basename", so it can be a program name with args.
49078set dummy $tool_basename; ac_word=$2
49079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49080$as_echo_n "checking for $ac_word... " >&6; }
49081if ${ac_cv_path_JTREGEXE+:} false; then :
49082  $as_echo_n "(cached) " >&6
49083else
49084  case $JTREGEXE in
49085  [\\/]* | ?:[\\/]*)
49086  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49087  ;;
49088  *)
49089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49090for as_dir in $PATH
49091do
49092  IFS=$as_save_IFS
49093  test -z "$as_dir" && as_dir=.
49094    for ac_exec_ext in '' $ac_executable_extensions; do
49095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49096    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49098    break 2
49099  fi
49100done
49101  done
49102IFS=$as_save_IFS
49103
49104  ;;
49105esac
49106fi
49107JTREGEXE=$ac_cv_path_JTREGEXE
49108if test -n "$JTREGEXE"; then
49109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49110$as_echo "$JTREGEXE" >&6; }
49111else
49112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49113$as_echo "no" >&6; }
49114fi
49115
49116
49117          if test "x$JTREGEXE" = x; then
49118            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49119          fi
49120        else
49121          # Otherwise we believe it is a complete path. Use it as it is.
49122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49123$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49124          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49125$as_echo_n "checking for JTREGEXE... " >&6; }
49126          if test ! -x "$tool_specified"; then
49127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49128$as_echo "not found" >&6; }
49129            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49130          fi
49131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49132$as_echo "$tool_specified" >&6; }
49133        fi
49134      fi
49135    fi
49136
49137  fi
49138
49139
49140
49141  if test "x$JTREGEXE" = x; then
49142    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
49143  fi
49144
49145
49146      JT_HOME="`$DIRNAME $JTREGEXE`"
49147    fi
49148  fi
49149
49150
49151
49152
49153
49154# Setup Jib dependency tool
49155
49156
49157# Check whether --with-jib was given.
49158if test "${with_jib+set}" = set; then :
49159  withval=$with_jib;
49160fi
49161
49162
49163  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49164    # jib disabled
49165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49166$as_echo_n "checking for jib... " >&6; }
49167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49168$as_echo "no" >&6; }
49169  elif test "x$with_jib" = xyes; then
49170    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49171  else
49172    JIB_HOME="${with_jib}"
49173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49174$as_echo_n "checking for jib... " >&6; }
49175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49176$as_echo "${JIB_HOME}" >&6; }
49177    if test ! -d "${JIB_HOME}"; then
49178      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49179    fi
49180    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49181    if test ! -f "${JIB_JAR}"; then
49182      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49183    fi
49184  fi
49185
49186
49187
49188
49189
49190  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49191  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49192  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49193  #                              commands produced by the link step (currently AIX only)
49194  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49195    COMPILER_TARGET_BITS_FLAG="-q"
49196    COMPILER_COMMAND_FILE_FLAG="-f"
49197    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49198  else
49199    COMPILER_TARGET_BITS_FLAG="-m"
49200    COMPILER_COMMAND_FILE_FLAG="@"
49201    COMPILER_BINDCMD_FILE_FLAG=""
49202
49203    # The solstudio linker does not support @-files.
49204    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49205      COMPILER_COMMAND_FILE_FLAG=
49206    fi
49207
49208    # Check if @file is supported by gcc
49209    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49210      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49211$as_echo_n "checking if @file is supported by gcc... " >&6; }
49212      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49213      $ECHO "" "--version" > command.file
49214      if $CXX @command.file 2>&5 >&5; then
49215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49216$as_echo "yes" >&6; }
49217        COMPILER_COMMAND_FILE_FLAG="@"
49218      else
49219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49220$as_echo "no" >&6; }
49221        COMPILER_COMMAND_FILE_FLAG=
49222      fi
49223      $RM command.file
49224    fi
49225  fi
49226
49227
49228
49229
49230  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49231  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49232    ARFLAGS="-r"
49233  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49234    ARFLAGS="-X64"
49235  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49236    # lib.exe is used as AR to create static libraries.
49237    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49238  else
49239    ARFLAGS=""
49240  fi
49241
49242
49243  ## Setup strip.
49244  # FIXME: should this really be per platform, or should it be per toolchain type?
49245  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49246  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49247  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49248    STRIPFLAGS="-g"
49249  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49250    STRIPFLAGS="-x"
49251  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49252    STRIPFLAGS="-S"
49253  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49254    STRIPFLAGS="-X32_64"
49255  fi
49256
49257
49258
49259  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49260    CC_OUT_OPTION=-Fo
49261    EXE_OUT_OPTION=-out:
49262    LD_OUT_OPTION=-out:
49263    AR_OUT_OPTION=-out:
49264  else
49265    # The option used to specify the target .o,.a or .so file.
49266    # When compiling, how to specify the to be created object file.
49267    CC_OUT_OPTION='-o$(SPACE)'
49268    # When linking, how to specify the to be created executable.
49269    EXE_OUT_OPTION='-o$(SPACE)'
49270    # When linking, how to specify the to be created dynamically linkable library.
49271    LD_OUT_OPTION='-o$(SPACE)'
49272    # When archiving, how to specify the to be create static archive for object files.
49273    AR_OUT_OPTION='rcs$(SPACE)'
49274  fi
49275
49276
49277
49278
49279
49280  # On Windows, we need to set RC flags.
49281  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49282    RC_FLAGS="-nologo -l0x409"
49283    JVM_RCFLAGS="-nologo"
49284    if test "x$DEBUG_LEVEL" = xrelease; then
49285      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49286      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49287    fi
49288
49289    # The version variables used to create RC_FLAGS may be overridden
49290    # in a custom configure script, or possibly the command line.
49291    # Let those variables be expanded at make time in spec.gmk.
49292    # The \$ are escaped to the shell, and the $(...) variables
49293    # are evaluated by make.
49294    RC_FLAGS="$RC_FLAGS \
49295        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49296        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49297        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49298        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49299        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49300        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49301        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49302
49303    JVM_RCFLAGS="$JVM_RCFLAGS \
49304        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49305        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49306        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49307        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49308        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49309        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49310        -D\"HS_FNAME=jvm.dll\" \
49311        -D\"HS_INTERNAL_NAME=jvm\""
49312  fi
49313
49314
49315
49316  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49317    # silence copyright notice and other headers.
49318    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49319  fi
49320
49321
49322# Now we can test some aspects on the target using configure macros.
49323
49324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49325$as_echo_n "checking for ANSI C header files... " >&6; }
49326if ${ac_cv_header_stdc+:} false; then :
49327  $as_echo_n "(cached) " >&6
49328else
49329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49330/* end confdefs.h.  */
49331#include <stdlib.h>
49332#include <stdarg.h>
49333#include <string.h>
49334#include <float.h>
49335
49336int
49337main ()
49338{
49339
49340  ;
49341  return 0;
49342}
49343_ACEOF
49344if ac_fn_cxx_try_compile "$LINENO"; then :
49345  ac_cv_header_stdc=yes
49346else
49347  ac_cv_header_stdc=no
49348fi
49349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49350
49351if test $ac_cv_header_stdc = yes; then
49352  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49354/* end confdefs.h.  */
49355#include <string.h>
49356
49357_ACEOF
49358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49359  $EGREP "memchr" >/dev/null 2>&1; then :
49360
49361else
49362  ac_cv_header_stdc=no
49363fi
49364rm -f conftest*
49365
49366fi
49367
49368if test $ac_cv_header_stdc = yes; then
49369  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49371/* end confdefs.h.  */
49372#include <stdlib.h>
49373
49374_ACEOF
49375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49376  $EGREP "free" >/dev/null 2>&1; then :
49377
49378else
49379  ac_cv_header_stdc=no
49380fi
49381rm -f conftest*
49382
49383fi
49384
49385if test $ac_cv_header_stdc = yes; then
49386  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49387  if test "$cross_compiling" = yes; then :
49388  :
49389else
49390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49391/* end confdefs.h.  */
49392#include <ctype.h>
49393#include <stdlib.h>
49394#if ((' ' & 0x0FF) == 0x020)
49395# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49396# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49397#else
49398# define ISLOWER(c) \
49399		   (('a' <= (c) && (c) <= 'i') \
49400		     || ('j' <= (c) && (c) <= 'r') \
49401		     || ('s' <= (c) && (c) <= 'z'))
49402# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49403#endif
49404
49405#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49406int
49407main ()
49408{
49409  int i;
49410  for (i = 0; i < 256; i++)
49411    if (XOR (islower (i), ISLOWER (i))
49412	|| toupper (i) != TOUPPER (i))
49413      return 2;
49414  return 0;
49415}
49416_ACEOF
49417if ac_fn_cxx_try_run "$LINENO"; then :
49418
49419else
49420  ac_cv_header_stdc=no
49421fi
49422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49423  conftest.$ac_objext conftest.beam conftest.$ac_ext
49424fi
49425
49426fi
49427fi
49428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49429$as_echo "$ac_cv_header_stdc" >&6; }
49430if test $ac_cv_header_stdc = yes; then
49431
49432$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49433
49434fi
49435
49436# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49437for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49438		  inttypes.h stdint.h unistd.h
49439do :
49440  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49441ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49442"
49443if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49444  cat >>confdefs.h <<_ACEOF
49445#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49446_ACEOF
49447
49448fi
49449
49450done
49451
49452
49453
49454  ###############################################################################
49455  #
49456  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49457  # (The JVM can use 32 or 64 bit Java pointers but that decision
49458  # is made at runtime.)
49459  #
49460
49461  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49462    # Always specify -m flag on Solaris
49463    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49464
49465  # When we add flags to the "official" CFLAGS etc, we need to
49466  # keep track of these additions in ADDED_CFLAGS etc. These
49467  # will later be checked to make sure only controlled additions
49468  # have been made to CFLAGS etc.
49469  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49470  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49471  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49472
49473  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49474  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49475  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49476
49477  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49478  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49479  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49480
49481  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49482  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49483  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49484
49485  elif test "x$COMPILE_TYPE" = xreduced; then
49486    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49487      # Specify -m if running reduced on unix platforms
49488
49489  # When we add flags to the "official" CFLAGS etc, we need to
49490  # keep track of these additions in ADDED_CFLAGS etc. These
49491  # will later be checked to make sure only controlled additions
49492  # have been made to CFLAGS etc.
49493  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49494  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49495  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49496
49497  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49498  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49499  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49500
49501  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49502  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49503  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49504
49505  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49506  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49507  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49508
49509    fi
49510  fi
49511  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49512    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49513    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49514    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49515  fi
49516
49517  # Make compilation sanity check
49518  for ac_header in stdio.h
49519do :
49520  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49521if test "x$ac_cv_header_stdio_h" = xyes; then :
49522  cat >>confdefs.h <<_ACEOF
49523#define HAVE_STDIO_H 1
49524_ACEOF
49525
49526else
49527
49528    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49529$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49530    if test "x$COMPILE_TYPE" = xreduced; then
49531
49532  # Print a helpful message on how to acquire the necessary build dependency.
49533  # reduced is the help tag: freetype, cups, alsa etc
49534  MISSING_DEPENDENCY=reduced
49535
49536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49537    cygwin_help $MISSING_DEPENDENCY
49538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49539    msys_help $MISSING_DEPENDENCY
49540  else
49541    PKGHANDLER_COMMAND=
49542
49543    case $PKGHANDLER in
49544      apt-get)
49545        apt_help     $MISSING_DEPENDENCY ;;
49546      yum)
49547        yum_help     $MISSING_DEPENDENCY ;;
49548      brew)
49549        brew_help    $MISSING_DEPENDENCY ;;
49550      port)
49551        port_help    $MISSING_DEPENDENCY ;;
49552      pkgutil)
49553        pkgutil_help $MISSING_DEPENDENCY ;;
49554      pkgadd)
49555        pkgadd_help  $MISSING_DEPENDENCY ;;
49556    esac
49557
49558    if test "x$PKGHANDLER_COMMAND" != x; then
49559      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49560    fi
49561  fi
49562
49563      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49564$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49565    elif test "x$COMPILE_TYPE" = xcross; then
49566      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49567$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49568    fi
49569    as_fn_error $? "Cannot continue." "$LINENO" 5
49570
49571fi
49572
49573done
49574
49575
49576  # The cast to long int works around a bug in the HP C Compiler
49577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49579# This bug is HP SR number 8606223364.
49580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49581$as_echo_n "checking size of int *... " >&6; }
49582if ${ac_cv_sizeof_int_p+:} false; then :
49583  $as_echo_n "(cached) " >&6
49584else
49585  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49586
49587else
49588  if test "$ac_cv_type_int_p" = yes; then
49589     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49591as_fn_error 77 "cannot compute sizeof (int *)
49592See \`config.log' for more details" "$LINENO" 5; }
49593   else
49594     ac_cv_sizeof_int_p=0
49595   fi
49596fi
49597
49598fi
49599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49600$as_echo "$ac_cv_sizeof_int_p" >&6; }
49601
49602
49603
49604cat >>confdefs.h <<_ACEOF
49605#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49606_ACEOF
49607
49608
49609
49610  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49611  if test "x$ac_cv_sizeof_int_p" = x; then
49612    # The test failed, lets stick to the assumed value.
49613    { $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
49614$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49615  else
49616    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49617
49618    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49619      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49620      # Let's try to implicitely set the compilers target architecture and retry the test
49621      { $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
49622$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;}
49623      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49624$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49625
49626  # When we add flags to the "official" CFLAGS etc, we need to
49627  # keep track of these additions in ADDED_CFLAGS etc. These
49628  # will later be checked to make sure only controlled additions
49629  # have been made to CFLAGS etc.
49630  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49631  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49632  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49633
49634  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49635  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49636  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49637
49638  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49639  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49640  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49641
49642  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49643  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49644  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49645
49646
49647      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49648      unset ac_cv_sizeof_int_p
49649      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49650      cat >>confdefs.h <<_ACEOF
49651#undef SIZEOF_INT_P
49652_ACEOF
49653
49654      # The cast to long int works around a bug in the HP C Compiler
49655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49657# This bug is HP SR number 8606223364.
49658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49659$as_echo_n "checking size of int *... " >&6; }
49660if ${ac_cv_sizeof_int_p+:} false; then :
49661  $as_echo_n "(cached) " >&6
49662else
49663  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49664
49665else
49666  if test "$ac_cv_type_int_p" = yes; then
49667     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49669as_fn_error 77 "cannot compute sizeof (int *)
49670See \`config.log' for more details" "$LINENO" 5; }
49671   else
49672     ac_cv_sizeof_int_p=0
49673   fi
49674fi
49675
49676fi
49677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49678$as_echo "$ac_cv_sizeof_int_p" >&6; }
49679
49680
49681
49682cat >>confdefs.h <<_ACEOF
49683#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49684_ACEOF
49685
49686
49687
49688      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49689
49690      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49691        { $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
49692$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;}
49693        if test "x$COMPILE_TYPE" = xreduced; then
49694
49695  # Print a helpful message on how to acquire the necessary build dependency.
49696  # reduced is the help tag: freetype, cups, alsa etc
49697  MISSING_DEPENDENCY=reduced
49698
49699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49700    cygwin_help $MISSING_DEPENDENCY
49701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49702    msys_help $MISSING_DEPENDENCY
49703  else
49704    PKGHANDLER_COMMAND=
49705
49706    case $PKGHANDLER in
49707      apt-get)
49708        apt_help     $MISSING_DEPENDENCY ;;
49709      yum)
49710        yum_help     $MISSING_DEPENDENCY ;;
49711      brew)
49712        brew_help    $MISSING_DEPENDENCY ;;
49713      port)
49714        port_help    $MISSING_DEPENDENCY ;;
49715      pkgutil)
49716        pkgutil_help $MISSING_DEPENDENCY ;;
49717      pkgadd)
49718        pkgadd_help  $MISSING_DEPENDENCY ;;
49719    esac
49720
49721    if test "x$PKGHANDLER_COMMAND" != x; then
49722      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49723    fi
49724  fi
49725
49726          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49727$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49728        elif test "x$COMPILE_TYPE" = xcross; then
49729          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49730$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49731        fi
49732        as_fn_error $? "Cannot continue." "$LINENO" 5
49733      fi
49734    fi
49735  fi
49736
49737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49738$as_echo_n "checking for target address size... " >&6; }
49739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49740$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49741
49742
49743  ###############################################################################
49744  #
49745  # Is the target little of big endian?
49746  #
49747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49748$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49749if ${ac_cv_c_bigendian+:} false; then :
49750  $as_echo_n "(cached) " >&6
49751else
49752  ac_cv_c_bigendian=unknown
49753    # See if we're dealing with a universal compiler.
49754    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49755/* end confdefs.h.  */
49756#ifndef __APPLE_CC__
49757	       not a universal capable compiler
49758	     #endif
49759	     typedef int dummy;
49760
49761_ACEOF
49762if ac_fn_cxx_try_compile "$LINENO"; then :
49763
49764	# Check for potential -arch flags.  It is not universal unless
49765	# there are at least two -arch flags with different values.
49766	ac_arch=
49767	ac_prev=
49768	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49769	 if test -n "$ac_prev"; then
49770	   case $ac_word in
49771	     i?86 | x86_64 | ppc | ppc64)
49772	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49773		 ac_arch=$ac_word
49774	       else
49775		 ac_cv_c_bigendian=universal
49776		 break
49777	       fi
49778	       ;;
49779	   esac
49780	   ac_prev=
49781	 elif test "x$ac_word" = "x-arch"; then
49782	   ac_prev=arch
49783	 fi
49784       done
49785fi
49786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49787    if test $ac_cv_c_bigendian = unknown; then
49788      # See if sys/param.h defines the BYTE_ORDER macro.
49789      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49790/* end confdefs.h.  */
49791#include <sys/types.h>
49792	     #include <sys/param.h>
49793
49794int
49795main ()
49796{
49797#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49798		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49799		     && LITTLE_ENDIAN)
49800	      bogus endian macros
49801	     #endif
49802
49803  ;
49804  return 0;
49805}
49806_ACEOF
49807if ac_fn_cxx_try_compile "$LINENO"; then :
49808  # It does; now see whether it defined to BIG_ENDIAN or not.
49809	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49810/* end confdefs.h.  */
49811#include <sys/types.h>
49812		#include <sys/param.h>
49813
49814int
49815main ()
49816{
49817#if BYTE_ORDER != BIG_ENDIAN
49818		 not big endian
49819		#endif
49820
49821  ;
49822  return 0;
49823}
49824_ACEOF
49825if ac_fn_cxx_try_compile "$LINENO"; then :
49826  ac_cv_c_bigendian=yes
49827else
49828  ac_cv_c_bigendian=no
49829fi
49830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49831fi
49832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49833    fi
49834    if test $ac_cv_c_bigendian = unknown; then
49835      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49836      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49837/* end confdefs.h.  */
49838#include <limits.h>
49839
49840int
49841main ()
49842{
49843#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49844	      bogus endian macros
49845	     #endif
49846
49847  ;
49848  return 0;
49849}
49850_ACEOF
49851if ac_fn_cxx_try_compile "$LINENO"; then :
49852  # It does; now see whether it defined to _BIG_ENDIAN or not.
49853	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49854/* end confdefs.h.  */
49855#include <limits.h>
49856
49857int
49858main ()
49859{
49860#ifndef _BIG_ENDIAN
49861		 not big endian
49862		#endif
49863
49864  ;
49865  return 0;
49866}
49867_ACEOF
49868if ac_fn_cxx_try_compile "$LINENO"; then :
49869  ac_cv_c_bigendian=yes
49870else
49871  ac_cv_c_bigendian=no
49872fi
49873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49874fi
49875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49876    fi
49877    if test $ac_cv_c_bigendian = unknown; then
49878      # Compile a test program.
49879      if test "$cross_compiling" = yes; then :
49880  # Try to guess by grepping values from an object file.
49881	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49882/* end confdefs.h.  */
49883short int ascii_mm[] =
49884		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49885		short int ascii_ii[] =
49886		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49887		int use_ascii (int i) {
49888		  return ascii_mm[i] + ascii_ii[i];
49889		}
49890		short int ebcdic_ii[] =
49891		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49892		short int ebcdic_mm[] =
49893		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49894		int use_ebcdic (int i) {
49895		  return ebcdic_mm[i] + ebcdic_ii[i];
49896		}
49897		extern int foo;
49898
49899int
49900main ()
49901{
49902return use_ascii (foo) == use_ebcdic (foo);
49903  ;
49904  return 0;
49905}
49906_ACEOF
49907if ac_fn_cxx_try_compile "$LINENO"; then :
49908  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49909	      ac_cv_c_bigendian=yes
49910	    fi
49911	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49912	      if test "$ac_cv_c_bigendian" = unknown; then
49913		ac_cv_c_bigendian=no
49914	      else
49915		# finding both strings is unlikely to happen, but who knows?
49916		ac_cv_c_bigendian=unknown
49917	      fi
49918	    fi
49919fi
49920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49921else
49922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49923/* end confdefs.h.  */
49924$ac_includes_default
49925int
49926main ()
49927{
49928
49929	     /* Are we little or big endian?  From Harbison&Steele.  */
49930	     union
49931	     {
49932	       long int l;
49933	       char c[sizeof (long int)];
49934	     } u;
49935	     u.l = 1;
49936	     return u.c[sizeof (long int) - 1] == 1;
49937
49938  ;
49939  return 0;
49940}
49941_ACEOF
49942if ac_fn_cxx_try_run "$LINENO"; then :
49943  ac_cv_c_bigendian=no
49944else
49945  ac_cv_c_bigendian=yes
49946fi
49947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49948  conftest.$ac_objext conftest.beam conftest.$ac_ext
49949fi
49950
49951    fi
49952fi
49953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49954$as_echo "$ac_cv_c_bigendian" >&6; }
49955 case $ac_cv_c_bigendian in #(
49956   yes)
49957     ENDIAN="big";; #(
49958   no)
49959     ENDIAN="little" ;; #(
49960   universal)
49961     ENDIAN="universal_endianness"
49962     ;; #(
49963   *)
49964     ENDIAN="unknown" ;;
49965 esac
49966
49967
49968  if test "x$ENDIAN" = xuniversal_endianness; then
49969    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49970  fi
49971  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49972    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
49973  fi
49974
49975
49976# Configure flags for the tools
49977
49978  ###############################################################################
49979  #
49980  # How to compile shared libraries.
49981  #
49982
49983  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49984    PICFLAG="-fPIC"
49985    C_FLAG_REORDER=''
49986    CXX_FLAG_REORDER=''
49987
49988    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49989      # Linking is different on MacOSX
49990      if test "x$STATIC_BUILD" = xtrue; then
49991        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49992      else
49993        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49994        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49995      fi
49996      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49997      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49998      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49999      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50000    else
50001      # Default works for linux, might work on other platforms as well.
50002      SHARED_LIBRARY_FLAGS='-shared'
50003      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50004      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50005      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50006      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50007    fi
50008  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50009    C_FLAG_REORDER=''
50010    CXX_FLAG_REORDER=''
50011
50012    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50013      # Linking is different on MacOSX
50014      PICFLAG=''
50015      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50016      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50017      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50018      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50019      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50020
50021      if test "x$STATIC_BUILD" = xfalse; then
50022        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50023      fi
50024    else
50025      # Default works for linux, might work on other platforms as well.
50026      PICFLAG='-fPIC'
50027      SHARED_LIBRARY_FLAGS='-shared'
50028      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50029      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50030      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50031
50032      # arm specific settings
50033      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50034        # '-Wl,-z,origin' isn't used on arm.
50035        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50036      else
50037        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50038      fi
50039
50040    fi
50041  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50042    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50043      PICFLAG="-xcode=pic32"
50044    else
50045      PICFLAG="-KPIC"
50046    fi
50047    C_FLAG_REORDER='-xF'
50048    CXX_FLAG_REORDER='-xF'
50049    SHARED_LIBRARY_FLAGS="-G"
50050    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50051    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50052    SET_SHARED_LIBRARY_NAME='-h $1'
50053    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50054  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50055    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50056    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50057    # will have to patch this single instruction with a call to some out-of-order code which
50058    # does the load from the TOC. This is of course slow. But in that case we also would have
50059    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50060    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50061    # can be patched directly by the linker and does not require a jump to out-of-order code.
50062    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50063    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50064    # loads for accessing a global variable). But there are rumors that this may be seen as a
50065    # 'performance feature' because of improved code locality of the symbols used in a
50066    # compilation unit.
50067    PICFLAG="-qpic"
50068    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50069    C_FLAG_REORDER=''
50070    CXX_FLAG_REORDER=''
50071    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50072    SET_EXECUTABLE_ORIGIN=""
50073    SET_SHARED_LIBRARY_ORIGIN=''
50074    SET_SHARED_LIBRARY_NAME=''
50075    SET_SHARED_LIBRARY_MAPFILE=''
50076  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50077    PICFLAG=""
50078    C_FLAG_REORDER=''
50079    CXX_FLAG_REORDER=''
50080    SHARED_LIBRARY_FLAGS="-dll"
50081    SET_EXECUTABLE_ORIGIN=''
50082    SET_SHARED_LIBRARY_ORIGIN=''
50083    SET_SHARED_LIBRARY_NAME=''
50084    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50085  fi
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095  # The (cross) compiler is now configured, we can now test capabilities
50096  # of the target platform.
50097
50098
50099
50100  ###############################################################################
50101  #
50102  # Setup the opt flags for different compilers
50103  # and different operating systems.
50104  #
50105
50106  # FIXME: this was indirectly the old default, but just inherited.
50107  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50108  #   C_FLAG_DEPS="-MMD -MF"
50109  # fi
50110
50111  # Generate make dependency files
50112  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50113    C_FLAG_DEPS="-MMD -MF"
50114  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50115    C_FLAG_DEPS="-MMD -MF"
50116  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50117    C_FLAG_DEPS="-xMMD -xMF"
50118  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50119    C_FLAG_DEPS="-qmakedep=gcc -MF"
50120  fi
50121  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50122
50123
50124
50125  # Debug symbols
50126  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50127    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50128      # reduce from default "-g2" option to save space
50129      CFLAGS_DEBUG_SYMBOLS="-g1"
50130      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50131    else
50132      CFLAGS_DEBUG_SYMBOLS="-g"
50133      CXXFLAGS_DEBUG_SYMBOLS="-g"
50134    fi
50135  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50136    CFLAGS_DEBUG_SYMBOLS="-g"
50137    CXXFLAGS_DEBUG_SYMBOLS="-g"
50138  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50139    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50140    # -g0 enables debug symbols without disabling inlining.
50141    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50142  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50143    CFLAGS_DEBUG_SYMBOLS="-g"
50144    CXXFLAGS_DEBUG_SYMBOLS="-g"
50145  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50146    CFLAGS_DEBUG_SYMBOLS="-Zi"
50147    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50148  fi
50149
50150
50151
50152  # Debug symbols for JVM_CFLAGS
50153  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50154    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50155    if test "x$DEBUG_LEVEL" = xslowdebug; then
50156      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50157    else
50158      # -g0 does not disable inlining, which -g does.
50159      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50160    fi
50161  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50162    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50163  else
50164    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50165  fi
50166
50167
50168  # bounds, memory and behavior checking options
50169  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50170    case $DEBUG_LEVEL in
50171    release )
50172      # no adjustment
50173      ;;
50174    fastdebug )
50175      # no adjustment
50176      ;;
50177    slowdebug )
50178      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50179      # get's added conditionally on whether we produce debug symbols or not.
50180      # This is most likely not really correct.
50181
50182      # Add runtime stack smashing and undefined behavior checks.
50183      # Not all versions of gcc support -fstack-protector
50184      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
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    # Execute function body
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276    # Execute function body
50277
50278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50279$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50280  supports=yes
50281
50282  saved_cflags="$CFLAGS"
50283  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50284  ac_ext=c
50285ac_cpp='$CPP $CPPFLAGS'
50286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50288ac_compiler_gnu=$ac_cv_c_compiler_gnu
50289
50290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50291/* end confdefs.h.  */
50292int i;
50293_ACEOF
50294if ac_fn_c_try_compile "$LINENO"; then :
50295
50296else
50297  supports=no
50298fi
50299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50300  ac_ext=cpp
50301ac_cpp='$CXXCPP $CPPFLAGS'
50302ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50303ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50304ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50305
50306  CFLAGS="$saved_cflags"
50307
50308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50309$as_echo "$supports" >&6; }
50310  if test "x$supports" = "xyes" ; then
50311    :
50312    C_COMP_SUPPORTS="yes"
50313  else
50314    :
50315    C_COMP_SUPPORTS="no"
50316  fi
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376    # Execute function body
50377
50378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50379$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50380  supports=yes
50381
50382  saved_cxxflags="$CXXFLAGS"
50383  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50384  ac_ext=cpp
50385ac_cpp='$CXXCPP $CPPFLAGS'
50386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50389
50390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50391/* end confdefs.h.  */
50392int i;
50393_ACEOF
50394if ac_fn_cxx_try_compile "$LINENO"; then :
50395
50396else
50397  supports=no
50398fi
50399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50400  ac_ext=cpp
50401ac_cpp='$CXXCPP $CPPFLAGS'
50402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50405
50406  CXXFLAGS="$saved_cxxflags"
50407
50408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50409$as_echo "$supports" >&6; }
50410  if test "x$supports" = "xyes" ; then
50411    :
50412    CXX_COMP_SUPPORTS="yes"
50413  else
50414    :
50415    CXX_COMP_SUPPORTS="no"
50416  fi
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50431$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50432  supports=no
50433  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50434
50435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50436$as_echo "$supports" >&6; }
50437  if test "x$supports" = "xyes" ; then
50438    :
50439
50440  else
50441    :
50442    STACK_PROTECTOR_CFLAG=""
50443  fi
50444
50445
50446
50447
50448
50449
50450
50451      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50452      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50453      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50454        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50455      fi
50456      ;;
50457    esac
50458  fi
50459
50460  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50461    if test "x$DEBUG_LEVEL" != xrelease; then
50462      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50463        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50464      fi
50465    fi
50466  fi
50467
50468  # Optimization levels
50469  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50470    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50471
50472    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50473      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50474      C_O_FLAG_HIGHEST_JVM="-xO4"
50475      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50476      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50477      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50478      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50479      C_O_FLAG_DEBUG_JVM=""
50480      C_O_FLAG_NONE="-xregs=no%frameptr"
50481      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50482      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50483      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50484      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50485      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50486      CXX_O_FLAG_DEBUG_JVM=""
50487      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50488      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50489        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50490        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50491      fi
50492    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50493      C_O_FLAG_HIGHEST_JVM="-xO4"
50494      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50495      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50496      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50497      C_O_FLAG_DEBUG=""
50498      C_O_FLAG_DEBUG_JVM=""
50499      C_O_FLAG_NONE=""
50500      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50501      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50502      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50503      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50504      CXX_O_FLAG_DEBUG=""
50505      CXX_O_FLAG_DEBUG_JVM=""
50506      CXX_O_FLAG_NONE=""
50507    fi
50508  else
50509    # The remaining toolchains share opt flags between CC and CXX;
50510    # setup for C and duplicate afterwards.
50511    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50512      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50513        # On MacOSX we optimize for size, something
50514        # we should do for all platforms?
50515        C_O_FLAG_HIGHEST_JVM="-Os"
50516        C_O_FLAG_HIGHEST="-Os"
50517        C_O_FLAG_HI="-Os"
50518        C_O_FLAG_NORM="-Os"
50519        C_O_FLAG_SIZE="-Os"
50520      else
50521        C_O_FLAG_HIGHEST_JVM="-O3"
50522        C_O_FLAG_HIGHEST="-O3"
50523        C_O_FLAG_HI="-O3"
50524        C_O_FLAG_NORM="-O2"
50525        C_O_FLAG_SIZE="-Os"
50526      fi
50527      C_O_FLAG_DEBUG="-O0"
50528      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50529        C_O_FLAG_DEBUG_JVM=""
50530      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50531        C_O_FLAG_DEBUG_JVM="-O0"
50532      fi
50533      C_O_FLAG_NONE="-O0"
50534    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50535      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50536        # On MacOSX we optimize for size, something
50537        # we should do for all platforms?
50538        C_O_FLAG_HIGHEST_JVM="-Os"
50539        C_O_FLAG_HIGHEST="-Os"
50540        C_O_FLAG_HI="-Os"
50541        C_O_FLAG_NORM="-Os"
50542        C_O_FLAG_SIZE="-Os"
50543      else
50544        C_O_FLAG_HIGHEST_JVM="-O3"
50545        C_O_FLAG_HIGHEST="-O3"
50546        C_O_FLAG_HI="-O3"
50547        C_O_FLAG_NORM="-O2"
50548        C_O_FLAG_SIZE="-Os"
50549      fi
50550      C_O_FLAG_DEBUG="-O0"
50551      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50552        C_O_FLAG_DEBUG_JVM=""
50553      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50554        C_O_FLAG_DEBUG_JVM="-O0"
50555      fi
50556      C_O_FLAG_NONE="-O0"
50557    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50558      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50559      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50560      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50561      C_O_FLAG_NORM="-O2"
50562      C_O_FLAG_DEBUG="-qnoopt"
50563      # FIXME: Value below not verified.
50564      C_O_FLAG_DEBUG_JVM=""
50565      C_O_FLAG_NONE="-qnoopt"
50566    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50567      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50568      C_O_FLAG_HIGHEST="-O2"
50569      C_O_FLAG_HI="-O1"
50570      C_O_FLAG_NORM="-O1"
50571      C_O_FLAG_DEBUG="-Od"
50572      C_O_FLAG_DEBUG_JVM=""
50573      C_O_FLAG_NONE="-Od"
50574      C_O_FLAG_SIZE="-Os"
50575    fi
50576    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50577    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50578    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50579    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50580    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50581    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50582    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50583    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50584  fi
50585
50586  # Adjust optimization flags according to debug level.
50587  case $DEBUG_LEVEL in
50588    release )
50589      # no adjustment
50590      ;;
50591    fastdebug )
50592      # Not quite so much optimization
50593      C_O_FLAG_HI="$C_O_FLAG_NORM"
50594      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50595      ;;
50596    slowdebug )
50597      # Disable optimization
50598      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50599      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50600      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50601      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50602      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50603      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50604      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50605      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50606      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50607      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50608      ;;
50609  esac
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630# Check whether --with-abi-profile was given.
50631if test "${with_abi_profile+set}" = set; then :
50632  withval=$with_abi_profile;
50633fi
50634
50635
50636  if test "x$with_abi_profile" != x; then
50637    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50638        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50639      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50640    fi
50641
50642    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50644$as_echo_n "checking for ABI profle... " >&6; }
50645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50646$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50647
50648    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50649      ARM_FLOAT_TYPE=vfp-sflt
50650      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50651    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50652      ARM_FLOAT_TYPE=vfp-hflt
50653      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50654    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50655      ARM_FLOAT_TYPE=sflt
50656      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50657    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50658      ARM_FLOAT_TYPE=vfp-sflt
50659      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50660    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50661      ARM_FLOAT_TYPE=vfp-hflt
50662      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50663    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50664      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50665      ARM_FLOAT_TYPE=
50666      ARM_ARCH_TYPE_FLAGS=
50667    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50668      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50669      ARM_FLOAT_TYPE=
50670      ARM_ARCH_TYPE_FLAGS=
50671    else
50672      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50673    fi
50674
50675    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50676      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50677    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50678      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50679    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50680      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50681    fi
50682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50683$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50685$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50686
50687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50688$as_echo_n "checking for arch type flags... " >&6; }
50689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50690$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50691
50692    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50693    # autoconf target triplet.
50694     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50695    # Sanity check that it is a known ABI.
50696    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50697        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50698        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50699          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50700$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50701    fi
50702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50703$as_echo_n "checking for ABI property name... " >&6; }
50704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50705$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50706
50707
50708    # Pass these on to the open part of configure as if they were set using
50709    # --with-extra-c[xx]flags.
50710    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50711    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50712    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50713    # FIXME: This should not really be set using extra_cflags.
50714    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50715        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50716        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50717    fi
50718    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50719    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50720    # And pass the architecture flags to the linker as well
50721    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50722  fi
50723
50724  # When building with an abi profile, the name of that profile is appended on the
50725  # bundle platform, which is used in bundle names.
50726  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50727    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50728  fi
50729
50730
50731  # Special extras...
50732  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50733    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50734      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50735      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50736    fi
50737    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50738    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50739  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50740    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50741    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50742  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50743    CXXSTD_CXXFLAG="-std=gnu++98"
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786    # Execute function body
50787
50788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50789$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50790  supports=yes
50791
50792  saved_cxxflags="$CXXFLAGS"
50793  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50794  ac_ext=cpp
50795ac_cpp='$CXXCPP $CPPFLAGS'
50796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50799
50800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50801/* end confdefs.h.  */
50802int i;
50803_ACEOF
50804if ac_fn_cxx_try_compile "$LINENO"; then :
50805
50806else
50807  supports=no
50808fi
50809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50810  ac_ext=cpp
50811ac_cpp='$CXXCPP $CPPFLAGS'
50812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50815
50816  CXXFLAGS="$saved_cxxflags"
50817
50818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50819$as_echo "$supports" >&6; }
50820  if test "x$supports" = "xyes" ; then
50821    :
50822
50823  else
50824    :
50825    CXXSTD_CXXFLAG=""
50826  fi
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50840    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50841
50842  fi
50843  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50844    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50845    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50846  fi
50847
50848  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50849  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50850  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50851
50852  ###############################################################################
50853  #
50854  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50855  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50856  #
50857
50858  # Setup compiler/platform specific flags into
50859  #    CFLAGS_JDK    - C Compiler flags
50860  #    CXXFLAGS_JDK  - C++ Compiler flags
50861  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50862  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50863    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50864    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50865    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50866    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50867      # Force compatibility with i586 on 32 bit intel platforms.
50868      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50869      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50870    fi
50871    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50872        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50873    case $OPENJDK_TARGET_CPU_ARCH in
50874      arm )
50875        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50876        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50877        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50878        ;;
50879      ppc )
50880        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50881        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50882        ;;
50883      s390 )
50884        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50885        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50886        ;;
50887      * )
50888        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50889        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50890        ;;
50891    esac
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946    # Execute function body
50947
50948  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50949  REFERENCE_VERSION=6
50950
50951  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50952    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50953  fi
50954
50955  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50956    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50957  fi
50958
50959  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50960  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50961
50962  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50963    :
50964
50965  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50966  # runs afoul of the more aggressive versions of these optimisations.
50967  # Notably, value range propagation now assumes that the this pointer of C++
50968  # member functions is non-null.
50969  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50970        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50971        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50972$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50973  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50974  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50975
50976  else
50977    :
50978
50979  fi
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50995    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50996
50997    # Restrict the debug information created by Clang to avoid
50998    # too big object files and speed the build up a little bit
50999    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51000    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51001    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51002      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51003        # Force compatibility with i586 on 32 bit intel platforms.
51004        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51005        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51006      fi
51007      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51008      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51009          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51010      case $OPENJDK_TARGET_CPU_ARCH in
51011        ppc )
51012          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51013          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51014          ;;
51015        * )
51016          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51017          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51018          ;;
51019      esac
51020    fi
51021  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51022    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51023    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51024    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51025      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51026    fi
51027
51028    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51029    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51030  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51031    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51032    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51033    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51034  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51035    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51036        -MD -Zc:wchar_t- -W3 -wd4800 \
51037        -DWIN32_LEAN_AND_MEAN \
51038        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51039        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51040        -DWIN32 -DIAL"
51041    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51042      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51043    else
51044      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51045    fi
51046    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51047    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51048    # studio.
51049    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51050      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51051      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51052      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51053    fi
51054  fi
51055
51056  ###############################################################################
51057
51058  # Adjust flags according to debug level.
51059  case $DEBUG_LEVEL in
51060    fastdebug | slowdebug )
51061      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51062      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51063      ;;
51064    release )
51065      ;;
51066    * )
51067      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51068      ;;
51069  esac
51070
51071  # Set some common defines. These works for all compilers, but assume
51072  # -D is universally accepted.
51073
51074  # Setup endianness
51075  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51076    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51077    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51078    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51079    #   Note: -Dmacro         is the same as    #define macro 1
51080    #         -Dmacro=        is the same as    #define macro
51081    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51082      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51083    else
51084      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51085    fi
51086  else
51087    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51088    # are defined in the system?
51089    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51090      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51091    else
51092      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51093    fi
51094  fi
51095
51096  # Setup target OS define. Use OS target name but in upper case.
51097  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51098  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51099
51100  # Setup target CPU
51101  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51102      $OPENJDK_TARGET_ADD_LP64 \
51103      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51104
51105  # Setup debug/release defines
51106  if test "x$DEBUG_LEVEL" = xrelease; then
51107    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51108    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51109      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51110    fi
51111  else
51112    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51113  fi
51114
51115  # Set some additional per-OS defines.
51116  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51117    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51118    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51119        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51120  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51121    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51122    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51123        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51124  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51125    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51126    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51127    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51128    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51129        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51130        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51131        -fno-omit-frame-pointer"
51132  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51133    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51134    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51135    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51136        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51137        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51138  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51139    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51140  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51141    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51142    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51143  fi
51144
51145  # Set some additional per-CPU defines.
51146  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51147    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51148  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51149    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51150  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51151    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51152      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51153      # fixes `relocation truncated to fit' error for gcc 4.1.
51154      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51155      # Use ppc64 instructions, but schedule for power5
51156      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51157    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51158      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51159    fi
51160  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51161    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51162      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51163      # Little endian machine uses ELFv2 ABI.
51164      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51165      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51166      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51167    fi
51168  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51169    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51170      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51171    fi
51172  fi
51173
51174  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51175    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51176  fi
51177
51178  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51179    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51180      # Solaris does not have _LP64=1 in the old build.
51181      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51182      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51183    fi
51184  fi
51185
51186  # Set JVM_CFLAGS warning handling
51187  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51188    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51189        -Wunused-value -Woverloaded-virtual"
51190
51191    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246    # Execute function body
51247
51248  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51249  REFERENCE_VERSION=4.8
51250
51251  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51252    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51253  fi
51254
51255  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51256    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51257  fi
51258
51259  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51260  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51261
51262  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51263    :
51264
51265            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51266            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51267
51268
51269  else
51270    :
51271
51272  fi
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287    fi
51288    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51289      # Non-zero builds have stricter warnings
51290      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51291    else
51292      if test "x$TOOLCHAIN_TYPE" = xclang; then
51293        # Some versions of llvm do not like -Wundef
51294        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51295      fi
51296    fi
51297  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51298    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51299        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51300  fi
51301
51302  # Additional macosx handling
51303  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51304    # Setting these parameters makes it an error to link to macosx APIs that are
51305    # newer than the given OS version and makes the linked binaries compatible
51306    # even if built on a newer version of the OS.
51307    # The expected format is X.Y.Z
51308    MACOSX_VERSION_MIN=10.7.0
51309
51310
51311    # The macro takes the version with no dots, ex: 1070
51312    # Let the flags variables get resolved in make for easier override on make
51313    # command line.
51314    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51315    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51316  fi
51317
51318  # Setup some hard coded includes
51319  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51320      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51321      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51322      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51323      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51324      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51325      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51326
51327  # The shared libraries are compiled using the picflag.
51328  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51329      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51330  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51331      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51332
51333  # Executable flags
51334  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51335  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51336
51337
51338
51339
51340
51341
51342  # Setup LDFLAGS et al.
51343  #
51344
51345  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51346    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51347    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51348    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51349    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51350      LDFLAGS_SAFESH="-safeseh"
51351      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51352      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51353      # NOTE: Old build added -machine. Probably not needed.
51354      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51355    else
51356      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51357    fi
51358  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51359      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51360      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51361        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51362        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51363    fi
51364  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51365    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51366    # We have previously set HAS_GNU_HASH if this is the case
51367    if test -n "$HAS_GNU_HASH"; then
51368      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51369      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51370      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51371    fi
51372      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51373        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51374    fi
51375    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51376      # And since we now know that the linker is gnu, then add -z defs, to forbid
51377      # undefined symbols in object files.
51378      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51379      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51380      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51381      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51382      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51383      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51384        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51385      fi
51386      case $DEBUG_LEVEL in
51387        release )
51388          # tell linker to optimize libraries.
51389          # Should this be supplied to the OSS linker as well?
51390          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51391          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51392          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51393          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51394            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51395          fi
51396          ;;
51397        slowdebug )
51398          # Hotspot always let the linker optimize
51399          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51400          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51401            # do relocations at load
51402            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51403            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51404            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51405          fi
51406          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51407            # mark relocations read only
51408            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51409            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51410            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51411          fi
51412          ;;
51413        fastdebug )
51414          # Hotspot always let the linker optimize
51415          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51416          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51417            # mark relocations read only
51418            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51419            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51420            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51421          fi
51422          ;;
51423        * )
51424          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51425          ;;
51426        esac
51427    fi
51428  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51429    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51430    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51431    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51432    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51433    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51434    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51435      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51436    fi
51437  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51438    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51439    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51440    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51441  fi
51442
51443  # Customize LDFLAGS for executables
51444
51445  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51446
51447  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51448    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51449      LDFLAGS_STACK_SIZE=1048576
51450    else
51451      LDFLAGS_STACK_SIZE=327680
51452    fi
51453    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51454  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51455    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51456  fi
51457
51458  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51459
51460  # Customize LDFLAGS for libs
51461  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51462
51463  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51464  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51465    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51466        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51467    JDKLIB_LIBS=""
51468  else
51469    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51470        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51471
51472    if test "xTARGET" = "xTARGET"; then
51473      # On some platforms (mac) the linker warns about non existing -L dirs.
51474      # For any of the variants server, client or minimal, the dir matches the
51475      # variant name. The "main" variant should be used for linking. For the
51476      # rest, the dir is just server.
51477      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51478          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51479        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51480            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51481      else
51482        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51483            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51484      fi
51485    elif test "xTARGET" = "xBUILD"; then
51486      # When building a buildjdk, it's always only the server variant
51487      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51488          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51489    fi
51490
51491    JDKLIB_LIBS="-ljava -ljvm"
51492    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51493      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51494    fi
51495
51496  fi
51497
51498LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51499
51500  # Set JVM_LIBS (per os)
51501  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51502    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51503  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51504    # FIXME: This hard-coded path is not really proper.
51505    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51506      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51507    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51508      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51509    fi
51510    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51511        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51512  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51513    JVM_LIBS="$JVM_LIBS -lm"
51514  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51515    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51516  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51517    JVM_LIBS="$JVM_LIBS -lm"
51518  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51519    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51520        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51521        wsock32.lib winmm.lib version.lib psapi.lib"
51522    fi
51523
51524  # Set JVM_ASFLAGS
51525  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51526    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51527      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51528    fi
51529  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51530    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51531  fi
51532
51533  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549  # Special extras...
51550  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51551    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51552      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51553      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51554    fi
51555    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51556    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51557  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51558    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51559    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51560  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51561    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604    # Execute function body
51605
51606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51607$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51608  supports=yes
51609
51610  saved_cxxflags="$CXXFLAGS"
51611  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51612  ac_ext=cpp
51613ac_cpp='$CXXCPP $CPPFLAGS'
51614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51617
51618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51619/* end confdefs.h.  */
51620int i;
51621_ACEOF
51622if ac_fn_cxx_try_compile "$LINENO"; then :
51623
51624else
51625  supports=no
51626fi
51627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51628  ac_ext=cpp
51629ac_cpp='$CXXCPP $CPPFLAGS'
51630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51633
51634  CXXFLAGS="$saved_cxxflags"
51635
51636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51637$as_echo "$supports" >&6; }
51638  if test "x$supports" = "xyes" ; then
51639    :
51640
51641  else
51642    :
51643    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51644  fi
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51658    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51659
51660  fi
51661  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51662    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51663    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51664  fi
51665
51666  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51667  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51668  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51669
51670  ###############################################################################
51671  #
51672  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51673  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51674  #
51675
51676  # Setup compiler/platform specific flags into
51677  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51678  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51679  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51680  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51681    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51682    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51683    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51684    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51685      # Force compatibility with i586 on 32 bit intel platforms.
51686      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51687      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51688    fi
51689    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51690        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51691    case $OPENJDK_BUILD_CPU_ARCH in
51692      arm )
51693        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51694        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51695        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51696        ;;
51697      ppc )
51698        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51699        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51700        ;;
51701      s390 )
51702        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51703        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51704        ;;
51705      * )
51706        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51707        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51708        ;;
51709    esac
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764    # Execute function body
51765
51766  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51767  REFERENCE_VERSION=6
51768
51769  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51770    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51771  fi
51772
51773  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51774    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51775  fi
51776
51777  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51778  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51779
51780  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51781    :
51782
51783  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51784  # runs afoul of the more aggressive versions of these optimisations.
51785  # Notably, value range propagation now assumes that the this pointer of C++
51786  # member functions is non-null.
51787  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51788        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51789        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51790$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51791  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51792  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51793
51794  else
51795    :
51796
51797  fi
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51813    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51814
51815    # Restrict the debug information created by Clang to avoid
51816    # too big object files and speed the build up a little bit
51817    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51818    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51819    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51820      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51821        # Force compatibility with i586 on 32 bit intel platforms.
51822        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51823        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51824      fi
51825      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51826      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51827          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51828      case $OPENJDK_BUILD_CPU_ARCH in
51829        ppc )
51830          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51831          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51832          ;;
51833        * )
51834          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51835          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51836          ;;
51837      esac
51838    fi
51839  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51840    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51841    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51842    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51843      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51844    fi
51845
51846    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51847    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51848  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51849    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51850    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51851    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51852  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51853    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51854        -MD -Zc:wchar_t- -W3 -wd4800 \
51855        -DWIN32_LEAN_AND_MEAN \
51856        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51857        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51858        -DWIN32 -DIAL"
51859    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51860      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51861    else
51862      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51863    fi
51864    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51865    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51866    # studio.
51867    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51868      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51869      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51870      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51871    fi
51872  fi
51873
51874  ###############################################################################
51875
51876  # Adjust flags according to debug level.
51877  case $DEBUG_LEVEL in
51878    fastdebug | slowdebug )
51879      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51880      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51881      ;;
51882    release )
51883      ;;
51884    * )
51885      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51886      ;;
51887  esac
51888
51889  # Set some common defines. These works for all compilers, but assume
51890  # -D is universally accepted.
51891
51892  # Setup endianness
51893  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51894    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51895    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51896    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51897    #   Note: -Dmacro         is the same as    #define macro 1
51898    #         -Dmacro=        is the same as    #define macro
51899    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51900      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51901    else
51902      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51903    fi
51904  else
51905    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51906    # are defined in the system?
51907    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51908      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51909    else
51910      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51911    fi
51912  fi
51913
51914  # Setup target OS define. Use OS target name but in upper case.
51915  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51916  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51917
51918  # Setup target CPU
51919  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51920      $OPENJDK_BUILD_ADD_LP64 \
51921      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51922
51923  # Setup debug/release defines
51924  if test "x$DEBUG_LEVEL" = xrelease; then
51925    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51926    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51927      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51928    fi
51929  else
51930    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51931  fi
51932
51933  # Set some additional per-OS defines.
51934  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51935    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51936    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51937        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51938  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51939    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51940    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51941        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51942  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51943    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51944    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51945    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51946    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51947        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51948        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51949        -fno-omit-frame-pointer"
51950  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51951    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51952    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51953    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51954        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51955        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51956  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51957    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51958  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51959    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51960    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51961  fi
51962
51963  # Set some additional per-CPU defines.
51964  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51965    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51966  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51967    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51968  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51969    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51970      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51971      # fixes `relocation truncated to fit' error for gcc 4.1.
51972      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51973      # Use ppc64 instructions, but schedule for power5
51974      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51975    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51976      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51977    fi
51978  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51979    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51980      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51981      # Little endian machine uses ELFv2 ABI.
51982      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51983      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51984      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51985    fi
51986  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51987    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51988      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51989    fi
51990  fi
51991
51992  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51993    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51994  fi
51995
51996  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51997    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51998      # Solaris does not have _LP64=1 in the old build.
51999      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52000      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52001    fi
52002  fi
52003
52004  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52005  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52006    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52007        -Wunused-value -Woverloaded-virtual"
52008
52009    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064    # Execute function body
52065
52066  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52067  REFERENCE_VERSION=4.8
52068
52069  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52070    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52071  fi
52072
52073  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52074    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52075  fi
52076
52077  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52078  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52079
52080  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52081    :
52082
52083            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52084            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52085
52086
52087  else
52088    :
52089
52090  fi
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105    fi
52106    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52107      # Non-zero builds have stricter warnings
52108      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52109    else
52110      if test "x$TOOLCHAIN_TYPE" = xclang; then
52111        # Some versions of llvm do not like -Wundef
52112        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52113      fi
52114    fi
52115  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52116    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52117        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52118  fi
52119
52120  # Additional macosx handling
52121  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52122    # Setting these parameters makes it an error to link to macosx APIs that are
52123    # newer than the given OS version and makes the linked binaries compatible
52124    # even if built on a newer version of the OS.
52125    # The expected format is X.Y.Z
52126    MACOSX_VERSION_MIN=10.7.0
52127
52128
52129    # The macro takes the version with no dots, ex: 1070
52130    # Let the flags variables get resolved in make for easier override on make
52131    # command line.
52132    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52133    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52134  fi
52135
52136  # Setup some hard coded includes
52137  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52138      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52139      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52140      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52141      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52142      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52143      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52144
52145  # The shared libraries are compiled using the picflag.
52146  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52147      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52148  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52149      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52150
52151  # Executable flags
52152  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52153  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52154
52155
52156
52157
52158
52159
52160  # Setup LDFLAGS et al.
52161  #
52162
52163  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52164    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52165    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52166    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52167    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52168      LDFLAGS_SAFESH="-safeseh"
52169      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52170      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52171      # NOTE: Old build added -machine. Probably not needed.
52172      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52173    else
52174      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52175    fi
52176  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52177      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52178      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52179        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52180        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52181    fi
52182  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52183    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52184    # We have previously set HAS_GNU_HASH if this is the case
52185    if test -n "$HAS_GNU_HASH"; then
52186      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52187      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52188      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52189    fi
52190      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52191        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52192    fi
52193    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52194      # And since we now know that the linker is gnu, then add -z defs, to forbid
52195      # undefined symbols in object files.
52196      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52197      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52198      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52199      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52200      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52201      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52202        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52203      fi
52204      case $DEBUG_LEVEL in
52205        release )
52206          # tell linker to optimize libraries.
52207          # Should this be supplied to the OSS linker as well?
52208          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52209          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52210          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52211          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52212            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52213          fi
52214          ;;
52215        slowdebug )
52216          # Hotspot always let the linker optimize
52217          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52218          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52219            # do relocations at load
52220            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52221            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52222            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52223          fi
52224          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52225            # mark relocations read only
52226            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52227            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52228            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52229          fi
52230          ;;
52231        fastdebug )
52232          # Hotspot always let the linker optimize
52233          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52234          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52235            # mark relocations read only
52236            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52237            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52238            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52239          fi
52240          ;;
52241        * )
52242          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52243          ;;
52244        esac
52245    fi
52246  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52247    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52248    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52249    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52250    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52251    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52252    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52253      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52254    fi
52255  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52256    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52257    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52258    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52259  fi
52260
52261  # Customize LDFLAGS for executables
52262
52263  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52264
52265  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52266    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52267      LDFLAGS_STACK_SIZE=1048576
52268    else
52269      LDFLAGS_STACK_SIZE=327680
52270    fi
52271    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52272  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52273    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52274  fi
52275
52276  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52277
52278  # Customize LDFLAGS for libs
52279  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52280
52281  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52282  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52283    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52284        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52285    OPENJDK_BUILD_JDKLIB_LIBS=""
52286  else
52287    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52288        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52289
52290    if test "xBUILD" = "xTARGET"; then
52291      # On some platforms (mac) the linker warns about non existing -L dirs.
52292      # For any of the variants server, client or minimal, the dir matches the
52293      # variant name. The "main" variant should be used for linking. For the
52294      # rest, the dir is just server.
52295      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52296          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52297        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52298            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52299      else
52300        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52301            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52302      fi
52303    elif test "xBUILD" = "xBUILD"; then
52304      # When building a buildjdk, it's always only the server variant
52305      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52306          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52307    fi
52308
52309    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52310    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52311      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52312    fi
52313
52314  fi
52315
52316OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52317
52318  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52319  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52320    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52321  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52322    # FIXME: This hard-coded path is not really proper.
52323    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52324      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52325    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52326      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52327    fi
52328    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52329        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52330  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52331    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52332  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52333    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52334  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52335    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52336  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52337    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52338        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52339        wsock32.lib winmm.lib version.lib psapi.lib"
52340    fi
52341
52342  # Set OPENJDK_BUILD_JVM_ASFLAGS
52343  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52344    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52345      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52346    fi
52347  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52348    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52349  fi
52350
52351  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367  # Tests are only ever compiled for TARGET
52368  # Flags for compiling test libraries
52369  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52370  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52371
52372  # Flags for compiling test executables
52373  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52374  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52375
52376
52377
52378
52379
52380
52381  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52382  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52383
52384
52385
52386
52387
52388
52389  # Check that the compiler supports -mX (or -qX on AIX) flags
52390  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438    # Execute function body
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487    # Execute function body
52488
52489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52490$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52491  supports=yes
52492
52493  saved_cflags="$CFLAGS"
52494  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52495  ac_ext=c
52496ac_cpp='$CPP $CPPFLAGS'
52497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52499ac_compiler_gnu=$ac_cv_c_compiler_gnu
52500
52501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52502/* end confdefs.h.  */
52503int i;
52504_ACEOF
52505if ac_fn_c_try_compile "$LINENO"; then :
52506
52507else
52508  supports=no
52509fi
52510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52511  ac_ext=cpp
52512ac_cpp='$CXXCPP $CPPFLAGS'
52513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52516
52517  CFLAGS="$saved_cflags"
52518
52519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52520$as_echo "$supports" >&6; }
52521  if test "x$supports" = "xyes" ; then
52522    :
52523    C_COMP_SUPPORTS="yes"
52524  else
52525    :
52526    C_COMP_SUPPORTS="no"
52527  fi
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587    # Execute function body
52588
52589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52590$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52591  supports=yes
52592
52593  saved_cxxflags="$CXXFLAGS"
52594  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52595  ac_ext=cpp
52596ac_cpp='$CXXCPP $CPPFLAGS'
52597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52600
52601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52602/* end confdefs.h.  */
52603int i;
52604_ACEOF
52605if ac_fn_cxx_try_compile "$LINENO"; then :
52606
52607else
52608  supports=no
52609fi
52610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52611  ac_ext=cpp
52612ac_cpp='$CXXCPP $CPPFLAGS'
52613ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52614ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52615ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52616
52617  CXXFLAGS="$saved_cxxflags"
52618
52619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52620$as_echo "$supports" >&6; }
52621  if test "x$supports" = "xyes" ; then
52622    :
52623    CXX_COMP_SUPPORTS="yes"
52624  else
52625    :
52626    CXX_COMP_SUPPORTS="no"
52627  fi
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52642$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52643  supports=no
52644  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52645
52646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52647$as_echo "$supports" >&6; }
52648  if test "x$supports" = "xyes" ; then
52649    :
52650    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52651  else
52652    :
52653    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52654  fi
52655
52656
52657
52658
52659
52660
52661
52662
52663  # Check whether --enable-warnings-as-errors was given.
52664if test "${enable_warnings_as_errors+set}" = set; then :
52665  enableval=$enable_warnings_as_errors;
52666fi
52667
52668
52669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52670$as_echo_n "checking if native warnings are errors... " >&6; }
52671  if test "x$enable_warnings_as_errors" = "xyes"; then
52672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52673$as_echo "yes (explicitly set)" >&6; }
52674    WARNINGS_AS_ERRORS=true
52675  elif test "x$enable_warnings_as_errors" = "xno"; then
52676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52677$as_echo "no" >&6; }
52678    WARNINGS_AS_ERRORS=false
52679  elif test "x$enable_warnings_as_errors" = "x"; then
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52681$as_echo "yes (default)" >&6; }
52682    WARNINGS_AS_ERRORS=true
52683  else
52684    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52685  fi
52686
52687
52688
52689  case "${TOOLCHAIN_TYPE}" in
52690    microsoft)
52691      DISABLE_WARNING_PREFIX="-wd"
52692      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52693      ;;
52694    solstudio)
52695      DISABLE_WARNING_PREFIX="-erroff="
52696      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52697      ;;
52698    gcc)
52699      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747    # Execute function body
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796    # Execute function body
52797
52798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52799$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52800  supports=yes
52801
52802  saved_cflags="$CFLAGS"
52803  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52804  ac_ext=c
52805ac_cpp='$CPP $CPPFLAGS'
52806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52808ac_compiler_gnu=$ac_cv_c_compiler_gnu
52809
52810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52811/* end confdefs.h.  */
52812int i;
52813_ACEOF
52814if ac_fn_c_try_compile "$LINENO"; then :
52815
52816else
52817  supports=no
52818fi
52819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52820  ac_ext=cpp
52821ac_cpp='$CXXCPP $CPPFLAGS'
52822ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52823ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52824ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52825
52826  CFLAGS="$saved_cflags"
52827
52828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52829$as_echo "$supports" >&6; }
52830  if test "x$supports" = "xyes" ; then
52831    :
52832    C_COMP_SUPPORTS="yes"
52833  else
52834    :
52835    C_COMP_SUPPORTS="no"
52836  fi
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896    # Execute function body
52897
52898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52899$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52900  supports=yes
52901
52902  saved_cxxflags="$CXXFLAGS"
52903  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52904  ac_ext=cpp
52905ac_cpp='$CXXCPP $CPPFLAGS'
52906ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52907ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52908ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52909
52910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52911/* end confdefs.h.  */
52912int i;
52913_ACEOF
52914if ac_fn_cxx_try_compile "$LINENO"; then :
52915
52916else
52917  supports=no
52918fi
52919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52920  ac_ext=cpp
52921ac_cpp='$CXXCPP $CPPFLAGS'
52922ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52923ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52924ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52925
52926  CXXFLAGS="$saved_cxxflags"
52927
52928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52929$as_echo "$supports" >&6; }
52930  if test "x$supports" = "xyes" ; then
52931    :
52932    CXX_COMP_SUPPORTS="yes"
52933  else
52934    :
52935    CXX_COMP_SUPPORTS="no"
52936  fi
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52951$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52952  supports=no
52953  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52954
52955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52956$as_echo "$supports" >&6; }
52957  if test "x$supports" = "xyes" ; then
52958    :
52959    GCC_CAN_DISABLE_WARNINGS=true
52960  else
52961    :
52962    GCC_CAN_DISABLE_WARNINGS=false
52963
52964  fi
52965
52966
52967
52968
52969
52970
52971      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52972        DISABLE_WARNING_PREFIX="-Wno-"
52973      else
52974        DISABLE_WARNING_PREFIX=
52975      fi
52976      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52977      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52978      # CFLAGS since any target specific flags will likely not work with the
52979      # build compiler
52980      CC_OLD="$CC"
52981      CXX_OLD="$CXX"
52982      CC="$BUILD_CC"
52983      CXX="$BUILD_CXX"
52984      CFLAGS_OLD="$CFLAGS"
52985      CFLAGS=""
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033    # Execute function body
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082    # Execute function body
53083
53084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53085$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53086  supports=yes
53087
53088  saved_cflags="$CFLAGS"
53089  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53090  ac_ext=c
53091ac_cpp='$CPP $CPPFLAGS'
53092ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53093ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53094ac_compiler_gnu=$ac_cv_c_compiler_gnu
53095
53096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53097/* end confdefs.h.  */
53098int i;
53099_ACEOF
53100if ac_fn_c_try_compile "$LINENO"; then :
53101
53102else
53103  supports=no
53104fi
53105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53106  ac_ext=cpp
53107ac_cpp='$CXXCPP $CPPFLAGS'
53108ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53109ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53110ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53111
53112  CFLAGS="$saved_cflags"
53113
53114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53115$as_echo "$supports" >&6; }
53116  if test "x$supports" = "xyes" ; then
53117    :
53118    C_COMP_SUPPORTS="yes"
53119  else
53120    :
53121    C_COMP_SUPPORTS="no"
53122  fi
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182    # Execute function body
53183
53184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53185$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53186  supports=yes
53187
53188  saved_cxxflags="$CXXFLAGS"
53189  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53190  ac_ext=cpp
53191ac_cpp='$CXXCPP $CPPFLAGS'
53192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53195
53196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53197/* end confdefs.h.  */
53198int i;
53199_ACEOF
53200if ac_fn_cxx_try_compile "$LINENO"; then :
53201
53202else
53203  supports=no
53204fi
53205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53206  ac_ext=cpp
53207ac_cpp='$CXXCPP $CPPFLAGS'
53208ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53209ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53210ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53211
53212  CXXFLAGS="$saved_cxxflags"
53213
53214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53215$as_echo "$supports" >&6; }
53216  if test "x$supports" = "xyes" ; then
53217    :
53218    CXX_COMP_SUPPORTS="yes"
53219  else
53220    :
53221    CXX_COMP_SUPPORTS="no"
53222  fi
53223
53224
53225
53226
53227
53228
53229
53230
53231
53232
53233
53234
53235
53236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53237$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53238  supports=no
53239  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53240
53241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53242$as_echo "$supports" >&6; }
53243  if test "x$supports" = "xyes" ; then
53244    :
53245    BUILD_CC_CAN_DISABLE_WARNINGS=true
53246  else
53247    :
53248    BUILD_CC_CAN_DISABLE_WARNINGS=false
53249
53250  fi
53251
53252
53253
53254
53255
53256
53257      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53258        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53259      else
53260        BUILD_CC_DISABLE_WARNING_PREFIX=
53261      fi
53262      CC="$CC_OLD"
53263      CXX="$CXX_OLD"
53264      CFLAGS="$CFLAGS_OLD"
53265      ;;
53266    clang)
53267      DISABLE_WARNING_PREFIX="-Wno-"
53268      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53269      ;;
53270    xlc)
53271      DISABLE_WARNING_PREFIX="-qsuppress="
53272      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53273      ;;
53274  esac
53275
53276
53277
53278
53279
53280# Setup debug symbols (need objcopy from the toolchain for that)
53281
53282  #
53283  # NATIVE_DEBUG_SYMBOLS
53284  # This must be done after the toolchain is setup, since we're looking at objcopy.
53285  #
53286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53287$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53288
53289# Check whether --with-native-debug-symbols was given.
53290if test "${with_native_debug_symbols+set}" = set; then :
53291  withval=$with_native_debug_symbols;
53292        if test "x$OPENJDK_TARGET_OS" = xaix; then
53293          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53294            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53295          fi
53296        fi
53297
53298else
53299
53300        if test "x$OPENJDK_TARGET_OS" = xaix; then
53301          # AIX doesn't support 'zipped' so use 'internal' as default
53302          with_native_debug_symbols="internal"
53303        else
53304          if test "x$STATIC_BUILD" = xtrue; then
53305            with_native_debug_symbols="none"
53306          else
53307            with_native_debug_symbols="zipped"
53308          fi
53309        fi
53310
53311fi
53312
53313  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53315$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53316
53317  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53318
53319    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53320      if test "x$OBJCOPY" = x; then
53321        # enabling of enable-debug-symbols and can't find objcopy
53322        # this is an error
53323        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53324      fi
53325    fi
53326
53327    COMPILE_WITH_DEBUG_SYMBOLS=true
53328    COPY_DEBUG_SYMBOLS=true
53329    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53330  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53331    COMPILE_WITH_DEBUG_SYMBOLS=false
53332    COPY_DEBUG_SYMBOLS=false
53333    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53334  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53335    COMPILE_WITH_DEBUG_SYMBOLS=true
53336    COPY_DEBUG_SYMBOLS=false
53337    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53338  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53339
53340    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53341      if test "x$OBJCOPY" = x; then
53342        # enabling of enable-debug-symbols and can't find objcopy
53343        # this is an error
53344        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53345      fi
53346    fi
53347
53348    COMPILE_WITH_DEBUG_SYMBOLS=true
53349    COPY_DEBUG_SYMBOLS=true
53350    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53351  else
53352    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53353  fi
53354
53355  # --enable-debug-symbols is deprecated.
53356  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53357
53358  # Check whether --enable-debug-symbols was given.
53359if test "${enable_debug_symbols+set}" = set; then :
53360  enableval=$enable_debug_symbols;
53361fi
53362
53363  if test "x$enable_debug_symbols" != x; then
53364    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53365$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53366
53367    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53368      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53369$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53370    fi
53371
53372  fi
53373
53374
53375  # --enable-zip-debug-info is deprecated.
53376  # Please use --with-native-debug-symbols=zipped .
53377
53378  # Check whether --enable-zip-debug-info was given.
53379if test "${enable_zip_debug_info+set}" = set; then :
53380  enableval=$enable_zip_debug_info;
53381fi
53382
53383  if test "x$enable_zip_debug_info" != x; then
53384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53385$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53386
53387    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53388      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53389$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53390    fi
53391
53392  fi
53393
53394
53395
53396
53397
53398
53399
53400  # Check whether --enable-native-coverage was given.
53401if test "${enable_native_coverage+set}" = set; then :
53402  enableval=$enable_native_coverage;
53403fi
53404
53405  GCOV_ENABLED="false"
53406  if test "x$enable_native_coverage" = "xyes"; then
53407    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53409$as_echo_n "checking if native coverage is enabled... " >&6; }
53410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53411$as_echo "yes" >&6; }
53412      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53413      GCOV_LDFLAGS="-fprofile-arcs"
53414      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53415      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53416      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53417      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53418      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53419      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53420      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53421      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53422      GCOV_ENABLED="true"
53423    else
53424      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53425    fi
53426  elif test "x$enable_native_coverage" = "xno"; then
53427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53428$as_echo_n "checking if native coverage is enabled... " >&6; }
53429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53430$as_echo "no" >&6; }
53431  elif test "x$enable_native_coverage" != "x"; then
53432    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53433  fi
53434
53435
53436
53437
53438# Need toolchain to setup dtrace
53439
53440  # Test for dtrace dependencies
53441  # Check whether --enable-dtrace was given.
53442if test "${enable_dtrace+set}" = set; then :
53443  enableval=$enable_dtrace;
53444fi
53445
53446
53447  DTRACE_DEP_MISSING=false
53448
53449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53450$as_echo_n "checking for dtrace tool... " >&6; }
53451  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53453$as_echo "$DTRACE" >&6; }
53454  else
53455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53456$as_echo "not found, cannot build dtrace" >&6; }
53457    DTRACE_DEP_MISSING=true
53458  fi
53459
53460  for ac_header in sys/sdt.h
53461do :
53462  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53463if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53464  cat >>confdefs.h <<_ACEOF
53465#define HAVE_SYS_SDT_H 1
53466_ACEOF
53467 DTRACE_HEADERS_OK=yes
53468else
53469  DTRACE_HEADERS_OK=no
53470fi
53471
53472done
53473
53474  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53475    DTRACE_DEP_MISSING=true
53476  fi
53477
53478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53479$as_echo_n "checking if dtrace should be built... " >&6; }
53480  if test "x$enable_dtrace" = "xyes"; then
53481    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53483$as_echo "no, missing dependencies" >&6; }
53484
53485  # Print a helpful message on how to acquire the necessary build dependency.
53486  # dtrace is the help tag: freetype, cups, alsa etc
53487  MISSING_DEPENDENCY=dtrace
53488
53489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53490    cygwin_help $MISSING_DEPENDENCY
53491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53492    msys_help $MISSING_DEPENDENCY
53493  else
53494    PKGHANDLER_COMMAND=
53495
53496    case $PKGHANDLER in
53497      apt-get)
53498        apt_help     $MISSING_DEPENDENCY ;;
53499      yum)
53500        yum_help     $MISSING_DEPENDENCY ;;
53501      brew)
53502        brew_help    $MISSING_DEPENDENCY ;;
53503      port)
53504        port_help    $MISSING_DEPENDENCY ;;
53505      pkgutil)
53506        pkgutil_help $MISSING_DEPENDENCY ;;
53507      pkgadd)
53508        pkgadd_help  $MISSING_DEPENDENCY ;;
53509    esac
53510
53511    if test "x$PKGHANDLER_COMMAND" != x; then
53512      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53513    fi
53514  fi
53515
53516      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53517    else
53518      INCLUDE_DTRACE=true
53519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53520$as_echo "yes, forced" >&6; }
53521    fi
53522  elif test "x$enable_dtrace" = "xno"; then
53523    INCLUDE_DTRACE=false
53524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53525$as_echo "no, forced" >&6; }
53526  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53527    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53528      INCLUDE_DTRACE=false
53529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53530$as_echo "no, missing dependencies" >&6; }
53531    else
53532      INCLUDE_DTRACE=true
53533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53534$as_echo "yes, dependencies present" >&6; }
53535    fi
53536  else
53537    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53538  fi
53539
53540
53541  # Check whether --enable-aot was given.
53542if test "${enable_aot+set}" = set; then :
53543  enableval=$enable_aot;
53544fi
53545
53546
53547  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53548    ENABLE_AOT="true"
53549  elif test "x$enable_aot" = "xyes"; then
53550    ENABLE_AOT="true"
53551  elif test "x$enable_aot" = "xno"; then
53552    ENABLE_AOT="false"
53553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53554$as_echo_n "checking if aot should be enabled... " >&6; }
53555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53556$as_echo "no, forced" >&6; }
53557  else
53558    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53559  fi
53560
53561  if test "x$ENABLE_AOT" = "xtrue"; then
53562    # Only enable AOT on X64 platforms.
53563    if test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
53564      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53565        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53566          ENABLE_AOT="true"
53567        else
53568          ENABLE_AOT="false"
53569          if test "x$enable_aot" = "xyes"; then
53570            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53571          fi
53572        fi
53573      else
53574        ENABLE_AOT="false"
53575        if test "x$enable_aot" = "xyes"; then
53576          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53577        fi
53578      fi
53579    else
53580      ENABLE_AOT="false"
53581      if test "x$enable_aot" = "xyes"; then
53582        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
53583      fi
53584    fi
53585  fi
53586
53587
53588
53589
53590  # Check whether --enable-hotspot-gtest was given.
53591if test "${enable_hotspot_gtest+set}" = set; then :
53592  enableval=$enable_hotspot_gtest;
53593fi
53594
53595
53596  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53597    GTEST_DIR_EXISTS="true"
53598  else
53599    GTEST_DIR_EXISTS="false"
53600  fi
53601
53602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53603$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53604  if test "x$enable_hotspot_gtest" = "xyes"; then
53605    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53607$as_echo "yes, forced" >&6; }
53608      BUILD_GTEST="true"
53609    else
53610      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53611    fi
53612  elif test "x$enable_hotspot_gtest" = "xno"; then
53613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53614$as_echo "no, forced" >&6; }
53615    BUILD_GTEST="false"
53616  elif test "x$enable_hotspot_gtest" = "x"; then
53617    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53619$as_echo "yes" >&6; }
53620      BUILD_GTEST="true"
53621    else
53622      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53623$as_echo "no" >&6; }
53624      BUILD_GTEST="false"
53625    fi
53626  else
53627    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53628  fi
53629
53630
53631
53632
53633###############################################################################
53634#
53635# Check dependencies for external and internal libraries.
53636#
53637###############################################################################
53638
53639# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53640
53641  # When using cygwin or msys, we need a wrapper binary that renames
53642  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53643  # @files and rewrites these too! This wrapper binary is
53644  # called fixpath.
53645  FIXPATH=
53646  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53648$as_echo_n "checking if fixpath can be created... " >&6; }
53649    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53650    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53651    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53652    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53653      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53654      FIXPATH="$FIXPATH_BIN -c"
53655    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53656      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53657      # @ was chosen as separator to minimize risk of other tools messing around with it
53658      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53659          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53660      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53661      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53662    fi
53663    FIXPATH_SRC_W="$FIXPATH_SRC"
53664    FIXPATH_BIN_W="$FIXPATH_BIN"
53665
53666  unix_path="$FIXPATH_SRC_W"
53667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53668    windows_path=`$CYGPATH -m "$unix_path"`
53669    FIXPATH_SRC_W="$windows_path"
53670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53671    windows_path=`cmd //c echo $unix_path`
53672    FIXPATH_SRC_W="$windows_path"
53673  fi
53674
53675
53676  unix_path="$FIXPATH_BIN_W"
53677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53678    windows_path=`$CYGPATH -m "$unix_path"`
53679    FIXPATH_BIN_W="$windows_path"
53680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53681    windows_path=`cmd //c echo $unix_path`
53682    FIXPATH_BIN_W="$windows_path"
53683  fi
53684
53685    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53686    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53687    cd $FIXPATH_DIR
53688    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53689    cd $CURDIR
53690
53691    if test ! -x $FIXPATH_BIN; then
53692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53693$as_echo "no" >&6; }
53694      cat $FIXPATH_DIR/fixpath1.log
53695      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53696    fi
53697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53698$as_echo "yes" >&6; }
53699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53700$as_echo_n "checking if fixpath.exe works... " >&6; }
53701    cd $FIXPATH_DIR
53702    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53703        > $FIXPATH_DIR/fixpath2.log 2>&1
53704    cd $CURDIR
53705    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53707$as_echo "no" >&6; }
53708      cat $FIXPATH_DIR/fixpath2.log
53709      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53710    fi
53711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53712$as_echo "yes" >&6; }
53713
53714    FIXPATH_DETACH_FLAG="--detach"
53715  fi
53716
53717
53718
53719
53720
53721
53722  # Check if X11 is needed
53723  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53724    # No X11 support on windows or macosx
53725    NEEDS_LIB_X11=false
53726  else
53727    # All other instances need X11, even if building headless only, libawt still
53728    # needs X11 headers.
53729    NEEDS_LIB_X11=true
53730  fi
53731
53732  # Check if cups is needed
53733  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53734    # Windows have a separate print system
53735    NEEDS_LIB_CUPS=false
53736  else
53737    NEEDS_LIB_CUPS=true
53738  fi
53739
53740  # A custom hook may have set this already
53741  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53742    NEEDS_LIB_FREETYPE=true
53743  fi
53744
53745  # Check if alsa is needed
53746  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53747    NEEDS_LIB_ALSA=true
53748  else
53749    NEEDS_LIB_ALSA=false
53750  fi
53751
53752  # Check if ffi is needed
53753  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53754    NEEDS_LIB_FFI=true
53755  else
53756    NEEDS_LIB_FFI=false
53757  fi
53758
53759
53760  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53761  # dynamic build is configured on command line.
53762
53763# Check whether --with-stdc++lib was given.
53764if test "${with_stdc__lib+set}" = set; then :
53765  withval=$with_stdc__lib;
53766        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53767                && test "x$with_stdc__lib" != xdefault; then
53768          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53769        fi
53770
53771else
53772  with_stdc__lib=default
53773
53774fi
53775
53776
53777  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53778    # Test if stdc++ can be linked statically.
53779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53780$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53781    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53782    ac_ext=cpp
53783ac_cpp='$CXXCPP $CPPFLAGS'
53784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53787
53788    OLD_LIBS="$LIBS"
53789    LIBS="$STATIC_STDCXX_FLAGS"
53790    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53791/* end confdefs.h.  */
53792
53793int
53794main ()
53795{
53796return 0;
53797  ;
53798  return 0;
53799}
53800_ACEOF
53801if ac_fn_cxx_try_link "$LINENO"; then :
53802  has_static_libstdcxx=yes
53803else
53804  has_static_libstdcxx=no
53805fi
53806rm -f core conftest.err conftest.$ac_objext \
53807    conftest$ac_exeext conftest.$ac_ext
53808    LIBS="$OLD_LIBS"
53809    ac_ext=cpp
53810ac_cpp='$CXXCPP $CPPFLAGS'
53811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53814
53815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53816$as_echo "$has_static_libstdcxx" >&6; }
53817
53818    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53819      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53820    fi
53821
53822    # If dynamic was requested, it's available since it would fail above otherwise.
53823    # If dynamic wasn't requested, go with static unless it isn't available.
53824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53825$as_echo_n "checking how to link with libstdc++... " >&6; }
53826    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53827        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53829$as_echo "dynamic" >&6; }
53830    else
53831      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53832      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53833      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53834      # just use the same setting as for the TARGET toolchain.
53835      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53837$as_echo "static" >&6; }
53838    fi
53839  fi
53840
53841  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53842  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53843    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53844  fi
53845
53846
53847
53848  # Setup Windows runtime dlls
53849  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53850
53851
53852# Check whether --with-msvcr-dll was given.
53853if test "${with_msvcr_dll+set}" = set; then :
53854  withval=$with_msvcr_dll;
53855fi
53856
53857
53858  if test "x$with_msvcr_dll" != x; then
53859    # If given explicitly by user, do not probe. If not present, fail directly.
53860
53861  DLL_NAME="$MSVCR_NAME"
53862  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53863  METHOD="--with-msvcr-dll"
53864  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53865    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53866$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53867
53868    # Need to check if the found msvcr is correct architecture
53869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53870$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53871    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53873      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53874      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53876        CORRECT_MSVCR_ARCH="PE32 executable"
53877      else
53878        CORRECT_MSVCR_ARCH="PE32+ executable"
53879      fi
53880    else
53881      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53882        CORRECT_MSVCR_ARCH=386
53883      else
53884        CORRECT_MSVCR_ARCH=x86-64
53885      fi
53886    fi
53887    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53889$as_echo "ok" >&6; }
53890      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53891
53892  # Only process if variable expands to non-empty
53893
53894  if test "x$MSVC_DLL" != x; then
53895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53896
53897  # Input might be given as Windows format, start by converting to
53898  # unix format.
53899  path="$MSVC_DLL"
53900  new_path=`$CYGPATH -u "$path"`
53901
53902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53905  # "foo.exe" is OK but "foo" is an error.
53906  #
53907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53908  # It is also a way to make sure we got the proper file name for the real test later on.
53909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53910  if test "x$test_shortpath" = x; then
53911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53912$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53913    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53914  fi
53915
53916  # Call helper function which possibly converts this using DOS-style short mode.
53917  # If so, the updated path is stored in $new_path.
53918
53919  input_path="$new_path"
53920  # Check if we need to convert this using DOS-style short mode. If the path
53921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53922  # take no chances and rewrite it.
53923  # Note: m4 eats our [], so we need to use [ and ] instead.
53924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53925  if test "x$has_forbidden_chars" != x; then
53926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53930      # Going to short mode and back again did indeed matter. Since short mode is
53931      # case insensitive, let's make it lowercase to improve readability.
53932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53933      # Now convert it back to Unix-style (cygpath)
53934      input_path=`$CYGPATH -u "$shortmode_path"`
53935      new_path="$input_path"
53936    fi
53937  fi
53938
53939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53940  if test "x$test_cygdrive_prefix" = x; then
53941    # As a simple fix, exclude /usr/bin since it's not a real path.
53942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53944      # a path prefixed by /cygdrive for fixpath to work.
53945      new_path="$CYGWIN_ROOT_PATH$input_path"
53946    fi
53947  fi
53948
53949
53950  if test "x$path" != "x$new_path"; then
53951    MSVC_DLL="$new_path"
53952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53953$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53954  fi
53955
53956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53957
53958  path="$MSVC_DLL"
53959  has_colon=`$ECHO $path | $GREP ^.:`
53960  new_path="$path"
53961  if test "x$has_colon" = x; then
53962    # Not in mixed or Windows style, start by that.
53963    new_path=`cmd //c echo $path`
53964  fi
53965
53966
53967  input_path="$new_path"
53968  # Check if we need to convert this using DOS-style short mode. If the path
53969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53970  # take no chances and rewrite it.
53971  # Note: m4 eats our [], so we need to use [ and ] instead.
53972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53973  if test "x$has_forbidden_chars" != x; then
53974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53976  fi
53977
53978
53979  windows_path="$new_path"
53980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53981    unix_path=`$CYGPATH -u "$windows_path"`
53982    new_path="$unix_path"
53983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53985    new_path="$unix_path"
53986  fi
53987
53988  if test "x$path" != "x$new_path"; then
53989    MSVC_DLL="$new_path"
53990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53991$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53992  fi
53993
53994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53996
53997    else
53998      # We're on a unix platform. Hooray! :)
53999      path="$MSVC_DLL"
54000      has_space=`$ECHO "$path" | $GREP " "`
54001      if test "x$has_space" != x; then
54002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54003$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54005      fi
54006
54007      # Use eval to expand a potential ~
54008      eval path="$path"
54009      if test ! -f "$path" && test ! -d "$path"; then
54010        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54011      fi
54012
54013      if test -d "$path"; then
54014        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54015      else
54016        dir="`$DIRNAME "$path"`"
54017        base="`$BASENAME "$path"`"
54018        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54019      fi
54020    fi
54021  fi
54022
54023      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54024$as_echo_n "checking for $DLL_NAME... " >&6; }
54025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54026$as_echo "$MSVC_DLL" >&6; }
54027    else
54028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54029$as_echo "incorrect, ignoring" >&6; }
54030      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54031$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54032    fi
54033  fi
54034
54035    if test "x$MSVC_DLL" = x; then
54036      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54037    fi
54038    MSVCR_DLL="$MSVC_DLL"
54039  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54040
54041  DLL_NAME="$MSVCR_NAME"
54042  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54043  METHOD="devkit"
54044  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54045    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54046$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54047
54048    # Need to check if the found msvcr is correct architecture
54049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54050$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54051    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54053      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54054      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54055      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54056        CORRECT_MSVCR_ARCH="PE32 executable"
54057      else
54058        CORRECT_MSVCR_ARCH="PE32+ executable"
54059      fi
54060    else
54061      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54062        CORRECT_MSVCR_ARCH=386
54063      else
54064        CORRECT_MSVCR_ARCH=x86-64
54065      fi
54066    fi
54067    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54069$as_echo "ok" >&6; }
54070      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54071
54072  # Only process if variable expands to non-empty
54073
54074  if test "x$MSVC_DLL" != x; then
54075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54076
54077  # Input might be given as Windows format, start by converting to
54078  # unix format.
54079  path="$MSVC_DLL"
54080  new_path=`$CYGPATH -u "$path"`
54081
54082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54085  # "foo.exe" is OK but "foo" is an error.
54086  #
54087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54088  # It is also a way to make sure we got the proper file name for the real test later on.
54089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54090  if test "x$test_shortpath" = x; then
54091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54092$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54093    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54094  fi
54095
54096  # Call helper function which possibly converts this using DOS-style short mode.
54097  # If so, the updated path is stored in $new_path.
54098
54099  input_path="$new_path"
54100  # Check if we need to convert this using DOS-style short mode. If the path
54101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54102  # take no chances and rewrite it.
54103  # Note: m4 eats our [], so we need to use [ and ] instead.
54104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54105  if test "x$has_forbidden_chars" != x; then
54106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54110      # Going to short mode and back again did indeed matter. Since short mode is
54111      # case insensitive, let's make it lowercase to improve readability.
54112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54113      # Now convert it back to Unix-style (cygpath)
54114      input_path=`$CYGPATH -u "$shortmode_path"`
54115      new_path="$input_path"
54116    fi
54117  fi
54118
54119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54120  if test "x$test_cygdrive_prefix" = x; then
54121    # As a simple fix, exclude /usr/bin since it's not a real path.
54122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54124      # a path prefixed by /cygdrive for fixpath to work.
54125      new_path="$CYGWIN_ROOT_PATH$input_path"
54126    fi
54127  fi
54128
54129
54130  if test "x$path" != "x$new_path"; then
54131    MSVC_DLL="$new_path"
54132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54133$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54134  fi
54135
54136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54137
54138  path="$MSVC_DLL"
54139  has_colon=`$ECHO $path | $GREP ^.:`
54140  new_path="$path"
54141  if test "x$has_colon" = x; then
54142    # Not in mixed or Windows style, start by that.
54143    new_path=`cmd //c echo $path`
54144  fi
54145
54146
54147  input_path="$new_path"
54148  # Check if we need to convert this using DOS-style short mode. If the path
54149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54150  # take no chances and rewrite it.
54151  # Note: m4 eats our [], so we need to use [ and ] instead.
54152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54153  if test "x$has_forbidden_chars" != x; then
54154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54156  fi
54157
54158
54159  windows_path="$new_path"
54160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54161    unix_path=`$CYGPATH -u "$windows_path"`
54162    new_path="$unix_path"
54163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54165    new_path="$unix_path"
54166  fi
54167
54168  if test "x$path" != "x$new_path"; then
54169    MSVC_DLL="$new_path"
54170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54171$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54172  fi
54173
54174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54176
54177    else
54178      # We're on a unix platform. Hooray! :)
54179      path="$MSVC_DLL"
54180      has_space=`$ECHO "$path" | $GREP " "`
54181      if test "x$has_space" != x; then
54182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54183$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54184        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54185      fi
54186
54187      # Use eval to expand a potential ~
54188      eval path="$path"
54189      if test ! -f "$path" && test ! -d "$path"; then
54190        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54191      fi
54192
54193      if test -d "$path"; then
54194        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54195      else
54196        dir="`$DIRNAME "$path"`"
54197        base="`$BASENAME "$path"`"
54198        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54199      fi
54200    fi
54201  fi
54202
54203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54204$as_echo_n "checking for $DLL_NAME... " >&6; }
54205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54206$as_echo "$MSVC_DLL" >&6; }
54207    else
54208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54209$as_echo "incorrect, ignoring" >&6; }
54210      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54211$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54212    fi
54213  fi
54214
54215    if test "x$MSVC_DLL" = x; then
54216      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54217    fi
54218    MSVCR_DLL="$MSVC_DLL"
54219  else
54220
54221  DLL_NAME="${MSVCR_NAME}"
54222  MSVC_DLL=
54223
54224  if test "x$MSVC_DLL" = x; then
54225    # Probe: Using well-known location from Visual Studio 10.0
54226    if test "x$VCINSTALLDIR" != x; then
54227      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54228
54229  windows_path="$CYGWIN_VC_INSTALL_DIR"
54230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54231    unix_path=`$CYGPATH -u "$windows_path"`
54232    CYGWIN_VC_INSTALL_DIR="$unix_path"
54233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54235    CYGWIN_VC_INSTALL_DIR="$unix_path"
54236  fi
54237
54238      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54239        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54240      else
54241        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54242      fi
54243      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54244
54245  DLL_NAME="$DLL_NAME"
54246  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54247  METHOD="well-known location in VCINSTALLDIR"
54248  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54249    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54250$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54251
54252    # Need to check if the found msvcr is correct architecture
54253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54254$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54255    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54257      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54258      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54259      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54260        CORRECT_MSVCR_ARCH="PE32 executable"
54261      else
54262        CORRECT_MSVCR_ARCH="PE32+ executable"
54263      fi
54264    else
54265      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54266        CORRECT_MSVCR_ARCH=386
54267      else
54268        CORRECT_MSVCR_ARCH=x86-64
54269      fi
54270    fi
54271    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54273$as_echo "ok" >&6; }
54274      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54275
54276  # Only process if variable expands to non-empty
54277
54278  if test "x$MSVC_DLL" != x; then
54279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54280
54281  # Input might be given as Windows format, start by converting to
54282  # unix format.
54283  path="$MSVC_DLL"
54284  new_path=`$CYGPATH -u "$path"`
54285
54286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54289  # "foo.exe" is OK but "foo" is an error.
54290  #
54291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54292  # It is also a way to make sure we got the proper file name for the real test later on.
54293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54294  if test "x$test_shortpath" = x; then
54295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54296$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54297    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54298  fi
54299
54300  # Call helper function which possibly converts this using DOS-style short mode.
54301  # If so, the updated path is stored in $new_path.
54302
54303  input_path="$new_path"
54304  # Check if we need to convert this using DOS-style short mode. If the path
54305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54306  # take no chances and rewrite it.
54307  # Note: m4 eats our [], so we need to use [ and ] instead.
54308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54309  if test "x$has_forbidden_chars" != x; then
54310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54314      # Going to short mode and back again did indeed matter. Since short mode is
54315      # case insensitive, let's make it lowercase to improve readability.
54316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54317      # Now convert it back to Unix-style (cygpath)
54318      input_path=`$CYGPATH -u "$shortmode_path"`
54319      new_path="$input_path"
54320    fi
54321  fi
54322
54323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54324  if test "x$test_cygdrive_prefix" = x; then
54325    # As a simple fix, exclude /usr/bin since it's not a real path.
54326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54328      # a path prefixed by /cygdrive for fixpath to work.
54329      new_path="$CYGWIN_ROOT_PATH$input_path"
54330    fi
54331  fi
54332
54333
54334  if test "x$path" != "x$new_path"; then
54335    MSVC_DLL="$new_path"
54336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54337$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54338  fi
54339
54340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54341
54342  path="$MSVC_DLL"
54343  has_colon=`$ECHO $path | $GREP ^.:`
54344  new_path="$path"
54345  if test "x$has_colon" = x; then
54346    # Not in mixed or Windows style, start by that.
54347    new_path=`cmd //c echo $path`
54348  fi
54349
54350
54351  input_path="$new_path"
54352  # Check if we need to convert this using DOS-style short mode. If the path
54353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54354  # take no chances and rewrite it.
54355  # Note: m4 eats our [], so we need to use [ and ] instead.
54356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54357  if test "x$has_forbidden_chars" != x; then
54358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54360  fi
54361
54362
54363  windows_path="$new_path"
54364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54365    unix_path=`$CYGPATH -u "$windows_path"`
54366    new_path="$unix_path"
54367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54369    new_path="$unix_path"
54370  fi
54371
54372  if test "x$path" != "x$new_path"; then
54373    MSVC_DLL="$new_path"
54374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54375$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54376  fi
54377
54378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54380
54381    else
54382      # We're on a unix platform. Hooray! :)
54383      path="$MSVC_DLL"
54384      has_space=`$ECHO "$path" | $GREP " "`
54385      if test "x$has_space" != x; then
54386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54387$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54389      fi
54390
54391      # Use eval to expand a potential ~
54392      eval path="$path"
54393      if test ! -f "$path" && test ! -d "$path"; then
54394        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54395      fi
54396
54397      if test -d "$path"; then
54398        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54399      else
54400        dir="`$DIRNAME "$path"`"
54401        base="`$BASENAME "$path"`"
54402        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54403      fi
54404    fi
54405  fi
54406
54407      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54408$as_echo_n "checking for $DLL_NAME... " >&6; }
54409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54410$as_echo "$MSVC_DLL" >&6; }
54411    else
54412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54413$as_echo "incorrect, ignoring" >&6; }
54414      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54415$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54416    fi
54417  fi
54418
54419    fi
54420  fi
54421
54422  if test "x$MSVC_DLL" = x; then
54423    # Probe: Check in the Boot JDK directory.
54424    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54425
54426  DLL_NAME="$DLL_NAME"
54427  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54428  METHOD="well-known location in Boot JDK"
54429  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54431$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54432
54433    # Need to check if the found msvcr is correct architecture
54434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54435$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54436    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54438      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54439      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54441        CORRECT_MSVCR_ARCH="PE32 executable"
54442      else
54443        CORRECT_MSVCR_ARCH="PE32+ executable"
54444      fi
54445    else
54446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54447        CORRECT_MSVCR_ARCH=386
54448      else
54449        CORRECT_MSVCR_ARCH=x86-64
54450      fi
54451    fi
54452    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54454$as_echo "ok" >&6; }
54455      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54456
54457  # Only process if variable expands to non-empty
54458
54459  if test "x$MSVC_DLL" != x; then
54460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54461
54462  # Input might be given as Windows format, start by converting to
54463  # unix format.
54464  path="$MSVC_DLL"
54465  new_path=`$CYGPATH -u "$path"`
54466
54467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54470  # "foo.exe" is OK but "foo" is an error.
54471  #
54472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54473  # It is also a way to make sure we got the proper file name for the real test later on.
54474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54475  if test "x$test_shortpath" = x; then
54476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54478    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54479  fi
54480
54481  # Call helper function which possibly converts this using DOS-style short mode.
54482  # If so, the updated path is stored in $new_path.
54483
54484  input_path="$new_path"
54485  # Check if we need to convert this using DOS-style short mode. If the path
54486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54487  # take no chances and rewrite it.
54488  # Note: m4 eats our [], so we need to use [ and ] instead.
54489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54490  if test "x$has_forbidden_chars" != x; then
54491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54495      # Going to short mode and back again did indeed matter. Since short mode is
54496      # case insensitive, let's make it lowercase to improve readability.
54497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54498      # Now convert it back to Unix-style (cygpath)
54499      input_path=`$CYGPATH -u "$shortmode_path"`
54500      new_path="$input_path"
54501    fi
54502  fi
54503
54504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54505  if test "x$test_cygdrive_prefix" = x; then
54506    # As a simple fix, exclude /usr/bin since it's not a real path.
54507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54509      # a path prefixed by /cygdrive for fixpath to work.
54510      new_path="$CYGWIN_ROOT_PATH$input_path"
54511    fi
54512  fi
54513
54514
54515  if test "x$path" != "x$new_path"; then
54516    MSVC_DLL="$new_path"
54517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54518$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54519  fi
54520
54521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54522
54523  path="$MSVC_DLL"
54524  has_colon=`$ECHO $path | $GREP ^.:`
54525  new_path="$path"
54526  if test "x$has_colon" = x; then
54527    # Not in mixed or Windows style, start by that.
54528    new_path=`cmd //c echo $path`
54529  fi
54530
54531
54532  input_path="$new_path"
54533  # Check if we need to convert this using DOS-style short mode. If the path
54534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54535  # take no chances and rewrite it.
54536  # Note: m4 eats our [], so we need to use [ and ] instead.
54537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54538  if test "x$has_forbidden_chars" != x; then
54539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54541  fi
54542
54543
54544  windows_path="$new_path"
54545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54546    unix_path=`$CYGPATH -u "$windows_path"`
54547    new_path="$unix_path"
54548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54550    new_path="$unix_path"
54551  fi
54552
54553  if test "x$path" != "x$new_path"; then
54554    MSVC_DLL="$new_path"
54555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54556$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54557  fi
54558
54559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54561
54562    else
54563      # We're on a unix platform. Hooray! :)
54564      path="$MSVC_DLL"
54565      has_space=`$ECHO "$path" | $GREP " "`
54566      if test "x$has_space" != x; then
54567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54570      fi
54571
54572      # Use eval to expand a potential ~
54573      eval path="$path"
54574      if test ! -f "$path" && test ! -d "$path"; then
54575        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54576      fi
54577
54578      if test -d "$path"; then
54579        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54580      else
54581        dir="`$DIRNAME "$path"`"
54582        base="`$BASENAME "$path"`"
54583        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54584      fi
54585    fi
54586  fi
54587
54588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54589$as_echo_n "checking for $DLL_NAME... " >&6; }
54590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54591$as_echo "$MSVC_DLL" >&6; }
54592    else
54593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54594$as_echo "incorrect, ignoring" >&6; }
54595      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54596$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54597    fi
54598  fi
54599
54600  fi
54601
54602  if test "x$MSVC_DLL" = x; then
54603    # Probe: Look in the Windows system32 directory
54604    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54605
54606  windows_path="$CYGWIN_SYSTEMROOT"
54607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54608    unix_path=`$CYGPATH -u "$windows_path"`
54609    CYGWIN_SYSTEMROOT="$unix_path"
54610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54612    CYGWIN_SYSTEMROOT="$unix_path"
54613  fi
54614
54615    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54616
54617  DLL_NAME="$DLL_NAME"
54618  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54619  METHOD="well-known location in SYSTEMROOT"
54620  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54622$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54623
54624    # Need to check if the found msvcr is correct architecture
54625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54626$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54627    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54629      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54630      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54631      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54632        CORRECT_MSVCR_ARCH="PE32 executable"
54633      else
54634        CORRECT_MSVCR_ARCH="PE32+ executable"
54635      fi
54636    else
54637      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54638        CORRECT_MSVCR_ARCH=386
54639      else
54640        CORRECT_MSVCR_ARCH=x86-64
54641      fi
54642    fi
54643    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54645$as_echo "ok" >&6; }
54646      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54647
54648  # Only process if variable expands to non-empty
54649
54650  if test "x$MSVC_DLL" != x; then
54651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54652
54653  # Input might be given as Windows format, start by converting to
54654  # unix format.
54655  path="$MSVC_DLL"
54656  new_path=`$CYGPATH -u "$path"`
54657
54658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54661  # "foo.exe" is OK but "foo" is an error.
54662  #
54663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54664  # It is also a way to make sure we got the proper file name for the real test later on.
54665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54666  if test "x$test_shortpath" = x; then
54667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54668$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54669    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54670  fi
54671
54672  # Call helper function which possibly converts this using DOS-style short mode.
54673  # If so, the updated path is stored in $new_path.
54674
54675  input_path="$new_path"
54676  # Check if we need to convert this using DOS-style short mode. If the path
54677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54678  # take no chances and rewrite it.
54679  # Note: m4 eats our [], so we need to use [ and ] instead.
54680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54681  if test "x$has_forbidden_chars" != x; then
54682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54686      # Going to short mode and back again did indeed matter. Since short mode is
54687      # case insensitive, let's make it lowercase to improve readability.
54688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54689      # Now convert it back to Unix-style (cygpath)
54690      input_path=`$CYGPATH -u "$shortmode_path"`
54691      new_path="$input_path"
54692    fi
54693  fi
54694
54695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54696  if test "x$test_cygdrive_prefix" = x; then
54697    # As a simple fix, exclude /usr/bin since it's not a real path.
54698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54700      # a path prefixed by /cygdrive for fixpath to work.
54701      new_path="$CYGWIN_ROOT_PATH$input_path"
54702    fi
54703  fi
54704
54705
54706  if test "x$path" != "x$new_path"; then
54707    MSVC_DLL="$new_path"
54708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54709$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54710  fi
54711
54712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54713
54714  path="$MSVC_DLL"
54715  has_colon=`$ECHO $path | $GREP ^.:`
54716  new_path="$path"
54717  if test "x$has_colon" = x; then
54718    # Not in mixed or Windows style, start by that.
54719    new_path=`cmd //c echo $path`
54720  fi
54721
54722
54723  input_path="$new_path"
54724  # Check if we need to convert this using DOS-style short mode. If the path
54725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54726  # take no chances and rewrite it.
54727  # Note: m4 eats our [], so we need to use [ and ] instead.
54728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54729  if test "x$has_forbidden_chars" != x; then
54730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54732  fi
54733
54734
54735  windows_path="$new_path"
54736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54737    unix_path=`$CYGPATH -u "$windows_path"`
54738    new_path="$unix_path"
54739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54741    new_path="$unix_path"
54742  fi
54743
54744  if test "x$path" != "x$new_path"; then
54745    MSVC_DLL="$new_path"
54746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54747$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54748  fi
54749
54750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54752
54753    else
54754      # We're on a unix platform. Hooray! :)
54755      path="$MSVC_DLL"
54756      has_space=`$ECHO "$path" | $GREP " "`
54757      if test "x$has_space" != x; then
54758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54759$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54761      fi
54762
54763      # Use eval to expand a potential ~
54764      eval path="$path"
54765      if test ! -f "$path" && test ! -d "$path"; then
54766        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54767      fi
54768
54769      if test -d "$path"; then
54770        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54771      else
54772        dir="`$DIRNAME "$path"`"
54773        base="`$BASENAME "$path"`"
54774        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54775      fi
54776    fi
54777  fi
54778
54779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54780$as_echo_n "checking for $DLL_NAME... " >&6; }
54781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54782$as_echo "$MSVC_DLL" >&6; }
54783    else
54784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54785$as_echo "incorrect, ignoring" >&6; }
54786      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54787$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54788    fi
54789  fi
54790
54791  fi
54792
54793  if test "x$MSVC_DLL" = x; then
54794    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54795    if test "x$VS100COMNTOOLS" != x; then
54796      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54797
54798  windows_path="$CYGWIN_VS_TOOLS_DIR"
54799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54800    unix_path=`$CYGPATH -u "$windows_path"`
54801    CYGWIN_VS_TOOLS_DIR="$unix_path"
54802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54804    CYGWIN_VS_TOOLS_DIR="$unix_path"
54805  fi
54806
54807      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54808        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54809	    | $GREP -i /x64/ | $HEAD --lines 1`
54810      else
54811        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54812	    | $GREP -i /x86/ | $HEAD --lines 1`
54813      fi
54814
54815  DLL_NAME="$DLL_NAME"
54816  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54817  METHOD="search of VS100COMNTOOLS"
54818  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54819    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54820$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54821
54822    # Need to check if the found msvcr is correct architecture
54823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54824$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54825    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54827      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54828      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54829      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54830        CORRECT_MSVCR_ARCH="PE32 executable"
54831      else
54832        CORRECT_MSVCR_ARCH="PE32+ executable"
54833      fi
54834    else
54835      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54836        CORRECT_MSVCR_ARCH=386
54837      else
54838        CORRECT_MSVCR_ARCH=x86-64
54839      fi
54840    fi
54841    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54843$as_echo "ok" >&6; }
54844      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54845
54846  # Only process if variable expands to non-empty
54847
54848  if test "x$MSVC_DLL" != x; then
54849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54850
54851  # Input might be given as Windows format, start by converting to
54852  # unix format.
54853  path="$MSVC_DLL"
54854  new_path=`$CYGPATH -u "$path"`
54855
54856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54859  # "foo.exe" is OK but "foo" is an error.
54860  #
54861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54862  # It is also a way to make sure we got the proper file name for the real test later on.
54863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54864  if test "x$test_shortpath" = x; then
54865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54866$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54867    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54868  fi
54869
54870  # Call helper function which possibly converts this using DOS-style short mode.
54871  # If so, the updated path is stored in $new_path.
54872
54873  input_path="$new_path"
54874  # Check if we need to convert this using DOS-style short mode. If the path
54875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54876  # take no chances and rewrite it.
54877  # Note: m4 eats our [], so we need to use [ and ] instead.
54878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54879  if test "x$has_forbidden_chars" != x; then
54880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54884      # Going to short mode and back again did indeed matter. Since short mode is
54885      # case insensitive, let's make it lowercase to improve readability.
54886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54887      # Now convert it back to Unix-style (cygpath)
54888      input_path=`$CYGPATH -u "$shortmode_path"`
54889      new_path="$input_path"
54890    fi
54891  fi
54892
54893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54894  if test "x$test_cygdrive_prefix" = x; then
54895    # As a simple fix, exclude /usr/bin since it's not a real path.
54896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54898      # a path prefixed by /cygdrive for fixpath to work.
54899      new_path="$CYGWIN_ROOT_PATH$input_path"
54900    fi
54901  fi
54902
54903
54904  if test "x$path" != "x$new_path"; then
54905    MSVC_DLL="$new_path"
54906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54907$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54908  fi
54909
54910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54911
54912  path="$MSVC_DLL"
54913  has_colon=`$ECHO $path | $GREP ^.:`
54914  new_path="$path"
54915  if test "x$has_colon" = x; then
54916    # Not in mixed or Windows style, start by that.
54917    new_path=`cmd //c echo $path`
54918  fi
54919
54920
54921  input_path="$new_path"
54922  # Check if we need to convert this using DOS-style short mode. If the path
54923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54924  # take no chances and rewrite it.
54925  # Note: m4 eats our [], so we need to use [ and ] instead.
54926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54927  if test "x$has_forbidden_chars" != x; then
54928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54930  fi
54931
54932
54933  windows_path="$new_path"
54934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54935    unix_path=`$CYGPATH -u "$windows_path"`
54936    new_path="$unix_path"
54937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54939    new_path="$unix_path"
54940  fi
54941
54942  if test "x$path" != "x$new_path"; then
54943    MSVC_DLL="$new_path"
54944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54945$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54946  fi
54947
54948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54950
54951    else
54952      # We're on a unix platform. Hooray! :)
54953      path="$MSVC_DLL"
54954      has_space=`$ECHO "$path" | $GREP " "`
54955      if test "x$has_space" != x; then
54956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54957$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54959      fi
54960
54961      # Use eval to expand a potential ~
54962      eval path="$path"
54963      if test ! -f "$path" && test ! -d "$path"; then
54964        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54965      fi
54966
54967      if test -d "$path"; then
54968        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54969      else
54970        dir="`$DIRNAME "$path"`"
54971        base="`$BASENAME "$path"`"
54972        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54973      fi
54974    fi
54975  fi
54976
54977      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54978$as_echo_n "checking for $DLL_NAME... " >&6; }
54979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54980$as_echo "$MSVC_DLL" >&6; }
54981    else
54982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54983$as_echo "incorrect, ignoring" >&6; }
54984      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54985$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54986    fi
54987  fi
54988
54989    fi
54990  fi
54991
54992  if test "x$MSVC_DLL" = x; then
54993    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54994    # (This was the original behaviour; kept since it might turn something up)
54995    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54996      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54997        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54998	    | $GREP x64 | $HEAD --lines 1`
54999      else
55000        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55001	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55002        if test "x$POSSIBLE_MSVC_DLL" = x; then
55003          # We're grasping at straws now...
55004          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55005	      | $HEAD --lines 1`
55006        fi
55007      fi
55008
55009
55010  DLL_NAME="$DLL_NAME"
55011  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55012  METHOD="search of VCINSTALLDIR"
55013  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55014    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55015$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55016
55017    # Need to check if the found msvcr is correct architecture
55018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55019$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55020    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55022      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55023      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55024      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55025        CORRECT_MSVCR_ARCH="PE32 executable"
55026      else
55027        CORRECT_MSVCR_ARCH="PE32+ executable"
55028      fi
55029    else
55030      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55031        CORRECT_MSVCR_ARCH=386
55032      else
55033        CORRECT_MSVCR_ARCH=x86-64
55034      fi
55035    fi
55036    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55038$as_echo "ok" >&6; }
55039      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55040
55041  # Only process if variable expands to non-empty
55042
55043  if test "x$MSVC_DLL" != x; then
55044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55045
55046  # Input might be given as Windows format, start by converting to
55047  # unix format.
55048  path="$MSVC_DLL"
55049  new_path=`$CYGPATH -u "$path"`
55050
55051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55054  # "foo.exe" is OK but "foo" is an error.
55055  #
55056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55057  # It is also a way to make sure we got the proper file name for the real test later on.
55058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55059  if test "x$test_shortpath" = x; then
55060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55061$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55062    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55063  fi
55064
55065  # Call helper function which possibly converts this using DOS-style short mode.
55066  # If so, the updated path is stored in $new_path.
55067
55068  input_path="$new_path"
55069  # Check if we need to convert this using DOS-style short mode. If the path
55070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55071  # take no chances and rewrite it.
55072  # Note: m4 eats our [], so we need to use [ and ] instead.
55073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55074  if test "x$has_forbidden_chars" != x; then
55075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55079      # Going to short mode and back again did indeed matter. Since short mode is
55080      # case insensitive, let's make it lowercase to improve readability.
55081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55082      # Now convert it back to Unix-style (cygpath)
55083      input_path=`$CYGPATH -u "$shortmode_path"`
55084      new_path="$input_path"
55085    fi
55086  fi
55087
55088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55089  if test "x$test_cygdrive_prefix" = x; then
55090    # As a simple fix, exclude /usr/bin since it's not a real path.
55091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55093      # a path prefixed by /cygdrive for fixpath to work.
55094      new_path="$CYGWIN_ROOT_PATH$input_path"
55095    fi
55096  fi
55097
55098
55099  if test "x$path" != "x$new_path"; then
55100    MSVC_DLL="$new_path"
55101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55102$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55103  fi
55104
55105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55106
55107  path="$MSVC_DLL"
55108  has_colon=`$ECHO $path | $GREP ^.:`
55109  new_path="$path"
55110  if test "x$has_colon" = x; then
55111    # Not in mixed or Windows style, start by that.
55112    new_path=`cmd //c echo $path`
55113  fi
55114
55115
55116  input_path="$new_path"
55117  # Check if we need to convert this using DOS-style short mode. If the path
55118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55119  # take no chances and rewrite it.
55120  # Note: m4 eats our [], so we need to use [ and ] instead.
55121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55122  if test "x$has_forbidden_chars" != x; then
55123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55125  fi
55126
55127
55128  windows_path="$new_path"
55129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55130    unix_path=`$CYGPATH -u "$windows_path"`
55131    new_path="$unix_path"
55132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55134    new_path="$unix_path"
55135  fi
55136
55137  if test "x$path" != "x$new_path"; then
55138    MSVC_DLL="$new_path"
55139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55140$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55141  fi
55142
55143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55145
55146    else
55147      # We're on a unix platform. Hooray! :)
55148      path="$MSVC_DLL"
55149      has_space=`$ECHO "$path" | $GREP " "`
55150      if test "x$has_space" != x; then
55151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55152$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55154      fi
55155
55156      # Use eval to expand a potential ~
55157      eval path="$path"
55158      if test ! -f "$path" && test ! -d "$path"; then
55159        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55160      fi
55161
55162      if test -d "$path"; then
55163        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55164      else
55165        dir="`$DIRNAME "$path"`"
55166        base="`$BASENAME "$path"`"
55167        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55168      fi
55169    fi
55170  fi
55171
55172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55173$as_echo_n "checking for $DLL_NAME... " >&6; }
55174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55175$as_echo "$MSVC_DLL" >&6; }
55176    else
55177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55178$as_echo "incorrect, ignoring" >&6; }
55179      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55180$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55181    fi
55182  fi
55183
55184    fi
55185  fi
55186
55187  if test "x$MSVC_DLL" = x; then
55188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55189$as_echo_n "checking for $DLL_NAME... " >&6; }
55190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55191$as_echo "no" >&6; }
55192    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55193  fi
55194
55195    MSVCR_DLL="$MSVC_DLL"
55196  fi
55197
55198
55199
55200# Check whether --with-msvcp-dll was given.
55201if test "${with_msvcp_dll+set}" = set; then :
55202  withval=$with_msvcp_dll;
55203fi
55204
55205
55206  if test "x$MSVCP_NAME" != "x"; then
55207    if test "x$with_msvcp_dll" != x; then
55208      # If given explicitly by user, do not probe. If not present, fail directly.
55209
55210  DLL_NAME="$MSVCP_NAME"
55211  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55212  METHOD="--with-msvcp-dll"
55213  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55215$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55216
55217    # Need to check if the found msvcr is correct architecture
55218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55219$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55220    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55222      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55223      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55224      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55225        CORRECT_MSVCR_ARCH="PE32 executable"
55226      else
55227        CORRECT_MSVCR_ARCH="PE32+ executable"
55228      fi
55229    else
55230      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55231        CORRECT_MSVCR_ARCH=386
55232      else
55233        CORRECT_MSVCR_ARCH=x86-64
55234      fi
55235    fi
55236    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55238$as_echo "ok" >&6; }
55239      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55240
55241  # Only process if variable expands to non-empty
55242
55243  if test "x$MSVC_DLL" != x; then
55244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55245
55246  # Input might be given as Windows format, start by converting to
55247  # unix format.
55248  path="$MSVC_DLL"
55249  new_path=`$CYGPATH -u "$path"`
55250
55251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55254  # "foo.exe" is OK but "foo" is an error.
55255  #
55256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55257  # It is also a way to make sure we got the proper file name for the real test later on.
55258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55259  if test "x$test_shortpath" = x; then
55260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55262    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55263  fi
55264
55265  # Call helper function which possibly converts this using DOS-style short mode.
55266  # If so, the updated path is stored in $new_path.
55267
55268  input_path="$new_path"
55269  # Check if we need to convert this using DOS-style short mode. If the path
55270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55271  # take no chances and rewrite it.
55272  # Note: m4 eats our [], so we need to use [ and ] instead.
55273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55274  if test "x$has_forbidden_chars" != x; then
55275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55279      # Going to short mode and back again did indeed matter. Since short mode is
55280      # case insensitive, let's make it lowercase to improve readability.
55281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55282      # Now convert it back to Unix-style (cygpath)
55283      input_path=`$CYGPATH -u "$shortmode_path"`
55284      new_path="$input_path"
55285    fi
55286  fi
55287
55288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55289  if test "x$test_cygdrive_prefix" = x; then
55290    # As a simple fix, exclude /usr/bin since it's not a real path.
55291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55293      # a path prefixed by /cygdrive for fixpath to work.
55294      new_path="$CYGWIN_ROOT_PATH$input_path"
55295    fi
55296  fi
55297
55298
55299  if test "x$path" != "x$new_path"; then
55300    MSVC_DLL="$new_path"
55301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55303  fi
55304
55305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55306
55307  path="$MSVC_DLL"
55308  has_colon=`$ECHO $path | $GREP ^.:`
55309  new_path="$path"
55310  if test "x$has_colon" = x; then
55311    # Not in mixed or Windows style, start by that.
55312    new_path=`cmd //c echo $path`
55313  fi
55314
55315
55316  input_path="$new_path"
55317  # Check if we need to convert this using DOS-style short mode. If the path
55318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55319  # take no chances and rewrite it.
55320  # Note: m4 eats our [], so we need to use [ and ] instead.
55321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55322  if test "x$has_forbidden_chars" != x; then
55323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55325  fi
55326
55327
55328  windows_path="$new_path"
55329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55330    unix_path=`$CYGPATH -u "$windows_path"`
55331    new_path="$unix_path"
55332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55334    new_path="$unix_path"
55335  fi
55336
55337  if test "x$path" != "x$new_path"; then
55338    MSVC_DLL="$new_path"
55339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55341  fi
55342
55343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55345
55346    else
55347      # We're on a unix platform. Hooray! :)
55348      path="$MSVC_DLL"
55349      has_space=`$ECHO "$path" | $GREP " "`
55350      if test "x$has_space" != x; then
55351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55352$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55354      fi
55355
55356      # Use eval to expand a potential ~
55357      eval path="$path"
55358      if test ! -f "$path" && test ! -d "$path"; then
55359        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55360      fi
55361
55362      if test -d "$path"; then
55363        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55364      else
55365        dir="`$DIRNAME "$path"`"
55366        base="`$BASENAME "$path"`"
55367        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55368      fi
55369    fi
55370  fi
55371
55372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55373$as_echo_n "checking for $DLL_NAME... " >&6; }
55374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55375$as_echo "$MSVC_DLL" >&6; }
55376    else
55377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55378$as_echo "incorrect, ignoring" >&6; }
55379      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55380$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55381    fi
55382  fi
55383
55384      if test "x$MSVC_DLL" = x; then
55385        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55386      fi
55387      MSVCP_DLL="$MSVC_DLL"
55388    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55389
55390  DLL_NAME="$MSVCP_NAME"
55391  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55392  METHOD="devkit"
55393  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55394    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55395$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55396
55397    # Need to check if the found msvcr is correct architecture
55398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55399$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55400    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55402      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55403      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55404      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55405        CORRECT_MSVCR_ARCH="PE32 executable"
55406      else
55407        CORRECT_MSVCR_ARCH="PE32+ executable"
55408      fi
55409    else
55410      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55411        CORRECT_MSVCR_ARCH=386
55412      else
55413        CORRECT_MSVCR_ARCH=x86-64
55414      fi
55415    fi
55416    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55418$as_echo "ok" >&6; }
55419      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55420
55421  # Only process if variable expands to non-empty
55422
55423  if test "x$MSVC_DLL" != x; then
55424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55425
55426  # Input might be given as Windows format, start by converting to
55427  # unix format.
55428  path="$MSVC_DLL"
55429  new_path=`$CYGPATH -u "$path"`
55430
55431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55434  # "foo.exe" is OK but "foo" is an error.
55435  #
55436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55437  # It is also a way to make sure we got the proper file name for the real test later on.
55438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55439  if test "x$test_shortpath" = x; then
55440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55441$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55442    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55443  fi
55444
55445  # Call helper function which possibly converts this using DOS-style short mode.
55446  # If so, the updated path is stored in $new_path.
55447
55448  input_path="$new_path"
55449  # Check if we need to convert this using DOS-style short mode. If the path
55450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55451  # take no chances and rewrite it.
55452  # Note: m4 eats our [], so we need to use [ and ] instead.
55453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55454  if test "x$has_forbidden_chars" != x; then
55455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55459      # Going to short mode and back again did indeed matter. Since short mode is
55460      # case insensitive, let's make it lowercase to improve readability.
55461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55462      # Now convert it back to Unix-style (cygpath)
55463      input_path=`$CYGPATH -u "$shortmode_path"`
55464      new_path="$input_path"
55465    fi
55466  fi
55467
55468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55469  if test "x$test_cygdrive_prefix" = x; then
55470    # As a simple fix, exclude /usr/bin since it's not a real path.
55471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55473      # a path prefixed by /cygdrive for fixpath to work.
55474      new_path="$CYGWIN_ROOT_PATH$input_path"
55475    fi
55476  fi
55477
55478
55479  if test "x$path" != "x$new_path"; then
55480    MSVC_DLL="$new_path"
55481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55482$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55483  fi
55484
55485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55486
55487  path="$MSVC_DLL"
55488  has_colon=`$ECHO $path | $GREP ^.:`
55489  new_path="$path"
55490  if test "x$has_colon" = x; then
55491    # Not in mixed or Windows style, start by that.
55492    new_path=`cmd //c echo $path`
55493  fi
55494
55495
55496  input_path="$new_path"
55497  # Check if we need to convert this using DOS-style short mode. If the path
55498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55499  # take no chances and rewrite it.
55500  # Note: m4 eats our [], so we need to use [ and ] instead.
55501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55502  if test "x$has_forbidden_chars" != x; then
55503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55505  fi
55506
55507
55508  windows_path="$new_path"
55509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55510    unix_path=`$CYGPATH -u "$windows_path"`
55511    new_path="$unix_path"
55512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55514    new_path="$unix_path"
55515  fi
55516
55517  if test "x$path" != "x$new_path"; then
55518    MSVC_DLL="$new_path"
55519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55520$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55521  fi
55522
55523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55525
55526    else
55527      # We're on a unix platform. Hooray! :)
55528      path="$MSVC_DLL"
55529      has_space=`$ECHO "$path" | $GREP " "`
55530      if test "x$has_space" != x; then
55531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55532$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55533        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55534      fi
55535
55536      # Use eval to expand a potential ~
55537      eval path="$path"
55538      if test ! -f "$path" && test ! -d "$path"; then
55539        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55540      fi
55541
55542      if test -d "$path"; then
55543        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55544      else
55545        dir="`$DIRNAME "$path"`"
55546        base="`$BASENAME "$path"`"
55547        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55548      fi
55549    fi
55550  fi
55551
55552      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55553$as_echo_n "checking for $DLL_NAME... " >&6; }
55554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55555$as_echo "$MSVC_DLL" >&6; }
55556    else
55557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55558$as_echo "incorrect, ignoring" >&6; }
55559      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55560$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55561    fi
55562  fi
55563
55564      if test "x$MSVC_DLL" = x; then
55565        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55566      fi
55567      MSVCP_DLL="$MSVC_DLL"
55568    else
55569
55570  DLL_NAME="${MSVCP_NAME}"
55571  MSVC_DLL=
55572
55573  if test "x$MSVC_DLL" = x; then
55574    # Probe: Using well-known location from Visual Studio 10.0
55575    if test "x$VCINSTALLDIR" != x; then
55576      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55577
55578  windows_path="$CYGWIN_VC_INSTALL_DIR"
55579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55580    unix_path=`$CYGPATH -u "$windows_path"`
55581    CYGWIN_VC_INSTALL_DIR="$unix_path"
55582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55584    CYGWIN_VC_INSTALL_DIR="$unix_path"
55585  fi
55586
55587      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55588        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55589      else
55590        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55591      fi
55592      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55593
55594  DLL_NAME="$DLL_NAME"
55595  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55596  METHOD="well-known location in VCINSTALLDIR"
55597  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55599$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55600
55601    # Need to check if the found msvcr is correct architecture
55602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55603$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55604    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55606      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55607      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55608      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55609        CORRECT_MSVCR_ARCH="PE32 executable"
55610      else
55611        CORRECT_MSVCR_ARCH="PE32+ executable"
55612      fi
55613    else
55614      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55615        CORRECT_MSVCR_ARCH=386
55616      else
55617        CORRECT_MSVCR_ARCH=x86-64
55618      fi
55619    fi
55620    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55622$as_echo "ok" >&6; }
55623      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55624
55625  # Only process if variable expands to non-empty
55626
55627  if test "x$MSVC_DLL" != x; then
55628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55629
55630  # Input might be given as Windows format, start by converting to
55631  # unix format.
55632  path="$MSVC_DLL"
55633  new_path=`$CYGPATH -u "$path"`
55634
55635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55638  # "foo.exe" is OK but "foo" is an error.
55639  #
55640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55641  # It is also a way to make sure we got the proper file name for the real test later on.
55642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55643  if test "x$test_shortpath" = x; then
55644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55645$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55646    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55647  fi
55648
55649  # Call helper function which possibly converts this using DOS-style short mode.
55650  # If so, the updated path is stored in $new_path.
55651
55652  input_path="$new_path"
55653  # Check if we need to convert this using DOS-style short mode. If the path
55654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55655  # take no chances and rewrite it.
55656  # Note: m4 eats our [], so we need to use [ and ] instead.
55657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55658  if test "x$has_forbidden_chars" != x; then
55659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55663      # Going to short mode and back again did indeed matter. Since short mode is
55664      # case insensitive, let's make it lowercase to improve readability.
55665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55666      # Now convert it back to Unix-style (cygpath)
55667      input_path=`$CYGPATH -u "$shortmode_path"`
55668      new_path="$input_path"
55669    fi
55670  fi
55671
55672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55673  if test "x$test_cygdrive_prefix" = x; then
55674    # As a simple fix, exclude /usr/bin since it's not a real path.
55675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55677      # a path prefixed by /cygdrive for fixpath to work.
55678      new_path="$CYGWIN_ROOT_PATH$input_path"
55679    fi
55680  fi
55681
55682
55683  if test "x$path" != "x$new_path"; then
55684    MSVC_DLL="$new_path"
55685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55686$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55687  fi
55688
55689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55690
55691  path="$MSVC_DLL"
55692  has_colon=`$ECHO $path | $GREP ^.:`
55693  new_path="$path"
55694  if test "x$has_colon" = x; then
55695    # Not in mixed or Windows style, start by that.
55696    new_path=`cmd //c echo $path`
55697  fi
55698
55699
55700  input_path="$new_path"
55701  # Check if we need to convert this using DOS-style short mode. If the path
55702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55703  # take no chances and rewrite it.
55704  # Note: m4 eats our [], so we need to use [ and ] instead.
55705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55706  if test "x$has_forbidden_chars" != x; then
55707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55709  fi
55710
55711
55712  windows_path="$new_path"
55713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55714    unix_path=`$CYGPATH -u "$windows_path"`
55715    new_path="$unix_path"
55716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55718    new_path="$unix_path"
55719  fi
55720
55721  if test "x$path" != "x$new_path"; then
55722    MSVC_DLL="$new_path"
55723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55724$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55725  fi
55726
55727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55729
55730    else
55731      # We're on a unix platform. Hooray! :)
55732      path="$MSVC_DLL"
55733      has_space=`$ECHO "$path" | $GREP " "`
55734      if test "x$has_space" != x; then
55735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55736$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55738      fi
55739
55740      # Use eval to expand a potential ~
55741      eval path="$path"
55742      if test ! -f "$path" && test ! -d "$path"; then
55743        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55744      fi
55745
55746      if test -d "$path"; then
55747        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55748      else
55749        dir="`$DIRNAME "$path"`"
55750        base="`$BASENAME "$path"`"
55751        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55752      fi
55753    fi
55754  fi
55755
55756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55757$as_echo_n "checking for $DLL_NAME... " >&6; }
55758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55759$as_echo "$MSVC_DLL" >&6; }
55760    else
55761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55762$as_echo "incorrect, ignoring" >&6; }
55763      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55764$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55765    fi
55766  fi
55767
55768    fi
55769  fi
55770
55771  if test "x$MSVC_DLL" = x; then
55772    # Probe: Check in the Boot JDK directory.
55773    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55774
55775  DLL_NAME="$DLL_NAME"
55776  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55777  METHOD="well-known location in Boot JDK"
55778  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55779    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55780$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55781
55782    # Need to check if the found msvcr is correct architecture
55783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55784$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55785    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55787      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55788      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55789      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55790        CORRECT_MSVCR_ARCH="PE32 executable"
55791      else
55792        CORRECT_MSVCR_ARCH="PE32+ executable"
55793      fi
55794    else
55795      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55796        CORRECT_MSVCR_ARCH=386
55797      else
55798        CORRECT_MSVCR_ARCH=x86-64
55799      fi
55800    fi
55801    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55803$as_echo "ok" >&6; }
55804      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55805
55806  # Only process if variable expands to non-empty
55807
55808  if test "x$MSVC_DLL" != x; then
55809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55810
55811  # Input might be given as Windows format, start by converting to
55812  # unix format.
55813  path="$MSVC_DLL"
55814  new_path=`$CYGPATH -u "$path"`
55815
55816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55819  # "foo.exe" is OK but "foo" is an error.
55820  #
55821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55822  # It is also a way to make sure we got the proper file name for the real test later on.
55823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55824  if test "x$test_shortpath" = x; then
55825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55826$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55827    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55828  fi
55829
55830  # Call helper function which possibly converts this using DOS-style short mode.
55831  # If so, the updated path is stored in $new_path.
55832
55833  input_path="$new_path"
55834  # Check if we need to convert this using DOS-style short mode. If the path
55835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55836  # take no chances and rewrite it.
55837  # Note: m4 eats our [], so we need to use [ and ] instead.
55838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55839  if test "x$has_forbidden_chars" != x; then
55840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55844      # Going to short mode and back again did indeed matter. Since short mode is
55845      # case insensitive, let's make it lowercase to improve readability.
55846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55847      # Now convert it back to Unix-style (cygpath)
55848      input_path=`$CYGPATH -u "$shortmode_path"`
55849      new_path="$input_path"
55850    fi
55851  fi
55852
55853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55854  if test "x$test_cygdrive_prefix" = x; then
55855    # As a simple fix, exclude /usr/bin since it's not a real path.
55856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55858      # a path prefixed by /cygdrive for fixpath to work.
55859      new_path="$CYGWIN_ROOT_PATH$input_path"
55860    fi
55861  fi
55862
55863
55864  if test "x$path" != "x$new_path"; then
55865    MSVC_DLL="$new_path"
55866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55867$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55868  fi
55869
55870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55871
55872  path="$MSVC_DLL"
55873  has_colon=`$ECHO $path | $GREP ^.:`
55874  new_path="$path"
55875  if test "x$has_colon" = x; then
55876    # Not in mixed or Windows style, start by that.
55877    new_path=`cmd //c echo $path`
55878  fi
55879
55880
55881  input_path="$new_path"
55882  # Check if we need to convert this using DOS-style short mode. If the path
55883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55884  # take no chances and rewrite it.
55885  # Note: m4 eats our [], so we need to use [ and ] instead.
55886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55887  if test "x$has_forbidden_chars" != x; then
55888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55890  fi
55891
55892
55893  windows_path="$new_path"
55894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55895    unix_path=`$CYGPATH -u "$windows_path"`
55896    new_path="$unix_path"
55897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55899    new_path="$unix_path"
55900  fi
55901
55902  if test "x$path" != "x$new_path"; then
55903    MSVC_DLL="$new_path"
55904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55905$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55906  fi
55907
55908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55910
55911    else
55912      # We're on a unix platform. Hooray! :)
55913      path="$MSVC_DLL"
55914      has_space=`$ECHO "$path" | $GREP " "`
55915      if test "x$has_space" != x; then
55916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55917$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55918        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55919      fi
55920
55921      # Use eval to expand a potential ~
55922      eval path="$path"
55923      if test ! -f "$path" && test ! -d "$path"; then
55924        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55925      fi
55926
55927      if test -d "$path"; then
55928        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55929      else
55930        dir="`$DIRNAME "$path"`"
55931        base="`$BASENAME "$path"`"
55932        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55933      fi
55934    fi
55935  fi
55936
55937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55938$as_echo_n "checking for $DLL_NAME... " >&6; }
55939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55940$as_echo "$MSVC_DLL" >&6; }
55941    else
55942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55943$as_echo "incorrect, ignoring" >&6; }
55944      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55945$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55946    fi
55947  fi
55948
55949  fi
55950
55951  if test "x$MSVC_DLL" = x; then
55952    # Probe: Look in the Windows system32 directory
55953    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55954
55955  windows_path="$CYGWIN_SYSTEMROOT"
55956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55957    unix_path=`$CYGPATH -u "$windows_path"`
55958    CYGWIN_SYSTEMROOT="$unix_path"
55959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55961    CYGWIN_SYSTEMROOT="$unix_path"
55962  fi
55963
55964    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55965
55966  DLL_NAME="$DLL_NAME"
55967  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55968  METHOD="well-known location in SYSTEMROOT"
55969  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55971$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55972
55973    # Need to check if the found msvcr is correct architecture
55974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55975$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55976    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55978      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55979      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55980      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55981        CORRECT_MSVCR_ARCH="PE32 executable"
55982      else
55983        CORRECT_MSVCR_ARCH="PE32+ executable"
55984      fi
55985    else
55986      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55987        CORRECT_MSVCR_ARCH=386
55988      else
55989        CORRECT_MSVCR_ARCH=x86-64
55990      fi
55991    fi
55992    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55993      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55994$as_echo "ok" >&6; }
55995      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55996
55997  # Only process if variable expands to non-empty
55998
55999  if test "x$MSVC_DLL" != x; then
56000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56001
56002  # Input might be given as Windows format, start by converting to
56003  # unix format.
56004  path="$MSVC_DLL"
56005  new_path=`$CYGPATH -u "$path"`
56006
56007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56010  # "foo.exe" is OK but "foo" is an error.
56011  #
56012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56013  # It is also a way to make sure we got the proper file name for the real test later on.
56014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56015  if test "x$test_shortpath" = x; then
56016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56017$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56018    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56019  fi
56020
56021  # Call helper function which possibly converts this using DOS-style short mode.
56022  # If so, the updated path is stored in $new_path.
56023
56024  input_path="$new_path"
56025  # Check if we need to convert this using DOS-style short mode. If the path
56026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56027  # take no chances and rewrite it.
56028  # Note: m4 eats our [], so we need to use [ and ] instead.
56029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56030  if test "x$has_forbidden_chars" != x; then
56031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56035      # Going to short mode and back again did indeed matter. Since short mode is
56036      # case insensitive, let's make it lowercase to improve readability.
56037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56038      # Now convert it back to Unix-style (cygpath)
56039      input_path=`$CYGPATH -u "$shortmode_path"`
56040      new_path="$input_path"
56041    fi
56042  fi
56043
56044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56045  if test "x$test_cygdrive_prefix" = x; then
56046    # As a simple fix, exclude /usr/bin since it's not a real path.
56047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56049      # a path prefixed by /cygdrive for fixpath to work.
56050      new_path="$CYGWIN_ROOT_PATH$input_path"
56051    fi
56052  fi
56053
56054
56055  if test "x$path" != "x$new_path"; then
56056    MSVC_DLL="$new_path"
56057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56058$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56059  fi
56060
56061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56062
56063  path="$MSVC_DLL"
56064  has_colon=`$ECHO $path | $GREP ^.:`
56065  new_path="$path"
56066  if test "x$has_colon" = x; then
56067    # Not in mixed or Windows style, start by that.
56068    new_path=`cmd //c echo $path`
56069  fi
56070
56071
56072  input_path="$new_path"
56073  # Check if we need to convert this using DOS-style short mode. If the path
56074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56075  # take no chances and rewrite it.
56076  # Note: m4 eats our [], so we need to use [ and ] instead.
56077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56078  if test "x$has_forbidden_chars" != x; then
56079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56081  fi
56082
56083
56084  windows_path="$new_path"
56085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56086    unix_path=`$CYGPATH -u "$windows_path"`
56087    new_path="$unix_path"
56088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56090    new_path="$unix_path"
56091  fi
56092
56093  if test "x$path" != "x$new_path"; then
56094    MSVC_DLL="$new_path"
56095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56096$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56097  fi
56098
56099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56101
56102    else
56103      # We're on a unix platform. Hooray! :)
56104      path="$MSVC_DLL"
56105      has_space=`$ECHO "$path" | $GREP " "`
56106      if test "x$has_space" != x; then
56107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56108$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56110      fi
56111
56112      # Use eval to expand a potential ~
56113      eval path="$path"
56114      if test ! -f "$path" && test ! -d "$path"; then
56115        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56116      fi
56117
56118      if test -d "$path"; then
56119        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56120      else
56121        dir="`$DIRNAME "$path"`"
56122        base="`$BASENAME "$path"`"
56123        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56124      fi
56125    fi
56126  fi
56127
56128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56129$as_echo_n "checking for $DLL_NAME... " >&6; }
56130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56131$as_echo "$MSVC_DLL" >&6; }
56132    else
56133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56134$as_echo "incorrect, ignoring" >&6; }
56135      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56136$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56137    fi
56138  fi
56139
56140  fi
56141
56142  if test "x$MSVC_DLL" = x; then
56143    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56144    if test "x$VS100COMNTOOLS" != x; then
56145      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56146
56147  windows_path="$CYGWIN_VS_TOOLS_DIR"
56148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56149    unix_path=`$CYGPATH -u "$windows_path"`
56150    CYGWIN_VS_TOOLS_DIR="$unix_path"
56151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56153    CYGWIN_VS_TOOLS_DIR="$unix_path"
56154  fi
56155
56156      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56157        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56158	    | $GREP -i /x64/ | $HEAD --lines 1`
56159      else
56160        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56161	    | $GREP -i /x86/ | $HEAD --lines 1`
56162      fi
56163
56164  DLL_NAME="$DLL_NAME"
56165  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56166  METHOD="search of VS100COMNTOOLS"
56167  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56168    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56169$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56170
56171    # Need to check if the found msvcr is correct architecture
56172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56173$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56174    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56176      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56177      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56178      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56179        CORRECT_MSVCR_ARCH="PE32 executable"
56180      else
56181        CORRECT_MSVCR_ARCH="PE32+ executable"
56182      fi
56183    else
56184      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56185        CORRECT_MSVCR_ARCH=386
56186      else
56187        CORRECT_MSVCR_ARCH=x86-64
56188      fi
56189    fi
56190    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56192$as_echo "ok" >&6; }
56193      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56194
56195  # Only process if variable expands to non-empty
56196
56197  if test "x$MSVC_DLL" != x; then
56198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56199
56200  # Input might be given as Windows format, start by converting to
56201  # unix format.
56202  path="$MSVC_DLL"
56203  new_path=`$CYGPATH -u "$path"`
56204
56205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56208  # "foo.exe" is OK but "foo" is an error.
56209  #
56210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56211  # It is also a way to make sure we got the proper file name for the real test later on.
56212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56213  if test "x$test_shortpath" = x; then
56214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56215$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56216    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56217  fi
56218
56219  # Call helper function which possibly converts this using DOS-style short mode.
56220  # If so, the updated path is stored in $new_path.
56221
56222  input_path="$new_path"
56223  # Check if we need to convert this using DOS-style short mode. If the path
56224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56225  # take no chances and rewrite it.
56226  # Note: m4 eats our [], so we need to use [ and ] instead.
56227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56228  if test "x$has_forbidden_chars" != x; then
56229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56233      # Going to short mode and back again did indeed matter. Since short mode is
56234      # case insensitive, let's make it lowercase to improve readability.
56235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56236      # Now convert it back to Unix-style (cygpath)
56237      input_path=`$CYGPATH -u "$shortmode_path"`
56238      new_path="$input_path"
56239    fi
56240  fi
56241
56242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56243  if test "x$test_cygdrive_prefix" = x; then
56244    # As a simple fix, exclude /usr/bin since it's not a real path.
56245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56247      # a path prefixed by /cygdrive for fixpath to work.
56248      new_path="$CYGWIN_ROOT_PATH$input_path"
56249    fi
56250  fi
56251
56252
56253  if test "x$path" != "x$new_path"; then
56254    MSVC_DLL="$new_path"
56255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56256$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56257  fi
56258
56259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56260
56261  path="$MSVC_DLL"
56262  has_colon=`$ECHO $path | $GREP ^.:`
56263  new_path="$path"
56264  if test "x$has_colon" = x; then
56265    # Not in mixed or Windows style, start by that.
56266    new_path=`cmd //c echo $path`
56267  fi
56268
56269
56270  input_path="$new_path"
56271  # Check if we need to convert this using DOS-style short mode. If the path
56272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56273  # take no chances and rewrite it.
56274  # Note: m4 eats our [], so we need to use [ and ] instead.
56275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56276  if test "x$has_forbidden_chars" != x; then
56277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56279  fi
56280
56281
56282  windows_path="$new_path"
56283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56284    unix_path=`$CYGPATH -u "$windows_path"`
56285    new_path="$unix_path"
56286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56288    new_path="$unix_path"
56289  fi
56290
56291  if test "x$path" != "x$new_path"; then
56292    MSVC_DLL="$new_path"
56293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56295  fi
56296
56297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56299
56300    else
56301      # We're on a unix platform. Hooray! :)
56302      path="$MSVC_DLL"
56303      has_space=`$ECHO "$path" | $GREP " "`
56304      if test "x$has_space" != x; then
56305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56306$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56308      fi
56309
56310      # Use eval to expand a potential ~
56311      eval path="$path"
56312      if test ! -f "$path" && test ! -d "$path"; then
56313        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56314      fi
56315
56316      if test -d "$path"; then
56317        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56318      else
56319        dir="`$DIRNAME "$path"`"
56320        base="`$BASENAME "$path"`"
56321        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56322      fi
56323    fi
56324  fi
56325
56326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56327$as_echo_n "checking for $DLL_NAME... " >&6; }
56328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56329$as_echo "$MSVC_DLL" >&6; }
56330    else
56331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56332$as_echo "incorrect, ignoring" >&6; }
56333      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56334$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56335    fi
56336  fi
56337
56338    fi
56339  fi
56340
56341  if test "x$MSVC_DLL" = x; then
56342    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56343    # (This was the original behaviour; kept since it might turn something up)
56344    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56345      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56346        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56347	    | $GREP x64 | $HEAD --lines 1`
56348      else
56349        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56350	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56351        if test "x$POSSIBLE_MSVC_DLL" = x; then
56352          # We're grasping at straws now...
56353          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56354	      | $HEAD --lines 1`
56355        fi
56356      fi
56357
56358
56359  DLL_NAME="$DLL_NAME"
56360  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56361  METHOD="search of VCINSTALLDIR"
56362  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56364$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56365
56366    # Need to check if the found msvcr is correct architecture
56367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56368$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56369    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56371      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56372      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56373      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56374        CORRECT_MSVCR_ARCH="PE32 executable"
56375      else
56376        CORRECT_MSVCR_ARCH="PE32+ executable"
56377      fi
56378    else
56379      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56380        CORRECT_MSVCR_ARCH=386
56381      else
56382        CORRECT_MSVCR_ARCH=x86-64
56383      fi
56384    fi
56385    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56387$as_echo "ok" >&6; }
56388      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56389
56390  # Only process if variable expands to non-empty
56391
56392  if test "x$MSVC_DLL" != x; then
56393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56394
56395  # Input might be given as Windows format, start by converting to
56396  # unix format.
56397  path="$MSVC_DLL"
56398  new_path=`$CYGPATH -u "$path"`
56399
56400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56403  # "foo.exe" is OK but "foo" is an error.
56404  #
56405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56406  # It is also a way to make sure we got the proper file name for the real test later on.
56407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56408  if test "x$test_shortpath" = x; then
56409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56410$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56411    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56412  fi
56413
56414  # Call helper function which possibly converts this using DOS-style short mode.
56415  # If so, the updated path is stored in $new_path.
56416
56417  input_path="$new_path"
56418  # Check if we need to convert this using DOS-style short mode. If the path
56419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56420  # take no chances and rewrite it.
56421  # Note: m4 eats our [], so we need to use [ and ] instead.
56422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56423  if test "x$has_forbidden_chars" != x; then
56424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56428      # Going to short mode and back again did indeed matter. Since short mode is
56429      # case insensitive, let's make it lowercase to improve readability.
56430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56431      # Now convert it back to Unix-style (cygpath)
56432      input_path=`$CYGPATH -u "$shortmode_path"`
56433      new_path="$input_path"
56434    fi
56435  fi
56436
56437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56438  if test "x$test_cygdrive_prefix" = x; then
56439    # As a simple fix, exclude /usr/bin since it's not a real path.
56440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56442      # a path prefixed by /cygdrive for fixpath to work.
56443      new_path="$CYGWIN_ROOT_PATH$input_path"
56444    fi
56445  fi
56446
56447
56448  if test "x$path" != "x$new_path"; then
56449    MSVC_DLL="$new_path"
56450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56451$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56452  fi
56453
56454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56455
56456  path="$MSVC_DLL"
56457  has_colon=`$ECHO $path | $GREP ^.:`
56458  new_path="$path"
56459  if test "x$has_colon" = x; then
56460    # Not in mixed or Windows style, start by that.
56461    new_path=`cmd //c echo $path`
56462  fi
56463
56464
56465  input_path="$new_path"
56466  # Check if we need to convert this using DOS-style short mode. If the path
56467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56468  # take no chances and rewrite it.
56469  # Note: m4 eats our [], so we need to use [ and ] instead.
56470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56471  if test "x$has_forbidden_chars" != x; then
56472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56474  fi
56475
56476
56477  windows_path="$new_path"
56478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56479    unix_path=`$CYGPATH -u "$windows_path"`
56480    new_path="$unix_path"
56481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56483    new_path="$unix_path"
56484  fi
56485
56486  if test "x$path" != "x$new_path"; then
56487    MSVC_DLL="$new_path"
56488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56489$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56490  fi
56491
56492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56494
56495    else
56496      # We're on a unix platform. Hooray! :)
56497      path="$MSVC_DLL"
56498      has_space=`$ECHO "$path" | $GREP " "`
56499      if test "x$has_space" != x; then
56500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56501$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56503      fi
56504
56505      # Use eval to expand a potential ~
56506      eval path="$path"
56507      if test ! -f "$path" && test ! -d "$path"; then
56508        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56509      fi
56510
56511      if test -d "$path"; then
56512        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56513      else
56514        dir="`$DIRNAME "$path"`"
56515        base="`$BASENAME "$path"`"
56516        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56517      fi
56518    fi
56519  fi
56520
56521      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56522$as_echo_n "checking for $DLL_NAME... " >&6; }
56523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56524$as_echo "$MSVC_DLL" >&6; }
56525    else
56526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56527$as_echo "incorrect, ignoring" >&6; }
56528      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56529$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56530    fi
56531  fi
56532
56533    fi
56534  fi
56535
56536  if test "x$MSVC_DLL" = x; then
56537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56538$as_echo_n "checking for $DLL_NAME... " >&6; }
56539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56540$as_echo "no" >&6; }
56541    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56542  fi
56543
56544      MSVCP_DLL="$MSVC_DLL"
56545    fi
56546
56547  fi
56548
56549  fi
56550
56551
56552  if test "x$NEEDS_LIB_X11" = xfalse; then
56553    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56554      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56555$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56556    fi
56557    X_CFLAGS=
56558    X_LIBS=
56559  else
56560
56561    if test "x${with_x}" = xno; then
56562      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56563    fi
56564
56565    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56566      # The user has specified a X11 base directory. Use it for includes and
56567      # libraries, unless explicitly overridden.
56568      if test "x$x_includes" = xNONE; then
56569        x_includes="${with_x}/include"
56570      fi
56571      if test "x$x_libraries" = xNONE; then
56572        x_libraries="${with_x}/lib"
56573      fi
56574    else
56575      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56576      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56577      # --x-libraries for the sysroot, if that seems to be correct.
56578      if test "x$SYSROOT" != "x"; then
56579        if test "x$x_includes" = xNONE; then
56580          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56581            x_includes="$SYSROOT/usr/X11R6/include"
56582          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56583            x_includes="$SYSROOT/usr/include"
56584          fi
56585        fi
56586        if test "x$x_libraries" = xNONE; then
56587          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56588            x_libraries="$SYSROOT/usr/X11R6/lib"
56589          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56590            x_libraries="$SYSROOT/usr/lib64"
56591          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56592            x_libraries="$SYSROOT/usr/lib"
56593          fi
56594        fi
56595      fi
56596    fi
56597
56598    # Now let autoconf do it's magic
56599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56600$as_echo_n "checking for X... " >&6; }
56601
56602
56603# Check whether --with-x was given.
56604if test "${with_x+set}" = set; then :
56605  withval=$with_x;
56606fi
56607
56608# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56609if test "x$with_x" = xno; then
56610  # The user explicitly disabled X.
56611  have_x=disabled
56612else
56613  case $x_includes,$x_libraries in #(
56614    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56615    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56616  $as_echo_n "(cached) " >&6
56617else
56618  # One or both of the vars are not set, and there is no cached value.
56619ac_x_includes=no ac_x_libraries=no
56620rm -f -r conftest.dir
56621if mkdir conftest.dir; then
56622  cd conftest.dir
56623  cat >Imakefile <<'_ACEOF'
56624incroot:
56625	@echo incroot='${INCROOT}'
56626usrlibdir:
56627	@echo usrlibdir='${USRLIBDIR}'
56628libdir:
56629	@echo libdir='${LIBDIR}'
56630_ACEOF
56631  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56632    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56633    for ac_var in incroot usrlibdir libdir; do
56634      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56635    done
56636    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56637    for ac_extension in a so sl dylib la dll; do
56638      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56639	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56640	ac_im_usrlibdir=$ac_im_libdir; break
56641      fi
56642    done
56643    # Screen out bogus values from the imake configuration.  They are
56644    # bogus both because they are the default anyway, and because
56645    # using them would break gcc on systems where it needs fixed includes.
56646    case $ac_im_incroot in
56647	/usr/include) ac_x_includes= ;;
56648	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56649    esac
56650    case $ac_im_usrlibdir in
56651	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56652	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56653    esac
56654  fi
56655  cd ..
56656  rm -f -r conftest.dir
56657fi
56658
56659# Standard set of common directories for X headers.
56660# Check X11 before X11Rn because it is often a symlink to the current release.
56661ac_x_header_dirs='
56662/usr/X11/include
56663/usr/X11R7/include
56664/usr/X11R6/include
56665/usr/X11R5/include
56666/usr/X11R4/include
56667
56668/usr/include/X11
56669/usr/include/X11R7
56670/usr/include/X11R6
56671/usr/include/X11R5
56672/usr/include/X11R4
56673
56674/usr/local/X11/include
56675/usr/local/X11R7/include
56676/usr/local/X11R6/include
56677/usr/local/X11R5/include
56678/usr/local/X11R4/include
56679
56680/usr/local/include/X11
56681/usr/local/include/X11R7
56682/usr/local/include/X11R6
56683/usr/local/include/X11R5
56684/usr/local/include/X11R4
56685
56686/usr/X386/include
56687/usr/x386/include
56688/usr/XFree86/include/X11
56689
56690/usr/include
56691/usr/local/include
56692/usr/unsupported/include
56693/usr/athena/include
56694/usr/local/x11r5/include
56695/usr/lpp/Xamples/include
56696
56697/usr/openwin/include
56698/usr/openwin/share/include'
56699
56700if test "$ac_x_includes" = no; then
56701  # Guess where to find include files, by looking for Xlib.h.
56702  # First, try using that file with no special directory specified.
56703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56704/* end confdefs.h.  */
56705#include <X11/Xlib.h>
56706_ACEOF
56707if ac_fn_cxx_try_cpp "$LINENO"; then :
56708  # We can compile using X headers with no special include directory.
56709ac_x_includes=
56710else
56711  for ac_dir in $ac_x_header_dirs; do
56712  if test -r "$ac_dir/X11/Xlib.h"; then
56713    ac_x_includes=$ac_dir
56714    break
56715  fi
56716done
56717fi
56718rm -f conftest.err conftest.i conftest.$ac_ext
56719fi # $ac_x_includes = no
56720
56721if test "$ac_x_libraries" = no; then
56722  # Check for the libraries.
56723  # See if we find them without any special options.
56724  # Don't add to $LIBS permanently.
56725  ac_save_LIBS=$LIBS
56726  LIBS="-lX11 $LIBS"
56727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56728/* end confdefs.h.  */
56729#include <X11/Xlib.h>
56730int
56731main ()
56732{
56733XrmInitialize ()
56734  ;
56735  return 0;
56736}
56737_ACEOF
56738if ac_fn_cxx_try_link "$LINENO"; then :
56739  LIBS=$ac_save_LIBS
56740# We can link X programs with no special library path.
56741ac_x_libraries=
56742else
56743  LIBS=$ac_save_LIBS
56744for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56745do
56746  # Don't even attempt the hair of trying to link an X program!
56747  for ac_extension in a so sl dylib la dll; do
56748    if test -r "$ac_dir/libX11.$ac_extension"; then
56749      ac_x_libraries=$ac_dir
56750      break 2
56751    fi
56752  done
56753done
56754fi
56755rm -f core conftest.err conftest.$ac_objext \
56756    conftest$ac_exeext conftest.$ac_ext
56757fi # $ac_x_libraries = no
56758
56759case $ac_x_includes,$ac_x_libraries in #(
56760  no,* | *,no | *\'*)
56761    # Didn't find X, or a directory has "'" in its name.
56762    ac_cv_have_x="have_x=no";; #(
56763  *)
56764    # Record where we found X for the cache.
56765    ac_cv_have_x="have_x=yes\
56766	ac_x_includes='$ac_x_includes'\
56767	ac_x_libraries='$ac_x_libraries'"
56768esac
56769fi
56770;; #(
56771    *) have_x=yes;;
56772  esac
56773  eval "$ac_cv_have_x"
56774fi # $with_x != no
56775
56776if test "$have_x" != yes; then
56777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56778$as_echo "$have_x" >&6; }
56779  no_x=yes
56780else
56781  # If each of the values was on the command line, it overrides each guess.
56782  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56783  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56784  # Update the cache value to reflect the command line values.
56785  ac_cv_have_x="have_x=yes\
56786	ac_x_includes='$x_includes'\
56787	ac_x_libraries='$x_libraries'"
56788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56789$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56790fi
56791
56792    if test "$no_x" = yes; then
56793  # Not all programs may use this symbol, but it does not hurt to define it.
56794
56795$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56796
56797  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56798else
56799  if test -n "$x_includes"; then
56800    X_CFLAGS="$X_CFLAGS -I$x_includes"
56801  fi
56802
56803  # It would also be nice to do this for all -L options, not just this one.
56804  if test -n "$x_libraries"; then
56805    X_LIBS="$X_LIBS -L$x_libraries"
56806    # For Solaris; some versions of Sun CC require a space after -R and
56807    # others require no space.  Words are not sufficient . . . .
56808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56809$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56810    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56811    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56812    ac_cxx_werror_flag=yes
56813    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56814/* end confdefs.h.  */
56815
56816int
56817main ()
56818{
56819
56820  ;
56821  return 0;
56822}
56823_ACEOF
56824if ac_fn_cxx_try_link "$LINENO"; then :
56825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56826$as_echo "no" >&6; }
56827       X_LIBS="$X_LIBS -R$x_libraries"
56828else
56829  LIBS="$ac_xsave_LIBS -R $x_libraries"
56830       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56831/* end confdefs.h.  */
56832
56833int
56834main ()
56835{
56836
56837  ;
56838  return 0;
56839}
56840_ACEOF
56841if ac_fn_cxx_try_link "$LINENO"; then :
56842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56843$as_echo "yes" >&6; }
56844	  X_LIBS="$X_LIBS -R $x_libraries"
56845else
56846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56847$as_echo "neither works" >&6; }
56848fi
56849rm -f core conftest.err conftest.$ac_objext \
56850    conftest$ac_exeext conftest.$ac_ext
56851fi
56852rm -f core conftest.err conftest.$ac_objext \
56853    conftest$ac_exeext conftest.$ac_ext
56854    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56855    LIBS=$ac_xsave_LIBS
56856  fi
56857
56858  # Check for system-dependent libraries X programs must link with.
56859  # Do this before checking for the system-independent R6 libraries
56860  # (-lICE), since we may need -lsocket or whatever for X linking.
56861
56862  if test "$ISC" = yes; then
56863    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56864  else
56865    # Martyn Johnson says this is needed for Ultrix, if the X
56866    # libraries were built with DECnet support.  And Karl Berry says
56867    # the Alpha needs dnet_stub (dnet does not exist).
56868    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56869    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56870/* end confdefs.h.  */
56871
56872/* Override any GCC internal prototype to avoid an error.
56873   Use char because int might match the return type of a GCC
56874   builtin and then its argument prototype would still apply.  */
56875#ifdef __cplusplus
56876extern "C"
56877#endif
56878char XOpenDisplay ();
56879int
56880main ()
56881{
56882return XOpenDisplay ();
56883  ;
56884  return 0;
56885}
56886_ACEOF
56887if ac_fn_cxx_try_link "$LINENO"; then :
56888
56889else
56890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56891$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56892if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56893  $as_echo_n "(cached) " >&6
56894else
56895  ac_check_lib_save_LIBS=$LIBS
56896LIBS="-ldnet  $LIBS"
56897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56898/* end confdefs.h.  */
56899
56900/* Override any GCC internal prototype to avoid an error.
56901   Use char because int might match the return type of a GCC
56902   builtin and then its argument prototype would still apply.  */
56903#ifdef __cplusplus
56904extern "C"
56905#endif
56906char dnet_ntoa ();
56907int
56908main ()
56909{
56910return dnet_ntoa ();
56911  ;
56912  return 0;
56913}
56914_ACEOF
56915if ac_fn_cxx_try_link "$LINENO"; then :
56916  ac_cv_lib_dnet_dnet_ntoa=yes
56917else
56918  ac_cv_lib_dnet_dnet_ntoa=no
56919fi
56920rm -f core conftest.err conftest.$ac_objext \
56921    conftest$ac_exeext conftest.$ac_ext
56922LIBS=$ac_check_lib_save_LIBS
56923fi
56924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56925$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56926if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56927  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56928fi
56929
56930    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56932$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56933if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56934  $as_echo_n "(cached) " >&6
56935else
56936  ac_check_lib_save_LIBS=$LIBS
56937LIBS="-ldnet_stub  $LIBS"
56938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56939/* end confdefs.h.  */
56940
56941/* Override any GCC internal prototype to avoid an error.
56942   Use char because int might match the return type of a GCC
56943   builtin and then its argument prototype would still apply.  */
56944#ifdef __cplusplus
56945extern "C"
56946#endif
56947char dnet_ntoa ();
56948int
56949main ()
56950{
56951return dnet_ntoa ();
56952  ;
56953  return 0;
56954}
56955_ACEOF
56956if ac_fn_cxx_try_link "$LINENO"; then :
56957  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56958else
56959  ac_cv_lib_dnet_stub_dnet_ntoa=no
56960fi
56961rm -f core conftest.err conftest.$ac_objext \
56962    conftest$ac_exeext conftest.$ac_ext
56963LIBS=$ac_check_lib_save_LIBS
56964fi
56965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56966$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56967if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56968  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56969fi
56970
56971    fi
56972fi
56973rm -f core conftest.err conftest.$ac_objext \
56974    conftest$ac_exeext conftest.$ac_ext
56975    LIBS="$ac_xsave_LIBS"
56976
56977    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56978    # to get the SysV transport functions.
56979    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56980    # needs -lnsl.
56981    # The nsl library prevents programs from opening the X display
56982    # on Irix 5.2, according to T.E. Dickey.
56983    # The functions gethostbyname, getservbyname, and inet_addr are
56984    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56985    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56986if test "x$ac_cv_func_gethostbyname" = xyes; then :
56987
56988fi
56989
56990    if test $ac_cv_func_gethostbyname = no; then
56991      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56992$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56993if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56994  $as_echo_n "(cached) " >&6
56995else
56996  ac_check_lib_save_LIBS=$LIBS
56997LIBS="-lnsl  $LIBS"
56998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56999/* end confdefs.h.  */
57000
57001/* Override any GCC internal prototype to avoid an error.
57002   Use char because int might match the return type of a GCC
57003   builtin and then its argument prototype would still apply.  */
57004#ifdef __cplusplus
57005extern "C"
57006#endif
57007char gethostbyname ();
57008int
57009main ()
57010{
57011return gethostbyname ();
57012  ;
57013  return 0;
57014}
57015_ACEOF
57016if ac_fn_cxx_try_link "$LINENO"; then :
57017  ac_cv_lib_nsl_gethostbyname=yes
57018else
57019  ac_cv_lib_nsl_gethostbyname=no
57020fi
57021rm -f core conftest.err conftest.$ac_objext \
57022    conftest$ac_exeext conftest.$ac_ext
57023LIBS=$ac_check_lib_save_LIBS
57024fi
57025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57026$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57027if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57028  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57029fi
57030
57031      if test $ac_cv_lib_nsl_gethostbyname = no; then
57032	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57033$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57034if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57035  $as_echo_n "(cached) " >&6
57036else
57037  ac_check_lib_save_LIBS=$LIBS
57038LIBS="-lbsd  $LIBS"
57039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57040/* end confdefs.h.  */
57041
57042/* Override any GCC internal prototype to avoid an error.
57043   Use char because int might match the return type of a GCC
57044   builtin and then its argument prototype would still apply.  */
57045#ifdef __cplusplus
57046extern "C"
57047#endif
57048char gethostbyname ();
57049int
57050main ()
57051{
57052return gethostbyname ();
57053  ;
57054  return 0;
57055}
57056_ACEOF
57057if ac_fn_cxx_try_link "$LINENO"; then :
57058  ac_cv_lib_bsd_gethostbyname=yes
57059else
57060  ac_cv_lib_bsd_gethostbyname=no
57061fi
57062rm -f core conftest.err conftest.$ac_objext \
57063    conftest$ac_exeext conftest.$ac_ext
57064LIBS=$ac_check_lib_save_LIBS
57065fi
57066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57067$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57068if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57069  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57070fi
57071
57072      fi
57073    fi
57074
57075    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57076    # socket/setsockopt and other routines are undefined under SCO ODT
57077    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57078    # on later versions), says Simon Leinen: it contains gethostby*
57079    # variants that don't use the name server (or something).  -lsocket
57080    # must be given before -lnsl if both are needed.  We assume that
57081    # if connect needs -lnsl, so does gethostbyname.
57082    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57083if test "x$ac_cv_func_connect" = xyes; then :
57084
57085fi
57086
57087    if test $ac_cv_func_connect = no; then
57088      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57089$as_echo_n "checking for connect in -lsocket... " >&6; }
57090if ${ac_cv_lib_socket_connect+:} false; then :
57091  $as_echo_n "(cached) " >&6
57092else
57093  ac_check_lib_save_LIBS=$LIBS
57094LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57096/* end confdefs.h.  */
57097
57098/* Override any GCC internal prototype to avoid an error.
57099   Use char because int might match the return type of a GCC
57100   builtin and then its argument prototype would still apply.  */
57101#ifdef __cplusplus
57102extern "C"
57103#endif
57104char connect ();
57105int
57106main ()
57107{
57108return connect ();
57109  ;
57110  return 0;
57111}
57112_ACEOF
57113if ac_fn_cxx_try_link "$LINENO"; then :
57114  ac_cv_lib_socket_connect=yes
57115else
57116  ac_cv_lib_socket_connect=no
57117fi
57118rm -f core conftest.err conftest.$ac_objext \
57119    conftest$ac_exeext conftest.$ac_ext
57120LIBS=$ac_check_lib_save_LIBS
57121fi
57122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57123$as_echo "$ac_cv_lib_socket_connect" >&6; }
57124if test "x$ac_cv_lib_socket_connect" = xyes; then :
57125  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57126fi
57127
57128    fi
57129
57130    # Guillermo Gomez says -lposix is necessary on A/UX.
57131    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57132if test "x$ac_cv_func_remove" = xyes; then :
57133
57134fi
57135
57136    if test $ac_cv_func_remove = no; then
57137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57138$as_echo_n "checking for remove in -lposix... " >&6; }
57139if ${ac_cv_lib_posix_remove+:} false; then :
57140  $as_echo_n "(cached) " >&6
57141else
57142  ac_check_lib_save_LIBS=$LIBS
57143LIBS="-lposix  $LIBS"
57144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57145/* end confdefs.h.  */
57146
57147/* Override any GCC internal prototype to avoid an error.
57148   Use char because int might match the return type of a GCC
57149   builtin and then its argument prototype would still apply.  */
57150#ifdef __cplusplus
57151extern "C"
57152#endif
57153char remove ();
57154int
57155main ()
57156{
57157return remove ();
57158  ;
57159  return 0;
57160}
57161_ACEOF
57162if ac_fn_cxx_try_link "$LINENO"; then :
57163  ac_cv_lib_posix_remove=yes
57164else
57165  ac_cv_lib_posix_remove=no
57166fi
57167rm -f core conftest.err conftest.$ac_objext \
57168    conftest$ac_exeext conftest.$ac_ext
57169LIBS=$ac_check_lib_save_LIBS
57170fi
57171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57172$as_echo "$ac_cv_lib_posix_remove" >&6; }
57173if test "x$ac_cv_lib_posix_remove" = xyes; then :
57174  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57175fi
57176
57177    fi
57178
57179    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57180    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57181if test "x$ac_cv_func_shmat" = xyes; then :
57182
57183fi
57184
57185    if test $ac_cv_func_shmat = no; then
57186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57187$as_echo_n "checking for shmat in -lipc... " >&6; }
57188if ${ac_cv_lib_ipc_shmat+:} false; then :
57189  $as_echo_n "(cached) " >&6
57190else
57191  ac_check_lib_save_LIBS=$LIBS
57192LIBS="-lipc  $LIBS"
57193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57194/* end confdefs.h.  */
57195
57196/* Override any GCC internal prototype to avoid an error.
57197   Use char because int might match the return type of a GCC
57198   builtin and then its argument prototype would still apply.  */
57199#ifdef __cplusplus
57200extern "C"
57201#endif
57202char shmat ();
57203int
57204main ()
57205{
57206return shmat ();
57207  ;
57208  return 0;
57209}
57210_ACEOF
57211if ac_fn_cxx_try_link "$LINENO"; then :
57212  ac_cv_lib_ipc_shmat=yes
57213else
57214  ac_cv_lib_ipc_shmat=no
57215fi
57216rm -f core conftest.err conftest.$ac_objext \
57217    conftest$ac_exeext conftest.$ac_ext
57218LIBS=$ac_check_lib_save_LIBS
57219fi
57220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57221$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57222if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57223  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57224fi
57225
57226    fi
57227  fi
57228
57229  # Check for libraries that X11R6 Xt/Xaw programs need.
57230  ac_save_LDFLAGS=$LDFLAGS
57231  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57232  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57233  # check for ICE first), but we must link in the order -lSM -lICE or
57234  # we get undefined symbols.  So assume we have SM if we have ICE.
57235  # These have to be linked with before -lX11, unlike the other
57236  # libraries we check for below, so use a different variable.
57237  # John Interrante, Karl Berry
57238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57239$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57240if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57241  $as_echo_n "(cached) " >&6
57242else
57243  ac_check_lib_save_LIBS=$LIBS
57244LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57246/* end confdefs.h.  */
57247
57248/* Override any GCC internal prototype to avoid an error.
57249   Use char because int might match the return type of a GCC
57250   builtin and then its argument prototype would still apply.  */
57251#ifdef __cplusplus
57252extern "C"
57253#endif
57254char IceConnectionNumber ();
57255int
57256main ()
57257{
57258return IceConnectionNumber ();
57259  ;
57260  return 0;
57261}
57262_ACEOF
57263if ac_fn_cxx_try_link "$LINENO"; then :
57264  ac_cv_lib_ICE_IceConnectionNumber=yes
57265else
57266  ac_cv_lib_ICE_IceConnectionNumber=no
57267fi
57268rm -f core conftest.err conftest.$ac_objext \
57269    conftest$ac_exeext conftest.$ac_ext
57270LIBS=$ac_check_lib_save_LIBS
57271fi
57272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57273$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57274if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57275  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57276fi
57277
57278  LDFLAGS=$ac_save_LDFLAGS
57279
57280fi
57281
57282
57283    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57284    # this doesn't make sense so we remove it.
57285    if test "x$COMPILE_TYPE" = xcross; then
57286      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57287    fi
57288
57289    if test "x$no_x" = xyes; then
57290
57291  # Print a helpful message on how to acquire the necessary build dependency.
57292  # x11 is the help tag: freetype, cups, alsa etc
57293  MISSING_DEPENDENCY=x11
57294
57295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57296    cygwin_help $MISSING_DEPENDENCY
57297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57298    msys_help $MISSING_DEPENDENCY
57299  else
57300    PKGHANDLER_COMMAND=
57301
57302    case $PKGHANDLER in
57303      apt-get)
57304        apt_help     $MISSING_DEPENDENCY ;;
57305      yum)
57306        yum_help     $MISSING_DEPENDENCY ;;
57307      brew)
57308        brew_help    $MISSING_DEPENDENCY ;;
57309      port)
57310        port_help    $MISSING_DEPENDENCY ;;
57311      pkgutil)
57312        pkgutil_help $MISSING_DEPENDENCY ;;
57313      pkgadd)
57314        pkgadd_help  $MISSING_DEPENDENCY ;;
57315    esac
57316
57317    if test "x$PKGHANDLER_COMMAND" != x; then
57318      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57319    fi
57320  fi
57321
57322      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57323    fi
57324
57325    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57326      OPENWIN_HOME="/usr/openwin"
57327      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57328      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57329          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57330    fi
57331
57332    ac_ext=c
57333ac_cpp='$CPP $CPPFLAGS'
57334ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57335ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57336ac_compiler_gnu=$ac_cv_c_compiler_gnu
57337
57338    OLD_CFLAGS="$CFLAGS"
57339    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57340
57341    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57342    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57343do :
57344  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57345ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57346          # include <X11/Xlib.h>
57347          # include <X11/Xutil.h>
57348
57349
57350"
57351if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57352  cat >>confdefs.h <<_ACEOF
57353#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57354_ACEOF
57355 X11_HEADERS_OK=yes
57356else
57357  X11_HEADERS_OK=no; break
57358fi
57359
57360done
57361
57362
57363    if test "x$X11_HEADERS_OK" = xno; then
57364
57365  # Print a helpful message on how to acquire the necessary build dependency.
57366  # x11 is the help tag: freetype, cups, alsa etc
57367  MISSING_DEPENDENCY=x11
57368
57369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57370    cygwin_help $MISSING_DEPENDENCY
57371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57372    msys_help $MISSING_DEPENDENCY
57373  else
57374    PKGHANDLER_COMMAND=
57375
57376    case $PKGHANDLER in
57377      apt-get)
57378        apt_help     $MISSING_DEPENDENCY ;;
57379      yum)
57380        yum_help     $MISSING_DEPENDENCY ;;
57381      brew)
57382        brew_help    $MISSING_DEPENDENCY ;;
57383      port)
57384        port_help    $MISSING_DEPENDENCY ;;
57385      pkgutil)
57386        pkgutil_help $MISSING_DEPENDENCY ;;
57387      pkgadd)
57388        pkgadd_help  $MISSING_DEPENDENCY ;;
57389    esac
57390
57391    if test "x$PKGHANDLER_COMMAND" != x; then
57392      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57393    fi
57394  fi
57395
57396      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57397    fi
57398
57399    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57400    # defined in libawt_xawt.
57401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57402$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57403    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57404/* end confdefs.h.  */
57405#include <X11/extensions/Xrender.h>
57406int
57407main ()
57408{
57409XLinearGradient x;
57410  ;
57411  return 0;
57412}
57413_ACEOF
57414if ac_fn_c_try_compile "$LINENO"; then :
57415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57416$as_echo "yes" >&6; }
57417else
57418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57419$as_echo "no" >&6; }
57420         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57421fi
57422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57423
57424    CFLAGS="$OLD_CFLAGS"
57425    ac_ext=cpp
57426ac_cpp='$CXXCPP $CPPFLAGS'
57427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57430
57431  fi # NEEDS_LIB_X11
57432
57433
57434
57435
57436
57437
57438# Check whether --with-cups was given.
57439if test "${with_cups+set}" = set; then :
57440  withval=$with_cups;
57441fi
57442
57443
57444# Check whether --with-cups-include was given.
57445if test "${with_cups_include+set}" = set; then :
57446  withval=$with_cups_include;
57447fi
57448
57449
57450  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57451    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57452        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57453      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57454$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57455    fi
57456    CUPS_CFLAGS=
57457  else
57458    CUPS_FOUND=no
57459
57460    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57461      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57462    fi
57463
57464    if test "x${with_cups}" != x; then
57465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57466$as_echo_n "checking for cups headers... " >&6; }
57467      if test -s "${with_cups}/include/cups/cups.h"; then
57468        CUPS_CFLAGS="-I${with_cups}/include"
57469        CUPS_FOUND=yes
57470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57471$as_echo "$CUPS_FOUND" >&6; }
57472      else
57473        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57474      fi
57475    fi
57476    if test "x${with_cups_include}" != x; then
57477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57478$as_echo_n "checking for cups headers... " >&6; }
57479      if test -s "${with_cups_include}/cups/cups.h"; then
57480        CUPS_CFLAGS="-I${with_cups_include}"
57481        CUPS_FOUND=yes
57482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57483$as_echo "$CUPS_FOUND" >&6; }
57484      else
57485        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57486      fi
57487    fi
57488    if test "x$CUPS_FOUND" = xno; then
57489      # Are the cups headers installed in the default /usr/include location?
57490      for ac_header in cups/cups.h cups/ppd.h
57491do :
57492  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57493ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57494if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57495  cat >>confdefs.h <<_ACEOF
57496#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57497_ACEOF
57498
57499          CUPS_FOUND=yes
57500          CUPS_CFLAGS=
57501          DEFAULT_CUPS=yes
57502
57503fi
57504
57505done
57506
57507    fi
57508    if test "x$CUPS_FOUND" = xno; then
57509
57510  # Print a helpful message on how to acquire the necessary build dependency.
57511  # cups is the help tag: freetype, cups, alsa etc
57512  MISSING_DEPENDENCY=cups
57513
57514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57515    cygwin_help $MISSING_DEPENDENCY
57516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57517    msys_help $MISSING_DEPENDENCY
57518  else
57519    PKGHANDLER_COMMAND=
57520
57521    case $PKGHANDLER in
57522      apt-get)
57523        apt_help     $MISSING_DEPENDENCY ;;
57524      yum)
57525        yum_help     $MISSING_DEPENDENCY ;;
57526      brew)
57527        brew_help    $MISSING_DEPENDENCY ;;
57528      port)
57529        port_help    $MISSING_DEPENDENCY ;;
57530      pkgutil)
57531        pkgutil_help $MISSING_DEPENDENCY ;;
57532      pkgadd)
57533        pkgadd_help  $MISSING_DEPENDENCY ;;
57534    esac
57535
57536    if test "x$PKGHANDLER_COMMAND" != x; then
57537      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57538    fi
57539  fi
57540
57541      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57542    fi
57543  fi
57544
57545
57546
57547
57548
57549# Check whether --with-freetype was given.
57550if test "${with_freetype+set}" = set; then :
57551  withval=$with_freetype;
57552fi
57553
57554
57555# Check whether --with-freetype-include was given.
57556if test "${with_freetype_include+set}" = set; then :
57557  withval=$with_freetype_include;
57558fi
57559
57560
57561# Check whether --with-freetype-lib was given.
57562if test "${with_freetype_lib+set}" = set; then :
57563  withval=$with_freetype_lib;
57564fi
57565
57566
57567# Check whether --with-freetype-src was given.
57568if test "${with_freetype_src+set}" = set; then :
57569  withval=$with_freetype_src;
57570fi
57571
57572  # Check whether --enable-freetype-bundling was given.
57573if test "${enable_freetype_bundling+set}" = set; then :
57574  enableval=$enable_freetype_bundling;
57575fi
57576
57577
57578  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57579  FREETYPE_BASE_NAME=freetype
57580  FREETYPE_CFLAGS=
57581  FREETYPE_LIBS=
57582  FREETYPE_BUNDLE_LIB_PATH=
57583
57584  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57585    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57586        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57587        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57588        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57589      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57590$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57591    fi
57592    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57593      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57594$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57595    fi
57596  else
57597    # freetype is needed to build; go get it!
57598
57599    BUNDLE_FREETYPE="$enable_freetype_bundling"
57600
57601    if  test "x$with_freetype_src" != x; then
57602      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57603        # Try to build freetype if --with-freetype-src was given on Windows
57604
57605  FREETYPE_SRC_PATH="$with_freetype_src"
57606  BUILD_FREETYPE=yes
57607
57608  # Check if the freetype sources are acessible..
57609  if ! test -d $FREETYPE_SRC_PATH; then
57610    { $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
57611$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57612    BUILD_FREETYPE=no
57613  fi
57614  # ..and contain a vc2010 project file
57615  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57616  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57617    { $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
57618$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57619    BUILD_FREETYPE=no
57620  fi
57621  # Now check if configure found a version of 'msbuild.exe'
57622  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57623    { $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
57624$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;}
57625    BUILD_FREETYPE=no
57626  fi
57627
57628  # Ready to go..
57629  if test "x$BUILD_FREETYPE" = xyes; then
57630    # msbuild requires trailing slashes for output directories
57631    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57632    freetype_lib_path_unix="$freetype_lib_path"
57633    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57634
57635  unix_path="$vcxproj_path"
57636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57637    windows_path=`$CYGPATH -m "$unix_path"`
57638    vcxproj_path="$windows_path"
57639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57640    windows_path=`cmd //c echo $unix_path`
57641    vcxproj_path="$windows_path"
57642  fi
57643
57644
57645  unix_path="$freetype_lib_path"
57646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57647    windows_path=`$CYGPATH -m "$unix_path"`
57648    freetype_lib_path="$windows_path"
57649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57650    windows_path=`cmd //c echo $unix_path`
57651    freetype_lib_path="$windows_path"
57652  fi
57653
57654
57655  unix_path="$freetype_obj_path"
57656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57657    windows_path=`$CYGPATH -m "$unix_path"`
57658    freetype_obj_path="$windows_path"
57659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57660    windows_path=`cmd //c echo $unix_path`
57661    freetype_obj_path="$windows_path"
57662  fi
57663
57664    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57665      freetype_platform=x64
57666    else
57667      freetype_platform=win32
57668    fi
57669
57670    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57671    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57672    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57673    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57674    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57675$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57676
57677    # First we try to build the freetype.dll
57678    $ECHO -e "@echo off\n"\
57679        "$MSBUILD $vcxproj_path "\
57680        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57681        "/p:Configuration=\"Release Multithreaded\" "\
57682        "/p:Platform=$freetype_platform "\
57683        "/p:ConfigurationType=DynamicLibrary "\
57684        "/p:TargetName=freetype "\
57685        "/p:OutDir=\"$freetype_lib_path\" "\
57686        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57687    cmd /c freetype.bat
57688
57689    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57690      # If that succeeds we also build freetype.lib
57691      $ECHO -e "@echo off\n"\
57692          "$MSBUILD $vcxproj_path "\
57693          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57694          "/p:Configuration=\"Release Multithreaded\" "\
57695          "/p:Platform=$freetype_platform "\
57696          "/p:ConfigurationType=StaticLibrary "\
57697          "/p:TargetName=freetype "\
57698          "/p:OutDir=\"$freetype_lib_path\" "\
57699          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57700      cmd /c freetype.bat
57701
57702      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57703        # Once we build both, lib and dll, set freetype lib and include path appropriately
57704        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57705        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57706        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57707$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57708      else
57709        BUILD_FREETYPE=no
57710      fi
57711    else
57712      BUILD_FREETYPE=no
57713    fi
57714  fi
57715
57716        if test "x$BUILD_FREETYPE" = xyes; then
57717          # Okay, we built it. Check that it works.
57718
57719  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57720  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57721  METHOD="--with-freetype-src"
57722
57723  # Let's start with an optimistic view of the world :-)
57724  FOUND_FREETYPE=yes
57725
57726  # First look for the canonical freetype main include file ft2build.h.
57727  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57728    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57729    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57730    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57731      # Fail.
57732      FOUND_FREETYPE=no
57733    fi
57734  fi
57735
57736  if test "x$FOUND_FREETYPE" = xyes; then
57737    # Include file found, let's continue the sanity check.
57738    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57739$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57740
57741    # Reset to default value
57742    FREETYPE_BASE_NAME=freetype
57743    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57744    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57745      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57747        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57748        # for the .6 version explicitly.
57749        FREETYPE_BASE_NAME=freetype.6
57750        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57751        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57752$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57753      else
57754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57755$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57756        FOUND_FREETYPE=no
57757      fi
57758    else
57759      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57760        # On Windows, we will need both .lib and .dll file.
57761        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57762          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57763$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57764          FOUND_FREETYPE=no
57765        fi
57766      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57767          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57768        # Found lib in isa dir, use that instead.
57769        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57770        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57771$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57772      fi
57773    fi
57774  fi
57775
57776  if test "x$FOUND_FREETYPE" = xyes; then
57777
57778  # Only process if variable expands to non-empty
57779
57780  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57782
57783  # Input might be given as Windows format, start by converting to
57784  # unix format.
57785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57786  new_path=`$CYGPATH -u "$path"`
57787
57788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57791  # "foo.exe" is OK but "foo" is an error.
57792  #
57793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57794  # It is also a way to make sure we got the proper file name for the real test later on.
57795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57796  if test "x$test_shortpath" = x; then
57797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57800  fi
57801
57802  # Call helper function which possibly converts this using DOS-style short mode.
57803  # If so, the updated path is stored in $new_path.
57804
57805  input_path="$new_path"
57806  # Check if we need to convert this using DOS-style short mode. If the path
57807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57808  # take no chances and rewrite it.
57809  # Note: m4 eats our [], so we need to use [ and ] instead.
57810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57811  if test "x$has_forbidden_chars" != x; then
57812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57816      # Going to short mode and back again did indeed matter. Since short mode is
57817      # case insensitive, let's make it lowercase to improve readability.
57818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57819      # Now convert it back to Unix-style (cygpath)
57820      input_path=`$CYGPATH -u "$shortmode_path"`
57821      new_path="$input_path"
57822    fi
57823  fi
57824
57825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57826  if test "x$test_cygdrive_prefix" = x; then
57827    # As a simple fix, exclude /usr/bin since it's not a real path.
57828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57830      # a path prefixed by /cygdrive for fixpath to work.
57831      new_path="$CYGWIN_ROOT_PATH$input_path"
57832    fi
57833  fi
57834
57835
57836  if test "x$path" != "x$new_path"; then
57837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57840  fi
57841
57842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57843
57844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57845  has_colon=`$ECHO $path | $GREP ^.:`
57846  new_path="$path"
57847  if test "x$has_colon" = x; then
57848    # Not in mixed or Windows style, start by that.
57849    new_path=`cmd //c echo $path`
57850  fi
57851
57852
57853  input_path="$new_path"
57854  # Check if we need to convert this using DOS-style short mode. If the path
57855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57856  # take no chances and rewrite it.
57857  # Note: m4 eats our [], so we need to use [ and ] instead.
57858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57859  if test "x$has_forbidden_chars" != x; then
57860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57862  fi
57863
57864
57865  windows_path="$new_path"
57866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57867    unix_path=`$CYGPATH -u "$windows_path"`
57868    new_path="$unix_path"
57869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57871    new_path="$unix_path"
57872  fi
57873
57874  if test "x$path" != "x$new_path"; then
57875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57878  fi
57879
57880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57882
57883    else
57884      # We're on a unix platform. Hooray! :)
57885      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57886      has_space=`$ECHO "$path" | $GREP " "`
57887      if test "x$has_space" != x; then
57888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57891      fi
57892
57893      # Use eval to expand a potential ~
57894      eval path="$path"
57895      if test ! -f "$path" && test ! -d "$path"; then
57896        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57897      fi
57898
57899      if test -d "$path"; then
57900        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57901      else
57902        dir="`$DIRNAME "$path"`"
57903        base="`$BASENAME "$path"`"
57904        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57905      fi
57906    fi
57907  fi
57908
57909
57910  # Only process if variable expands to non-empty
57911
57912  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57914
57915  # Input might be given as Windows format, start by converting to
57916  # unix format.
57917  path="$POTENTIAL_FREETYPE_LIB_PATH"
57918  new_path=`$CYGPATH -u "$path"`
57919
57920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57923  # "foo.exe" is OK but "foo" is an error.
57924  #
57925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57926  # It is also a way to make sure we got the proper file name for the real test later on.
57927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57928  if test "x$test_shortpath" = x; then
57929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57931    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57932  fi
57933
57934  # Call helper function which possibly converts this using DOS-style short mode.
57935  # If so, the updated path is stored in $new_path.
57936
57937  input_path="$new_path"
57938  # Check if we need to convert this using DOS-style short mode. If the path
57939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57940  # take no chances and rewrite it.
57941  # Note: m4 eats our [], so we need to use [ and ] instead.
57942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57943  if test "x$has_forbidden_chars" != x; then
57944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57948      # Going to short mode and back again did indeed matter. Since short mode is
57949      # case insensitive, let's make it lowercase to improve readability.
57950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57951      # Now convert it back to Unix-style (cygpath)
57952      input_path=`$CYGPATH -u "$shortmode_path"`
57953      new_path="$input_path"
57954    fi
57955  fi
57956
57957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57958  if test "x$test_cygdrive_prefix" = x; then
57959    # As a simple fix, exclude /usr/bin since it's not a real path.
57960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57962      # a path prefixed by /cygdrive for fixpath to work.
57963      new_path="$CYGWIN_ROOT_PATH$input_path"
57964    fi
57965  fi
57966
57967
57968  if test "x$path" != "x$new_path"; then
57969    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57972  fi
57973
57974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57975
57976  path="$POTENTIAL_FREETYPE_LIB_PATH"
57977  has_colon=`$ECHO $path | $GREP ^.:`
57978  new_path="$path"
57979  if test "x$has_colon" = x; then
57980    # Not in mixed or Windows style, start by that.
57981    new_path=`cmd //c echo $path`
57982  fi
57983
57984
57985  input_path="$new_path"
57986  # Check if we need to convert this using DOS-style short mode. If the path
57987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57988  # take no chances and rewrite it.
57989  # Note: m4 eats our [], so we need to use [ and ] instead.
57990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57991  if test "x$has_forbidden_chars" != x; then
57992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57994  fi
57995
57996
57997  windows_path="$new_path"
57998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57999    unix_path=`$CYGPATH -u "$windows_path"`
58000    new_path="$unix_path"
58001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58003    new_path="$unix_path"
58004  fi
58005
58006  if test "x$path" != "x$new_path"; then
58007    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58010  fi
58011
58012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58014
58015    else
58016      # We're on a unix platform. Hooray! :)
58017      path="$POTENTIAL_FREETYPE_LIB_PATH"
58018      has_space=`$ECHO "$path" | $GREP " "`
58019      if test "x$has_space" != x; then
58020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58023      fi
58024
58025      # Use eval to expand a potential ~
58026      eval path="$path"
58027      if test ! -f "$path" && test ! -d "$path"; then
58028        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58029      fi
58030
58031      if test -d "$path"; then
58032        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58033      else
58034        dir="`$DIRNAME "$path"`"
58035        base="`$BASENAME "$path"`"
58036        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58037      fi
58038    fi
58039  fi
58040
58041
58042    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58044$as_echo_n "checking for freetype includes... " >&6; }
58045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58046$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58047    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58049$as_echo_n "checking for freetype libraries... " >&6; }
58050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58051$as_echo "$FREETYPE_LIB_PATH" >&6; }
58052  fi
58053
58054          if test "x$FOUND_FREETYPE" != xyes; then
58055            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58056          fi
58057        else
58058          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58059$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58060          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58061        fi
58062      else
58063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58064$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58065      fi
58066    fi
58067
58068    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58069      # User has specified settings
58070
58071      if test "x$BUNDLE_FREETYPE" = x; then
58072        # If not specified, default is to bundle freetype
58073        BUNDLE_FREETYPE=yes
58074      fi
58075
58076      if test "x$with_freetype" != x; then
58077        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58078        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58079      fi
58080
58081      # Allow --with-freetype-lib and --with-freetype-include to override
58082      if test "x$with_freetype_include" != x; then
58083        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58084      fi
58085      if test "x$with_freetype_lib" != x; then
58086        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58087      fi
58088
58089      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58090        # Okay, we got it. Check that it works.
58091
58092  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58093  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58094  METHOD="--with-freetype"
58095
58096  # Let's start with an optimistic view of the world :-)
58097  FOUND_FREETYPE=yes
58098
58099  # First look for the canonical freetype main include file ft2build.h.
58100  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58101    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58102    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58103    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58104      # Fail.
58105      FOUND_FREETYPE=no
58106    fi
58107  fi
58108
58109  if test "x$FOUND_FREETYPE" = xyes; then
58110    # Include file found, let's continue the sanity check.
58111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58113
58114    # Reset to default value
58115    FREETYPE_BASE_NAME=freetype
58116    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58117    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58118      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58120        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58121        # for the .6 version explicitly.
58122        FREETYPE_BASE_NAME=freetype.6
58123        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58124        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58125$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58126      else
58127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58128$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58129        FOUND_FREETYPE=no
58130      fi
58131    else
58132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58133        # On Windows, we will need both .lib and .dll file.
58134        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58135          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58137          FOUND_FREETYPE=no
58138        fi
58139      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58141        # Found lib in isa dir, use that instead.
58142        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58143        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58144$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58145      fi
58146    fi
58147  fi
58148
58149  if test "x$FOUND_FREETYPE" = xyes; then
58150
58151  # Only process if variable expands to non-empty
58152
58153  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58155
58156  # Input might be given as Windows format, start by converting to
58157  # unix format.
58158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58159  new_path=`$CYGPATH -u "$path"`
58160
58161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58164  # "foo.exe" is OK but "foo" is an error.
58165  #
58166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58167  # It is also a way to make sure we got the proper file name for the real test later on.
58168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58169  if test "x$test_shortpath" = x; then
58170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58173  fi
58174
58175  # Call helper function which possibly converts this using DOS-style short mode.
58176  # If so, the updated path is stored in $new_path.
58177
58178  input_path="$new_path"
58179  # Check if we need to convert this using DOS-style short mode. If the path
58180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58181  # take no chances and rewrite it.
58182  # Note: m4 eats our [], so we need to use [ and ] instead.
58183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58184  if test "x$has_forbidden_chars" != x; then
58185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58189      # Going to short mode and back again did indeed matter. Since short mode is
58190      # case insensitive, let's make it lowercase to improve readability.
58191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58192      # Now convert it back to Unix-style (cygpath)
58193      input_path=`$CYGPATH -u "$shortmode_path"`
58194      new_path="$input_path"
58195    fi
58196  fi
58197
58198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58199  if test "x$test_cygdrive_prefix" = x; then
58200    # As a simple fix, exclude /usr/bin since it's not a real path.
58201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58203      # a path prefixed by /cygdrive for fixpath to work.
58204      new_path="$CYGWIN_ROOT_PATH$input_path"
58205    fi
58206  fi
58207
58208
58209  if test "x$path" != "x$new_path"; then
58210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58213  fi
58214
58215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58216
58217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58218  has_colon=`$ECHO $path | $GREP ^.:`
58219  new_path="$path"
58220  if test "x$has_colon" = x; then
58221    # Not in mixed or Windows style, start by that.
58222    new_path=`cmd //c echo $path`
58223  fi
58224
58225
58226  input_path="$new_path"
58227  # Check if we need to convert this using DOS-style short mode. If the path
58228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58229  # take no chances and rewrite it.
58230  # Note: m4 eats our [], so we need to use [ and ] instead.
58231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58232  if test "x$has_forbidden_chars" != x; then
58233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58235  fi
58236
58237
58238  windows_path="$new_path"
58239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58240    unix_path=`$CYGPATH -u "$windows_path"`
58241    new_path="$unix_path"
58242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58244    new_path="$unix_path"
58245  fi
58246
58247  if test "x$path" != "x$new_path"; then
58248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58251  fi
58252
58253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58255
58256    else
58257      # We're on a unix platform. Hooray! :)
58258      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58259      has_space=`$ECHO "$path" | $GREP " "`
58260      if test "x$has_space" != x; then
58261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58264      fi
58265
58266      # Use eval to expand a potential ~
58267      eval path="$path"
58268      if test ! -f "$path" && test ! -d "$path"; then
58269        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58270      fi
58271
58272      if test -d "$path"; then
58273        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58274      else
58275        dir="`$DIRNAME "$path"`"
58276        base="`$BASENAME "$path"`"
58277        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58278      fi
58279    fi
58280  fi
58281
58282
58283  # Only process if variable expands to non-empty
58284
58285  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58287
58288  # Input might be given as Windows format, start by converting to
58289  # unix format.
58290  path="$POTENTIAL_FREETYPE_LIB_PATH"
58291  new_path=`$CYGPATH -u "$path"`
58292
58293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58296  # "foo.exe" is OK but "foo" is an error.
58297  #
58298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58299  # It is also a way to make sure we got the proper file name for the real test later on.
58300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58301  if test "x$test_shortpath" = x; then
58302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58304    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58305  fi
58306
58307  # Call helper function which possibly converts this using DOS-style short mode.
58308  # If so, the updated path is stored in $new_path.
58309
58310  input_path="$new_path"
58311  # Check if we need to convert this using DOS-style short mode. If the path
58312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58313  # take no chances and rewrite it.
58314  # Note: m4 eats our [], so we need to use [ and ] instead.
58315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58316  if test "x$has_forbidden_chars" != x; then
58317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58321      # Going to short mode and back again did indeed matter. Since short mode is
58322      # case insensitive, let's make it lowercase to improve readability.
58323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58324      # Now convert it back to Unix-style (cygpath)
58325      input_path=`$CYGPATH -u "$shortmode_path"`
58326      new_path="$input_path"
58327    fi
58328  fi
58329
58330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58331  if test "x$test_cygdrive_prefix" = x; then
58332    # As a simple fix, exclude /usr/bin since it's not a real path.
58333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58335      # a path prefixed by /cygdrive for fixpath to work.
58336      new_path="$CYGWIN_ROOT_PATH$input_path"
58337    fi
58338  fi
58339
58340
58341  if test "x$path" != "x$new_path"; then
58342    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58345  fi
58346
58347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58348
58349  path="$POTENTIAL_FREETYPE_LIB_PATH"
58350  has_colon=`$ECHO $path | $GREP ^.:`
58351  new_path="$path"
58352  if test "x$has_colon" = x; then
58353    # Not in mixed or Windows style, start by that.
58354    new_path=`cmd //c echo $path`
58355  fi
58356
58357
58358  input_path="$new_path"
58359  # Check if we need to convert this using DOS-style short mode. If the path
58360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58361  # take no chances and rewrite it.
58362  # Note: m4 eats our [], so we need to use [ and ] instead.
58363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58364  if test "x$has_forbidden_chars" != x; then
58365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58367  fi
58368
58369
58370  windows_path="$new_path"
58371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58372    unix_path=`$CYGPATH -u "$windows_path"`
58373    new_path="$unix_path"
58374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58376    new_path="$unix_path"
58377  fi
58378
58379  if test "x$path" != "x$new_path"; then
58380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58383  fi
58384
58385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58387
58388    else
58389      # We're on a unix platform. Hooray! :)
58390      path="$POTENTIAL_FREETYPE_LIB_PATH"
58391      has_space=`$ECHO "$path" | $GREP " "`
58392      if test "x$has_space" != x; then
58393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58396      fi
58397
58398      # Use eval to expand a potential ~
58399      eval path="$path"
58400      if test ! -f "$path" && test ! -d "$path"; then
58401        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58402      fi
58403
58404      if test -d "$path"; then
58405        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58406      else
58407        dir="`$DIRNAME "$path"`"
58408        base="`$BASENAME "$path"`"
58409        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58410      fi
58411    fi
58412  fi
58413
58414
58415    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58417$as_echo_n "checking for freetype includes... " >&6; }
58418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58419$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58420    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58422$as_echo_n "checking for freetype libraries... " >&6; }
58423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58424$as_echo "$FREETYPE_LIB_PATH" >&6; }
58425  fi
58426
58427        if test "x$FOUND_FREETYPE" != xyes; then
58428          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58429        fi
58430      else
58431        # User specified only one of lib or include. This is an error.
58432        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58433          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58434$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58435          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58436        else
58437          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58438$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58439          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58440        fi
58441      fi
58442    else
58443      # User did not specify settings, but we need freetype. Try to locate it.
58444
58445      if test "x$BUNDLE_FREETYPE" = x; then
58446        # If not specified, default is to bundle freetype only on windows
58447        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58448          BUNDLE_FREETYPE=yes
58449        else
58450          BUNDLE_FREETYPE=no
58451        fi
58452      fi
58453
58454      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58455      if test "x$SYSROOT" = x; then
58456        if test "x$FOUND_FREETYPE" != xyes; then
58457          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58458          if test "x$PKG_CONFIG" != x; then
58459
58460pkg_failed=no
58461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58462$as_echo_n "checking for FREETYPE... " >&6; }
58463
58464if test -n "$FREETYPE_CFLAGS"; then
58465    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58466 elif test -n "$PKG_CONFIG"; then
58467    if test -n "$PKG_CONFIG" && \
58468    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58469  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58470  ac_status=$?
58471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58472  test $ac_status = 0; }; then
58473  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58474else
58475  pkg_failed=yes
58476fi
58477 else
58478    pkg_failed=untried
58479fi
58480if test -n "$FREETYPE_LIBS"; then
58481    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58482 elif test -n "$PKG_CONFIG"; then
58483    if test -n "$PKG_CONFIG" && \
58484    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58485  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58486  ac_status=$?
58487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58488  test $ac_status = 0; }; then
58489  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58490else
58491  pkg_failed=yes
58492fi
58493 else
58494    pkg_failed=untried
58495fi
58496
58497
58498
58499if test $pkg_failed = yes; then
58500
58501if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58502        _pkg_short_errors_supported=yes
58503else
58504        _pkg_short_errors_supported=no
58505fi
58506        if test $_pkg_short_errors_supported = yes; then
58507	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58508        else
58509	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58510        fi
58511	# Put the nasty error message in config.log where it belongs
58512	echo "$FREETYPE_PKG_ERRORS" >&5
58513
58514	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58515$as_echo "no" >&6; }
58516                FOUND_FREETYPE=no
58517elif test $pkg_failed = untried; then
58518	FOUND_FREETYPE=no
58519else
58520	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58521	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58523$as_echo "yes" >&6; }
58524	FOUND_FREETYPE=yes
58525fi
58526            if test "x$FOUND_FREETYPE" = xyes; then
58527              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58528              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58529              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58530              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58531                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58532              fi
58533              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58534              if test "x$BUNDLE_FREETYPE" = xyes; then
58535                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58536$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58537                FOUND_FREETYPE=no
58538              else
58539                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58540$as_echo_n "checking for freetype... " >&6; }
58541                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58542$as_echo "yes (using pkg-config)" >&6; }
58543              fi
58544            fi
58545          fi
58546        fi
58547      fi
58548
58549      if test "x$FOUND_FREETYPE" != xyes; then
58550        # Check in well-known locations
58551        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58552          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58553
58554  windows_path="$FREETYPE_BASE_DIR"
58555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58556    unix_path=`$CYGPATH -u "$windows_path"`
58557    FREETYPE_BASE_DIR="$unix_path"
58558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58560    FREETYPE_BASE_DIR="$unix_path"
58561  fi
58562
58563
58564  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58565  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58566  METHOD="well-known location"
58567
58568  # Let's start with an optimistic view of the world :-)
58569  FOUND_FREETYPE=yes
58570
58571  # First look for the canonical freetype main include file ft2build.h.
58572  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58573    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58574    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58575    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58576      # Fail.
58577      FOUND_FREETYPE=no
58578    fi
58579  fi
58580
58581  if test "x$FOUND_FREETYPE" = xyes; then
58582    # Include file found, let's continue the sanity check.
58583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58584$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58585
58586    # Reset to default value
58587    FREETYPE_BASE_NAME=freetype
58588    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58589    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58590      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58592        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58593        # for the .6 version explicitly.
58594        FREETYPE_BASE_NAME=freetype.6
58595        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58596        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58597$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58598      else
58599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58601        FOUND_FREETYPE=no
58602      fi
58603    else
58604      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58605        # On Windows, we will need both .lib and .dll file.
58606        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58607          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58608$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58609          FOUND_FREETYPE=no
58610        fi
58611      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58612          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58613        # Found lib in isa dir, use that instead.
58614        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58615        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58616$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58617      fi
58618    fi
58619  fi
58620
58621  if test "x$FOUND_FREETYPE" = xyes; then
58622
58623  # Only process if variable expands to non-empty
58624
58625  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58627
58628  # Input might be given as Windows format, start by converting to
58629  # unix format.
58630  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58631  new_path=`$CYGPATH -u "$path"`
58632
58633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58636  # "foo.exe" is OK but "foo" is an error.
58637  #
58638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58639  # It is also a way to make sure we got the proper file name for the real test later on.
58640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58641  if test "x$test_shortpath" = x; then
58642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58645  fi
58646
58647  # Call helper function which possibly converts this using DOS-style short mode.
58648  # If so, the updated path is stored in $new_path.
58649
58650  input_path="$new_path"
58651  # Check if we need to convert this using DOS-style short mode. If the path
58652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58653  # take no chances and rewrite it.
58654  # Note: m4 eats our [], so we need to use [ and ] instead.
58655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58656  if test "x$has_forbidden_chars" != x; then
58657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58661      # Going to short mode and back again did indeed matter. Since short mode is
58662      # case insensitive, let's make it lowercase to improve readability.
58663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58664      # Now convert it back to Unix-style (cygpath)
58665      input_path=`$CYGPATH -u "$shortmode_path"`
58666      new_path="$input_path"
58667    fi
58668  fi
58669
58670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58671  if test "x$test_cygdrive_prefix" = x; then
58672    # As a simple fix, exclude /usr/bin since it's not a real path.
58673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58675      # a path prefixed by /cygdrive for fixpath to work.
58676      new_path="$CYGWIN_ROOT_PATH$input_path"
58677    fi
58678  fi
58679
58680
58681  if test "x$path" != "x$new_path"; then
58682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58685  fi
58686
58687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58688
58689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58690  has_colon=`$ECHO $path | $GREP ^.:`
58691  new_path="$path"
58692  if test "x$has_colon" = x; then
58693    # Not in mixed or Windows style, start by that.
58694    new_path=`cmd //c echo $path`
58695  fi
58696
58697
58698  input_path="$new_path"
58699  # Check if we need to convert this using DOS-style short mode. If the path
58700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58701  # take no chances and rewrite it.
58702  # Note: m4 eats our [], so we need to use [ and ] instead.
58703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58704  if test "x$has_forbidden_chars" != x; then
58705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58707  fi
58708
58709
58710  windows_path="$new_path"
58711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58712    unix_path=`$CYGPATH -u "$windows_path"`
58713    new_path="$unix_path"
58714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58716    new_path="$unix_path"
58717  fi
58718
58719  if test "x$path" != "x$new_path"; then
58720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58723  fi
58724
58725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58727
58728    else
58729      # We're on a unix platform. Hooray! :)
58730      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58731      has_space=`$ECHO "$path" | $GREP " "`
58732      if test "x$has_space" != x; then
58733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58736      fi
58737
58738      # Use eval to expand a potential ~
58739      eval path="$path"
58740      if test ! -f "$path" && test ! -d "$path"; then
58741        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58742      fi
58743
58744      if test -d "$path"; then
58745        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58746      else
58747        dir="`$DIRNAME "$path"`"
58748        base="`$BASENAME "$path"`"
58749        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58750      fi
58751    fi
58752  fi
58753
58754
58755  # Only process if variable expands to non-empty
58756
58757  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58759
58760  # Input might be given as Windows format, start by converting to
58761  # unix format.
58762  path="$POTENTIAL_FREETYPE_LIB_PATH"
58763  new_path=`$CYGPATH -u "$path"`
58764
58765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58768  # "foo.exe" is OK but "foo" is an error.
58769  #
58770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58771  # It is also a way to make sure we got the proper file name for the real test later on.
58772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58773  if test "x$test_shortpath" = x; then
58774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58776    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58777  fi
58778
58779  # Call helper function which possibly converts this using DOS-style short mode.
58780  # If so, the updated path is stored in $new_path.
58781
58782  input_path="$new_path"
58783  # Check if we need to convert this using DOS-style short mode. If the path
58784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58785  # take no chances and rewrite it.
58786  # Note: m4 eats our [], so we need to use [ and ] instead.
58787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58788  if test "x$has_forbidden_chars" != x; then
58789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58793      # Going to short mode and back again did indeed matter. Since short mode is
58794      # case insensitive, let's make it lowercase to improve readability.
58795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58796      # Now convert it back to Unix-style (cygpath)
58797      input_path=`$CYGPATH -u "$shortmode_path"`
58798      new_path="$input_path"
58799    fi
58800  fi
58801
58802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58803  if test "x$test_cygdrive_prefix" = x; then
58804    # As a simple fix, exclude /usr/bin since it's not a real path.
58805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58807      # a path prefixed by /cygdrive for fixpath to work.
58808      new_path="$CYGWIN_ROOT_PATH$input_path"
58809    fi
58810  fi
58811
58812
58813  if test "x$path" != "x$new_path"; then
58814    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58816$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58817  fi
58818
58819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58820
58821  path="$POTENTIAL_FREETYPE_LIB_PATH"
58822  has_colon=`$ECHO $path | $GREP ^.:`
58823  new_path="$path"
58824  if test "x$has_colon" = x; then
58825    # Not in mixed or Windows style, start by that.
58826    new_path=`cmd //c echo $path`
58827  fi
58828
58829
58830  input_path="$new_path"
58831  # Check if we need to convert this using DOS-style short mode. If the path
58832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58833  # take no chances and rewrite it.
58834  # Note: m4 eats our [], so we need to use [ and ] instead.
58835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58836  if test "x$has_forbidden_chars" != x; then
58837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58839  fi
58840
58841
58842  windows_path="$new_path"
58843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58844    unix_path=`$CYGPATH -u "$windows_path"`
58845    new_path="$unix_path"
58846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58848    new_path="$unix_path"
58849  fi
58850
58851  if test "x$path" != "x$new_path"; then
58852    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58854$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58855  fi
58856
58857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58859
58860    else
58861      # We're on a unix platform. Hooray! :)
58862      path="$POTENTIAL_FREETYPE_LIB_PATH"
58863      has_space=`$ECHO "$path" | $GREP " "`
58864      if test "x$has_space" != x; then
58865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58866$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58867        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58868      fi
58869
58870      # Use eval to expand a potential ~
58871      eval path="$path"
58872      if test ! -f "$path" && test ! -d "$path"; then
58873        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58874      fi
58875
58876      if test -d "$path"; then
58877        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58878      else
58879        dir="`$DIRNAME "$path"`"
58880        base="`$BASENAME "$path"`"
58881        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58882      fi
58883    fi
58884  fi
58885
58886
58887    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58889$as_echo_n "checking for freetype includes... " >&6; }
58890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58891$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58892    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58894$as_echo_n "checking for freetype libraries... " >&6; }
58895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58896$as_echo "$FREETYPE_LIB_PATH" >&6; }
58897  fi
58898
58899          if test "x$FOUND_FREETYPE" != xyes; then
58900            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58901
58902  windows_path="$FREETYPE_BASE_DIR"
58903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58904    unix_path=`$CYGPATH -u "$windows_path"`
58905    FREETYPE_BASE_DIR="$unix_path"
58906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58908    FREETYPE_BASE_DIR="$unix_path"
58909  fi
58910
58911
58912  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58913  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58914  METHOD="well-known location"
58915
58916  # Let's start with an optimistic view of the world :-)
58917  FOUND_FREETYPE=yes
58918
58919  # First look for the canonical freetype main include file ft2build.h.
58920  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58921    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58922    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58923    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58924      # Fail.
58925      FOUND_FREETYPE=no
58926    fi
58927  fi
58928
58929  if test "x$FOUND_FREETYPE" = xyes; then
58930    # Include file found, let's continue the sanity check.
58931    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58932$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58933
58934    # Reset to default value
58935    FREETYPE_BASE_NAME=freetype
58936    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58937    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58938      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58939          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58940        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58941        # for the .6 version explicitly.
58942        FREETYPE_BASE_NAME=freetype.6
58943        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58944        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58945$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58946      else
58947        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58948$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58949        FOUND_FREETYPE=no
58950      fi
58951    else
58952      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58953        # On Windows, we will need both .lib and .dll file.
58954        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58955          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58956$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58957          FOUND_FREETYPE=no
58958        fi
58959      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58960          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58961        # Found lib in isa dir, use that instead.
58962        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58963        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58964$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58965      fi
58966    fi
58967  fi
58968
58969  if test "x$FOUND_FREETYPE" = xyes; then
58970
58971  # Only process if variable expands to non-empty
58972
58973  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58975
58976  # Input might be given as Windows format, start by converting to
58977  # unix format.
58978  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58979  new_path=`$CYGPATH -u "$path"`
58980
58981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58984  # "foo.exe" is OK but "foo" is an error.
58985  #
58986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58987  # It is also a way to make sure we got the proper file name for the real test later on.
58988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58989  if test "x$test_shortpath" = x; then
58990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58991$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58992    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58993  fi
58994
58995  # Call helper function which possibly converts this using DOS-style short mode.
58996  # If so, the updated path is stored in $new_path.
58997
58998  input_path="$new_path"
58999  # Check if we need to convert this using DOS-style short mode. If the path
59000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59001  # take no chances and rewrite it.
59002  # Note: m4 eats our [], so we need to use [ and ] instead.
59003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59004  if test "x$has_forbidden_chars" != x; then
59005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59009      # Going to short mode and back again did indeed matter. Since short mode is
59010      # case insensitive, let's make it lowercase to improve readability.
59011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59012      # Now convert it back to Unix-style (cygpath)
59013      input_path=`$CYGPATH -u "$shortmode_path"`
59014      new_path="$input_path"
59015    fi
59016  fi
59017
59018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59019  if test "x$test_cygdrive_prefix" = x; then
59020    # As a simple fix, exclude /usr/bin since it's not a real path.
59021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59023      # a path prefixed by /cygdrive for fixpath to work.
59024      new_path="$CYGWIN_ROOT_PATH$input_path"
59025    fi
59026  fi
59027
59028
59029  if test "x$path" != "x$new_path"; then
59030    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59032$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59033  fi
59034
59035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59036
59037  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59038  has_colon=`$ECHO $path | $GREP ^.:`
59039  new_path="$path"
59040  if test "x$has_colon" = x; then
59041    # Not in mixed or Windows style, start by that.
59042    new_path=`cmd //c echo $path`
59043  fi
59044
59045
59046  input_path="$new_path"
59047  # Check if we need to convert this using DOS-style short mode. If the path
59048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59049  # take no chances and rewrite it.
59050  # Note: m4 eats our [], so we need to use [ and ] instead.
59051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59052  if test "x$has_forbidden_chars" != x; then
59053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59055  fi
59056
59057
59058  windows_path="$new_path"
59059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59060    unix_path=`$CYGPATH -u "$windows_path"`
59061    new_path="$unix_path"
59062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59064    new_path="$unix_path"
59065  fi
59066
59067  if test "x$path" != "x$new_path"; then
59068    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59070$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59071  fi
59072
59073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59075
59076    else
59077      # We're on a unix platform. Hooray! :)
59078      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59079      has_space=`$ECHO "$path" | $GREP " "`
59080      if test "x$has_space" != x; then
59081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59084      fi
59085
59086      # Use eval to expand a potential ~
59087      eval path="$path"
59088      if test ! -f "$path" && test ! -d "$path"; then
59089        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59090      fi
59091
59092      if test -d "$path"; then
59093        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59094      else
59095        dir="`$DIRNAME "$path"`"
59096        base="`$BASENAME "$path"`"
59097        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59098      fi
59099    fi
59100  fi
59101
59102
59103  # Only process if variable expands to non-empty
59104
59105  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59107
59108  # Input might be given as Windows format, start by converting to
59109  # unix format.
59110  path="$POTENTIAL_FREETYPE_LIB_PATH"
59111  new_path=`$CYGPATH -u "$path"`
59112
59113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59116  # "foo.exe" is OK but "foo" is an error.
59117  #
59118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59119  # It is also a way to make sure we got the proper file name for the real test later on.
59120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59121  if test "x$test_shortpath" = x; then
59122    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59123$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59124    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59125  fi
59126
59127  # Call helper function which possibly converts this using DOS-style short mode.
59128  # If so, the updated path is stored in $new_path.
59129
59130  input_path="$new_path"
59131  # Check if we need to convert this using DOS-style short mode. If the path
59132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59133  # take no chances and rewrite it.
59134  # Note: m4 eats our [], so we need to use [ and ] instead.
59135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59136  if test "x$has_forbidden_chars" != x; then
59137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59141      # Going to short mode and back again did indeed matter. Since short mode is
59142      # case insensitive, let's make it lowercase to improve readability.
59143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59144      # Now convert it back to Unix-style (cygpath)
59145      input_path=`$CYGPATH -u "$shortmode_path"`
59146      new_path="$input_path"
59147    fi
59148  fi
59149
59150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59151  if test "x$test_cygdrive_prefix" = x; then
59152    # As a simple fix, exclude /usr/bin since it's not a real path.
59153    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59155      # a path prefixed by /cygdrive for fixpath to work.
59156      new_path="$CYGWIN_ROOT_PATH$input_path"
59157    fi
59158  fi
59159
59160
59161  if test "x$path" != "x$new_path"; then
59162    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59164$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59165  fi
59166
59167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59168
59169  path="$POTENTIAL_FREETYPE_LIB_PATH"
59170  has_colon=`$ECHO $path | $GREP ^.:`
59171  new_path="$path"
59172  if test "x$has_colon" = x; then
59173    # Not in mixed or Windows style, start by that.
59174    new_path=`cmd //c echo $path`
59175  fi
59176
59177
59178  input_path="$new_path"
59179  # Check if we need to convert this using DOS-style short mode. If the path
59180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59181  # take no chances and rewrite it.
59182  # Note: m4 eats our [], so we need to use [ and ] instead.
59183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59184  if test "x$has_forbidden_chars" != x; then
59185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59187  fi
59188
59189
59190  windows_path="$new_path"
59191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59192    unix_path=`$CYGPATH -u "$windows_path"`
59193    new_path="$unix_path"
59194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59196    new_path="$unix_path"
59197  fi
59198
59199  if test "x$path" != "x$new_path"; then
59200    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59202$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59203  fi
59204
59205  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59206  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59207
59208    else
59209      # We're on a unix platform. Hooray! :)
59210      path="$POTENTIAL_FREETYPE_LIB_PATH"
59211      has_space=`$ECHO "$path" | $GREP " "`
59212      if test "x$has_space" != x; then
59213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59215        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59216      fi
59217
59218      # Use eval to expand a potential ~
59219      eval path="$path"
59220      if test ! -f "$path" && test ! -d "$path"; then
59221        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59222      fi
59223
59224      if test -d "$path"; then
59225        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59226      else
59227        dir="`$DIRNAME "$path"`"
59228        base="`$BASENAME "$path"`"
59229        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59230      fi
59231    fi
59232  fi
59233
59234
59235    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59237$as_echo_n "checking for freetype includes... " >&6; }
59238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59239$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59240    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59242$as_echo_n "checking for freetype libraries... " >&6; }
59243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59244$as_echo "$FREETYPE_LIB_PATH" >&6; }
59245  fi
59246
59247          fi
59248          if test "x$FOUND_FREETYPE" != xyes; then
59249            FREETYPE_BASE_DIR="$HOME/freetype"
59250
59251  windows_path="$FREETYPE_BASE_DIR"
59252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59253    unix_path=`$CYGPATH -u "$windows_path"`
59254    FREETYPE_BASE_DIR="$unix_path"
59255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59257    FREETYPE_BASE_DIR="$unix_path"
59258  fi
59259
59260            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59261
59262  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59263  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59264  METHOD="well-known location"
59265
59266  # Let's start with an optimistic view of the world :-)
59267  FOUND_FREETYPE=yes
59268
59269  # First look for the canonical freetype main include file ft2build.h.
59270  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59271    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59272    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59273    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59274      # Fail.
59275      FOUND_FREETYPE=no
59276    fi
59277  fi
59278
59279  if test "x$FOUND_FREETYPE" = xyes; then
59280    # Include file found, let's continue the sanity check.
59281    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59282$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59283
59284    # Reset to default value
59285    FREETYPE_BASE_NAME=freetype
59286    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59287    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59288      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59289          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59290        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59291        # for the .6 version explicitly.
59292        FREETYPE_BASE_NAME=freetype.6
59293        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59294        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59295$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59296      else
59297        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59298$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59299        FOUND_FREETYPE=no
59300      fi
59301    else
59302      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59303        # On Windows, we will need both .lib and .dll file.
59304        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59305          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59306$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59307          FOUND_FREETYPE=no
59308        fi
59309      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59310          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59311        # Found lib in isa dir, use that instead.
59312        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59313        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59314$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59315      fi
59316    fi
59317  fi
59318
59319  if test "x$FOUND_FREETYPE" = xyes; then
59320
59321  # Only process if variable expands to non-empty
59322
59323  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59325
59326  # Input might be given as Windows format, start by converting to
59327  # unix format.
59328  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59329  new_path=`$CYGPATH -u "$path"`
59330
59331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59334  # "foo.exe" is OK but "foo" is an error.
59335  #
59336  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59337  # It is also a way to make sure we got the proper file name for the real test later on.
59338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59339  if test "x$test_shortpath" = x; then
59340    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59342    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59343  fi
59344
59345  # Call helper function which possibly converts this using DOS-style short mode.
59346  # If so, the updated path is stored in $new_path.
59347
59348  input_path="$new_path"
59349  # Check if we need to convert this using DOS-style short mode. If the path
59350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59351  # take no chances and rewrite it.
59352  # Note: m4 eats our [], so we need to use [ and ] instead.
59353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59354  if test "x$has_forbidden_chars" != x; then
59355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59359      # Going to short mode and back again did indeed matter. Since short mode is
59360      # case insensitive, let's make it lowercase to improve readability.
59361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59362      # Now convert it back to Unix-style (cygpath)
59363      input_path=`$CYGPATH -u "$shortmode_path"`
59364      new_path="$input_path"
59365    fi
59366  fi
59367
59368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59369  if test "x$test_cygdrive_prefix" = x; then
59370    # As a simple fix, exclude /usr/bin since it's not a real path.
59371    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59373      # a path prefixed by /cygdrive for fixpath to work.
59374      new_path="$CYGWIN_ROOT_PATH$input_path"
59375    fi
59376  fi
59377
59378
59379  if test "x$path" != "x$new_path"; then
59380    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59383  fi
59384
59385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59386
59387  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59388  has_colon=`$ECHO $path | $GREP ^.:`
59389  new_path="$path"
59390  if test "x$has_colon" = x; then
59391    # Not in mixed or Windows style, start by that.
59392    new_path=`cmd //c echo $path`
59393  fi
59394
59395
59396  input_path="$new_path"
59397  # Check if we need to convert this using DOS-style short mode. If the path
59398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59399  # take no chances and rewrite it.
59400  # Note: m4 eats our [], so we need to use [ and ] instead.
59401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59402  if test "x$has_forbidden_chars" != x; then
59403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59405  fi
59406
59407
59408  windows_path="$new_path"
59409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59410    unix_path=`$CYGPATH -u "$windows_path"`
59411    new_path="$unix_path"
59412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59414    new_path="$unix_path"
59415  fi
59416
59417  if test "x$path" != "x$new_path"; then
59418    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59421  fi
59422
59423  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59424  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59425
59426    else
59427      # We're on a unix platform. Hooray! :)
59428      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59429      has_space=`$ECHO "$path" | $GREP " "`
59430      if test "x$has_space" != x; then
59431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59433        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59434      fi
59435
59436      # Use eval to expand a potential ~
59437      eval path="$path"
59438      if test ! -f "$path" && test ! -d "$path"; then
59439        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59440      fi
59441
59442      if test -d "$path"; then
59443        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59444      else
59445        dir="`$DIRNAME "$path"`"
59446        base="`$BASENAME "$path"`"
59447        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59448      fi
59449    fi
59450  fi
59451
59452
59453  # Only process if variable expands to non-empty
59454
59455  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59457
59458  # Input might be given as Windows format, start by converting to
59459  # unix format.
59460  path="$POTENTIAL_FREETYPE_LIB_PATH"
59461  new_path=`$CYGPATH -u "$path"`
59462
59463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59466  # "foo.exe" is OK but "foo" is an error.
59467  #
59468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59469  # It is also a way to make sure we got the proper file name for the real test later on.
59470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59471  if test "x$test_shortpath" = x; then
59472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59474    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59475  fi
59476
59477  # Call helper function which possibly converts this using DOS-style short mode.
59478  # If so, the updated path is stored in $new_path.
59479
59480  input_path="$new_path"
59481  # Check if we need to convert this using DOS-style short mode. If the path
59482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59483  # take no chances and rewrite it.
59484  # Note: m4 eats our [], so we need to use [ and ] instead.
59485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59486  if test "x$has_forbidden_chars" != x; then
59487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59491      # Going to short mode and back again did indeed matter. Since short mode is
59492      # case insensitive, let's make it lowercase to improve readability.
59493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59494      # Now convert it back to Unix-style (cygpath)
59495      input_path=`$CYGPATH -u "$shortmode_path"`
59496      new_path="$input_path"
59497    fi
59498  fi
59499
59500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59501  if test "x$test_cygdrive_prefix" = x; then
59502    # As a simple fix, exclude /usr/bin since it's not a real path.
59503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59505      # a path prefixed by /cygdrive for fixpath to work.
59506      new_path="$CYGWIN_ROOT_PATH$input_path"
59507    fi
59508  fi
59509
59510
59511  if test "x$path" != "x$new_path"; then
59512    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59514$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59515  fi
59516
59517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59518
59519  path="$POTENTIAL_FREETYPE_LIB_PATH"
59520  has_colon=`$ECHO $path | $GREP ^.:`
59521  new_path="$path"
59522  if test "x$has_colon" = x; then
59523    # Not in mixed or Windows style, start by that.
59524    new_path=`cmd //c echo $path`
59525  fi
59526
59527
59528  input_path="$new_path"
59529  # Check if we need to convert this using DOS-style short mode. If the path
59530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59531  # take no chances and rewrite it.
59532  # Note: m4 eats our [], so we need to use [ and ] instead.
59533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59534  if test "x$has_forbidden_chars" != x; then
59535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59537  fi
59538
59539
59540  windows_path="$new_path"
59541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59542    unix_path=`$CYGPATH -u "$windows_path"`
59543    new_path="$unix_path"
59544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59546    new_path="$unix_path"
59547  fi
59548
59549  if test "x$path" != "x$new_path"; then
59550    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59553  fi
59554
59555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59557
59558    else
59559      # We're on a unix platform. Hooray! :)
59560      path="$POTENTIAL_FREETYPE_LIB_PATH"
59561      has_space=`$ECHO "$path" | $GREP " "`
59562      if test "x$has_space" != x; then
59563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59566      fi
59567
59568      # Use eval to expand a potential ~
59569      eval path="$path"
59570      if test ! -f "$path" && test ! -d "$path"; then
59571        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59572      fi
59573
59574      if test -d "$path"; then
59575        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59576      else
59577        dir="`$DIRNAME "$path"`"
59578        base="`$BASENAME "$path"`"
59579        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59580      fi
59581    fi
59582  fi
59583
59584
59585    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59587$as_echo_n "checking for freetype includes... " >&6; }
59588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59589$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59590    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59592$as_echo_n "checking for freetype libraries... " >&6; }
59593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59594$as_echo "$FREETYPE_LIB_PATH" >&6; }
59595  fi
59596
59597            else
59598
59599  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59600  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59601  METHOD="well-known location"
59602
59603  # Let's start with an optimistic view of the world :-)
59604  FOUND_FREETYPE=yes
59605
59606  # First look for the canonical freetype main include file ft2build.h.
59607  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59608    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59609    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59610    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59611      # Fail.
59612      FOUND_FREETYPE=no
59613    fi
59614  fi
59615
59616  if test "x$FOUND_FREETYPE" = xyes; then
59617    # Include file found, let's continue the sanity check.
59618    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59619$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59620
59621    # Reset to default value
59622    FREETYPE_BASE_NAME=freetype
59623    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59624    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59625      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59626          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59627        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59628        # for the .6 version explicitly.
59629        FREETYPE_BASE_NAME=freetype.6
59630        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59631        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59632$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59633      else
59634        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59636        FOUND_FREETYPE=no
59637      fi
59638    else
59639      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59640        # On Windows, we will need both .lib and .dll file.
59641        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59642          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59643$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59644          FOUND_FREETYPE=no
59645        fi
59646      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59647          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59648        # Found lib in isa dir, use that instead.
59649        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59650        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59651$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59652      fi
59653    fi
59654  fi
59655
59656  if test "x$FOUND_FREETYPE" = xyes; then
59657
59658  # Only process if variable expands to non-empty
59659
59660  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59662
59663  # Input might be given as Windows format, start by converting to
59664  # unix format.
59665  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59666  new_path=`$CYGPATH -u "$path"`
59667
59668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59671  # "foo.exe" is OK but "foo" is an error.
59672  #
59673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59674  # It is also a way to make sure we got the proper file name for the real test later on.
59675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59676  if test "x$test_shortpath" = x; then
59677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59679    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59680  fi
59681
59682  # Call helper function which possibly converts this using DOS-style short mode.
59683  # If so, the updated path is stored in $new_path.
59684
59685  input_path="$new_path"
59686  # Check if we need to convert this using DOS-style short mode. If the path
59687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59688  # take no chances and rewrite it.
59689  # Note: m4 eats our [], so we need to use [ and ] instead.
59690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59691  if test "x$has_forbidden_chars" != x; then
59692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59696      # Going to short mode and back again did indeed matter. Since short mode is
59697      # case insensitive, let's make it lowercase to improve readability.
59698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59699      # Now convert it back to Unix-style (cygpath)
59700      input_path=`$CYGPATH -u "$shortmode_path"`
59701      new_path="$input_path"
59702    fi
59703  fi
59704
59705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59706  if test "x$test_cygdrive_prefix" = x; then
59707    # As a simple fix, exclude /usr/bin since it's not a real path.
59708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59710      # a path prefixed by /cygdrive for fixpath to work.
59711      new_path="$CYGWIN_ROOT_PATH$input_path"
59712    fi
59713  fi
59714
59715
59716  if test "x$path" != "x$new_path"; then
59717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59720  fi
59721
59722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59723
59724  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59725  has_colon=`$ECHO $path | $GREP ^.:`
59726  new_path="$path"
59727  if test "x$has_colon" = x; then
59728    # Not in mixed or Windows style, start by that.
59729    new_path=`cmd //c echo $path`
59730  fi
59731
59732
59733  input_path="$new_path"
59734  # Check if we need to convert this using DOS-style short mode. If the path
59735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59736  # take no chances and rewrite it.
59737  # Note: m4 eats our [], so we need to use [ and ] instead.
59738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59739  if test "x$has_forbidden_chars" != x; then
59740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59742  fi
59743
59744
59745  windows_path="$new_path"
59746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59747    unix_path=`$CYGPATH -u "$windows_path"`
59748    new_path="$unix_path"
59749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59751    new_path="$unix_path"
59752  fi
59753
59754  if test "x$path" != "x$new_path"; then
59755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59758  fi
59759
59760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59762
59763    else
59764      # We're on a unix platform. Hooray! :)
59765      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59766      has_space=`$ECHO "$path" | $GREP " "`
59767      if test "x$has_space" != x; then
59768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59771      fi
59772
59773      # Use eval to expand a potential ~
59774      eval path="$path"
59775      if test ! -f "$path" && test ! -d "$path"; then
59776        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59777      fi
59778
59779      if test -d "$path"; then
59780        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59781      else
59782        dir="`$DIRNAME "$path"`"
59783        base="`$BASENAME "$path"`"
59784        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59785      fi
59786    fi
59787  fi
59788
59789
59790  # Only process if variable expands to non-empty
59791
59792  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59794
59795  # Input might be given as Windows format, start by converting to
59796  # unix format.
59797  path="$POTENTIAL_FREETYPE_LIB_PATH"
59798  new_path=`$CYGPATH -u "$path"`
59799
59800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59803  # "foo.exe" is OK but "foo" is an error.
59804  #
59805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59806  # It is also a way to make sure we got the proper file name for the real test later on.
59807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59808  if test "x$test_shortpath" = x; then
59809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59811    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59812  fi
59813
59814  # Call helper function which possibly converts this using DOS-style short mode.
59815  # If so, the updated path is stored in $new_path.
59816
59817  input_path="$new_path"
59818  # Check if we need to convert this using DOS-style short mode. If the path
59819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59820  # take no chances and rewrite it.
59821  # Note: m4 eats our [], so we need to use [ and ] instead.
59822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59823  if test "x$has_forbidden_chars" != x; then
59824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59828      # Going to short mode and back again did indeed matter. Since short mode is
59829      # case insensitive, let's make it lowercase to improve readability.
59830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59831      # Now convert it back to Unix-style (cygpath)
59832      input_path=`$CYGPATH -u "$shortmode_path"`
59833      new_path="$input_path"
59834    fi
59835  fi
59836
59837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59838  if test "x$test_cygdrive_prefix" = x; then
59839    # As a simple fix, exclude /usr/bin since it's not a real path.
59840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59842      # a path prefixed by /cygdrive for fixpath to work.
59843      new_path="$CYGWIN_ROOT_PATH$input_path"
59844    fi
59845  fi
59846
59847
59848  if test "x$path" != "x$new_path"; then
59849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59852  fi
59853
59854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59855
59856  path="$POTENTIAL_FREETYPE_LIB_PATH"
59857  has_colon=`$ECHO $path | $GREP ^.:`
59858  new_path="$path"
59859  if test "x$has_colon" = x; then
59860    # Not in mixed or Windows style, start by that.
59861    new_path=`cmd //c echo $path`
59862  fi
59863
59864
59865  input_path="$new_path"
59866  # Check if we need to convert this using DOS-style short mode. If the path
59867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59868  # take no chances and rewrite it.
59869  # Note: m4 eats our [], so we need to use [ and ] instead.
59870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59871  if test "x$has_forbidden_chars" != x; then
59872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59874  fi
59875
59876
59877  windows_path="$new_path"
59878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59879    unix_path=`$CYGPATH -u "$windows_path"`
59880    new_path="$unix_path"
59881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59883    new_path="$unix_path"
59884  fi
59885
59886  if test "x$path" != "x$new_path"; then
59887    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59890  fi
59891
59892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59894
59895    else
59896      # We're on a unix platform. Hooray! :)
59897      path="$POTENTIAL_FREETYPE_LIB_PATH"
59898      has_space=`$ECHO "$path" | $GREP " "`
59899      if test "x$has_space" != x; then
59900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59903      fi
59904
59905      # Use eval to expand a potential ~
59906      eval path="$path"
59907      if test ! -f "$path" && test ! -d "$path"; then
59908        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59909      fi
59910
59911      if test -d "$path"; then
59912        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59913      else
59914        dir="`$DIRNAME "$path"`"
59915        base="`$BASENAME "$path"`"
59916        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59917      fi
59918    fi
59919  fi
59920
59921
59922    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59924$as_echo_n "checking for freetype includes... " >&6; }
59925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59926$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59927    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59929$as_echo_n "checking for freetype libraries... " >&6; }
59930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59931$as_echo "$FREETYPE_LIB_PATH" >&6; }
59932  fi
59933
59934            fi
59935            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59936                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59937              # Source is available, as a last resort try to build freetype in default location
59938
59939  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59940  BUILD_FREETYPE=yes
59941
59942  # Check if the freetype sources are acessible..
59943  if ! test -d $FREETYPE_SRC_PATH; then
59944    { $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
59945$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59946    BUILD_FREETYPE=no
59947  fi
59948  # ..and contain a vc2010 project file
59949  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59950  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59951    { $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
59952$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59953    BUILD_FREETYPE=no
59954  fi
59955  # Now check if configure found a version of 'msbuild.exe'
59956  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59957    { $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
59958$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;}
59959    BUILD_FREETYPE=no
59960  fi
59961
59962  # Ready to go..
59963  if test "x$BUILD_FREETYPE" = xyes; then
59964    # msbuild requires trailing slashes for output directories
59965    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59966    freetype_lib_path_unix="$freetype_lib_path"
59967    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59968
59969  unix_path="$vcxproj_path"
59970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59971    windows_path=`$CYGPATH -m "$unix_path"`
59972    vcxproj_path="$windows_path"
59973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59974    windows_path=`cmd //c echo $unix_path`
59975    vcxproj_path="$windows_path"
59976  fi
59977
59978
59979  unix_path="$freetype_lib_path"
59980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59981    windows_path=`$CYGPATH -m "$unix_path"`
59982    freetype_lib_path="$windows_path"
59983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59984    windows_path=`cmd //c echo $unix_path`
59985    freetype_lib_path="$windows_path"
59986  fi
59987
59988
59989  unix_path="$freetype_obj_path"
59990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59991    windows_path=`$CYGPATH -m "$unix_path"`
59992    freetype_obj_path="$windows_path"
59993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59994    windows_path=`cmd //c echo $unix_path`
59995    freetype_obj_path="$windows_path"
59996  fi
59997
59998    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59999      freetype_platform=x64
60000    else
60001      freetype_platform=win32
60002    fi
60003
60004    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60005    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60006    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60007    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60008    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60009$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60010
60011    # First we try to build the freetype.dll
60012    $ECHO -e "@echo off\n"\
60013        "$MSBUILD $vcxproj_path "\
60014        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60015        "/p:Configuration=\"Release Multithreaded\" "\
60016        "/p:Platform=$freetype_platform "\
60017        "/p:ConfigurationType=DynamicLibrary "\
60018        "/p:TargetName=freetype "\
60019        "/p:OutDir=\"$freetype_lib_path\" "\
60020        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60021    cmd /c freetype.bat
60022
60023    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60024      # If that succeeds we also build freetype.lib
60025      $ECHO -e "@echo off\n"\
60026          "$MSBUILD $vcxproj_path "\
60027          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60028          "/p:Configuration=\"Release Multithreaded\" "\
60029          "/p:Platform=$freetype_platform "\
60030          "/p:ConfigurationType=StaticLibrary "\
60031          "/p:TargetName=freetype "\
60032          "/p:OutDir=\"$freetype_lib_path\" "\
60033          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60034      cmd /c freetype.bat
60035
60036      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60037        # Once we build both, lib and dll, set freetype lib and include path appropriately
60038        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60039        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60040        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60041$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60042      else
60043        BUILD_FREETYPE=no
60044      fi
60045    else
60046      BUILD_FREETYPE=no
60047    fi
60048  fi
60049
60050              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60051
60052  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60053  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60054  METHOD="well-known location"
60055
60056  # Let's start with an optimistic view of the world :-)
60057  FOUND_FREETYPE=yes
60058
60059  # First look for the canonical freetype main include file ft2build.h.
60060  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60061    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60062    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60063    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60064      # Fail.
60065      FOUND_FREETYPE=no
60066    fi
60067  fi
60068
60069  if test "x$FOUND_FREETYPE" = xyes; then
60070    # Include file found, let's continue the sanity check.
60071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60072$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60073
60074    # Reset to default value
60075    FREETYPE_BASE_NAME=freetype
60076    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60077    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60078      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60080        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60081        # for the .6 version explicitly.
60082        FREETYPE_BASE_NAME=freetype.6
60083        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60084        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60085$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60086      else
60087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60088$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60089        FOUND_FREETYPE=no
60090      fi
60091    else
60092      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60093        # On Windows, we will need both .lib and .dll file.
60094        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60095          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60097          FOUND_FREETYPE=no
60098        fi
60099      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60100          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60101        # Found lib in isa dir, use that instead.
60102        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60103        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60104$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60105      fi
60106    fi
60107  fi
60108
60109  if test "x$FOUND_FREETYPE" = xyes; then
60110
60111  # Only process if variable expands to non-empty
60112
60113  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60115
60116  # Input might be given as Windows format, start by converting to
60117  # unix format.
60118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60119  new_path=`$CYGPATH -u "$path"`
60120
60121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60124  # "foo.exe" is OK but "foo" is an error.
60125  #
60126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60127  # It is also a way to make sure we got the proper file name for the real test later on.
60128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60129  if test "x$test_shortpath" = x; then
60130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60133  fi
60134
60135  # Call helper function which possibly converts this using DOS-style short mode.
60136  # If so, the updated path is stored in $new_path.
60137
60138  input_path="$new_path"
60139  # Check if we need to convert this using DOS-style short mode. If the path
60140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60141  # take no chances and rewrite it.
60142  # Note: m4 eats our [], so we need to use [ and ] instead.
60143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60144  if test "x$has_forbidden_chars" != x; then
60145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60149      # Going to short mode and back again did indeed matter. Since short mode is
60150      # case insensitive, let's make it lowercase to improve readability.
60151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60152      # Now convert it back to Unix-style (cygpath)
60153      input_path=`$CYGPATH -u "$shortmode_path"`
60154      new_path="$input_path"
60155    fi
60156  fi
60157
60158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60159  if test "x$test_cygdrive_prefix" = x; then
60160    # As a simple fix, exclude /usr/bin since it's not a real path.
60161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60163      # a path prefixed by /cygdrive for fixpath to work.
60164      new_path="$CYGWIN_ROOT_PATH$input_path"
60165    fi
60166  fi
60167
60168
60169  if test "x$path" != "x$new_path"; then
60170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60173  fi
60174
60175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60176
60177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60178  has_colon=`$ECHO $path | $GREP ^.:`
60179  new_path="$path"
60180  if test "x$has_colon" = x; then
60181    # Not in mixed or Windows style, start by that.
60182    new_path=`cmd //c echo $path`
60183  fi
60184
60185
60186  input_path="$new_path"
60187  # Check if we need to convert this using DOS-style short mode. If the path
60188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60189  # take no chances and rewrite it.
60190  # Note: m4 eats our [], so we need to use [ and ] instead.
60191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60192  if test "x$has_forbidden_chars" != x; then
60193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60195  fi
60196
60197
60198  windows_path="$new_path"
60199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60200    unix_path=`$CYGPATH -u "$windows_path"`
60201    new_path="$unix_path"
60202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60204    new_path="$unix_path"
60205  fi
60206
60207  if test "x$path" != "x$new_path"; then
60208    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60211  fi
60212
60213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60215
60216    else
60217      # We're on a unix platform. Hooray! :)
60218      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60219      has_space=`$ECHO "$path" | $GREP " "`
60220      if test "x$has_space" != x; then
60221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60224      fi
60225
60226      # Use eval to expand a potential ~
60227      eval path="$path"
60228      if test ! -f "$path" && test ! -d "$path"; then
60229        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60230      fi
60231
60232      if test -d "$path"; then
60233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60234      else
60235        dir="`$DIRNAME "$path"`"
60236        base="`$BASENAME "$path"`"
60237        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60238      fi
60239    fi
60240  fi
60241
60242
60243  # Only process if variable expands to non-empty
60244
60245  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60247
60248  # Input might be given as Windows format, start by converting to
60249  # unix format.
60250  path="$POTENTIAL_FREETYPE_LIB_PATH"
60251  new_path=`$CYGPATH -u "$path"`
60252
60253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60256  # "foo.exe" is OK but "foo" is an error.
60257  #
60258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60259  # It is also a way to make sure we got the proper file name for the real test later on.
60260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60261  if test "x$test_shortpath" = x; then
60262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60265  fi
60266
60267  # Call helper function which possibly converts this using DOS-style short mode.
60268  # If so, the updated path is stored in $new_path.
60269
60270  input_path="$new_path"
60271  # Check if we need to convert this using DOS-style short mode. If the path
60272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60273  # take no chances and rewrite it.
60274  # Note: m4 eats our [], so we need to use [ and ] instead.
60275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60276  if test "x$has_forbidden_chars" != x; then
60277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60281      # Going to short mode and back again did indeed matter. Since short mode is
60282      # case insensitive, let's make it lowercase to improve readability.
60283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60284      # Now convert it back to Unix-style (cygpath)
60285      input_path=`$CYGPATH -u "$shortmode_path"`
60286      new_path="$input_path"
60287    fi
60288  fi
60289
60290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60291  if test "x$test_cygdrive_prefix" = x; then
60292    # As a simple fix, exclude /usr/bin since it's not a real path.
60293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60295      # a path prefixed by /cygdrive for fixpath to work.
60296      new_path="$CYGWIN_ROOT_PATH$input_path"
60297    fi
60298  fi
60299
60300
60301  if test "x$path" != "x$new_path"; then
60302    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60305  fi
60306
60307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60308
60309  path="$POTENTIAL_FREETYPE_LIB_PATH"
60310  has_colon=`$ECHO $path | $GREP ^.:`
60311  new_path="$path"
60312  if test "x$has_colon" = x; then
60313    # Not in mixed or Windows style, start by that.
60314    new_path=`cmd //c echo $path`
60315  fi
60316
60317
60318  input_path="$new_path"
60319  # Check if we need to convert this using DOS-style short mode. If the path
60320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60321  # take no chances and rewrite it.
60322  # Note: m4 eats our [], so we need to use [ and ] instead.
60323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60324  if test "x$has_forbidden_chars" != x; then
60325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60327  fi
60328
60329
60330  windows_path="$new_path"
60331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60332    unix_path=`$CYGPATH -u "$windows_path"`
60333    new_path="$unix_path"
60334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60336    new_path="$unix_path"
60337  fi
60338
60339  if test "x$path" != "x$new_path"; then
60340    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60343  fi
60344
60345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60347
60348    else
60349      # We're on a unix platform. Hooray! :)
60350      path="$POTENTIAL_FREETYPE_LIB_PATH"
60351      has_space=`$ECHO "$path" | $GREP " "`
60352      if test "x$has_space" != x; then
60353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60356      fi
60357
60358      # Use eval to expand a potential ~
60359      eval path="$path"
60360      if test ! -f "$path" && test ! -d "$path"; then
60361        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60362      fi
60363
60364      if test -d "$path"; then
60365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60366      else
60367        dir="`$DIRNAME "$path"`"
60368        base="`$BASENAME "$path"`"
60369        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60370      fi
60371    fi
60372  fi
60373
60374
60375    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60377$as_echo_n "checking for freetype includes... " >&6; }
60378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60379$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60380    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60382$as_echo_n "checking for freetype libraries... " >&6; }
60383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60384$as_echo "$FREETYPE_LIB_PATH" >&6; }
60385  fi
60386
60387              else
60388
60389  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60390  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60391  METHOD="well-known location"
60392
60393  # Let's start with an optimistic view of the world :-)
60394  FOUND_FREETYPE=yes
60395
60396  # First look for the canonical freetype main include file ft2build.h.
60397  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60398    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60399    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60400    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60401      # Fail.
60402      FOUND_FREETYPE=no
60403    fi
60404  fi
60405
60406  if test "x$FOUND_FREETYPE" = xyes; then
60407    # Include file found, let's continue the sanity check.
60408    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60409$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60410
60411    # Reset to default value
60412    FREETYPE_BASE_NAME=freetype
60413    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60414    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60415      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60416          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60417        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60418        # for the .6 version explicitly.
60419        FREETYPE_BASE_NAME=freetype.6
60420        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60421        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60422$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60423      else
60424        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60425$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60426        FOUND_FREETYPE=no
60427      fi
60428    else
60429      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60430        # On Windows, we will need both .lib and .dll file.
60431        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60432          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60433$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60434          FOUND_FREETYPE=no
60435        fi
60436      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60437          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60438        # Found lib in isa dir, use that instead.
60439        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60440        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60441$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60442      fi
60443    fi
60444  fi
60445
60446  if test "x$FOUND_FREETYPE" = xyes; then
60447
60448  # Only process if variable expands to non-empty
60449
60450  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60452
60453  # Input might be given as Windows format, start by converting to
60454  # unix format.
60455  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60456  new_path=`$CYGPATH -u "$path"`
60457
60458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60461  # "foo.exe" is OK but "foo" is an error.
60462  #
60463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60464  # It is also a way to make sure we got the proper file name for the real test later on.
60465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60466  if test "x$test_shortpath" = x; then
60467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60469    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60470  fi
60471
60472  # Call helper function which possibly converts this using DOS-style short mode.
60473  # If so, the updated path is stored in $new_path.
60474
60475  input_path="$new_path"
60476  # Check if we need to convert this using DOS-style short mode. If the path
60477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60478  # take no chances and rewrite it.
60479  # Note: m4 eats our [], so we need to use [ and ] instead.
60480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60481  if test "x$has_forbidden_chars" != x; then
60482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60486      # Going to short mode and back again did indeed matter. Since short mode is
60487      # case insensitive, let's make it lowercase to improve readability.
60488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60489      # Now convert it back to Unix-style (cygpath)
60490      input_path=`$CYGPATH -u "$shortmode_path"`
60491      new_path="$input_path"
60492    fi
60493  fi
60494
60495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60496  if test "x$test_cygdrive_prefix" = x; then
60497    # As a simple fix, exclude /usr/bin since it's not a real path.
60498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60500      # a path prefixed by /cygdrive for fixpath to work.
60501      new_path="$CYGWIN_ROOT_PATH$input_path"
60502    fi
60503  fi
60504
60505
60506  if test "x$path" != "x$new_path"; then
60507    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60510  fi
60511
60512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60513
60514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60515  has_colon=`$ECHO $path | $GREP ^.:`
60516  new_path="$path"
60517  if test "x$has_colon" = x; then
60518    # Not in mixed or Windows style, start by that.
60519    new_path=`cmd //c echo $path`
60520  fi
60521
60522
60523  input_path="$new_path"
60524  # Check if we need to convert this using DOS-style short mode. If the path
60525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60526  # take no chances and rewrite it.
60527  # Note: m4 eats our [], so we need to use [ and ] instead.
60528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60529  if test "x$has_forbidden_chars" != x; then
60530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60532  fi
60533
60534
60535  windows_path="$new_path"
60536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60537    unix_path=`$CYGPATH -u "$windows_path"`
60538    new_path="$unix_path"
60539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60541    new_path="$unix_path"
60542  fi
60543
60544  if test "x$path" != "x$new_path"; then
60545    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60548  fi
60549
60550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60552
60553    else
60554      # We're on a unix platform. Hooray! :)
60555      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60556      has_space=`$ECHO "$path" | $GREP " "`
60557      if test "x$has_space" != x; then
60558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60561      fi
60562
60563      # Use eval to expand a potential ~
60564      eval path="$path"
60565      if test ! -f "$path" && test ! -d "$path"; then
60566        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60567      fi
60568
60569      if test -d "$path"; then
60570        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60571      else
60572        dir="`$DIRNAME "$path"`"
60573        base="`$BASENAME "$path"`"
60574        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60575      fi
60576    fi
60577  fi
60578
60579
60580  # Only process if variable expands to non-empty
60581
60582  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60584
60585  # Input might be given as Windows format, start by converting to
60586  # unix format.
60587  path="$POTENTIAL_FREETYPE_LIB_PATH"
60588  new_path=`$CYGPATH -u "$path"`
60589
60590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60593  # "foo.exe" is OK but "foo" is an error.
60594  #
60595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60596  # It is also a way to make sure we got the proper file name for the real test later on.
60597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60598  if test "x$test_shortpath" = x; then
60599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60600$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60601    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60602  fi
60603
60604  # Call helper function which possibly converts this using DOS-style short mode.
60605  # If so, the updated path is stored in $new_path.
60606
60607  input_path="$new_path"
60608  # Check if we need to convert this using DOS-style short mode. If the path
60609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60610  # take no chances and rewrite it.
60611  # Note: m4 eats our [], so we need to use [ and ] instead.
60612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60613  if test "x$has_forbidden_chars" != x; then
60614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60618      # Going to short mode and back again did indeed matter. Since short mode is
60619      # case insensitive, let's make it lowercase to improve readability.
60620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60621      # Now convert it back to Unix-style (cygpath)
60622      input_path=`$CYGPATH -u "$shortmode_path"`
60623      new_path="$input_path"
60624    fi
60625  fi
60626
60627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60628  if test "x$test_cygdrive_prefix" = x; then
60629    # As a simple fix, exclude /usr/bin since it's not a real path.
60630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60632      # a path prefixed by /cygdrive for fixpath to work.
60633      new_path="$CYGWIN_ROOT_PATH$input_path"
60634    fi
60635  fi
60636
60637
60638  if test "x$path" != "x$new_path"; then
60639    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60642  fi
60643
60644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60645
60646  path="$POTENTIAL_FREETYPE_LIB_PATH"
60647  has_colon=`$ECHO $path | $GREP ^.:`
60648  new_path="$path"
60649  if test "x$has_colon" = x; then
60650    # Not in mixed or Windows style, start by that.
60651    new_path=`cmd //c echo $path`
60652  fi
60653
60654
60655  input_path="$new_path"
60656  # Check if we need to convert this using DOS-style short mode. If the path
60657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60658  # take no chances and rewrite it.
60659  # Note: m4 eats our [], so we need to use [ and ] instead.
60660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60661  if test "x$has_forbidden_chars" != x; then
60662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60664  fi
60665
60666
60667  windows_path="$new_path"
60668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60669    unix_path=`$CYGPATH -u "$windows_path"`
60670    new_path="$unix_path"
60671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60673    new_path="$unix_path"
60674  fi
60675
60676  if test "x$path" != "x$new_path"; then
60677    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60680  fi
60681
60682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60684
60685    else
60686      # We're on a unix platform. Hooray! :)
60687      path="$POTENTIAL_FREETYPE_LIB_PATH"
60688      has_space=`$ECHO "$path" | $GREP " "`
60689      if test "x$has_space" != x; then
60690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60691$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60693      fi
60694
60695      # Use eval to expand a potential ~
60696      eval path="$path"
60697      if test ! -f "$path" && test ! -d "$path"; then
60698        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60699      fi
60700
60701      if test -d "$path"; then
60702        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60703      else
60704        dir="`$DIRNAME "$path"`"
60705        base="`$BASENAME "$path"`"
60706        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60707      fi
60708    fi
60709  fi
60710
60711
60712    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60714$as_echo_n "checking for freetype includes... " >&6; }
60715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60716$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60717    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60719$as_echo_n "checking for freetype libraries... " >&6; }
60720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60721$as_echo "$FREETYPE_LIB_PATH" >&6; }
60722  fi
60723
60724              fi
60725            fi
60726          fi
60727        else
60728          FREETYPE_BASE_DIR="$SYSROOT/usr"
60729
60730  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60731  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60732  METHOD="well-known location"
60733
60734  # Let's start with an optimistic view of the world :-)
60735  FOUND_FREETYPE=yes
60736
60737  # First look for the canonical freetype main include file ft2build.h.
60738  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60739    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60740    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60741    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60742      # Fail.
60743      FOUND_FREETYPE=no
60744    fi
60745  fi
60746
60747  if test "x$FOUND_FREETYPE" = xyes; then
60748    # Include file found, let's continue the sanity check.
60749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60750$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60751
60752    # Reset to default value
60753    FREETYPE_BASE_NAME=freetype
60754    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60755    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60756      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60758        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60759        # for the .6 version explicitly.
60760        FREETYPE_BASE_NAME=freetype.6
60761        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60762        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60763$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60764      else
60765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60767        FOUND_FREETYPE=no
60768      fi
60769    else
60770      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60771        # On Windows, we will need both .lib and .dll file.
60772        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60773          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60775          FOUND_FREETYPE=no
60776        fi
60777      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60778          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60779        # Found lib in isa dir, use that instead.
60780        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60781        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60782$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60783      fi
60784    fi
60785  fi
60786
60787  if test "x$FOUND_FREETYPE" = xyes; then
60788
60789  # Only process if variable expands to non-empty
60790
60791  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60793
60794  # Input might be given as Windows format, start by converting to
60795  # unix format.
60796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60797  new_path=`$CYGPATH -u "$path"`
60798
60799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60802  # "foo.exe" is OK but "foo" is an error.
60803  #
60804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60805  # It is also a way to make sure we got the proper file name for the real test later on.
60806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60807  if test "x$test_shortpath" = x; then
60808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60811  fi
60812
60813  # Call helper function which possibly converts this using DOS-style short mode.
60814  # If so, the updated path is stored in $new_path.
60815
60816  input_path="$new_path"
60817  # Check if we need to convert this using DOS-style short mode. If the path
60818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60819  # take no chances and rewrite it.
60820  # Note: m4 eats our [], so we need to use [ and ] instead.
60821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60822  if test "x$has_forbidden_chars" != x; then
60823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60827      # Going to short mode and back again did indeed matter. Since short mode is
60828      # case insensitive, let's make it lowercase to improve readability.
60829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60830      # Now convert it back to Unix-style (cygpath)
60831      input_path=`$CYGPATH -u "$shortmode_path"`
60832      new_path="$input_path"
60833    fi
60834  fi
60835
60836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60837  if test "x$test_cygdrive_prefix" = x; then
60838    # As a simple fix, exclude /usr/bin since it's not a real path.
60839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60841      # a path prefixed by /cygdrive for fixpath to work.
60842      new_path="$CYGWIN_ROOT_PATH$input_path"
60843    fi
60844  fi
60845
60846
60847  if test "x$path" != "x$new_path"; then
60848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60851  fi
60852
60853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60854
60855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60856  has_colon=`$ECHO $path | $GREP ^.:`
60857  new_path="$path"
60858  if test "x$has_colon" = x; then
60859    # Not in mixed or Windows style, start by that.
60860    new_path=`cmd //c echo $path`
60861  fi
60862
60863
60864  input_path="$new_path"
60865  # Check if we need to convert this using DOS-style short mode. If the path
60866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60867  # take no chances and rewrite it.
60868  # Note: m4 eats our [], so we need to use [ and ] instead.
60869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60870  if test "x$has_forbidden_chars" != x; then
60871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60873  fi
60874
60875
60876  windows_path="$new_path"
60877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60878    unix_path=`$CYGPATH -u "$windows_path"`
60879    new_path="$unix_path"
60880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60882    new_path="$unix_path"
60883  fi
60884
60885  if test "x$path" != "x$new_path"; then
60886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60889  fi
60890
60891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60893
60894    else
60895      # We're on a unix platform. Hooray! :)
60896      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60897      has_space=`$ECHO "$path" | $GREP " "`
60898      if test "x$has_space" != x; then
60899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60902      fi
60903
60904      # Use eval to expand a potential ~
60905      eval path="$path"
60906      if test ! -f "$path" && test ! -d "$path"; then
60907        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60908      fi
60909
60910      if test -d "$path"; then
60911        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60912      else
60913        dir="`$DIRNAME "$path"`"
60914        base="`$BASENAME "$path"`"
60915        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60916      fi
60917    fi
60918  fi
60919
60920
60921  # Only process if variable expands to non-empty
60922
60923  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60925
60926  # Input might be given as Windows format, start by converting to
60927  # unix format.
60928  path="$POTENTIAL_FREETYPE_LIB_PATH"
60929  new_path=`$CYGPATH -u "$path"`
60930
60931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60934  # "foo.exe" is OK but "foo" is an error.
60935  #
60936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60937  # It is also a way to make sure we got the proper file name for the real test later on.
60938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60939  if test "x$test_shortpath" = x; then
60940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60942    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60943  fi
60944
60945  # Call helper function which possibly converts this using DOS-style short mode.
60946  # If so, the updated path is stored in $new_path.
60947
60948  input_path="$new_path"
60949  # Check if we need to convert this using DOS-style short mode. If the path
60950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60951  # take no chances and rewrite it.
60952  # Note: m4 eats our [], so we need to use [ and ] instead.
60953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60954  if test "x$has_forbidden_chars" != x; then
60955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60959      # Going to short mode and back again did indeed matter. Since short mode is
60960      # case insensitive, let's make it lowercase to improve readability.
60961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60962      # Now convert it back to Unix-style (cygpath)
60963      input_path=`$CYGPATH -u "$shortmode_path"`
60964      new_path="$input_path"
60965    fi
60966  fi
60967
60968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60969  if test "x$test_cygdrive_prefix" = x; then
60970    # As a simple fix, exclude /usr/bin since it's not a real path.
60971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60973      # a path prefixed by /cygdrive for fixpath to work.
60974      new_path="$CYGWIN_ROOT_PATH$input_path"
60975    fi
60976  fi
60977
60978
60979  if test "x$path" != "x$new_path"; then
60980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60983  fi
60984
60985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60986
60987  path="$POTENTIAL_FREETYPE_LIB_PATH"
60988  has_colon=`$ECHO $path | $GREP ^.:`
60989  new_path="$path"
60990  if test "x$has_colon" = x; then
60991    # Not in mixed or Windows style, start by that.
60992    new_path=`cmd //c echo $path`
60993  fi
60994
60995
60996  input_path="$new_path"
60997  # Check if we need to convert this using DOS-style short mode. If the path
60998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60999  # take no chances and rewrite it.
61000  # Note: m4 eats our [], so we need to use [ and ] instead.
61001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61002  if test "x$has_forbidden_chars" != x; then
61003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61005  fi
61006
61007
61008  windows_path="$new_path"
61009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61010    unix_path=`$CYGPATH -u "$windows_path"`
61011    new_path="$unix_path"
61012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61014    new_path="$unix_path"
61015  fi
61016
61017  if test "x$path" != "x$new_path"; then
61018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61021  fi
61022
61023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61025
61026    else
61027      # We're on a unix platform. Hooray! :)
61028      path="$POTENTIAL_FREETYPE_LIB_PATH"
61029      has_space=`$ECHO "$path" | $GREP " "`
61030      if test "x$has_space" != x; then
61031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61034      fi
61035
61036      # Use eval to expand a potential ~
61037      eval path="$path"
61038      if test ! -f "$path" && test ! -d "$path"; then
61039        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61040      fi
61041
61042      if test -d "$path"; then
61043        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61044      else
61045        dir="`$DIRNAME "$path"`"
61046        base="`$BASENAME "$path"`"
61047        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61048      fi
61049    fi
61050  fi
61051
61052
61053    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61055$as_echo_n "checking for freetype includes... " >&6; }
61056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61057$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61058    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61060$as_echo_n "checking for freetype libraries... " >&6; }
61061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61062$as_echo "$FREETYPE_LIB_PATH" >&6; }
61063  fi
61064
61065
61066          if test "x$FOUND_FREETYPE" != xyes; then
61067            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61068
61069  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61070  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61071  METHOD="well-known location"
61072
61073  # Let's start with an optimistic view of the world :-)
61074  FOUND_FREETYPE=yes
61075
61076  # First look for the canonical freetype main include file ft2build.h.
61077  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61078    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61079    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61080    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61081      # Fail.
61082      FOUND_FREETYPE=no
61083    fi
61084  fi
61085
61086  if test "x$FOUND_FREETYPE" = xyes; then
61087    # Include file found, let's continue the sanity check.
61088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61089$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61090
61091    # Reset to default value
61092    FREETYPE_BASE_NAME=freetype
61093    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61094    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61095      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61096          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61097        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61098        # for the .6 version explicitly.
61099        FREETYPE_BASE_NAME=freetype.6
61100        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61101        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61102$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61103      else
61104        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61105$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61106        FOUND_FREETYPE=no
61107      fi
61108    else
61109      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61110        # On Windows, we will need both .lib and .dll file.
61111        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61112          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61113$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61114          FOUND_FREETYPE=no
61115        fi
61116      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61117          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61118        # Found lib in isa dir, use that instead.
61119        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61120        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61121$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61122      fi
61123    fi
61124  fi
61125
61126  if test "x$FOUND_FREETYPE" = xyes; then
61127
61128  # Only process if variable expands to non-empty
61129
61130  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61132
61133  # Input might be given as Windows format, start by converting to
61134  # unix format.
61135  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61136  new_path=`$CYGPATH -u "$path"`
61137
61138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61141  # "foo.exe" is OK but "foo" is an error.
61142  #
61143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61144  # It is also a way to make sure we got the proper file name for the real test later on.
61145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61146  if test "x$test_shortpath" = x; then
61147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61149    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61150  fi
61151
61152  # Call helper function which possibly converts this using DOS-style short mode.
61153  # If so, the updated path is stored in $new_path.
61154
61155  input_path="$new_path"
61156  # Check if we need to convert this using DOS-style short mode. If the path
61157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61158  # take no chances and rewrite it.
61159  # Note: m4 eats our [], so we need to use [ and ] instead.
61160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61161  if test "x$has_forbidden_chars" != x; then
61162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61166      # Going to short mode and back again did indeed matter. Since short mode is
61167      # case insensitive, let's make it lowercase to improve readability.
61168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61169      # Now convert it back to Unix-style (cygpath)
61170      input_path=`$CYGPATH -u "$shortmode_path"`
61171      new_path="$input_path"
61172    fi
61173  fi
61174
61175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61176  if test "x$test_cygdrive_prefix" = x; then
61177    # As a simple fix, exclude /usr/bin since it's not a real path.
61178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61180      # a path prefixed by /cygdrive for fixpath to work.
61181      new_path="$CYGWIN_ROOT_PATH$input_path"
61182    fi
61183  fi
61184
61185
61186  if test "x$path" != "x$new_path"; then
61187    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61190  fi
61191
61192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61193
61194  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61195  has_colon=`$ECHO $path | $GREP ^.:`
61196  new_path="$path"
61197  if test "x$has_colon" = x; then
61198    # Not in mixed or Windows style, start by that.
61199    new_path=`cmd //c echo $path`
61200  fi
61201
61202
61203  input_path="$new_path"
61204  # Check if we need to convert this using DOS-style short mode. If the path
61205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61206  # take no chances and rewrite it.
61207  # Note: m4 eats our [], so we need to use [ and ] instead.
61208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61209  if test "x$has_forbidden_chars" != x; then
61210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61212  fi
61213
61214
61215  windows_path="$new_path"
61216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61217    unix_path=`$CYGPATH -u "$windows_path"`
61218    new_path="$unix_path"
61219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61221    new_path="$unix_path"
61222  fi
61223
61224  if test "x$path" != "x$new_path"; then
61225    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61228  fi
61229
61230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61232
61233    else
61234      # We're on a unix platform. Hooray! :)
61235      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61236      has_space=`$ECHO "$path" | $GREP " "`
61237      if test "x$has_space" != x; then
61238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61241      fi
61242
61243      # Use eval to expand a potential ~
61244      eval path="$path"
61245      if test ! -f "$path" && test ! -d "$path"; then
61246        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61247      fi
61248
61249      if test -d "$path"; then
61250        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61251      else
61252        dir="`$DIRNAME "$path"`"
61253        base="`$BASENAME "$path"`"
61254        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61255      fi
61256    fi
61257  fi
61258
61259
61260  # Only process if variable expands to non-empty
61261
61262  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61264
61265  # Input might be given as Windows format, start by converting to
61266  # unix format.
61267  path="$POTENTIAL_FREETYPE_LIB_PATH"
61268  new_path=`$CYGPATH -u "$path"`
61269
61270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61273  # "foo.exe" is OK but "foo" is an error.
61274  #
61275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61276  # It is also a way to make sure we got the proper file name for the real test later on.
61277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61278  if test "x$test_shortpath" = x; then
61279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61281    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61282  fi
61283
61284  # Call helper function which possibly converts this using DOS-style short mode.
61285  # If so, the updated path is stored in $new_path.
61286
61287  input_path="$new_path"
61288  # Check if we need to convert this using DOS-style short mode. If the path
61289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61290  # take no chances and rewrite it.
61291  # Note: m4 eats our [], so we need to use [ and ] instead.
61292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61293  if test "x$has_forbidden_chars" != x; then
61294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61298      # Going to short mode and back again did indeed matter. Since short mode is
61299      # case insensitive, let's make it lowercase to improve readability.
61300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61301      # Now convert it back to Unix-style (cygpath)
61302      input_path=`$CYGPATH -u "$shortmode_path"`
61303      new_path="$input_path"
61304    fi
61305  fi
61306
61307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61308  if test "x$test_cygdrive_prefix" = x; then
61309    # As a simple fix, exclude /usr/bin since it's not a real path.
61310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61312      # a path prefixed by /cygdrive for fixpath to work.
61313      new_path="$CYGWIN_ROOT_PATH$input_path"
61314    fi
61315  fi
61316
61317
61318  if test "x$path" != "x$new_path"; then
61319    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61322  fi
61323
61324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61325
61326  path="$POTENTIAL_FREETYPE_LIB_PATH"
61327  has_colon=`$ECHO $path | $GREP ^.:`
61328  new_path="$path"
61329  if test "x$has_colon" = x; then
61330    # Not in mixed or Windows style, start by that.
61331    new_path=`cmd //c echo $path`
61332  fi
61333
61334
61335  input_path="$new_path"
61336  # Check if we need to convert this using DOS-style short mode. If the path
61337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61338  # take no chances and rewrite it.
61339  # Note: m4 eats our [], so we need to use [ and ] instead.
61340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61341  if test "x$has_forbidden_chars" != x; then
61342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61344  fi
61345
61346
61347  windows_path="$new_path"
61348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61349    unix_path=`$CYGPATH -u "$windows_path"`
61350    new_path="$unix_path"
61351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61353    new_path="$unix_path"
61354  fi
61355
61356  if test "x$path" != "x$new_path"; then
61357    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61360  fi
61361
61362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61364
61365    else
61366      # We're on a unix platform. Hooray! :)
61367      path="$POTENTIAL_FREETYPE_LIB_PATH"
61368      has_space=`$ECHO "$path" | $GREP " "`
61369      if test "x$has_space" != x; then
61370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61373      fi
61374
61375      # Use eval to expand a potential ~
61376      eval path="$path"
61377      if test ! -f "$path" && test ! -d "$path"; then
61378        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61379      fi
61380
61381      if test -d "$path"; then
61382        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61383      else
61384        dir="`$DIRNAME "$path"`"
61385        base="`$BASENAME "$path"`"
61386        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61387      fi
61388    fi
61389  fi
61390
61391
61392    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61394$as_echo_n "checking for freetype includes... " >&6; }
61395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61396$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61397    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61399$as_echo_n "checking for freetype libraries... " >&6; }
61400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61401$as_echo "$FREETYPE_LIB_PATH" >&6; }
61402  fi
61403
61404          fi
61405          if test "x$FOUND_FREETYPE" != xyes; then
61406            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61407
61408  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61409  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61410  METHOD="well-known location"
61411
61412  # Let's start with an optimistic view of the world :-)
61413  FOUND_FREETYPE=yes
61414
61415  # First look for the canonical freetype main include file ft2build.h.
61416  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61417    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61418    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61419    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61420      # Fail.
61421      FOUND_FREETYPE=no
61422    fi
61423  fi
61424
61425  if test "x$FOUND_FREETYPE" = xyes; then
61426    # Include file found, let's continue the sanity check.
61427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61428$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61429
61430    # Reset to default value
61431    FREETYPE_BASE_NAME=freetype
61432    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61433    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61434      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61435          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61436        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61437        # for the .6 version explicitly.
61438        FREETYPE_BASE_NAME=freetype.6
61439        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61440        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61441$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61442      else
61443        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61444$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61445        FOUND_FREETYPE=no
61446      fi
61447    else
61448      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61449        # On Windows, we will need both .lib and .dll file.
61450        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61451          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61452$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61453          FOUND_FREETYPE=no
61454        fi
61455      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61457        # Found lib in isa dir, use that instead.
61458        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61459        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61460$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61461      fi
61462    fi
61463  fi
61464
61465  if test "x$FOUND_FREETYPE" = xyes; then
61466
61467  # Only process if variable expands to non-empty
61468
61469  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61471
61472  # Input might be given as Windows format, start by converting to
61473  # unix format.
61474  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61475  new_path=`$CYGPATH -u "$path"`
61476
61477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61480  # "foo.exe" is OK but "foo" is an error.
61481  #
61482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61483  # It is also a way to make sure we got the proper file name for the real test later on.
61484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61485  if test "x$test_shortpath" = x; then
61486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61488    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61489  fi
61490
61491  # Call helper function which possibly converts this using DOS-style short mode.
61492  # If so, the updated path is stored in $new_path.
61493
61494  input_path="$new_path"
61495  # Check if we need to convert this using DOS-style short mode. If the path
61496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61497  # take no chances and rewrite it.
61498  # Note: m4 eats our [], so we need to use [ and ] instead.
61499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61500  if test "x$has_forbidden_chars" != x; then
61501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61505      # Going to short mode and back again did indeed matter. Since short mode is
61506      # case insensitive, let's make it lowercase to improve readability.
61507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61508      # Now convert it back to Unix-style (cygpath)
61509      input_path=`$CYGPATH -u "$shortmode_path"`
61510      new_path="$input_path"
61511    fi
61512  fi
61513
61514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61515  if test "x$test_cygdrive_prefix" = x; then
61516    # As a simple fix, exclude /usr/bin since it's not a real path.
61517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61519      # a path prefixed by /cygdrive for fixpath to work.
61520      new_path="$CYGWIN_ROOT_PATH$input_path"
61521    fi
61522  fi
61523
61524
61525  if test "x$path" != "x$new_path"; then
61526    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61528$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61529  fi
61530
61531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61532
61533  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61534  has_colon=`$ECHO $path | $GREP ^.:`
61535  new_path="$path"
61536  if test "x$has_colon" = x; then
61537    # Not in mixed or Windows style, start by that.
61538    new_path=`cmd //c echo $path`
61539  fi
61540
61541
61542  input_path="$new_path"
61543  # Check if we need to convert this using DOS-style short mode. If the path
61544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61545  # take no chances and rewrite it.
61546  # Note: m4 eats our [], so we need to use [ and ] instead.
61547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61548  if test "x$has_forbidden_chars" != x; then
61549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61551  fi
61552
61553
61554  windows_path="$new_path"
61555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61556    unix_path=`$CYGPATH -u "$windows_path"`
61557    new_path="$unix_path"
61558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61560    new_path="$unix_path"
61561  fi
61562
61563  if test "x$path" != "x$new_path"; then
61564    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61567  fi
61568
61569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61571
61572    else
61573      # We're on a unix platform. Hooray! :)
61574      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61575      has_space=`$ECHO "$path" | $GREP " "`
61576      if test "x$has_space" != x; then
61577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61578$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61580      fi
61581
61582      # Use eval to expand a potential ~
61583      eval path="$path"
61584      if test ! -f "$path" && test ! -d "$path"; then
61585        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61586      fi
61587
61588      if test -d "$path"; then
61589        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61590      else
61591        dir="`$DIRNAME "$path"`"
61592        base="`$BASENAME "$path"`"
61593        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61594      fi
61595    fi
61596  fi
61597
61598
61599  # Only process if variable expands to non-empty
61600
61601  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61603
61604  # Input might be given as Windows format, start by converting to
61605  # unix format.
61606  path="$POTENTIAL_FREETYPE_LIB_PATH"
61607  new_path=`$CYGPATH -u "$path"`
61608
61609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61612  # "foo.exe" is OK but "foo" is an error.
61613  #
61614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61615  # It is also a way to make sure we got the proper file name for the real test later on.
61616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61617  if test "x$test_shortpath" = x; then
61618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61620    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61621  fi
61622
61623  # Call helper function which possibly converts this using DOS-style short mode.
61624  # If so, the updated path is stored in $new_path.
61625
61626  input_path="$new_path"
61627  # Check if we need to convert this using DOS-style short mode. If the path
61628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61629  # take no chances and rewrite it.
61630  # Note: m4 eats our [], so we need to use [ and ] instead.
61631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61632  if test "x$has_forbidden_chars" != x; then
61633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61637      # Going to short mode and back again did indeed matter. Since short mode is
61638      # case insensitive, let's make it lowercase to improve readability.
61639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61640      # Now convert it back to Unix-style (cygpath)
61641      input_path=`$CYGPATH -u "$shortmode_path"`
61642      new_path="$input_path"
61643    fi
61644  fi
61645
61646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61647  if test "x$test_cygdrive_prefix" = x; then
61648    # As a simple fix, exclude /usr/bin since it's not a real path.
61649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61651      # a path prefixed by /cygdrive for fixpath to work.
61652      new_path="$CYGWIN_ROOT_PATH$input_path"
61653    fi
61654  fi
61655
61656
61657  if test "x$path" != "x$new_path"; then
61658    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61661  fi
61662
61663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61664
61665  path="$POTENTIAL_FREETYPE_LIB_PATH"
61666  has_colon=`$ECHO $path | $GREP ^.:`
61667  new_path="$path"
61668  if test "x$has_colon" = x; then
61669    # Not in mixed or Windows style, start by that.
61670    new_path=`cmd //c echo $path`
61671  fi
61672
61673
61674  input_path="$new_path"
61675  # Check if we need to convert this using DOS-style short mode. If the path
61676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61677  # take no chances and rewrite it.
61678  # Note: m4 eats our [], so we need to use [ and ] instead.
61679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61680  if test "x$has_forbidden_chars" != x; then
61681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61683  fi
61684
61685
61686  windows_path="$new_path"
61687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61688    unix_path=`$CYGPATH -u "$windows_path"`
61689    new_path="$unix_path"
61690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61692    new_path="$unix_path"
61693  fi
61694
61695  if test "x$path" != "x$new_path"; then
61696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61699  fi
61700
61701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61703
61704    else
61705      # We're on a unix platform. Hooray! :)
61706      path="$POTENTIAL_FREETYPE_LIB_PATH"
61707      has_space=`$ECHO "$path" | $GREP " "`
61708      if test "x$has_space" != x; then
61709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61710$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61712      fi
61713
61714      # Use eval to expand a potential ~
61715      eval path="$path"
61716      if test ! -f "$path" && test ! -d "$path"; then
61717        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61718      fi
61719
61720      if test -d "$path"; then
61721        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61722      else
61723        dir="`$DIRNAME "$path"`"
61724        base="`$BASENAME "$path"`"
61725        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61726      fi
61727    fi
61728  fi
61729
61730
61731    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61733$as_echo_n "checking for freetype includes... " >&6; }
61734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61735$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61736    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61738$as_echo_n "checking for freetype libraries... " >&6; }
61739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61740$as_echo "$FREETYPE_LIB_PATH" >&6; }
61741  fi
61742
61743          fi
61744
61745          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61746            if test "x$FOUND_FREETYPE" != xyes; then
61747              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61748              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61749
61750  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61751  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61752  METHOD="well-known location"
61753
61754  # Let's start with an optimistic view of the world :-)
61755  FOUND_FREETYPE=yes
61756
61757  # First look for the canonical freetype main include file ft2build.h.
61758  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61759    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61760    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61761    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61762      # Fail.
61763      FOUND_FREETYPE=no
61764    fi
61765  fi
61766
61767  if test "x$FOUND_FREETYPE" = xyes; then
61768    # Include file found, let's continue the sanity check.
61769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61770$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61771
61772    # Reset to default value
61773    FREETYPE_BASE_NAME=freetype
61774    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61775    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61776      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61777          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61778        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61779        # for the .6 version explicitly.
61780        FREETYPE_BASE_NAME=freetype.6
61781        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61782        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61783$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61784      else
61785        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61786$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61787        FOUND_FREETYPE=no
61788      fi
61789    else
61790      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61791        # On Windows, we will need both .lib and .dll file.
61792        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61793          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61794$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61795          FOUND_FREETYPE=no
61796        fi
61797      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61798          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61799        # Found lib in isa dir, use that instead.
61800        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61801        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61802$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61803      fi
61804    fi
61805  fi
61806
61807  if test "x$FOUND_FREETYPE" = xyes; then
61808
61809  # Only process if variable expands to non-empty
61810
61811  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61813
61814  # Input might be given as Windows format, start by converting to
61815  # unix format.
61816  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61817  new_path=`$CYGPATH -u "$path"`
61818
61819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61822  # "foo.exe" is OK but "foo" is an error.
61823  #
61824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61825  # It is also a way to make sure we got the proper file name for the real test later on.
61826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61827  if test "x$test_shortpath" = x; then
61828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61830    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61831  fi
61832
61833  # Call helper function which possibly converts this using DOS-style short mode.
61834  # If so, the updated path is stored in $new_path.
61835
61836  input_path="$new_path"
61837  # Check if we need to convert this using DOS-style short mode. If the path
61838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61839  # take no chances and rewrite it.
61840  # Note: m4 eats our [], so we need to use [ and ] instead.
61841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61842  if test "x$has_forbidden_chars" != x; then
61843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61847      # Going to short mode and back again did indeed matter. Since short mode is
61848      # case insensitive, let's make it lowercase to improve readability.
61849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61850      # Now convert it back to Unix-style (cygpath)
61851      input_path=`$CYGPATH -u "$shortmode_path"`
61852      new_path="$input_path"
61853    fi
61854  fi
61855
61856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61857  if test "x$test_cygdrive_prefix" = x; then
61858    # As a simple fix, exclude /usr/bin since it's not a real path.
61859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61861      # a path prefixed by /cygdrive for fixpath to work.
61862      new_path="$CYGWIN_ROOT_PATH$input_path"
61863    fi
61864  fi
61865
61866
61867  if test "x$path" != "x$new_path"; then
61868    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61870$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61871  fi
61872
61873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61874
61875  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61876  has_colon=`$ECHO $path | $GREP ^.:`
61877  new_path="$path"
61878  if test "x$has_colon" = x; then
61879    # Not in mixed or Windows style, start by that.
61880    new_path=`cmd //c echo $path`
61881  fi
61882
61883
61884  input_path="$new_path"
61885  # Check if we need to convert this using DOS-style short mode. If the path
61886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61887  # take no chances and rewrite it.
61888  # Note: m4 eats our [], so we need to use [ and ] instead.
61889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61890  if test "x$has_forbidden_chars" != x; then
61891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61893  fi
61894
61895
61896  windows_path="$new_path"
61897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61898    unix_path=`$CYGPATH -u "$windows_path"`
61899    new_path="$unix_path"
61900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61902    new_path="$unix_path"
61903  fi
61904
61905  if test "x$path" != "x$new_path"; then
61906    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61909  fi
61910
61911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61913
61914    else
61915      # We're on a unix platform. Hooray! :)
61916      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61917      has_space=`$ECHO "$path" | $GREP " "`
61918      if test "x$has_space" != x; then
61919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61922      fi
61923
61924      # Use eval to expand a potential ~
61925      eval path="$path"
61926      if test ! -f "$path" && test ! -d "$path"; then
61927        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61928      fi
61929
61930      if test -d "$path"; then
61931        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61932      else
61933        dir="`$DIRNAME "$path"`"
61934        base="`$BASENAME "$path"`"
61935        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61936      fi
61937    fi
61938  fi
61939
61940
61941  # Only process if variable expands to non-empty
61942
61943  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61945
61946  # Input might be given as Windows format, start by converting to
61947  # unix format.
61948  path="$POTENTIAL_FREETYPE_LIB_PATH"
61949  new_path=`$CYGPATH -u "$path"`
61950
61951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61954  # "foo.exe" is OK but "foo" is an error.
61955  #
61956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61957  # It is also a way to make sure we got the proper file name for the real test later on.
61958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61959  if test "x$test_shortpath" = x; then
61960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61961$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61962    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61963  fi
61964
61965  # Call helper function which possibly converts this using DOS-style short mode.
61966  # If so, the updated path is stored in $new_path.
61967
61968  input_path="$new_path"
61969  # Check if we need to convert this using DOS-style short mode. If the path
61970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61971  # take no chances and rewrite it.
61972  # Note: m4 eats our [], so we need to use [ and ] instead.
61973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61974  if test "x$has_forbidden_chars" != x; then
61975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61979      # Going to short mode and back again did indeed matter. Since short mode is
61980      # case insensitive, let's make it lowercase to improve readability.
61981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61982      # Now convert it back to Unix-style (cygpath)
61983      input_path=`$CYGPATH -u "$shortmode_path"`
61984      new_path="$input_path"
61985    fi
61986  fi
61987
61988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61989  if test "x$test_cygdrive_prefix" = x; then
61990    # As a simple fix, exclude /usr/bin since it's not a real path.
61991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61993      # a path prefixed by /cygdrive for fixpath to work.
61994      new_path="$CYGWIN_ROOT_PATH$input_path"
61995    fi
61996  fi
61997
61998
61999  if test "x$path" != "x$new_path"; then
62000    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62002$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62003  fi
62004
62005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62006
62007  path="$POTENTIAL_FREETYPE_LIB_PATH"
62008  has_colon=`$ECHO $path | $GREP ^.:`
62009  new_path="$path"
62010  if test "x$has_colon" = x; then
62011    # Not in mixed or Windows style, start by that.
62012    new_path=`cmd //c echo $path`
62013  fi
62014
62015
62016  input_path="$new_path"
62017  # Check if we need to convert this using DOS-style short mode. If the path
62018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62019  # take no chances and rewrite it.
62020  # Note: m4 eats our [], so we need to use [ and ] instead.
62021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62022  if test "x$has_forbidden_chars" != x; then
62023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62025  fi
62026
62027
62028  windows_path="$new_path"
62029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62030    unix_path=`$CYGPATH -u "$windows_path"`
62031    new_path="$unix_path"
62032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62034    new_path="$unix_path"
62035  fi
62036
62037  if test "x$path" != "x$new_path"; then
62038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62041  fi
62042
62043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62045
62046    else
62047      # We're on a unix platform. Hooray! :)
62048      path="$POTENTIAL_FREETYPE_LIB_PATH"
62049      has_space=`$ECHO "$path" | $GREP " "`
62050      if test "x$has_space" != x; then
62051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62052$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62054      fi
62055
62056      # Use eval to expand a potential ~
62057      eval path="$path"
62058      if test ! -f "$path" && test ! -d "$path"; then
62059        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62060      fi
62061
62062      if test -d "$path"; then
62063        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62064      else
62065        dir="`$DIRNAME "$path"`"
62066        base="`$BASENAME "$path"`"
62067        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62068      fi
62069    fi
62070  fi
62071
62072
62073    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62075$as_echo_n "checking for freetype includes... " >&6; }
62076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62077$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62078    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62080$as_echo_n "checking for freetype libraries... " >&6; }
62081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62082$as_echo "$FREETYPE_LIB_PATH" >&6; }
62083  fi
62084
62085            fi
62086          fi
62087
62088          if test "x$FOUND_FREETYPE" != xyes; then
62089            FREETYPE_BASE_DIR="$SYSROOT/usr"
62090            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62091
62092  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62093  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62094  METHOD="well-known location"
62095
62096  # Let's start with an optimistic view of the world :-)
62097  FOUND_FREETYPE=yes
62098
62099  # First look for the canonical freetype main include file ft2build.h.
62100  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62101    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62102    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62103    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62104      # Fail.
62105      FOUND_FREETYPE=no
62106    fi
62107  fi
62108
62109  if test "x$FOUND_FREETYPE" = xyes; then
62110    # Include file found, let's continue the sanity check.
62111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62113
62114    # Reset to default value
62115    FREETYPE_BASE_NAME=freetype
62116    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62117    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62118      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62120        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62121        # for the .6 version explicitly.
62122        FREETYPE_BASE_NAME=freetype.6
62123        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62124        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62125$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62126      else
62127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62128$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62129        FOUND_FREETYPE=no
62130      fi
62131    else
62132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62133        # On Windows, we will need both .lib and .dll file.
62134        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62135          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62137          FOUND_FREETYPE=no
62138        fi
62139      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62141        # Found lib in isa dir, use that instead.
62142        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62143        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62144$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62145      fi
62146    fi
62147  fi
62148
62149  if test "x$FOUND_FREETYPE" = xyes; then
62150
62151  # Only process if variable expands to non-empty
62152
62153  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62155
62156  # Input might be given as Windows format, start by converting to
62157  # unix format.
62158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62159  new_path=`$CYGPATH -u "$path"`
62160
62161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62164  # "foo.exe" is OK but "foo" is an error.
62165  #
62166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62167  # It is also a way to make sure we got the proper file name for the real test later on.
62168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62169  if test "x$test_shortpath" = x; then
62170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62173  fi
62174
62175  # Call helper function which possibly converts this using DOS-style short mode.
62176  # If so, the updated path is stored in $new_path.
62177
62178  input_path="$new_path"
62179  # Check if we need to convert this using DOS-style short mode. If the path
62180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62181  # take no chances and rewrite it.
62182  # Note: m4 eats our [], so we need to use [ and ] instead.
62183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62184  if test "x$has_forbidden_chars" != x; then
62185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62189      # Going to short mode and back again did indeed matter. Since short mode is
62190      # case insensitive, let's make it lowercase to improve readability.
62191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62192      # Now convert it back to Unix-style (cygpath)
62193      input_path=`$CYGPATH -u "$shortmode_path"`
62194      new_path="$input_path"
62195    fi
62196  fi
62197
62198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62199  if test "x$test_cygdrive_prefix" = x; then
62200    # As a simple fix, exclude /usr/bin since it's not a real path.
62201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62203      # a path prefixed by /cygdrive for fixpath to work.
62204      new_path="$CYGWIN_ROOT_PATH$input_path"
62205    fi
62206  fi
62207
62208
62209  if test "x$path" != "x$new_path"; then
62210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62213  fi
62214
62215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62216
62217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62218  has_colon=`$ECHO $path | $GREP ^.:`
62219  new_path="$path"
62220  if test "x$has_colon" = x; then
62221    # Not in mixed or Windows style, start by that.
62222    new_path=`cmd //c echo $path`
62223  fi
62224
62225
62226  input_path="$new_path"
62227  # Check if we need to convert this using DOS-style short mode. If the path
62228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62229  # take no chances and rewrite it.
62230  # Note: m4 eats our [], so we need to use [ and ] instead.
62231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62232  if test "x$has_forbidden_chars" != x; then
62233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62235  fi
62236
62237
62238  windows_path="$new_path"
62239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62240    unix_path=`$CYGPATH -u "$windows_path"`
62241    new_path="$unix_path"
62242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62244    new_path="$unix_path"
62245  fi
62246
62247  if test "x$path" != "x$new_path"; then
62248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62251  fi
62252
62253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62255
62256    else
62257      # We're on a unix platform. Hooray! :)
62258      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62259      has_space=`$ECHO "$path" | $GREP " "`
62260      if test "x$has_space" != x; then
62261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62264      fi
62265
62266      # Use eval to expand a potential ~
62267      eval path="$path"
62268      if test ! -f "$path" && test ! -d "$path"; then
62269        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62270      fi
62271
62272      if test -d "$path"; then
62273        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62274      else
62275        dir="`$DIRNAME "$path"`"
62276        base="`$BASENAME "$path"`"
62277        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62278      fi
62279    fi
62280  fi
62281
62282
62283  # Only process if variable expands to non-empty
62284
62285  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62287
62288  # Input might be given as Windows format, start by converting to
62289  # unix format.
62290  path="$POTENTIAL_FREETYPE_LIB_PATH"
62291  new_path=`$CYGPATH -u "$path"`
62292
62293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62296  # "foo.exe" is OK but "foo" is an error.
62297  #
62298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62299  # It is also a way to make sure we got the proper file name for the real test later on.
62300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62301  if test "x$test_shortpath" = x; then
62302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62304    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62305  fi
62306
62307  # Call helper function which possibly converts this using DOS-style short mode.
62308  # If so, the updated path is stored in $new_path.
62309
62310  input_path="$new_path"
62311  # Check if we need to convert this using DOS-style short mode. If the path
62312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62313  # take no chances and rewrite it.
62314  # Note: m4 eats our [], so we need to use [ and ] instead.
62315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62316  if test "x$has_forbidden_chars" != x; then
62317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62321      # Going to short mode and back again did indeed matter. Since short mode is
62322      # case insensitive, let's make it lowercase to improve readability.
62323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62324      # Now convert it back to Unix-style (cygpath)
62325      input_path=`$CYGPATH -u "$shortmode_path"`
62326      new_path="$input_path"
62327    fi
62328  fi
62329
62330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62331  if test "x$test_cygdrive_prefix" = x; then
62332    # As a simple fix, exclude /usr/bin since it's not a real path.
62333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62335      # a path prefixed by /cygdrive for fixpath to work.
62336      new_path="$CYGWIN_ROOT_PATH$input_path"
62337    fi
62338  fi
62339
62340
62341  if test "x$path" != "x$new_path"; then
62342    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62345  fi
62346
62347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62348
62349  path="$POTENTIAL_FREETYPE_LIB_PATH"
62350  has_colon=`$ECHO $path | $GREP ^.:`
62351  new_path="$path"
62352  if test "x$has_colon" = x; then
62353    # Not in mixed or Windows style, start by that.
62354    new_path=`cmd //c echo $path`
62355  fi
62356
62357
62358  input_path="$new_path"
62359  # Check if we need to convert this using DOS-style short mode. If the path
62360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62361  # take no chances and rewrite it.
62362  # Note: m4 eats our [], so we need to use [ and ] instead.
62363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62364  if test "x$has_forbidden_chars" != x; then
62365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62367  fi
62368
62369
62370  windows_path="$new_path"
62371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62372    unix_path=`$CYGPATH -u "$windows_path"`
62373    new_path="$unix_path"
62374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62376    new_path="$unix_path"
62377  fi
62378
62379  if test "x$path" != "x$new_path"; then
62380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62383  fi
62384
62385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62387
62388    else
62389      # We're on a unix platform. Hooray! :)
62390      path="$POTENTIAL_FREETYPE_LIB_PATH"
62391      has_space=`$ECHO "$path" | $GREP " "`
62392      if test "x$has_space" != x; then
62393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62396      fi
62397
62398      # Use eval to expand a potential ~
62399      eval path="$path"
62400      if test ! -f "$path" && test ! -d "$path"; then
62401        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62402      fi
62403
62404      if test -d "$path"; then
62405        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62406      else
62407        dir="`$DIRNAME "$path"`"
62408        base="`$BASENAME "$path"`"
62409        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62410      fi
62411    fi
62412  fi
62413
62414
62415    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62417$as_echo_n "checking for freetype includes... " >&6; }
62418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62419$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62420    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62422$as_echo_n "checking for freetype libraries... " >&6; }
62423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62424$as_echo "$FREETYPE_LIB_PATH" >&6; }
62425  fi
62426
62427            else
62428
62429  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62430  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62431  METHOD="well-known location"
62432
62433  # Let's start with an optimistic view of the world :-)
62434  FOUND_FREETYPE=yes
62435
62436  # First look for the canonical freetype main include file ft2build.h.
62437  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62438    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62439    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62440    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62441      # Fail.
62442      FOUND_FREETYPE=no
62443    fi
62444  fi
62445
62446  if test "x$FOUND_FREETYPE" = xyes; then
62447    # Include file found, let's continue the sanity check.
62448    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62449$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62450
62451    # Reset to default value
62452    FREETYPE_BASE_NAME=freetype
62453    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62454    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62455      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62457        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62458        # for the .6 version explicitly.
62459        FREETYPE_BASE_NAME=freetype.6
62460        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62461        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62462$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62463      else
62464        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62466        FOUND_FREETYPE=no
62467      fi
62468    else
62469      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62470        # On Windows, we will need both .lib and .dll file.
62471        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62472          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62474          FOUND_FREETYPE=no
62475        fi
62476      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62477          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62478        # Found lib in isa dir, use that instead.
62479        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62480        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62481$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62482      fi
62483    fi
62484  fi
62485
62486  if test "x$FOUND_FREETYPE" = xyes; then
62487
62488  # Only process if variable expands to non-empty
62489
62490  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62492
62493  # Input might be given as Windows format, start by converting to
62494  # unix format.
62495  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62496  new_path=`$CYGPATH -u "$path"`
62497
62498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62501  # "foo.exe" is OK but "foo" is an error.
62502  #
62503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62504  # It is also a way to make sure we got the proper file name for the real test later on.
62505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62506  if test "x$test_shortpath" = x; then
62507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62510  fi
62511
62512  # Call helper function which possibly converts this using DOS-style short mode.
62513  # If so, the updated path is stored in $new_path.
62514
62515  input_path="$new_path"
62516  # Check if we need to convert this using DOS-style short mode. If the path
62517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62518  # take no chances and rewrite it.
62519  # Note: m4 eats our [], so we need to use [ and ] instead.
62520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62521  if test "x$has_forbidden_chars" != x; then
62522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62526      # Going to short mode and back again did indeed matter. Since short mode is
62527      # case insensitive, let's make it lowercase to improve readability.
62528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62529      # Now convert it back to Unix-style (cygpath)
62530      input_path=`$CYGPATH -u "$shortmode_path"`
62531      new_path="$input_path"
62532    fi
62533  fi
62534
62535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62536  if test "x$test_cygdrive_prefix" = x; then
62537    # As a simple fix, exclude /usr/bin since it's not a real path.
62538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62540      # a path prefixed by /cygdrive for fixpath to work.
62541      new_path="$CYGWIN_ROOT_PATH$input_path"
62542    fi
62543  fi
62544
62545
62546  if test "x$path" != "x$new_path"; then
62547    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62550  fi
62551
62552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62553
62554  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62555  has_colon=`$ECHO $path | $GREP ^.:`
62556  new_path="$path"
62557  if test "x$has_colon" = x; then
62558    # Not in mixed or Windows style, start by that.
62559    new_path=`cmd //c echo $path`
62560  fi
62561
62562
62563  input_path="$new_path"
62564  # Check if we need to convert this using DOS-style short mode. If the path
62565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62566  # take no chances and rewrite it.
62567  # Note: m4 eats our [], so we need to use [ and ] instead.
62568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62569  if test "x$has_forbidden_chars" != x; then
62570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62572  fi
62573
62574
62575  windows_path="$new_path"
62576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62577    unix_path=`$CYGPATH -u "$windows_path"`
62578    new_path="$unix_path"
62579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62581    new_path="$unix_path"
62582  fi
62583
62584  if test "x$path" != "x$new_path"; then
62585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62588  fi
62589
62590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62592
62593    else
62594      # We're on a unix platform. Hooray! :)
62595      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62596      has_space=`$ECHO "$path" | $GREP " "`
62597      if test "x$has_space" != x; then
62598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62601      fi
62602
62603      # Use eval to expand a potential ~
62604      eval path="$path"
62605      if test ! -f "$path" && test ! -d "$path"; then
62606        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62607      fi
62608
62609      if test -d "$path"; then
62610        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62611      else
62612        dir="`$DIRNAME "$path"`"
62613        base="`$BASENAME "$path"`"
62614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62615      fi
62616    fi
62617  fi
62618
62619
62620  # Only process if variable expands to non-empty
62621
62622  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62624
62625  # Input might be given as Windows format, start by converting to
62626  # unix format.
62627  path="$POTENTIAL_FREETYPE_LIB_PATH"
62628  new_path=`$CYGPATH -u "$path"`
62629
62630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62633  # "foo.exe" is OK but "foo" is an error.
62634  #
62635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62636  # It is also a way to make sure we got the proper file name for the real test later on.
62637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62638  if test "x$test_shortpath" = x; then
62639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62642  fi
62643
62644  # Call helper function which possibly converts this using DOS-style short mode.
62645  # If so, the updated path is stored in $new_path.
62646
62647  input_path="$new_path"
62648  # Check if we need to convert this using DOS-style short mode. If the path
62649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62650  # take no chances and rewrite it.
62651  # Note: m4 eats our [], so we need to use [ and ] instead.
62652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62653  if test "x$has_forbidden_chars" != x; then
62654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62658      # Going to short mode and back again did indeed matter. Since short mode is
62659      # case insensitive, let's make it lowercase to improve readability.
62660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62661      # Now convert it back to Unix-style (cygpath)
62662      input_path=`$CYGPATH -u "$shortmode_path"`
62663      new_path="$input_path"
62664    fi
62665  fi
62666
62667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62668  if test "x$test_cygdrive_prefix" = x; then
62669    # As a simple fix, exclude /usr/bin since it's not a real path.
62670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62672      # a path prefixed by /cygdrive for fixpath to work.
62673      new_path="$CYGWIN_ROOT_PATH$input_path"
62674    fi
62675  fi
62676
62677
62678  if test "x$path" != "x$new_path"; then
62679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62682  fi
62683
62684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62685
62686  path="$POTENTIAL_FREETYPE_LIB_PATH"
62687  has_colon=`$ECHO $path | $GREP ^.:`
62688  new_path="$path"
62689  if test "x$has_colon" = x; then
62690    # Not in mixed or Windows style, start by that.
62691    new_path=`cmd //c echo $path`
62692  fi
62693
62694
62695  input_path="$new_path"
62696  # Check if we need to convert this using DOS-style short mode. If the path
62697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62698  # take no chances and rewrite it.
62699  # Note: m4 eats our [], so we need to use [ and ] instead.
62700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62701  if test "x$has_forbidden_chars" != x; then
62702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62704  fi
62705
62706
62707  windows_path="$new_path"
62708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62709    unix_path=`$CYGPATH -u "$windows_path"`
62710    new_path="$unix_path"
62711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62713    new_path="$unix_path"
62714  fi
62715
62716  if test "x$path" != "x$new_path"; then
62717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62720  fi
62721
62722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62724
62725    else
62726      # We're on a unix platform. Hooray! :)
62727      path="$POTENTIAL_FREETYPE_LIB_PATH"
62728      has_space=`$ECHO "$path" | $GREP " "`
62729      if test "x$has_space" != x; then
62730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62733      fi
62734
62735      # Use eval to expand a potential ~
62736      eval path="$path"
62737      if test ! -f "$path" && test ! -d "$path"; then
62738        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62739      fi
62740
62741      if test -d "$path"; then
62742        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62743      else
62744        dir="`$DIRNAME "$path"`"
62745        base="`$BASENAME "$path"`"
62746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62747      fi
62748    fi
62749  fi
62750
62751
62752    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62754$as_echo_n "checking for freetype includes... " >&6; }
62755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62756$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62757    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62759$as_echo_n "checking for freetype libraries... " >&6; }
62760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62761$as_echo "$FREETYPE_LIB_PATH" >&6; }
62762  fi
62763
62764              if test "x$FOUND_FREETYPE" != xyes; then
62765
62766  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62767  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62768  METHOD="well-known location"
62769
62770  # Let's start with an optimistic view of the world :-)
62771  FOUND_FREETYPE=yes
62772
62773  # First look for the canonical freetype main include file ft2build.h.
62774  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62775    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62776    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62777    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62778      # Fail.
62779      FOUND_FREETYPE=no
62780    fi
62781  fi
62782
62783  if test "x$FOUND_FREETYPE" = xyes; then
62784    # Include file found, let's continue the sanity check.
62785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62786$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62787
62788    # Reset to default value
62789    FREETYPE_BASE_NAME=freetype
62790    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62791    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62792      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62794        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62795        # for the .6 version explicitly.
62796        FREETYPE_BASE_NAME=freetype.6
62797        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62798        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62799$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62800      else
62801        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62802$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62803        FOUND_FREETYPE=no
62804      fi
62805    else
62806      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62807        # On Windows, we will need both .lib and .dll file.
62808        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62809          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62811          FOUND_FREETYPE=no
62812        fi
62813      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62814          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62815        # Found lib in isa dir, use that instead.
62816        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62817        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62818$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62819      fi
62820    fi
62821  fi
62822
62823  if test "x$FOUND_FREETYPE" = xyes; then
62824
62825  # Only process if variable expands to non-empty
62826
62827  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62829
62830  # Input might be given as Windows format, start by converting to
62831  # unix format.
62832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62833  new_path=`$CYGPATH -u "$path"`
62834
62835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62838  # "foo.exe" is OK but "foo" is an error.
62839  #
62840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62841  # It is also a way to make sure we got the proper file name for the real test later on.
62842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62843  if test "x$test_shortpath" = x; then
62844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62846    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62847  fi
62848
62849  # Call helper function which possibly converts this using DOS-style short mode.
62850  # If so, the updated path is stored in $new_path.
62851
62852  input_path="$new_path"
62853  # Check if we need to convert this using DOS-style short mode. If the path
62854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62855  # take no chances and rewrite it.
62856  # Note: m4 eats our [], so we need to use [ and ] instead.
62857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62858  if test "x$has_forbidden_chars" != x; then
62859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62863      # Going to short mode and back again did indeed matter. Since short mode is
62864      # case insensitive, let's make it lowercase to improve readability.
62865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62866      # Now convert it back to Unix-style (cygpath)
62867      input_path=`$CYGPATH -u "$shortmode_path"`
62868      new_path="$input_path"
62869    fi
62870  fi
62871
62872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62873  if test "x$test_cygdrive_prefix" = x; then
62874    # As a simple fix, exclude /usr/bin since it's not a real path.
62875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62877      # a path prefixed by /cygdrive for fixpath to work.
62878      new_path="$CYGWIN_ROOT_PATH$input_path"
62879    fi
62880  fi
62881
62882
62883  if test "x$path" != "x$new_path"; then
62884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62887  fi
62888
62889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62890
62891  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62892  has_colon=`$ECHO $path | $GREP ^.:`
62893  new_path="$path"
62894  if test "x$has_colon" = x; then
62895    # Not in mixed or Windows style, start by that.
62896    new_path=`cmd //c echo $path`
62897  fi
62898
62899
62900  input_path="$new_path"
62901  # Check if we need to convert this using DOS-style short mode. If the path
62902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62903  # take no chances and rewrite it.
62904  # Note: m4 eats our [], so we need to use [ and ] instead.
62905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62906  if test "x$has_forbidden_chars" != x; then
62907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62909  fi
62910
62911
62912  windows_path="$new_path"
62913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62914    unix_path=`$CYGPATH -u "$windows_path"`
62915    new_path="$unix_path"
62916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62918    new_path="$unix_path"
62919  fi
62920
62921  if test "x$path" != "x$new_path"; then
62922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62925  fi
62926
62927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62929
62930    else
62931      # We're on a unix platform. Hooray! :)
62932      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62933      has_space=`$ECHO "$path" | $GREP " "`
62934      if test "x$has_space" != x; then
62935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62938      fi
62939
62940      # Use eval to expand a potential ~
62941      eval path="$path"
62942      if test ! -f "$path" && test ! -d "$path"; then
62943        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62944      fi
62945
62946      if test -d "$path"; then
62947        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62948      else
62949        dir="`$DIRNAME "$path"`"
62950        base="`$BASENAME "$path"`"
62951        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62952      fi
62953    fi
62954  fi
62955
62956
62957  # Only process if variable expands to non-empty
62958
62959  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62961
62962  # Input might be given as Windows format, start by converting to
62963  # unix format.
62964  path="$POTENTIAL_FREETYPE_LIB_PATH"
62965  new_path=`$CYGPATH -u "$path"`
62966
62967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62970  # "foo.exe" is OK but "foo" is an error.
62971  #
62972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62973  # It is also a way to make sure we got the proper file name for the real test later on.
62974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62975  if test "x$test_shortpath" = x; then
62976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62978    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62979  fi
62980
62981  # Call helper function which possibly converts this using DOS-style short mode.
62982  # If so, the updated path is stored in $new_path.
62983
62984  input_path="$new_path"
62985  # Check if we need to convert this using DOS-style short mode. If the path
62986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62987  # take no chances and rewrite it.
62988  # Note: m4 eats our [], so we need to use [ and ] instead.
62989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62990  if test "x$has_forbidden_chars" != x; then
62991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62995      # Going to short mode and back again did indeed matter. Since short mode is
62996      # case insensitive, let's make it lowercase to improve readability.
62997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62998      # Now convert it back to Unix-style (cygpath)
62999      input_path=`$CYGPATH -u "$shortmode_path"`
63000      new_path="$input_path"
63001    fi
63002  fi
63003
63004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63005  if test "x$test_cygdrive_prefix" = x; then
63006    # As a simple fix, exclude /usr/bin since it's not a real path.
63007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63009      # a path prefixed by /cygdrive for fixpath to work.
63010      new_path="$CYGWIN_ROOT_PATH$input_path"
63011    fi
63012  fi
63013
63014
63015  if test "x$path" != "x$new_path"; then
63016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63019  fi
63020
63021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63022
63023  path="$POTENTIAL_FREETYPE_LIB_PATH"
63024  has_colon=`$ECHO $path | $GREP ^.:`
63025  new_path="$path"
63026  if test "x$has_colon" = x; then
63027    # Not in mixed or Windows style, start by that.
63028    new_path=`cmd //c echo $path`
63029  fi
63030
63031
63032  input_path="$new_path"
63033  # Check if we need to convert this using DOS-style short mode. If the path
63034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63035  # take no chances and rewrite it.
63036  # Note: m4 eats our [], so we need to use [ and ] instead.
63037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63038  if test "x$has_forbidden_chars" != x; then
63039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63041  fi
63042
63043
63044  windows_path="$new_path"
63045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63046    unix_path=`$CYGPATH -u "$windows_path"`
63047    new_path="$unix_path"
63048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63050    new_path="$unix_path"
63051  fi
63052
63053  if test "x$path" != "x$new_path"; then
63054    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63057  fi
63058
63059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63061
63062    else
63063      # We're on a unix platform. Hooray! :)
63064      path="$POTENTIAL_FREETYPE_LIB_PATH"
63065      has_space=`$ECHO "$path" | $GREP " "`
63066      if test "x$has_space" != x; then
63067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63070      fi
63071
63072      # Use eval to expand a potential ~
63073      eval path="$path"
63074      if test ! -f "$path" && test ! -d "$path"; then
63075        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63076      fi
63077
63078      if test -d "$path"; then
63079        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63080      else
63081        dir="`$DIRNAME "$path"`"
63082        base="`$BASENAME "$path"`"
63083        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63084      fi
63085    fi
63086  fi
63087
63088
63089    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63091$as_echo_n "checking for freetype includes... " >&6; }
63092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63093$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63094    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63096$as_echo_n "checking for freetype libraries... " >&6; }
63097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63098$as_echo "$FREETYPE_LIB_PATH" >&6; }
63099  fi
63100
63101              fi
63102            fi
63103          fi
63104        fi
63105      fi # end check in well-known locations
63106
63107      if test "x$FOUND_FREETYPE" != xyes; then
63108
63109  # Print a helpful message on how to acquire the necessary build dependency.
63110  # freetype is the help tag: freetype, cups, alsa etc
63111  MISSING_DEPENDENCY=freetype
63112
63113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63114    cygwin_help $MISSING_DEPENDENCY
63115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63116    msys_help $MISSING_DEPENDENCY
63117  else
63118    PKGHANDLER_COMMAND=
63119
63120    case $PKGHANDLER in
63121      apt-get)
63122        apt_help     $MISSING_DEPENDENCY ;;
63123      yum)
63124        yum_help     $MISSING_DEPENDENCY ;;
63125      brew)
63126        brew_help    $MISSING_DEPENDENCY ;;
63127      port)
63128        port_help    $MISSING_DEPENDENCY ;;
63129      pkgutil)
63130        pkgutil_help $MISSING_DEPENDENCY ;;
63131      pkgadd)
63132        pkgadd_help  $MISSING_DEPENDENCY ;;
63133    esac
63134
63135    if test "x$PKGHANDLER_COMMAND" != x; then
63136      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63137    fi
63138  fi
63139
63140        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63141      fi
63142    fi # end user specified settings
63143
63144    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63145    if test "x$FREETYPE_CFLAGS" = x; then
63146
63147  # Only process if variable expands to non-empty
63148
63149  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63151
63152  # Input might be given as Windows format, start by converting to
63153  # unix format.
63154  path="$FREETYPE_INCLUDE_PATH"
63155  new_path=`$CYGPATH -u "$path"`
63156
63157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63160  # "foo.exe" is OK but "foo" is an error.
63161  #
63162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63163  # It is also a way to make sure we got the proper file name for the real test later on.
63164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63165  if test "x$test_shortpath" = x; then
63166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63167$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63168    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63169  fi
63170
63171  # Call helper function which possibly converts this using DOS-style short mode.
63172  # If so, the updated path is stored in $new_path.
63173
63174  input_path="$new_path"
63175  # Check if we need to convert this using DOS-style short mode. If the path
63176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63177  # take no chances and rewrite it.
63178  # Note: m4 eats our [], so we need to use [ and ] instead.
63179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63180  if test "x$has_forbidden_chars" != x; then
63181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63185      # Going to short mode and back again did indeed matter. Since short mode is
63186      # case insensitive, let's make it lowercase to improve readability.
63187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63188      # Now convert it back to Unix-style (cygpath)
63189      input_path=`$CYGPATH -u "$shortmode_path"`
63190      new_path="$input_path"
63191    fi
63192  fi
63193
63194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63195  if test "x$test_cygdrive_prefix" = x; then
63196    # As a simple fix, exclude /usr/bin since it's not a real path.
63197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63199      # a path prefixed by /cygdrive for fixpath to work.
63200      new_path="$CYGWIN_ROOT_PATH$input_path"
63201    fi
63202  fi
63203
63204
63205  if test "x$path" != "x$new_path"; then
63206    FREETYPE_INCLUDE_PATH="$new_path"
63207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63208$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63209  fi
63210
63211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63212
63213  path="$FREETYPE_INCLUDE_PATH"
63214  has_colon=`$ECHO $path | $GREP ^.:`
63215  new_path="$path"
63216  if test "x$has_colon" = x; then
63217    # Not in mixed or Windows style, start by that.
63218    new_path=`cmd //c echo $path`
63219  fi
63220
63221
63222  input_path="$new_path"
63223  # Check if we need to convert this using DOS-style short mode. If the path
63224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63225  # take no chances and rewrite it.
63226  # Note: m4 eats our [], so we need to use [ and ] instead.
63227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63228  if test "x$has_forbidden_chars" != x; then
63229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63231  fi
63232
63233
63234  windows_path="$new_path"
63235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63236    unix_path=`$CYGPATH -u "$windows_path"`
63237    new_path="$unix_path"
63238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63240    new_path="$unix_path"
63241  fi
63242
63243  if test "x$path" != "x$new_path"; then
63244    FREETYPE_INCLUDE_PATH="$new_path"
63245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63246$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63247  fi
63248
63249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63251
63252    else
63253      # We're on a unix platform. Hooray! :)
63254      path="$FREETYPE_INCLUDE_PATH"
63255      has_space=`$ECHO "$path" | $GREP " "`
63256      if test "x$has_space" != x; then
63257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63258$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63260      fi
63261
63262      # Use eval to expand a potential ~
63263      eval path="$path"
63264      if test ! -f "$path" && test ! -d "$path"; then
63265        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63266      fi
63267
63268      if test -d "$path"; then
63269        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63270      else
63271        dir="`$DIRNAME "$path"`"
63272        base="`$BASENAME "$path"`"
63273        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63274      fi
63275    fi
63276  fi
63277
63278      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63279        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63280      else
63281        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63282      fi
63283    fi
63284
63285    if test "x$FREETYPE_LIBS" = x; then
63286
63287  # Only process if variable expands to non-empty
63288
63289  if test "x$FREETYPE_LIB_PATH" != x; then
63290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63291
63292  # Input might be given as Windows format, start by converting to
63293  # unix format.
63294  path="$FREETYPE_LIB_PATH"
63295  new_path=`$CYGPATH -u "$path"`
63296
63297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63300  # "foo.exe" is OK but "foo" is an error.
63301  #
63302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63303  # It is also a way to make sure we got the proper file name for the real test later on.
63304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63305  if test "x$test_shortpath" = x; then
63306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63307$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63308    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63309  fi
63310
63311  # Call helper function which possibly converts this using DOS-style short mode.
63312  # If so, the updated path is stored in $new_path.
63313
63314  input_path="$new_path"
63315  # Check if we need to convert this using DOS-style short mode. If the path
63316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63317  # take no chances and rewrite it.
63318  # Note: m4 eats our [], so we need to use [ and ] instead.
63319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63320  if test "x$has_forbidden_chars" != x; then
63321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63325      # Going to short mode and back again did indeed matter. Since short mode is
63326      # case insensitive, let's make it lowercase to improve readability.
63327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63328      # Now convert it back to Unix-style (cygpath)
63329      input_path=`$CYGPATH -u "$shortmode_path"`
63330      new_path="$input_path"
63331    fi
63332  fi
63333
63334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63335  if test "x$test_cygdrive_prefix" = x; then
63336    # As a simple fix, exclude /usr/bin since it's not a real path.
63337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63339      # a path prefixed by /cygdrive for fixpath to work.
63340      new_path="$CYGWIN_ROOT_PATH$input_path"
63341    fi
63342  fi
63343
63344
63345  if test "x$path" != "x$new_path"; then
63346    FREETYPE_LIB_PATH="$new_path"
63347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63348$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63349  fi
63350
63351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63352
63353  path="$FREETYPE_LIB_PATH"
63354  has_colon=`$ECHO $path | $GREP ^.:`
63355  new_path="$path"
63356  if test "x$has_colon" = x; then
63357    # Not in mixed or Windows style, start by that.
63358    new_path=`cmd //c echo $path`
63359  fi
63360
63361
63362  input_path="$new_path"
63363  # Check if we need to convert this using DOS-style short mode. If the path
63364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63365  # take no chances and rewrite it.
63366  # Note: m4 eats our [], so we need to use [ and ] instead.
63367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63368  if test "x$has_forbidden_chars" != x; then
63369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63371  fi
63372
63373
63374  windows_path="$new_path"
63375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63376    unix_path=`$CYGPATH -u "$windows_path"`
63377    new_path="$unix_path"
63378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63380    new_path="$unix_path"
63381  fi
63382
63383  if test "x$path" != "x$new_path"; then
63384    FREETYPE_LIB_PATH="$new_path"
63385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63386$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63387  fi
63388
63389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63391
63392    else
63393      # We're on a unix platform. Hooray! :)
63394      path="$FREETYPE_LIB_PATH"
63395      has_space=`$ECHO "$path" | $GREP " "`
63396      if test "x$has_space" != x; then
63397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63398$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63400      fi
63401
63402      # Use eval to expand a potential ~
63403      eval path="$path"
63404      if test ! -f "$path" && test ! -d "$path"; then
63405        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63406      fi
63407
63408      if test -d "$path"; then
63409        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63410      else
63411        dir="`$DIRNAME "$path"`"
63412        base="`$BASENAME "$path"`"
63413        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63414      fi
63415    fi
63416  fi
63417
63418      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63419        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63420      else
63421        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63422      fi
63423    fi
63424
63425    # Try to compile it
63426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63427$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63428    ac_ext=cpp
63429ac_cpp='$CXXCPP $CPPFLAGS'
63430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63433
63434    PREV_CXXCFLAGS="$CXXFLAGS"
63435    PREV_LIBS="$LIBS"
63436    PREV_CXX="$CXX"
63437    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63438    LIBS="$LIBS $FREETYPE_LIBS"
63439    CXX="$FIXPATH $CXX"
63440    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63441/* end confdefs.h.  */
63442
63443          #include<ft2build.h>
63444          #include FT_FREETYPE_H
63445          int main () {
63446            FT_Init_FreeType(NULL);
63447            return 0;
63448          }
63449
63450_ACEOF
63451if ac_fn_cxx_try_link "$LINENO"; then :
63452
63453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63454$as_echo "yes" >&6; }
63455
63456else
63457
63458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63459$as_echo "no" >&6; }
63460          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63461$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63462          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63463$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63464
63465
63466  # Print a helpful message on how to acquire the necessary build dependency.
63467  # freetype is the help tag: freetype, cups, alsa etc
63468  MISSING_DEPENDENCY=freetype
63469
63470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63471    cygwin_help $MISSING_DEPENDENCY
63472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63473    msys_help $MISSING_DEPENDENCY
63474  else
63475    PKGHANDLER_COMMAND=
63476
63477    case $PKGHANDLER in
63478      apt-get)
63479        apt_help     $MISSING_DEPENDENCY ;;
63480      yum)
63481        yum_help     $MISSING_DEPENDENCY ;;
63482      brew)
63483        brew_help    $MISSING_DEPENDENCY ;;
63484      port)
63485        port_help    $MISSING_DEPENDENCY ;;
63486      pkgutil)
63487        pkgutil_help $MISSING_DEPENDENCY ;;
63488      pkgadd)
63489        pkgadd_help  $MISSING_DEPENDENCY ;;
63490    esac
63491
63492    if test "x$PKGHANDLER_COMMAND" != x; then
63493      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63494    fi
63495  fi
63496
63497
63498          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63499
63500
63501fi
63502rm -f core conftest.err conftest.$ac_objext \
63503    conftest$ac_exeext conftest.$ac_ext
63504    CXXCFLAGS="$PREV_CXXFLAGS"
63505    LIBS="$PREV_LIBS"
63506    CXX="$PREV_CXX"
63507    ac_ext=cpp
63508ac_cpp='$CXXCPP $CPPFLAGS'
63509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63512
63513
63514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63515$as_echo_n "checking if we should bundle freetype... " >&6; }
63516    if test "x$BUNDLE_FREETYPE" = xyes; then
63517      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63518    fi
63519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63520$as_echo "$BUNDLE_FREETYPE" >&6; }
63521
63522  fi # end freetype needed
63523
63524
63525
63526
63527
63528
63529
63530# Check whether --with-alsa was given.
63531if test "${with_alsa+set}" = set; then :
63532  withval=$with_alsa;
63533fi
63534
63535
63536# Check whether --with-alsa-include was given.
63537if test "${with_alsa_include+set}" = set; then :
63538  withval=$with_alsa_include;
63539fi
63540
63541
63542# Check whether --with-alsa-lib was given.
63543if test "${with_alsa_lib+set}" = set; then :
63544  withval=$with_alsa_lib;
63545fi
63546
63547
63548  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63549    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63550        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63551        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63552      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63553$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63554    fi
63555    ALSA_CFLAGS=
63556    ALSA_LIBS=
63557  else
63558    ALSA_FOUND=no
63559
63560    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63561      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63562    fi
63563
63564    if test "x${with_alsa}" != x; then
63565      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63566      ALSA_CFLAGS="-I${with_alsa}/include"
63567      ALSA_FOUND=yes
63568    fi
63569    if test "x${with_alsa_include}" != x; then
63570      ALSA_CFLAGS="-I${with_alsa_include}"
63571      ALSA_FOUND=yes
63572    fi
63573    if test "x${with_alsa_lib}" != x; then
63574      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63575      ALSA_FOUND=yes
63576    fi
63577    # Do not try pkg-config if we have a sysroot set.
63578    if test "x$SYSROOT" = x; then
63579      if test "x$ALSA_FOUND" = xno; then
63580
63581pkg_failed=no
63582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63583$as_echo_n "checking for ALSA... " >&6; }
63584
63585if test -n "$ALSA_CFLAGS"; then
63586    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63587 elif test -n "$PKG_CONFIG"; then
63588    if test -n "$PKG_CONFIG" && \
63589    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63590  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63591  ac_status=$?
63592  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63593  test $ac_status = 0; }; then
63594  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63595else
63596  pkg_failed=yes
63597fi
63598 else
63599    pkg_failed=untried
63600fi
63601if test -n "$ALSA_LIBS"; then
63602    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63603 elif test -n "$PKG_CONFIG"; then
63604    if test -n "$PKG_CONFIG" && \
63605    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63606  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63607  ac_status=$?
63608  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63609  test $ac_status = 0; }; then
63610  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63611else
63612  pkg_failed=yes
63613fi
63614 else
63615    pkg_failed=untried
63616fi
63617
63618
63619
63620if test $pkg_failed = yes; then
63621
63622if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63623        _pkg_short_errors_supported=yes
63624else
63625        _pkg_short_errors_supported=no
63626fi
63627        if test $_pkg_short_errors_supported = yes; then
63628	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63629        else
63630	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63631        fi
63632	# Put the nasty error message in config.log where it belongs
63633	echo "$ALSA_PKG_ERRORS" >&5
63634
63635	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63636$as_echo "no" >&6; }
63637                ALSA_FOUND=no
63638elif test $pkg_failed = untried; then
63639	ALSA_FOUND=no
63640else
63641	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63642	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63644$as_echo "yes" >&6; }
63645	ALSA_FOUND=yes
63646fi
63647      fi
63648    fi
63649    if test "x$ALSA_FOUND" = xno; then
63650      for ac_header in alsa/asoundlib.h
63651do :
63652  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63653if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63654  cat >>confdefs.h <<_ACEOF
63655#define HAVE_ALSA_ASOUNDLIB_H 1
63656_ACEOF
63657
63658            ALSA_FOUND=yes
63659            ALSA_CFLAGS=-Iignoreme
63660            ALSA_LIBS=-lasound
63661            DEFAULT_ALSA=yes
63662
63663else
63664  ALSA_FOUND=no
63665
63666fi
63667
63668done
63669
63670    fi
63671    if test "x$ALSA_FOUND" = xno; then
63672
63673  # Print a helpful message on how to acquire the necessary build dependency.
63674  # alsa is the help tag: freetype, cups, alsa etc
63675  MISSING_DEPENDENCY=alsa
63676
63677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63678    cygwin_help $MISSING_DEPENDENCY
63679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63680    msys_help $MISSING_DEPENDENCY
63681  else
63682    PKGHANDLER_COMMAND=
63683
63684    case $PKGHANDLER in
63685      apt-get)
63686        apt_help     $MISSING_DEPENDENCY ;;
63687      yum)
63688        yum_help     $MISSING_DEPENDENCY ;;
63689      brew)
63690        brew_help    $MISSING_DEPENDENCY ;;
63691      port)
63692        port_help    $MISSING_DEPENDENCY ;;
63693      pkgutil)
63694        pkgutil_help $MISSING_DEPENDENCY ;;
63695      pkgadd)
63696        pkgadd_help  $MISSING_DEPENDENCY ;;
63697    esac
63698
63699    if test "x$PKGHANDLER_COMMAND" != x; then
63700      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63701    fi
63702  fi
63703
63704      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63705    fi
63706  fi
63707
63708
63709
63710
63711
63712
63713# Check whether --with-libffi was given.
63714if test "${with_libffi+set}" = set; then :
63715  withval=$with_libffi;
63716fi
63717
63718
63719# Check whether --with-libffi-include was given.
63720if test "${with_libffi_include+set}" = set; then :
63721  withval=$with_libffi_include;
63722fi
63723
63724
63725# Check whether --with-libffi-lib was given.
63726if test "${with_libffi_lib+set}" = set; then :
63727  withval=$with_libffi_lib;
63728fi
63729
63730  # Check whether --enable-libffi-bundling was given.
63731if test "${enable_libffi_bundling+set}" = set; then :
63732  enableval=$enable_libffi_bundling;
63733fi
63734
63735
63736  if test "x$NEEDS_LIB_FFI" = xfalse; then
63737    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63738        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63739        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63740      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63741$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63742    fi
63743    LIBFFI_CFLAGS=
63744    LIBFFI_LIBS=
63745  else
63746    LIBFFI_FOUND=no
63747
63748    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63749      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63750    fi
63751
63752    if test "x${with_libffi}" != x; then
63753      LIBFFI_LIB_PATH="${with_libffi}/lib"
63754      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63755      LIBFFI_CFLAGS="-I${with_libffi}/include"
63756      LIBFFI_FOUND=yes
63757    fi
63758    if test "x${with_libffi_include}" != x; then
63759      LIBFFI_CFLAGS="-I${with_libffi_include}"
63760      LIBFFI_FOUND=yes
63761    fi
63762    if test "x${with_libffi_lib}" != x; then
63763      LIBFFI_LIB_PATH="${with_libffi_lib}"
63764      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63765      LIBFFI_FOUND=yes
63766    fi
63767    # Do not try pkg-config if we have a sysroot set.
63768    if test "x$SYSROOT" = x; then
63769      if test "x$LIBFFI_FOUND" = xno; then
63770        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63771
63772pkg_failed=no
63773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63774$as_echo_n "checking for LIBFFI... " >&6; }
63775
63776if test -n "$LIBFFI_CFLAGS"; then
63777    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63778 elif test -n "$PKG_CONFIG"; then
63779    if test -n "$PKG_CONFIG" && \
63780    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63781  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63782  ac_status=$?
63783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63784  test $ac_status = 0; }; then
63785  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63786else
63787  pkg_failed=yes
63788fi
63789 else
63790    pkg_failed=untried
63791fi
63792if test -n "$LIBFFI_LIBS"; then
63793    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63794 elif test -n "$PKG_CONFIG"; then
63795    if test -n "$PKG_CONFIG" && \
63796    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63797  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63798  ac_status=$?
63799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63800  test $ac_status = 0; }; then
63801  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63802else
63803  pkg_failed=yes
63804fi
63805 else
63806    pkg_failed=untried
63807fi
63808
63809
63810
63811if test $pkg_failed = yes; then
63812
63813if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63814        _pkg_short_errors_supported=yes
63815else
63816        _pkg_short_errors_supported=no
63817fi
63818        if test $_pkg_short_errors_supported = yes; then
63819	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63820        else
63821	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63822        fi
63823	# Put the nasty error message in config.log where it belongs
63824	echo "$LIBFFI_PKG_ERRORS" >&5
63825
63826	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63827$as_echo "no" >&6; }
63828                LIBFFI_FOUND=no
63829elif test $pkg_failed = untried; then
63830	LIBFFI_FOUND=no
63831else
63832	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63833	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63835$as_echo "yes" >&6; }
63836	LIBFFI_FOUND=yes
63837fi
63838      fi
63839    fi
63840    if test "x$LIBFFI_FOUND" = xno; then
63841      for ac_header in ffi.h
63842do :
63843  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63844if test "x$ac_cv_header_ffi_h" = xyes; then :
63845  cat >>confdefs.h <<_ACEOF
63846#define HAVE_FFI_H 1
63847_ACEOF
63848
63849            LIBFFI_FOUND=yes
63850            LIBFFI_CFLAGS=
63851            LIBFFI_LIBS=-lffi
63852
63853else
63854  LIBFFI_FOUND=no
63855
63856fi
63857
63858done
63859
63860    fi
63861    if test "x$LIBFFI_FOUND" = xno; then
63862
63863  # Print a helpful message on how to acquire the necessary build dependency.
63864  # ffi is the help tag: freetype, cups, alsa etc
63865  MISSING_DEPENDENCY=ffi
63866
63867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63868    cygwin_help $MISSING_DEPENDENCY
63869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63870    msys_help $MISSING_DEPENDENCY
63871  else
63872    PKGHANDLER_COMMAND=
63873
63874    case $PKGHANDLER in
63875      apt-get)
63876        apt_help     $MISSING_DEPENDENCY ;;
63877      yum)
63878        yum_help     $MISSING_DEPENDENCY ;;
63879      brew)
63880        brew_help    $MISSING_DEPENDENCY ;;
63881      port)
63882        port_help    $MISSING_DEPENDENCY ;;
63883      pkgutil)
63884        pkgutil_help $MISSING_DEPENDENCY ;;
63885      pkgadd)
63886        pkgadd_help  $MISSING_DEPENDENCY ;;
63887    esac
63888
63889    if test "x$PKGHANDLER_COMMAND" != x; then
63890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63891    fi
63892  fi
63893
63894      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63895    fi
63896
63897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63898$as_echo_n "checking if libffi works... " >&6; }
63899    ac_ext=c
63900ac_cpp='$CPP $CPPFLAGS'
63901ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63903ac_compiler_gnu=$ac_cv_c_compiler_gnu
63904
63905    OLD_CFLAGS="$CFLAGS"
63906    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63907    OLD_LIBS="$LIBS"
63908    LIBS="$LIBS $LIBFFI_LIBS"
63909    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63910/* end confdefs.h.  */
63911#include <ffi.h>
63912int
63913main ()
63914{
63915
63916          ffi_call(NULL, NULL, NULL, NULL);
63917          return 0;
63918
63919  ;
63920  return 0;
63921}
63922_ACEOF
63923if ac_fn_c_try_link "$LINENO"; then :
63924  LIBFFI_WORKS=yes
63925else
63926  LIBFFI_WORKS=no
63927
63928fi
63929rm -f core conftest.err conftest.$ac_objext \
63930    conftest$ac_exeext conftest.$ac_ext
63931    CFLAGS="$OLD_CFLAGS"
63932    LIBS="$OLD_LIBS"
63933    ac_ext=cpp
63934ac_cpp='$CXXCPP $CPPFLAGS'
63935ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63936ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63937ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63938
63939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63940$as_echo "$LIBFFI_WORKS" >&6; }
63941
63942    if test "x$LIBFFI_WORKS" = xno; then
63943
63944  # Print a helpful message on how to acquire the necessary build dependency.
63945  # ffi is the help tag: freetype, cups, alsa etc
63946  MISSING_DEPENDENCY=ffi
63947
63948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63949    cygwin_help $MISSING_DEPENDENCY
63950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63951    msys_help $MISSING_DEPENDENCY
63952  else
63953    PKGHANDLER_COMMAND=
63954
63955    case $PKGHANDLER in
63956      apt-get)
63957        apt_help     $MISSING_DEPENDENCY ;;
63958      yum)
63959        yum_help     $MISSING_DEPENDENCY ;;
63960      brew)
63961        brew_help    $MISSING_DEPENDENCY ;;
63962      port)
63963        port_help    $MISSING_DEPENDENCY ;;
63964      pkgutil)
63965        pkgutil_help $MISSING_DEPENDENCY ;;
63966      pkgadd)
63967        pkgadd_help  $MISSING_DEPENDENCY ;;
63968    esac
63969
63970    if test "x$PKGHANDLER_COMMAND" != x; then
63971      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63972    fi
63973  fi
63974
63975      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63976    fi
63977
63978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63979$as_echo_n "checking if libffi should be bundled... " >&6; }
63980    if test "x$enable_libffi_bundling" = "x"; then
63981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63982$as_echo "no" >&6; }
63983      ENABLE_LIBFFI_BUNDLING=false
63984    elif  test "x$enable_libffi_bundling" = "xno"; then
63985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63986$as_echo "no, forced" >&6; }
63987      ENABLE_LIBFFI_BUNDLING=false
63988    elif  test "x$enable_libffi_bundling" = "xyes"; then
63989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63990$as_echo "yes, forced" >&6; }
63991      ENABLE_LIBFFI_BUNDLING=true
63992    else
63993      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63994    fi
63995
63996    # Find the libffi.so.X to bundle
63997    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63999$as_echo_n "checking for libffi lib file location... " >&6; }
64000      if test "x${LIBFFI_LIB_PATH}" != x; then
64001        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64002          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64003        else
64004          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64005        fi
64006      else
64007        # If we don't have an explicit path, look in a few obvious places
64008        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64009          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64010            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64011          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64012            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64013          else
64014            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64015          fi
64016        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64017          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64018            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64019          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64020            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64021          else
64022            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64023          fi
64024        else
64025          # Fallback on the default /usr/lib dir
64026          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64027            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64028          else
64029            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64030          fi
64031        fi
64032      fi
64033      # Make sure the wildcard is evaluated
64034      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64036$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64037    fi
64038  fi
64039
64040
64041
64042
64043
64044
64045
64046  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64047    # Extract the first word of "llvm-config", so it can be a program name with args.
64048set dummy llvm-config; ac_word=$2
64049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64050$as_echo_n "checking for $ac_word... " >&6; }
64051if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64052  $as_echo_n "(cached) " >&6
64053else
64054  if test -n "$LLVM_CONFIG"; then
64055  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64056else
64057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64058for as_dir in $PATH
64059do
64060  IFS=$as_save_IFS
64061  test -z "$as_dir" && as_dir=.
64062    for ac_exec_ext in '' $ac_executable_extensions; do
64063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64064    ac_cv_prog_LLVM_CONFIG="llvm-config"
64065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64066    break 2
64067  fi
64068done
64069  done
64070IFS=$as_save_IFS
64071
64072fi
64073fi
64074LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64075if test -n "$LLVM_CONFIG"; then
64076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64077$as_echo "$LLVM_CONFIG" >&6; }
64078else
64079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64080$as_echo "no" >&6; }
64081fi
64082
64083
64084
64085    if test "x$LLVM_CONFIG" != xllvm-config; then
64086      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64087    fi
64088
64089    llvm_components="jit mcjit engine nativecodegen native"
64090    unset LLVM_CFLAGS
64091    for flag in $("$LLVM_CONFIG" --cxxflags); do
64092      if echo "${flag}" | grep -q '^-[ID]'; then
64093        if test "${flag}" != "-D_DEBUG" ; then
64094          if test "${LLVM_CFLAGS}" != "" ; then
64095            LLVM_CFLAGS="${LLVM_CFLAGS} "
64096          fi
64097          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64098        fi
64099      fi
64100    done
64101    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64102    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64103
64104    unset LLVM_LDFLAGS
64105    for flag in $("${LLVM_CONFIG}" --ldflags); do
64106      if echo "${flag}" | grep -q '^-L'; then
64107        if test "${LLVM_LDFLAGS}" != ""; then
64108          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64109        fi
64110        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64111      fi
64112    done
64113
64114    unset LLVM_LIBS
64115    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64116      if echo "${flag}" | grep -q '^-l'; then
64117        if test "${LLVM_LIBS}" != ""; then
64118          LLVM_LIBS="${LLVM_LIBS} "
64119        fi
64120        LLVM_LIBS="${LLVM_LIBS}${flag}"
64121      fi
64122    done
64123
64124    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64125    # always properly detect -ltinfo
64126    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64127
64128
64129
64130
64131  fi
64132
64133
64134
64135# Check whether --with-libjpeg was given.
64136if test "${with_libjpeg+set}" = set; then :
64137  withval=$with_libjpeg;
64138fi
64139
64140
64141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64142$as_echo_n "checking for which libjpeg to use... " >&6; }
64143  # default is bundled
64144  DEFAULT_LIBJPEG=bundled
64145  # if user didn't specify, use DEFAULT_LIBJPEG
64146  if test "x${with_libjpeg}" = "x"; then
64147    with_libjpeg=${DEFAULT_LIBJPEG}
64148  fi
64149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64150$as_echo "${with_libjpeg}" >&6; }
64151
64152  if test "x${with_libjpeg}" = "xbundled"; then
64153    USE_EXTERNAL_LIBJPEG=false
64154  elif test "x${with_libjpeg}" = "xsystem"; then
64155    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64156if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64157
64158else
64159   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64160fi
64161
64162
64163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64164$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64165if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64166  $as_echo_n "(cached) " >&6
64167else
64168  ac_check_lib_save_LIBS=$LIBS
64169LIBS="-ljpeg  $LIBS"
64170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64171/* end confdefs.h.  */
64172
64173/* Override any GCC internal prototype to avoid an error.
64174   Use char because int might match the return type of a GCC
64175   builtin and then its argument prototype would still apply.  */
64176#ifdef __cplusplus
64177extern "C"
64178#endif
64179char jpeg_CreateDecompress ();
64180int
64181main ()
64182{
64183return jpeg_CreateDecompress ();
64184  ;
64185  return 0;
64186}
64187_ACEOF
64188if ac_fn_cxx_try_link "$LINENO"; then :
64189  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64190else
64191  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64192fi
64193rm -f core conftest.err conftest.$ac_objext \
64194    conftest$ac_exeext conftest.$ac_ext
64195LIBS=$ac_check_lib_save_LIBS
64196fi
64197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64198$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64199if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64200  cat >>confdefs.h <<_ACEOF
64201#define HAVE_LIBJPEG 1
64202_ACEOF
64203
64204  LIBS="-ljpeg $LIBS"
64205
64206else
64207   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64208fi
64209
64210
64211    USE_EXTERNAL_LIBJPEG=true
64212  else
64213    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64214  fi
64215
64216
64217
64218
64219
64220# Check whether --with-giflib was given.
64221if test "${with_giflib+set}" = set; then :
64222  withval=$with_giflib;
64223fi
64224
64225
64226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64227$as_echo_n "checking for which giflib to use... " >&6; }
64228  # default is bundled
64229  DEFAULT_GIFLIB=bundled
64230  # if user didn't specify, use DEFAULT_GIFLIB
64231  if test "x${with_giflib}" = "x"; then
64232    with_giflib=${DEFAULT_GIFLIB}
64233  fi
64234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64235$as_echo "${with_giflib}" >&6; }
64236
64237  if test "x${with_giflib}" = "xbundled"; then
64238    USE_EXTERNAL_LIBGIF=false
64239  elif test "x${with_giflib}" = "xsystem"; then
64240    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64241if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64242
64243else
64244   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64245fi
64246
64247
64248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64249$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64250if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64251  $as_echo_n "(cached) " >&6
64252else
64253  ac_check_lib_save_LIBS=$LIBS
64254LIBS="-lgif  $LIBS"
64255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64256/* end confdefs.h.  */
64257
64258/* Override any GCC internal prototype to avoid an error.
64259   Use char because int might match the return type of a GCC
64260   builtin and then its argument prototype would still apply.  */
64261#ifdef __cplusplus
64262extern "C"
64263#endif
64264char DGifGetCode ();
64265int
64266main ()
64267{
64268return DGifGetCode ();
64269  ;
64270  return 0;
64271}
64272_ACEOF
64273if ac_fn_cxx_try_link "$LINENO"; then :
64274  ac_cv_lib_gif_DGifGetCode=yes
64275else
64276  ac_cv_lib_gif_DGifGetCode=no
64277fi
64278rm -f core conftest.err conftest.$ac_objext \
64279    conftest$ac_exeext conftest.$ac_ext
64280LIBS=$ac_check_lib_save_LIBS
64281fi
64282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64283$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64284if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64285  cat >>confdefs.h <<_ACEOF
64286#define HAVE_LIBGIF 1
64287_ACEOF
64288
64289  LIBS="-lgif $LIBS"
64290
64291else
64292   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64293fi
64294
64295
64296    USE_EXTERNAL_LIBGIF=true
64297  else
64298    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64299  fi
64300
64301
64302
64303
64304
64305# Check whether --with-libpng was given.
64306if test "${with_libpng+set}" = set; then :
64307  withval=$with_libpng;
64308fi
64309
64310
64311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64312$as_echo_n "checking for which libpng to use... " >&6; }
64313
64314  # default is bundled
64315  DEFAULT_LIBPNG=bundled
64316  # if user didn't specify, use DEFAULT_LIBPNG
64317  if test "x${with_libpng}" = "x"; then
64318    with_libpng=${DEFAULT_LIBPNG}
64319  fi
64320
64321  if test "x${with_libpng}" = "xbundled"; then
64322    USE_EXTERNAL_LIBPNG=false
64323    PNG_CFLAGS=""
64324    PNG_LIBS=""
64325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64326$as_echo "bundled" >&6; }
64327  elif test "x${with_libpng}" = "xsystem"; then
64328
64329pkg_failed=no
64330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64331$as_echo_n "checking for PNG... " >&6; }
64332
64333if test -n "$PNG_CFLAGS"; then
64334    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64335 elif test -n "$PKG_CONFIG"; then
64336    if test -n "$PKG_CONFIG" && \
64337    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64338  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64339  ac_status=$?
64340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64341  test $ac_status = 0; }; then
64342  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64343else
64344  pkg_failed=yes
64345fi
64346 else
64347    pkg_failed=untried
64348fi
64349if test -n "$PNG_LIBS"; then
64350    pkg_cv_PNG_LIBS="$PNG_LIBS"
64351 elif test -n "$PKG_CONFIG"; then
64352    if test -n "$PKG_CONFIG" && \
64353    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64354  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64355  ac_status=$?
64356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64357  test $ac_status = 0; }; then
64358  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64359else
64360  pkg_failed=yes
64361fi
64362 else
64363    pkg_failed=untried
64364fi
64365
64366
64367
64368if test $pkg_failed = yes; then
64369
64370if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64371        _pkg_short_errors_supported=yes
64372else
64373        _pkg_short_errors_supported=no
64374fi
64375        if test $_pkg_short_errors_supported = yes; then
64376	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64377        else
64378	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64379        fi
64380	# Put the nasty error message in config.log where it belongs
64381	echo "$PNG_PKG_ERRORS" >&5
64382
64383	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64384$as_echo "no" >&6; }
64385                LIBPNG_FOUND=no
64386elif test $pkg_failed = untried; then
64387	LIBPNG_FOUND=no
64388else
64389	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64390	PNG_LIBS=$pkg_cv_PNG_LIBS
64391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64392$as_echo "yes" >&6; }
64393	LIBPNG_FOUND=yes
64394fi
64395    if test "x${LIBPNG_FOUND}" = "xyes"; then
64396      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64397      USE_EXTERNAL_LIBPNG=true
64398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64399$as_echo "system" >&6; }
64400    else
64401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64402$as_echo "system not found" >&6; }
64403      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64404    fi
64405  else
64406    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64407  fi
64408
64409
64410
64411
64412
64413
64414
64415# Check whether --with-zlib was given.
64416if test "${with_zlib+set}" = set; then :
64417  withval=$with_zlib;
64418fi
64419
64420
64421  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64422$as_echo_n "checking for compress in -lz... " >&6; }
64423if ${ac_cv_lib_z_compress+:} false; then :
64424  $as_echo_n "(cached) " >&6
64425else
64426  ac_check_lib_save_LIBS=$LIBS
64427LIBS="-lz  $LIBS"
64428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64429/* end confdefs.h.  */
64430
64431/* Override any GCC internal prototype to avoid an error.
64432   Use char because int might match the return type of a GCC
64433   builtin and then its argument prototype would still apply.  */
64434#ifdef __cplusplus
64435extern "C"
64436#endif
64437char compress ();
64438int
64439main ()
64440{
64441return compress ();
64442  ;
64443  return 0;
64444}
64445_ACEOF
64446if ac_fn_cxx_try_link "$LINENO"; then :
64447  ac_cv_lib_z_compress=yes
64448else
64449  ac_cv_lib_z_compress=no
64450fi
64451rm -f core conftest.err conftest.$ac_objext \
64452    conftest$ac_exeext conftest.$ac_ext
64453LIBS=$ac_check_lib_save_LIBS
64454fi
64455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64456$as_echo "$ac_cv_lib_z_compress" >&6; }
64457if test "x$ac_cv_lib_z_compress" = xyes; then :
64458   ZLIB_FOUND=yes
64459else
64460   ZLIB_FOUND=no
64461fi
64462
64463
64464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64465$as_echo_n "checking for which zlib to use... " >&6; }
64466
64467  DEFAULT_ZLIB=system
64468  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64469    # On windows default is bundled...on others default is system
64470    DEFAULT_ZLIB=bundled
64471  fi
64472
64473  if test "x${ZLIB_FOUND}" != "xyes"; then
64474    # If we don't find any system...set default to bundled
64475    DEFAULT_ZLIB=bundled
64476  fi
64477
64478  # If user didn't specify, use DEFAULT_ZLIB
64479  if test "x${with_zlib}" = "x"; then
64480    with_zlib=${DEFAULT_ZLIB}
64481  fi
64482
64483  if test "x${with_zlib}" = "xbundled"; then
64484    USE_EXTERNAL_LIBZ=false
64485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64486$as_echo "bundled" >&6; }
64487  elif test "x${with_zlib}" = "xsystem"; then
64488    if test "x${ZLIB_FOUND}" = "xyes"; then
64489      USE_EXTERNAL_LIBZ=true
64490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64491$as_echo "system" >&6; }
64492    else
64493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64494$as_echo "system not found" >&6; }
64495      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64496    fi
64497  else
64498    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64499  fi
64500
64501
64502
64503
64504
64505# Check whether --with-lcms was given.
64506if test "${with_lcms+set}" = set; then :
64507  withval=$with_lcms;
64508fi
64509
64510
64511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64512$as_echo_n "checking for which lcms to use... " >&6; }
64513
64514  DEFAULT_LCMS=bundled
64515  # If user didn't specify, use DEFAULT_LCMS
64516  if test "x${with_lcms}" = "x"; then
64517    with_lcms=${DEFAULT_LCMS}
64518  fi
64519
64520  if test "x${with_lcms}" = "xbundled"; then
64521    USE_EXTERNAL_LCMS=false
64522    LCMS_CFLAGS=""
64523    LCMS_LIBS=""
64524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64525$as_echo "bundled" >&6; }
64526  elif test "x${with_lcms}" = "xsystem"; then
64527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64528$as_echo "system" >&6; }
64529
64530pkg_failed=no
64531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64532$as_echo_n "checking for LCMS... " >&6; }
64533
64534if test -n "$LCMS_CFLAGS"; then
64535    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64536 elif test -n "$PKG_CONFIG"; then
64537    if test -n "$PKG_CONFIG" && \
64538    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64539  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64540  ac_status=$?
64541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64542  test $ac_status = 0; }; then
64543  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64544else
64545  pkg_failed=yes
64546fi
64547 else
64548    pkg_failed=untried
64549fi
64550if test -n "$LCMS_LIBS"; then
64551    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64552 elif test -n "$PKG_CONFIG"; then
64553    if test -n "$PKG_CONFIG" && \
64554    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64555  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64556  ac_status=$?
64557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64558  test $ac_status = 0; }; then
64559  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64560else
64561  pkg_failed=yes
64562fi
64563 else
64564    pkg_failed=untried
64565fi
64566
64567
64568
64569if test $pkg_failed = yes; then
64570
64571if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64572        _pkg_short_errors_supported=yes
64573else
64574        _pkg_short_errors_supported=no
64575fi
64576        if test $_pkg_short_errors_supported = yes; then
64577	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64578        else
64579	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64580        fi
64581	# Put the nasty error message in config.log where it belongs
64582	echo "$LCMS_PKG_ERRORS" >&5
64583
64584	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64585$as_echo "no" >&6; }
64586                LCMS_FOUND=no
64587elif test $pkg_failed = untried; then
64588	LCMS_FOUND=no
64589else
64590	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64591	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64593$as_echo "yes" >&6; }
64594	LCMS_FOUND=yes
64595fi
64596    if test "x${LCMS_FOUND}" = "xyes"; then
64597      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64598      USE_EXTERNAL_LCMS=true
64599    else
64600      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64601    fi
64602  else
64603    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64604  fi
64605
64606
64607
64608
64609
64610
64611
64612
64613
64614
64615
64616
64617
64618  # Setup libm (the maths library)
64619  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64621$as_echo_n "checking for cos in -lm... " >&6; }
64622if ${ac_cv_lib_m_cos+:} false; then :
64623  $as_echo_n "(cached) " >&6
64624else
64625  ac_check_lib_save_LIBS=$LIBS
64626LIBS="-lm  $LIBS"
64627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64628/* end confdefs.h.  */
64629
64630/* Override any GCC internal prototype to avoid an error.
64631   Use char because int might match the return type of a GCC
64632   builtin and then its argument prototype would still apply.  */
64633#ifdef __cplusplus
64634extern "C"
64635#endif
64636char cos ();
64637int
64638main ()
64639{
64640return cos ();
64641  ;
64642  return 0;
64643}
64644_ACEOF
64645if ac_fn_cxx_try_link "$LINENO"; then :
64646  ac_cv_lib_m_cos=yes
64647else
64648  ac_cv_lib_m_cos=no
64649fi
64650rm -f core conftest.err conftest.$ac_objext \
64651    conftest$ac_exeext conftest.$ac_ext
64652LIBS=$ac_check_lib_save_LIBS
64653fi
64654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64655$as_echo "$ac_cv_lib_m_cos" >&6; }
64656if test "x$ac_cv_lib_m_cos" = xyes; then :
64657  cat >>confdefs.h <<_ACEOF
64658#define HAVE_LIBM 1
64659_ACEOF
64660
64661  LIBS="-lm $LIBS"
64662
64663else
64664
64665        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64666$as_echo "$as_me: Maths library was not found" >&6;}
64667
64668fi
64669
64670    LIBM="-lm"
64671  else
64672    LIBM=""
64673  fi
64674
64675
64676  # Setup libdl (for dynamic library loading)
64677  save_LIBS="$LIBS"
64678  LIBS=""
64679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64680$as_echo_n "checking for dlopen in -ldl... " >&6; }
64681if ${ac_cv_lib_dl_dlopen+:} false; then :
64682  $as_echo_n "(cached) " >&6
64683else
64684  ac_check_lib_save_LIBS=$LIBS
64685LIBS="-ldl  $LIBS"
64686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64687/* end confdefs.h.  */
64688
64689/* Override any GCC internal prototype to avoid an error.
64690   Use char because int might match the return type of a GCC
64691   builtin and then its argument prototype would still apply.  */
64692#ifdef __cplusplus
64693extern "C"
64694#endif
64695char dlopen ();
64696int
64697main ()
64698{
64699return dlopen ();
64700  ;
64701  return 0;
64702}
64703_ACEOF
64704if ac_fn_cxx_try_link "$LINENO"; then :
64705  ac_cv_lib_dl_dlopen=yes
64706else
64707  ac_cv_lib_dl_dlopen=no
64708fi
64709rm -f core conftest.err conftest.$ac_objext \
64710    conftest$ac_exeext conftest.$ac_ext
64711LIBS=$ac_check_lib_save_LIBS
64712fi
64713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64714$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64715if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64716  cat >>confdefs.h <<_ACEOF
64717#define HAVE_LIBDL 1
64718_ACEOF
64719
64720  LIBS="-ldl $LIBS"
64721
64722fi
64723
64724  LIBDL="$LIBS"
64725
64726  LIBS="$save_LIBS"
64727
64728  # Deprecated libraries, keep the flags for backwards compatibility
64729  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64730
64731
64732# Check whether --with-dxsdk was given.
64733if test "${with_dxsdk+set}" = set; then :
64734  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64735$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64736fi
64737
64738
64739
64740
64741# Check whether --with-dxsdk-lib was given.
64742if test "${with_dxsdk_lib+set}" = set; then :
64743  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64744$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64745fi
64746
64747
64748
64749
64750# Check whether --with-dxsdk-include was given.
64751if test "${with_dxsdk_include+set}" = set; then :
64752  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64753$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64754fi
64755
64756
64757  fi
64758
64759  # Control if libzip can use mmap. Available for purposes of overriding.
64760  LIBZIP_CAN_USE_MMAP=true
64761
64762
64763
64764  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64765    # Find the root of the Solaris Studio installation from the compiler path
64766    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64767    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64769$as_echo_n "checking for libstlport.so.1... " >&6; }
64770    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64771      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64772      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64773    fi
64774    if test -f "$STLPORT_LIB"; then
64775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64776$as_echo "yes, $STLPORT_LIB" >&6; }
64777
64778  # Only process if variable expands to non-empty
64779
64780  if test "x$STLPORT_LIB" != x; then
64781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64782
64783  # Input might be given as Windows format, start by converting to
64784  # unix format.
64785  path="$STLPORT_LIB"
64786  new_path=`$CYGPATH -u "$path"`
64787
64788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64791  # "foo.exe" is OK but "foo" is an error.
64792  #
64793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64794  # It is also a way to make sure we got the proper file name for the real test later on.
64795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64796  if test "x$test_shortpath" = x; then
64797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64798$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64799    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64800  fi
64801
64802  # Call helper function which possibly converts this using DOS-style short mode.
64803  # If so, the updated path is stored in $new_path.
64804
64805  input_path="$new_path"
64806  # Check if we need to convert this using DOS-style short mode. If the path
64807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64808  # take no chances and rewrite it.
64809  # Note: m4 eats our [], so we need to use [ and ] instead.
64810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64811  if test "x$has_forbidden_chars" != x; then
64812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64816      # Going to short mode and back again did indeed matter. Since short mode is
64817      # case insensitive, let's make it lowercase to improve readability.
64818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64819      # Now convert it back to Unix-style (cygpath)
64820      input_path=`$CYGPATH -u "$shortmode_path"`
64821      new_path="$input_path"
64822    fi
64823  fi
64824
64825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64826  if test "x$test_cygdrive_prefix" = x; then
64827    # As a simple fix, exclude /usr/bin since it's not a real path.
64828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64830      # a path prefixed by /cygdrive for fixpath to work.
64831      new_path="$CYGWIN_ROOT_PATH$input_path"
64832    fi
64833  fi
64834
64835
64836  if test "x$path" != "x$new_path"; then
64837    STLPORT_LIB="$new_path"
64838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64839$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64840  fi
64841
64842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64843
64844  path="$STLPORT_LIB"
64845  has_colon=`$ECHO $path | $GREP ^.:`
64846  new_path="$path"
64847  if test "x$has_colon" = x; then
64848    # Not in mixed or Windows style, start by that.
64849    new_path=`cmd //c echo $path`
64850  fi
64851
64852
64853  input_path="$new_path"
64854  # Check if we need to convert this using DOS-style short mode. If the path
64855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64856  # take no chances and rewrite it.
64857  # Note: m4 eats our [], so we need to use [ and ] instead.
64858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64859  if test "x$has_forbidden_chars" != x; then
64860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64862  fi
64863
64864
64865  windows_path="$new_path"
64866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64867    unix_path=`$CYGPATH -u "$windows_path"`
64868    new_path="$unix_path"
64869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64871    new_path="$unix_path"
64872  fi
64873
64874  if test "x$path" != "x$new_path"; then
64875    STLPORT_LIB="$new_path"
64876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64877$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64878  fi
64879
64880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64882
64883    else
64884      # We're on a unix platform. Hooray! :)
64885      path="$STLPORT_LIB"
64886      has_space=`$ECHO "$path" | $GREP " "`
64887      if test "x$has_space" != x; then
64888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64889$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64891      fi
64892
64893      # Use eval to expand a potential ~
64894      eval path="$path"
64895      if test ! -f "$path" && test ! -d "$path"; then
64896        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64897      fi
64898
64899      if test -d "$path"; then
64900        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64901      else
64902        dir="`$DIRNAME "$path"`"
64903        base="`$BASENAME "$path"`"
64904        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64905      fi
64906    fi
64907  fi
64908
64909    else
64910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64911$as_echo "no, not found at $STLPORT_LIB" >&6; }
64912      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64913    fi
64914
64915  fi
64916
64917
64918
64919
64920
64921
64922
64923
64924
64925
64926
64927
64928
64929
64930# Hotspot setup depends on lib checks (AOT needs libelf).
64931
64932
64933  # The user can in some cases supply additional jvm features. For the custom
64934  # variant, this defines the entire variant.
64935
64936# Check whether --with-jvm-features was given.
64937if test "${with_jvm_features+set}" = set; then :
64938  withval=$with_jvm_features;
64939fi
64940
64941  if test "x$with_jvm_features" != x; then
64942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64943$as_echo_n "checking additional JVM features... " >&6; }
64944    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64946$as_echo "$JVM_FEATURES" >&6; }
64947  fi
64948
64949  # Override hotspot cpu definitions for ARM platforms
64950  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64951    HOTSPOT_TARGET_CPU=arm_32
64952    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64953    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64954    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64955  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64956    HOTSPOT_TARGET_CPU=arm_64
64957    HOTSPOT_TARGET_CPU_ARCH=arm
64958    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64959    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64960  fi
64961
64962  # Verify that dependencies are met for explicitly set features.
64963  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64964    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64965  fi
64966
64967  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64968    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64969  fi
64970
64971  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64972    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64973  fi
64974
64975  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64976    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64977  fi
64978
64979  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64980    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64981  fi
64982
64983  # Turn on additional features based on other parts of configure
64984  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64985    JVM_FEATURES="$JVM_FEATURES dtrace"
64986  else
64987    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64988      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64989    fi
64990  fi
64991
64992  if test "x$STATIC_BUILD" = "xtrue"; then
64993    JVM_FEATURES="$JVM_FEATURES static-build"
64994  else
64995    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64996      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64997    fi
64998  fi
64999
65000  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65001    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65002      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65003    fi
65004  fi
65005
65006  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65007    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65008      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65009    fi
65010  fi
65011
65012  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65013  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65014     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65015     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65016    JVM_FEATURES_jvmci="jvmci"
65017  else
65018    JVM_FEATURES_jvmci=""
65019  fi
65020
65021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65022$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65023  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65025$as_echo "yes, forced" >&6; }
65026    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65027      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65028    fi
65029    INCLUDE_GRAAL="true"
65030  else
65031    # By default enable graal build where AOT is available
65032    if test "x$ENABLE_AOT" = "xtrue"; then
65033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65034$as_echo "yes" >&6; }
65035      JVM_FEATURES_graal="graal"
65036      INCLUDE_GRAAL="true"
65037    else
65038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65039$as_echo "no" >&6; }
65040      JVM_FEATURES_graal=""
65041      INCLUDE_GRAAL="false"
65042    fi
65043  fi
65044
65045
65046
65047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65048$as_echo_n "checking if aot should be enabled... " >&6; }
65049  if test "x$ENABLE_AOT" = "xtrue"; then
65050    if test "x$enable_aot" = "xyes"; then
65051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65052$as_echo "yes, forced" >&6; }
65053    else
65054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65055$as_echo "yes" >&6; }
65056    fi
65057    JVM_FEATURES_aot="aot"
65058  else
65059    if test "x$enable_aot" = "xno"; then
65060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65061$as_echo "no, forced" >&6; }
65062    else
65063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65064$as_echo "no" >&6; }
65065    fi
65066    JVM_FEATURES_aot=""
65067  fi
65068
65069  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65070    # Default to use link time optimizations on minimal on arm
65071    JVM_FEATURES_link_time_opt="link-time-opt"
65072  else
65073    JVM_FEATURES_link_time_opt=""
65074  fi
65075
65076  # All variants but minimal (and custom) get these features
65077  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65078
65079  # Enable features depending on variant.
65080  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65081  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65082  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65083  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65084  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65085  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65086  JVM_FEATURES_custom="$JVM_FEATURES"
65087
65088
65089
65090
65091
65092
65093
65094
65095
65096  # Used for verification of Makefiles by check-jvm-feature
65097
65098
65099  # We don't support --with-jvm-interpreter anymore, use zero instead.
65100
65101
65102# Check whether --with-jvm-interpreter was given.
65103if test "${with_jvm_interpreter+set}" = set; then :
65104  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65105$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65106fi
65107
65108
65109
65110
65111###############################################################################
65112#
65113# We need to do some final tweaking, when everything else is done.
65114#
65115###############################################################################
65116
65117
65118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65119$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65120
65121  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65122    ENABLE_INTREE_EC=true
65123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65124$as_echo "yes" >&6; }
65125  else
65126    ENABLE_INTREE_EC=false
65127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65128$as_echo "no" >&6; }
65129  fi
65130
65131
65132
65133
65134  # Check whether --enable-jtreg-failure-handler was given.
65135if test "${enable_jtreg_failure_handler+set}" = set; then :
65136  enableval=$enable_jtreg_failure_handler;
65137fi
65138
65139
65140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65141$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65142
65143  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65144    if test "x$JT_HOME" = "x"; then
65145      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65146    else
65147      BUILD_FAILURE_HANDLER=true
65148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65149$as_echo "yes, forced" >&6; }
65150    fi
65151  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65152    BUILD_FAILURE_HANDLER=false
65153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65154$as_echo "no, forced" >&6; }
65155  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65156      || test "x$enable_jtreg_failure_handler" = "x"; then
65157    if test "x$JT_HOME" = "x"; then
65158      BUILD_FAILURE_HANDLER=false
65159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65160$as_echo "no, missing jtreg" >&6; }
65161    else
65162      BUILD_FAILURE_HANDLER=true
65163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65164$as_echo "yes, jtreg present" >&6; }
65165    fi
65166  else
65167    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65168  fi
65169
65170
65171
65172
65173  # Check whether --enable-generate-classlist was given.
65174if test "${enable_generate_classlist+set}" = set; then :
65175  enableval=$enable_generate_classlist;
65176fi
65177
65178
65179  # Check if it's likely that it's possible to generate the classlist. Depending
65180  # on exact jvm configuration it could be possible anyway.
65181  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65182    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65183  else
65184    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65185  fi
65186
65187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65188$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65189  if test "x$enable_generate_classlist" = "xyes"; then
65190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65191$as_echo "yes, forced" >&6; }
65192    ENABLE_GENERATE_CLASSLIST="true"
65193    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65194      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65195$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65196    fi
65197  elif test "x$enable_generate_classlist" = "xno"; then
65198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65199$as_echo "no, forced" >&6; }
65200    ENABLE_GENERATE_CLASSLIST="false"
65201  elif test "x$enable_generate_classlist" = "x"; then
65202    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65204$as_echo "yes" >&6; }
65205      ENABLE_GENERATE_CLASSLIST="true"
65206    else
65207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65208$as_echo "no" >&6; }
65209      ENABLE_GENERATE_CLASSLIST="false"
65210    fi
65211  else
65212    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65213  fi
65214
65215
65216
65217
65218###############################################################################
65219#
65220# Configure parts of the build that only affect the build performance,
65221# not the result.
65222#
65223###############################################################################
65224
65225
65226  # How many cores do we have on this build system?
65227
65228# Check whether --with-num-cores was given.
65229if test "${with_num_cores+set}" = set; then :
65230  withval=$with_num_cores;
65231fi
65232
65233  if test "x$with_num_cores" = x; then
65234    # The number of cores were not specified, try to probe them.
65235
65236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65237$as_echo_n "checking for number of cores... " >&6; }
65238  NUM_CORES=1
65239  FOUND_CORES=no
65240
65241  if test -f /proc/cpuinfo; then
65242    # Looks like a Linux (or cygwin) system
65243    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65244    FOUND_CORES=yes
65245  elif test -x /usr/sbin/psrinfo; then
65246    # Looks like a Solaris system
65247    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65248    FOUND_CORES=yes
65249  elif test -x /usr/sbin/sysctl; then
65250    # Looks like a MacOSX system
65251    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65252    FOUND_CORES=yes
65253  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65254    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65255    FOUND_CORES=yes
65256  elif test -n "$NUMBER_OF_PROCESSORS"; then
65257    # On windows, look in the env
65258    NUM_CORES=$NUMBER_OF_PROCESSORS
65259    FOUND_CORES=yes
65260  fi
65261
65262  if test "x$FOUND_CORES" = xyes; then
65263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65264$as_echo "$NUM_CORES" >&6; }
65265  else
65266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65267$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65268    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65269$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65270  fi
65271
65272  else
65273    NUM_CORES=$with_num_cores
65274  fi
65275
65276
65277
65278  # How much memory do we have on this build system?
65279
65280# Check whether --with-memory-size was given.
65281if test "${with_memory_size+set}" = set; then :
65282  withval=$with_memory_size;
65283fi
65284
65285  if test "x$with_memory_size" = x; then
65286    # The memory size was not specified, try to probe it.
65287
65288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65289$as_echo_n "checking for memory size... " >&6; }
65290  # Default to 1024 MB
65291  MEMORY_SIZE=1024
65292  FOUND_MEM=no
65293
65294  if test -f /proc/meminfo; then
65295    # Looks like a Linux (or cygwin) system
65296    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65297    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65298    FOUND_MEM=yes
65299  elif test -x /usr/sbin/prtconf; then
65300    # Looks like a Solaris or AIX system
65301    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65302    FOUND_MEM=yes
65303  elif test -x /usr/sbin/sysctl; then
65304    # Looks like a MacOSX system
65305    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65306    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65307    FOUND_MEM=yes
65308  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65309    # Windows, but without cygwin
65310    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65311    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65312    FOUND_MEM=yes
65313  fi
65314
65315  if test "x$FOUND_MEM" = xyes; then
65316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65317$as_echo "$MEMORY_SIZE MB" >&6; }
65318  else
65319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65320$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65321    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65322$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65323  fi
65324
65325  else
65326    MEMORY_SIZE=$with_memory_size
65327  fi
65328
65329
65330
65331  # Provide a decent default number of parallel jobs for make depending on
65332  # number of cores, amount of memory and machine architecture.
65333
65334# Check whether --with-jobs was given.
65335if test "${with_jobs+set}" = set; then :
65336  withval=$with_jobs;
65337fi
65338
65339  if test "x$with_jobs" = x; then
65340    # Number of jobs was not specified, calculate.
65341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65342$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65343    # Approximate memory in GB.
65344    memory_gb=`expr $MEMORY_SIZE / 1024`
65345    # Pick the lowest of memory in gb and number of cores.
65346    if test "$memory_gb" -lt "$NUM_CORES"; then
65347      JOBS="$memory_gb"
65348    else
65349      JOBS="$NUM_CORES"
65350    fi
65351    if test "$JOBS" -eq "0"; then
65352      JOBS=1
65353    fi
65354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65355$as_echo "$JOBS" >&6; }
65356  else
65357    JOBS=$with_jobs
65358  fi
65359
65360
65361
65362  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65363
65364# Check whether --with-test-jobs was given.
65365if test "${with_test_jobs+set}" = set; then :
65366  withval=$with_test_jobs;
65367fi
65368
65369  if test "x$with_test_jobs" = x; then
65370      TEST_JOBS=0
65371  else
65372      TEST_JOBS=$with_test_jobs
65373  fi
65374
65375
65376
65377# Setup arguments for the boot jdk (after cores and memory have been setup)
65378
65379  ##############################################################################
65380  #
65381  # Specify jvm options for anything that is run with the Boot JDK.
65382  # Not all JVM:s accept the same arguments on the command line.
65383  #
65384
65385# Check whether --with-boot-jdk-jvmargs was given.
65386if test "${with_boot_jdk_jvmargs+set}" = set; then :
65387  withval=$with_boot_jdk_jvmargs;
65388fi
65389
65390
65391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65392$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65393
65394  # Disable special log output when a debug build is used as Boot JDK...
65395
65396  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65397  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65398  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65399  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65400  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65401  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65402    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65403    JVM_ARG_OK=true
65404  else
65405    $ECHO "Arg failed:" >&5
65406    $ECHO "$OUTPUT" >&5
65407    JVM_ARG_OK=false
65408  fi
65409
65410
65411  # Force en-US environment
65412
65413  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65414  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65415  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65416  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65417  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65418  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65419    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65420    JVM_ARG_OK=true
65421  else
65422    $ECHO "Arg failed:" >&5
65423    $ECHO "$OUTPUT" >&5
65424    JVM_ARG_OK=false
65425  fi
65426
65427
65428  # Apply user provided options.
65429
65430  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65431  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65432  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65433  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65434  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65435  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65436    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65437    JVM_ARG_OK=true
65438  else
65439    $ECHO "Arg failed:" >&5
65440    $ECHO "$OUTPUT" >&5
65441    JVM_ARG_OK=false
65442  fi
65443
65444
65445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65446$as_echo "$boot_jdk_jvmargs" >&6; }
65447
65448  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65449  JAVA_FLAGS=$boot_jdk_jvmargs
65450
65451
65452
65453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65454$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65455
65456  # Starting amount of heap memory.
65457
65458  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65459  $ECHO "Command: $JAVA -Xms64M -version" >&5
65460  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65461  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65462  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65463  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65464    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65465    JVM_ARG_OK=true
65466  else
65467    $ECHO "Arg failed:" >&5
65468    $ECHO "$OUTPUT" >&5
65469    JVM_ARG_OK=false
65470  fi
65471
65472  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65473
65474  # Maximum amount of heap memory and stack size.
65475  JVM_HEAP_LIMIT_32="1024"
65476  # Running a 64 bit JVM allows for and requires a bigger heap
65477  JVM_HEAP_LIMIT_64="1600"
65478  STACK_SIZE_32=768
65479  STACK_SIZE_64=1536
65480  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65481  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65482    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65483  fi
65484  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65485    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65486  fi
65487  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65488    JVM_HEAP_LIMIT_32=512
65489    JVM_HEAP_LIMIT_64=512
65490  fi
65491
65492  if test "x$BOOT_JDK_BITS" = "x32"; then
65493    STACK_SIZE=$STACK_SIZE_32
65494    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65495  else
65496    STACK_SIZE=$STACK_SIZE_64
65497    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65498  fi
65499
65500  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65501  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65502  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65503  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65504  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65505  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65506    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65507    JVM_ARG_OK=true
65508  else
65509    $ECHO "Arg failed:" >&5
65510    $ECHO "$OUTPUT" >&5
65511    JVM_ARG_OK=false
65512  fi
65513
65514
65515  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65516  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65517  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65518  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65519  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65520  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65521    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65522    JVM_ARG_OK=true
65523  else
65524    $ECHO "Arg failed:" >&5
65525    $ECHO "$OUTPUT" >&5
65526    JVM_ARG_OK=false
65527  fi
65528
65529
65530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65531$as_echo "$boot_jdk_jvmargs_big" >&6; }
65532
65533  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65534
65535
65536  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65537    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65538    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65539  else
65540    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65541    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65542  fi
65543  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65544  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65546$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65548$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65549
65550
65551  # By default, the main javac compilations use big
65552  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65553
65554
65555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65556$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65557
65558  # Use serial gc for small short lived tools if possible
65559
65560  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65561  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65562  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65563  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65564  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65565  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65566    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65567    JVM_ARG_OK=true
65568  else
65569    $ECHO "Arg failed:" >&5
65570    $ECHO "$OUTPUT" >&5
65571    JVM_ARG_OK=false
65572  fi
65573
65574
65575  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65576  $ECHO "Command: $JAVA -Xms32M -version" >&5
65577  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65578  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65579  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65580  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65581    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65582    JVM_ARG_OK=true
65583  else
65584    $ECHO "Arg failed:" >&5
65585    $ECHO "$OUTPUT" >&5
65586    JVM_ARG_OK=false
65587  fi
65588
65589
65590  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65591  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65592  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65593  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65594  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65595  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65596    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65597    JVM_ARG_OK=true
65598  else
65599    $ECHO "Arg failed:" >&5
65600    $ECHO "$OUTPUT" >&5
65601    JVM_ARG_OK=false
65602  fi
65603
65604
65605  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65606  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65607  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65608  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65609  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65610  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65611    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65612    JVM_ARG_OK=true
65613  else
65614    $ECHO "Arg failed:" >&5
65615    $ECHO "$OUTPUT" >&5
65616    JVM_ARG_OK=false
65617  fi
65618
65619
65620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65621$as_echo "$boot_jdk_jvmargs_small" >&6; }
65622
65623  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65624
65625
65626  JAVA_TOOL_FLAGS_SMALL=""
65627  for f in $JAVA_FLAGS_SMALL; do
65628    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65629  done
65630
65631
65632
65633# Setup smart javac (after cores and memory have been setup)
65634
65635
65636# Check whether --with-sjavac-server-java was given.
65637if test "${with_sjavac_server_java+set}" = set; then :
65638  withval=$with_sjavac_server_java;
65639fi
65640
65641
65642  if test "x$with_sjavac_server_java" != x; then
65643    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65644    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65645    if test "x$FOUND_VERSION" = x; then
65646      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65647    fi
65648  else
65649    SJAVAC_SERVER_JAVA="$JAVA"
65650  fi
65651
65652
65653  if test "$MEMORY_SIZE" -gt "3000"; then
65654
65655  $ECHO "Check if jvm arg is ok: -d64" >&5
65656  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65657  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65658  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65659  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65660  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65661    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65662    JVM_ARG_OK=true
65663  else
65664    $ECHO "Arg failed:" >&5
65665    $ECHO "$OUTPUT" >&5
65666    JVM_ARG_OK=false
65667  fi
65668
65669    if test "$JVM_ARG_OK" = true; then
65670      JVM_64BIT=true
65671      JVM_ARG_OK=false
65672    fi
65673  fi
65674
65675  MX_VALUE=`expr $MEMORY_SIZE / 2`
65676  if test "$JVM_64BIT" = true; then
65677    # Set ms lower than mx since more than one instance of the server might
65678    # get launched at the same time before they figure out which instance won.
65679    MS_VALUE=512
65680    if test "$MX_VALUE" -gt "2048"; then
65681      MX_VALUE=2048
65682    fi
65683  else
65684    MS_VALUE=256
65685    if test "$MX_VALUE" -gt "1500"; then
65686      MX_VALUE=1500
65687    fi
65688  fi
65689  if test "$MX_VALUE" -lt "512"; then
65690    MX_VALUE=512
65691  fi
65692
65693  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65694  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65695  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65696  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65697  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65698  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65699    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65700    JVM_ARG_OK=true
65701  else
65702    $ECHO "Arg failed:" >&5
65703    $ECHO "$OUTPUT" >&5
65704    JVM_ARG_OK=false
65705  fi
65706
65707
65708
65709  # Check whether --enable-sjavac was given.
65710if test "${enable_sjavac+set}" = set; then :
65711  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65712else
65713  ENABLE_SJAVAC="no"
65714fi
65715
65716  if test "x$JVM_ARG_OK" = "xfalse"; then
65717    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65718$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65719    ENABLE_SJAVAC="no"
65720  fi
65721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65722$as_echo_n "checking whether to use sjavac... " >&6; }
65723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65724$as_echo "$ENABLE_SJAVAC" >&6; }
65725
65726
65727  # Check whether --enable-javac-server was given.
65728if test "${enable_javac_server+set}" = set; then :
65729  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65730else
65731  ENABLE_JAVAC_SERVER="yes"
65732fi
65733
65734  if test "x$JVM_ARG_OK" = "xfalse"; then
65735    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65736$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65737    ENABLE_JAVAC_SERVER="no"
65738  fi
65739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65740$as_echo_n "checking whether to use javac server... " >&6; }
65741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65742$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65743
65744
65745  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65746    # When using a server javac, the small client instances do not need much
65747    # resources.
65748    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65749  fi
65750
65751
65752# Setup use of icecc if requested
65753
65754  # Check whether --enable-icecc was given.
65755if test "${enable_icecc+set}" = set; then :
65756  enableval=$enable_icecc;
65757fi
65758
65759
65760  if test "x${enable_icecc}" = "xyes"; then
65761
65762
65763
65764  # Publish this variable in the help.
65765
65766
65767  if [ -z "${ICECC_CMD+x}" ]; then
65768    # The variable is not set by user, try to locate tool using the code snippet
65769    for ac_prog in icecc
65770do
65771  # Extract the first word of "$ac_prog", so it can be a program name with args.
65772set dummy $ac_prog; ac_word=$2
65773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65774$as_echo_n "checking for $ac_word... " >&6; }
65775if ${ac_cv_path_ICECC_CMD+:} false; then :
65776  $as_echo_n "(cached) " >&6
65777else
65778  case $ICECC_CMD in
65779  [\\/]* | ?:[\\/]*)
65780  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65781  ;;
65782  *)
65783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65784for as_dir in $PATH
65785do
65786  IFS=$as_save_IFS
65787  test -z "$as_dir" && as_dir=.
65788    for ac_exec_ext in '' $ac_executable_extensions; do
65789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65790    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65792    break 2
65793  fi
65794done
65795  done
65796IFS=$as_save_IFS
65797
65798  ;;
65799esac
65800fi
65801ICECC_CMD=$ac_cv_path_ICECC_CMD
65802if test -n "$ICECC_CMD"; then
65803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65804$as_echo "$ICECC_CMD" >&6; }
65805else
65806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65807$as_echo "no" >&6; }
65808fi
65809
65810
65811  test -n "$ICECC_CMD" && break
65812done
65813
65814  else
65815    # The variable is set, but is it from the command line or the environment?
65816
65817    # Try to remove the string !ICECC_CMD! from our list.
65818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65820      # If it failed, the variable was not from the command line. Ignore it,
65821      # but warn the user (except for BASH, which is always set by the calling BASH).
65822      if test "xICECC_CMD" != xBASH; then
65823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65824$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65825      fi
65826      # Try to locate tool using the code snippet
65827      for ac_prog in icecc
65828do
65829  # Extract the first word of "$ac_prog", so it can be a program name with args.
65830set dummy $ac_prog; ac_word=$2
65831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65832$as_echo_n "checking for $ac_word... " >&6; }
65833if ${ac_cv_path_ICECC_CMD+:} false; then :
65834  $as_echo_n "(cached) " >&6
65835else
65836  case $ICECC_CMD in
65837  [\\/]* | ?:[\\/]*)
65838  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65839  ;;
65840  *)
65841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65842for as_dir in $PATH
65843do
65844  IFS=$as_save_IFS
65845  test -z "$as_dir" && as_dir=.
65846    for ac_exec_ext in '' $ac_executable_extensions; do
65847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65848    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65850    break 2
65851  fi
65852done
65853  done
65854IFS=$as_save_IFS
65855
65856  ;;
65857esac
65858fi
65859ICECC_CMD=$ac_cv_path_ICECC_CMD
65860if test -n "$ICECC_CMD"; then
65861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65862$as_echo "$ICECC_CMD" >&6; }
65863else
65864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65865$as_echo "no" >&6; }
65866fi
65867
65868
65869  test -n "$ICECC_CMD" && break
65870done
65871
65872    else
65873      # If it succeeded, then it was overridden by the user. We will use it
65874      # for the tool.
65875
65876      # First remove it from the list of overridden variables, so we can test
65877      # for unknown variables in the end.
65878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65879
65880      # Check if we try to supply an empty value
65881      if test "x$ICECC_CMD" = x; then
65882        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65883$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65885$as_echo_n "checking for ICECC_CMD... " >&6; }
65886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65887$as_echo "disabled" >&6; }
65888      else
65889        # Check if the provided tool contains a complete path.
65890        tool_specified="$ICECC_CMD"
65891        tool_basename="${tool_specified##*/}"
65892        if test "x$tool_basename" = "x$tool_specified"; then
65893          # A command without a complete path is provided, search $PATH.
65894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65895$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65896          # Extract the first word of "$tool_basename", so it can be a program name with args.
65897set dummy $tool_basename; ac_word=$2
65898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65899$as_echo_n "checking for $ac_word... " >&6; }
65900if ${ac_cv_path_ICECC_CMD+:} false; then :
65901  $as_echo_n "(cached) " >&6
65902else
65903  case $ICECC_CMD in
65904  [\\/]* | ?:[\\/]*)
65905  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65906  ;;
65907  *)
65908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65909for as_dir in $PATH
65910do
65911  IFS=$as_save_IFS
65912  test -z "$as_dir" && as_dir=.
65913    for ac_exec_ext in '' $ac_executable_extensions; do
65914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65915    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65917    break 2
65918  fi
65919done
65920  done
65921IFS=$as_save_IFS
65922
65923  ;;
65924esac
65925fi
65926ICECC_CMD=$ac_cv_path_ICECC_CMD
65927if test -n "$ICECC_CMD"; then
65928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65929$as_echo "$ICECC_CMD" >&6; }
65930else
65931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65932$as_echo "no" >&6; }
65933fi
65934
65935
65936          if test "x$ICECC_CMD" = x; then
65937            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65938          fi
65939        else
65940          # Otherwise we believe it is a complete path. Use it as it is.
65941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65942$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65943          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65944$as_echo_n "checking for ICECC_CMD... " >&6; }
65945          if test ! -x "$tool_specified"; then
65946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65947$as_echo "not found" >&6; }
65948            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65949          fi
65950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65951$as_echo "$tool_specified" >&6; }
65952        fi
65953      fi
65954    fi
65955
65956  fi
65957
65958
65959
65960  if test "x$ICECC_CMD" = x; then
65961    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65962  fi
65963
65964
65965    old_path="$PATH"
65966
65967    # Look for icecc-create-env in some known places
65968    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65969
65970
65971
65972  # Publish this variable in the help.
65973
65974
65975  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65976    # The variable is not set by user, try to locate tool using the code snippet
65977    for ac_prog in icecc-create-env
65978do
65979  # Extract the first word of "$ac_prog", so it can be a program name with args.
65980set dummy $ac_prog; ac_word=$2
65981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65982$as_echo_n "checking for $ac_word... " >&6; }
65983if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65984  $as_echo_n "(cached) " >&6
65985else
65986  case $ICECC_CREATE_ENV in
65987  [\\/]* | ?:[\\/]*)
65988  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65989  ;;
65990  *)
65991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65992for as_dir in $PATH
65993do
65994  IFS=$as_save_IFS
65995  test -z "$as_dir" && as_dir=.
65996    for ac_exec_ext in '' $ac_executable_extensions; do
65997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65998    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66000    break 2
66001  fi
66002done
66003  done
66004IFS=$as_save_IFS
66005
66006  ;;
66007esac
66008fi
66009ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66010if test -n "$ICECC_CREATE_ENV"; then
66011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66012$as_echo "$ICECC_CREATE_ENV" >&6; }
66013else
66014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66015$as_echo "no" >&6; }
66016fi
66017
66018
66019  test -n "$ICECC_CREATE_ENV" && break
66020done
66021
66022  else
66023    # The variable is set, but is it from the command line or the environment?
66024
66025    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66028      # If it failed, the variable was not from the command line. Ignore it,
66029      # but warn the user (except for BASH, which is always set by the calling BASH).
66030      if test "xICECC_CREATE_ENV" != xBASH; then
66031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66032$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66033      fi
66034      # Try to locate tool using the code snippet
66035      for ac_prog in icecc-create-env
66036do
66037  # Extract the first word of "$ac_prog", so it can be a program name with args.
66038set dummy $ac_prog; ac_word=$2
66039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66040$as_echo_n "checking for $ac_word... " >&6; }
66041if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66042  $as_echo_n "(cached) " >&6
66043else
66044  case $ICECC_CREATE_ENV in
66045  [\\/]* | ?:[\\/]*)
66046  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66047  ;;
66048  *)
66049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66050for as_dir in $PATH
66051do
66052  IFS=$as_save_IFS
66053  test -z "$as_dir" && as_dir=.
66054    for ac_exec_ext in '' $ac_executable_extensions; do
66055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66056    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66058    break 2
66059  fi
66060done
66061  done
66062IFS=$as_save_IFS
66063
66064  ;;
66065esac
66066fi
66067ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66068if test -n "$ICECC_CREATE_ENV"; then
66069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66070$as_echo "$ICECC_CREATE_ENV" >&6; }
66071else
66072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66073$as_echo "no" >&6; }
66074fi
66075
66076
66077  test -n "$ICECC_CREATE_ENV" && break
66078done
66079
66080    else
66081      # If it succeeded, then it was overridden by the user. We will use it
66082      # for the tool.
66083
66084      # First remove it from the list of overridden variables, so we can test
66085      # for unknown variables in the end.
66086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66087
66088      # Check if we try to supply an empty value
66089      if test "x$ICECC_CREATE_ENV" = x; then
66090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66091$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66093$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66095$as_echo "disabled" >&6; }
66096      else
66097        # Check if the provided tool contains a complete path.
66098        tool_specified="$ICECC_CREATE_ENV"
66099        tool_basename="${tool_specified##*/}"
66100        if test "x$tool_basename" = "x$tool_specified"; then
66101          # A command without a complete path is provided, search $PATH.
66102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66103$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66104          # Extract the first word of "$tool_basename", so it can be a program name with args.
66105set dummy $tool_basename; ac_word=$2
66106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66107$as_echo_n "checking for $ac_word... " >&6; }
66108if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66109  $as_echo_n "(cached) " >&6
66110else
66111  case $ICECC_CREATE_ENV in
66112  [\\/]* | ?:[\\/]*)
66113  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66114  ;;
66115  *)
66116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66117for as_dir in $PATH
66118do
66119  IFS=$as_save_IFS
66120  test -z "$as_dir" && as_dir=.
66121    for ac_exec_ext in '' $ac_executable_extensions; do
66122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66123    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66125    break 2
66126  fi
66127done
66128  done
66129IFS=$as_save_IFS
66130
66131  ;;
66132esac
66133fi
66134ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66135if test -n "$ICECC_CREATE_ENV"; then
66136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66137$as_echo "$ICECC_CREATE_ENV" >&6; }
66138else
66139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66140$as_echo "no" >&6; }
66141fi
66142
66143
66144          if test "x$ICECC_CREATE_ENV" = x; then
66145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66146          fi
66147        else
66148          # Otherwise we believe it is a complete path. Use it as it is.
66149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66150$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66152$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66153          if test ! -x "$tool_specified"; then
66154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66155$as_echo "not found" >&6; }
66156            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66157          fi
66158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66159$as_echo "$tool_specified" >&6; }
66160        fi
66161      fi
66162    fi
66163
66164  fi
66165
66166
66167
66168  if test "x$ICECC_CREATE_ENV" = x; then
66169    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66170  fi
66171
66172
66173    # Use icecc-create-env to create a minimal compilation environment that can
66174    # be sent to the other hosts in the icecream cluster.
66175    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66176    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66177    # Older versions of icecc does not have the --gcc parameter
66178    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66179      icecc_gcc_arg="--gcc"
66180    fi
66181    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66182
66183  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66184      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66185          ${icecc_create_env_log} 2>&1 )
66186  if test "$?" != "0"; then
66187    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66188$as_echo "$as_me: icecc-create-env output:" >&6;}
66189    cat \
66190          ${icecc_create_env_log}
66191    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66192  fi
66193
66194    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66195      # For clang, the icecc compilerwrapper is needed. It usually resides next
66196      # to icecc-create-env.
66197
66198
66199
66200  # Publish this variable in the help.
66201
66202
66203  if [ -z "${ICECC_WRAPPER+x}" ]; then
66204    # The variable is not set by user, try to locate tool using the code snippet
66205    for ac_prog in compilerwrapper
66206do
66207  # Extract the first word of "$ac_prog", so it can be a program name with args.
66208set dummy $ac_prog; ac_word=$2
66209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66210$as_echo_n "checking for $ac_word... " >&6; }
66211if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66212  $as_echo_n "(cached) " >&6
66213else
66214  case $ICECC_WRAPPER in
66215  [\\/]* | ?:[\\/]*)
66216  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66217  ;;
66218  *)
66219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66220for as_dir in $PATH
66221do
66222  IFS=$as_save_IFS
66223  test -z "$as_dir" && as_dir=.
66224    for ac_exec_ext in '' $ac_executable_extensions; do
66225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66226    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66228    break 2
66229  fi
66230done
66231  done
66232IFS=$as_save_IFS
66233
66234  ;;
66235esac
66236fi
66237ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66238if test -n "$ICECC_WRAPPER"; then
66239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66240$as_echo "$ICECC_WRAPPER" >&6; }
66241else
66242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66243$as_echo "no" >&6; }
66244fi
66245
66246
66247  test -n "$ICECC_WRAPPER" && break
66248done
66249
66250  else
66251    # The variable is set, but is it from the command line or the environment?
66252
66253    # Try to remove the string !ICECC_WRAPPER! from our list.
66254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66256      # If it failed, the variable was not from the command line. Ignore it,
66257      # but warn the user (except for BASH, which is always set by the calling BASH).
66258      if test "xICECC_WRAPPER" != xBASH; then
66259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66260$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66261      fi
66262      # Try to locate tool using the code snippet
66263      for ac_prog in compilerwrapper
66264do
66265  # Extract the first word of "$ac_prog", so it can be a program name with args.
66266set dummy $ac_prog; ac_word=$2
66267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66268$as_echo_n "checking for $ac_word... " >&6; }
66269if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66270  $as_echo_n "(cached) " >&6
66271else
66272  case $ICECC_WRAPPER in
66273  [\\/]* | ?:[\\/]*)
66274  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66275  ;;
66276  *)
66277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66278for as_dir in $PATH
66279do
66280  IFS=$as_save_IFS
66281  test -z "$as_dir" && as_dir=.
66282    for ac_exec_ext in '' $ac_executable_extensions; do
66283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66284    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66286    break 2
66287  fi
66288done
66289  done
66290IFS=$as_save_IFS
66291
66292  ;;
66293esac
66294fi
66295ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66296if test -n "$ICECC_WRAPPER"; then
66297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66298$as_echo "$ICECC_WRAPPER" >&6; }
66299else
66300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66301$as_echo "no" >&6; }
66302fi
66303
66304
66305  test -n "$ICECC_WRAPPER" && break
66306done
66307
66308    else
66309      # If it succeeded, then it was overridden by the user. We will use it
66310      # for the tool.
66311
66312      # First remove it from the list of overridden variables, so we can test
66313      # for unknown variables in the end.
66314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66315
66316      # Check if we try to supply an empty value
66317      if test "x$ICECC_WRAPPER" = x; then
66318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66319$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66321$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66323$as_echo "disabled" >&6; }
66324      else
66325        # Check if the provided tool contains a complete path.
66326        tool_specified="$ICECC_WRAPPER"
66327        tool_basename="${tool_specified##*/}"
66328        if test "x$tool_basename" = "x$tool_specified"; then
66329          # A command without a complete path is provided, search $PATH.
66330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66331$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66332          # Extract the first word of "$tool_basename", so it can be a program name with args.
66333set dummy $tool_basename; ac_word=$2
66334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66335$as_echo_n "checking for $ac_word... " >&6; }
66336if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66337  $as_echo_n "(cached) " >&6
66338else
66339  case $ICECC_WRAPPER in
66340  [\\/]* | ?:[\\/]*)
66341  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66342  ;;
66343  *)
66344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66345for as_dir in $PATH
66346do
66347  IFS=$as_save_IFS
66348  test -z "$as_dir" && as_dir=.
66349    for ac_exec_ext in '' $ac_executable_extensions; do
66350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66351    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66353    break 2
66354  fi
66355done
66356  done
66357IFS=$as_save_IFS
66358
66359  ;;
66360esac
66361fi
66362ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66363if test -n "$ICECC_WRAPPER"; then
66364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66365$as_echo "$ICECC_WRAPPER" >&6; }
66366else
66367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66368$as_echo "no" >&6; }
66369fi
66370
66371
66372          if test "x$ICECC_WRAPPER" = x; then
66373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66374          fi
66375        else
66376          # Otherwise we believe it is a complete path. Use it as it is.
66377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66378$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66380$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66381          if test ! -x "$tool_specified"; then
66382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66383$as_echo "not found" >&6; }
66384            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66385          fi
66386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66387$as_echo "$tool_specified" >&6; }
66388        fi
66389      fi
66390    fi
66391
66392  fi
66393
66394
66395
66396  if test "x$ICECC_WRAPPER" = x; then
66397    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66398  fi
66399
66400
66401
66402  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66403      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66404  if test "$?" != "0"; then
66405    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66406$as_echo "$as_me: icecc-create-env output:" >&6;}
66407    cat ${icecc_create_env_log}
66408    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66409  fi
66410
66411    else
66412      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66413    fi
66414    PATH="$old_path"
66415    # The bundle with the compiler gets a name based on checksums. Parse log file
66416    # to find it.
66417    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66418    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66419    if test ! -f ${ICECC_ENV_BUNDLE}; then
66420      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66421    fi
66422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66423$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66425$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66426    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66427
66428    if test "x${COMPILE_TYPE}" = "xcross"; then
66429      # If cross compiling, create a separate env package for the build compiler
66430      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66431      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66432      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66433
66434  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66435      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66436            ${icecc_create_env_log_build} 2>&1 )
66437  if test "$?" != "0"; then
66438    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66439$as_echo "$as_me: icecc-create-env output:" >&6;}
66440    cat \
66441            ${icecc_create_env_log_build}
66442    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66443  fi
66444
66445      elif test "x${BUILD_CC##*/}" = "xclang"; then
66446
66447  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66448      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66449  if test "$?" != "0"; then
66450    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66451$as_echo "$as_me: icecc-create-env output:" >&6;}
66452    cat ${icecc_create_env_log_build}
66453    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66454  fi
66455
66456      else
66457        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66458      fi
66459      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66460      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66461      if test ! -f ${ICECC_ENV_BUNDLE}; then
66462        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66463      fi
66464      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66465$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66467$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66468      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66469          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66470    else
66471      BUILD_ICECC="${ICECC}"
66472    fi
66473
66474
66475  fi
66476
66477
66478# Can the C/C++ compiler use precompiled headers?
66479
66480
66481  ###############################################################################
66482  #
66483  # Can the C/C++ compiler use precompiled headers?
66484  #
66485  # Check whether --enable-precompiled-headers was given.
66486if test "${enable_precompiled_headers+set}" = set; then :
66487  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66488else
66489  ENABLE_PRECOMPH=yes
66490fi
66491
66492
66493  USE_PRECOMPILED_HEADER=true
66494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66495$as_echo_n "checking If precompiled header is enabled... " >&6; }
66496  if test "x$ENABLE_PRECOMPH" = xno; then
66497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66498$as_echo "no, forced" >&6; }
66499    USE_PRECOMPILED_HEADER=false
66500  elif test "x$ICECC" != "x"; then
66501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66502$as_echo "no, does not work effectively with icecc" >&6; }
66503    USE_PRECOMPILED_HEADER=false
66504  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66506$as_echo "no, does not work with Solaris Studio" >&6; }
66507    USE_PRECOMPILED_HEADER=false
66508  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66510$as_echo "no, does not work with xlc" >&6; }
66511    USE_PRECOMPILED_HEADER=false
66512  else
66513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66514$as_echo "yes" >&6; }
66515  fi
66516
66517  if test "x$ENABLE_PRECOMPH" = xyes; then
66518    # Check that the compiler actually supports precomp headers.
66519    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66521$as_echo_n "checking that precompiled headers work... " >&6; }
66522      echo "int alfa();" > conftest.h
66523      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66524      if test ! -f conftest.hpp.gch; then
66525        USE_PRECOMPILED_HEADER=false
66526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66527$as_echo "no" >&6; }
66528      else
66529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66530$as_echo "yes" >&6; }
66531      fi
66532      $RM conftest.h conftest.hpp.gch
66533    fi
66534  fi
66535
66536
66537
66538
66539# Setup use of ccache, if available
66540
66541  # Check whether --enable-ccache was given.
66542if test "${enable_ccache+set}" = set; then :
66543  enableval=$enable_ccache;
66544fi
66545
66546
66547  CCACHE_STATUS=
66548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66549$as_echo_n "checking is ccache enabled... " >&6; }
66550  if test "x$enable_ccache" = xyes; then
66551    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66553$as_echo "yes" >&6; }
66554      OLD_PATH="$PATH"
66555      if test "x$TOOLCHAIN_PATH" != x; then
66556        PATH=$TOOLCHAIN_PATH:$PATH
66557      fi
66558
66559
66560
66561  # Publish this variable in the help.
66562
66563
66564  if [ -z "${CCACHE+x}" ]; then
66565    # The variable is not set by user, try to locate tool using the code snippet
66566    for ac_prog in ccache
66567do
66568  # Extract the first word of "$ac_prog", so it can be a program name with args.
66569set dummy $ac_prog; ac_word=$2
66570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66571$as_echo_n "checking for $ac_word... " >&6; }
66572if ${ac_cv_path_CCACHE+:} false; then :
66573  $as_echo_n "(cached) " >&6
66574else
66575  case $CCACHE in
66576  [\\/]* | ?:[\\/]*)
66577  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66578  ;;
66579  *)
66580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66581for as_dir in $PATH
66582do
66583  IFS=$as_save_IFS
66584  test -z "$as_dir" && as_dir=.
66585    for ac_exec_ext in '' $ac_executable_extensions; do
66586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66587    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66589    break 2
66590  fi
66591done
66592  done
66593IFS=$as_save_IFS
66594
66595  ;;
66596esac
66597fi
66598CCACHE=$ac_cv_path_CCACHE
66599if test -n "$CCACHE"; then
66600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66601$as_echo "$CCACHE" >&6; }
66602else
66603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66604$as_echo "no" >&6; }
66605fi
66606
66607
66608  test -n "$CCACHE" && break
66609done
66610
66611  else
66612    # The variable is set, but is it from the command line or the environment?
66613
66614    # Try to remove the string !CCACHE! from our list.
66615    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66616    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66617      # If it failed, the variable was not from the command line. Ignore it,
66618      # but warn the user (except for BASH, which is always set by the calling BASH).
66619      if test "xCCACHE" != xBASH; then
66620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66621$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66622      fi
66623      # Try to locate tool using the code snippet
66624      for ac_prog in ccache
66625do
66626  # Extract the first word of "$ac_prog", so it can be a program name with args.
66627set dummy $ac_prog; ac_word=$2
66628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66629$as_echo_n "checking for $ac_word... " >&6; }
66630if ${ac_cv_path_CCACHE+:} false; then :
66631  $as_echo_n "(cached) " >&6
66632else
66633  case $CCACHE in
66634  [\\/]* | ?:[\\/]*)
66635  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66636  ;;
66637  *)
66638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66639for as_dir in $PATH
66640do
66641  IFS=$as_save_IFS
66642  test -z "$as_dir" && as_dir=.
66643    for ac_exec_ext in '' $ac_executable_extensions; do
66644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66645    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66647    break 2
66648  fi
66649done
66650  done
66651IFS=$as_save_IFS
66652
66653  ;;
66654esac
66655fi
66656CCACHE=$ac_cv_path_CCACHE
66657if test -n "$CCACHE"; then
66658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66659$as_echo "$CCACHE" >&6; }
66660else
66661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66662$as_echo "no" >&6; }
66663fi
66664
66665
66666  test -n "$CCACHE" && break
66667done
66668
66669    else
66670      # If it succeeded, then it was overridden by the user. We will use it
66671      # for the tool.
66672
66673      # First remove it from the list of overridden variables, so we can test
66674      # for unknown variables in the end.
66675      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66676
66677      # Check if we try to supply an empty value
66678      if test "x$CCACHE" = x; then
66679        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66680$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66682$as_echo_n "checking for CCACHE... " >&6; }
66683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66684$as_echo "disabled" >&6; }
66685      else
66686        # Check if the provided tool contains a complete path.
66687        tool_specified="$CCACHE"
66688        tool_basename="${tool_specified##*/}"
66689        if test "x$tool_basename" = "x$tool_specified"; then
66690          # A command without a complete path is provided, search $PATH.
66691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66692$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66693          # Extract the first word of "$tool_basename", so it can be a program name with args.
66694set dummy $tool_basename; ac_word=$2
66695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66696$as_echo_n "checking for $ac_word... " >&6; }
66697if ${ac_cv_path_CCACHE+:} false; then :
66698  $as_echo_n "(cached) " >&6
66699else
66700  case $CCACHE in
66701  [\\/]* | ?:[\\/]*)
66702  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66703  ;;
66704  *)
66705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66706for as_dir in $PATH
66707do
66708  IFS=$as_save_IFS
66709  test -z "$as_dir" && as_dir=.
66710    for ac_exec_ext in '' $ac_executable_extensions; do
66711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66712    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66714    break 2
66715  fi
66716done
66717  done
66718IFS=$as_save_IFS
66719
66720  ;;
66721esac
66722fi
66723CCACHE=$ac_cv_path_CCACHE
66724if test -n "$CCACHE"; then
66725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66726$as_echo "$CCACHE" >&6; }
66727else
66728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66729$as_echo "no" >&6; }
66730fi
66731
66732
66733          if test "x$CCACHE" = x; then
66734            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66735          fi
66736        else
66737          # Otherwise we believe it is a complete path. Use it as it is.
66738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66739$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66740          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66741$as_echo_n "checking for CCACHE... " >&6; }
66742          if test ! -x "$tool_specified"; then
66743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66744$as_echo "not found" >&6; }
66745            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66746          fi
66747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66748$as_echo "$tool_specified" >&6; }
66749        fi
66750      fi
66751    fi
66752
66753  fi
66754
66755
66756
66757  if test "x$CCACHE" = x; then
66758    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66759  fi
66760
66761
66762      PATH="$OLD_PATH"
66763      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66764      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66765    else
66766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66767$as_echo "no" >&6; }
66768      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66769$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66770    fi
66771  elif test "x$enable_ccache" = xno; then
66772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66773$as_echo "no, explicitly disabled" >&6; }
66774    CCACHE_STATUS="Disabled"
66775  elif test "x$enable_ccache" = x; then
66776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66777$as_echo "no" >&6; }
66778  else
66779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66780$as_echo "unknown" >&6; }
66781    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66782  fi
66783
66784
66785
66786# Check whether --with-ccache-dir was given.
66787if test "${with_ccache_dir+set}" = set; then :
66788  withval=$with_ccache_dir;
66789fi
66790
66791
66792  if test "x$with_ccache_dir" != x; then
66793    # When using a non home ccache directory, assume the use is to share ccache files
66794    # with other users. Thus change the umask.
66795    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66796    if test "x$CCACHE" = x; then
66797      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66798$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66799    fi
66800  fi
66801
66802  if test "x$CCACHE" != x; then
66803
66804  if test "x$CCACHE" != x; then
66805    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66806      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66807          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66808      if test "x$HAS_BAD_CCACHE" != "x"; then
66809        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66810      fi
66811    fi
66812    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66813      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66814          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66815      if test "x$HAS_BAD_CCACHE" != "x"; then
66816        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66817      fi
66818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66819$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66820      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66821      PUSHED_FLAGS="$CXXFLAGS"
66822      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66823      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66824/* end confdefs.h.  */
66825
66826int
66827main ()
66828{
66829
66830  ;
66831  return 0;
66832}
66833_ACEOF
66834if ac_fn_cxx_try_compile "$LINENO"; then :
66835  CC_KNOWS_CCACHE_TRICK=yes
66836else
66837  CC_KNOWS_CCACHE_TRICK=no
66838fi
66839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66840      CXXFLAGS="$PUSHED_FLAGS"
66841      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66843$as_echo "yes" >&6; }
66844        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66845
66846        CCACHE_SLOPPINESS=pch_defines,time_macros
66847      else
66848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66849$as_echo "no" >&6; }
66850        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66851      fi
66852    fi
66853
66854    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66855        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66856
66857    if test "x$SET_CCACHE_DIR" != x; then
66858      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66859      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66860    fi
66861  fi
66862
66863  fi
66864
66865
66866###############################################################################
66867#
66868# And now the finish...
66869#
66870###############################################################################
66871
66872# Check for some common pitfalls
66873
66874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66875    file_to_test="$SRC_ROOT/LICENSE"
66876    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66877      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
66878    fi
66879  fi
66880
66881
66882  # Did user specify any unknown variables?
66883
66884  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66885    # Replace the separating ! with spaces before presenting for end user.
66886    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66887    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66888$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66889  fi
66890
66891
66892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66893$as_echo_n "checking if build directory is on local disk... " >&6; }
66894
66895  # df -l lists only local disks; if the given directory is not found then
66896  # a non-zero exit code is given
66897  if test "x$DF" = x; then
66898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66899      # msys does not have df; use Windows "net use" instead.
66900      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66901      if test "x$IS_NETWORK_DISK" = x; then
66902        OUTPUT_DIR_IS_LOCAL="yes"
66903      else
66904        OUTPUT_DIR_IS_LOCAL="no"
66905      fi
66906    else
66907      # No df here, say it's local
66908      OUTPUT_DIR_IS_LOCAL="yes"
66909    fi
66910  else
66911    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66912      OUTPUT_DIR_IS_LOCAL="yes"
66913    else
66914      OUTPUT_DIR_IS_LOCAL="no"
66915    fi
66916  fi
66917
66918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66919$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66920
66921
66922
66923  # Check if the user has any old-style ALT_ variables set.
66924  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66925
66926  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66927  # Since we can't properly handle the dependencies for this, warn the user about the situation
66928  if test -e $OUTPUT_ROOT/spec.gmk; then
66929    IS_RECONFIGURE=yes
66930  else
66931    IS_RECONFIGURE=no
66932  fi
66933
66934
66935# At the end, call the custom hook. (Dummy macro if no custom sources available)
66936
66937
66938# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66939
66940  # Keep feature lists sorted and free of duplicates
66941  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66942  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66943  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66944  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66945  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66946  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66947  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66948
66949  # Validate features
66950  for variant in $JVM_VARIANTS; do
66951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66952$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66953    features_var_name=JVM_FEATURES_$variant
66954    JVM_FEATURES_TO_TEST=${!features_var_name}
66955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66956$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66957    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66958    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66959    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66960    if test "x$INVALID_FEATURES" != x; then
66961      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66962    fi
66963  done
66964
66965
66966# We're messing a bit with internal autoconf variables to put the config.status
66967# in the output directory instead of the current directory.
66968CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66969
66970# Create the actual output files. Now the main work of configure is done.
66971cat >confcache <<\_ACEOF
66972# This file is a shell script that caches the results of configure
66973# tests run on this system so they can be shared between configure
66974# scripts and configure runs, see configure's option --config-cache.
66975# It is not useful on other systems.  If it contains results you don't
66976# want to keep, you may remove or edit it.
66977#
66978# config.status only pays attention to the cache file if you give it
66979# the --recheck option to rerun configure.
66980#
66981# `ac_cv_env_foo' variables (set or unset) will be overridden when
66982# loading this file, other *unset* `ac_cv_foo' will be assigned the
66983# following values.
66984
66985_ACEOF
66986
66987# The following way of writing the cache mishandles newlines in values,
66988# but we know of no workaround that is simple, portable, and efficient.
66989# So, we kill variables containing newlines.
66990# Ultrix sh set writes to stderr and can't be redirected directly,
66991# and sets the high bit in the cache file unless we assign to the vars.
66992(
66993  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66994    eval ac_val=\$$ac_var
66995    case $ac_val in #(
66996    *${as_nl}*)
66997      case $ac_var in #(
66998      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66999$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67000      esac
67001      case $ac_var in #(
67002      _ | IFS | as_nl) ;; #(
67003      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67004      *) { eval $ac_var=; unset $ac_var;} ;;
67005      esac ;;
67006    esac
67007  done
67008
67009  (set) 2>&1 |
67010    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67011    *${as_nl}ac_space=\ *)
67012      # `set' does not quote correctly, so add quotes: double-quote
67013      # substitution turns \\\\ into \\, and sed turns \\ into \.
67014      sed -n \
67015	"s/'/'\\\\''/g;
67016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67017      ;; #(
67018    *)
67019      # `set' quotes correctly as required by POSIX, so do not add quotes.
67020      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67021      ;;
67022    esac |
67023    sort
67024) |
67025  sed '
67026     /^ac_cv_env_/b end
67027     t clear
67028     :clear
67029     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67030     t end
67031     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67032     :end' >>confcache
67033if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67034  if test -w "$cache_file"; then
67035    if test "x$cache_file" != "x/dev/null"; then
67036      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67037$as_echo "$as_me: updating cache $cache_file" >&6;}
67038      if test ! -f "$cache_file" || test -h "$cache_file"; then
67039	cat confcache >"$cache_file"
67040      else
67041        case $cache_file in #(
67042        */* | ?:*)
67043	  mv -f confcache "$cache_file"$$ &&
67044	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67045        *)
67046	  mv -f confcache "$cache_file" ;;
67047	esac
67048      fi
67049    fi
67050  else
67051    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67052$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67053  fi
67054fi
67055rm -f confcache
67056
67057test "x$prefix" = xNONE && prefix=$ac_default_prefix
67058# Let make expand exec_prefix.
67059test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67060
67061# Transform confdefs.h into DEFS.
67062# Protect against shell expansion while executing Makefile rules.
67063# Protect against Makefile macro expansion.
67064#
67065# If the first sed substitution is executed (which looks for macros that
67066# take arguments), then branch to the quote section.  Otherwise,
67067# look for a macro that doesn't take arguments.
67068ac_script='
67069:mline
67070/\\$/{
67071 N
67072 s,\\\n,,
67073 b mline
67074}
67075t clear
67076:clear
67077s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67078t quote
67079s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67080t quote
67081b any
67082:quote
67083s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67084s/\[/\\&/g
67085s/\]/\\&/g
67086s/\$/$$/g
67087H
67088:any
67089${
67090	g
67091	s/^\n//
67092	s/\n/ /g
67093	p
67094}
67095'
67096DEFS=`sed -n "$ac_script" confdefs.h`
67097
67098
67099ac_libobjs=
67100ac_ltlibobjs=
67101U=
67102for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67103  # 1. Remove the extension, and $U if already installed.
67104  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67105  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67106  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67107  #    will be set to the directory where LIBOBJS objects are built.
67108  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67109  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67110done
67111LIBOBJS=$ac_libobjs
67112
67113LTLIBOBJS=$ac_ltlibobjs
67114
67115
67116
67117: "${CONFIG_STATUS=./config.status}"
67118ac_write_fail=0
67119ac_clean_files_save=$ac_clean_files
67120ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67121{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67122$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67123as_write_fail=0
67124cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67125#! $SHELL
67126# Generated by $as_me.
67127# Run this file to recreate the current configuration.
67128# Compiler output produced by configure, useful for debugging
67129# configure, is in config.log if it exists.
67130
67131debug=false
67132ac_cs_recheck=false
67133ac_cs_silent=false
67134
67135SHELL=\${CONFIG_SHELL-$SHELL}
67136export SHELL
67137_ASEOF
67138cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67139## -------------------- ##
67140## M4sh Initialization. ##
67141## -------------------- ##
67142
67143# Be more Bourne compatible
67144DUALCASE=1; export DUALCASE # for MKS sh
67145if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67146  emulate sh
67147  NULLCMD=:
67148  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67149  # is contrary to our usage.  Disable this feature.
67150  alias -g '${1+"$@"}'='"$@"'
67151  setopt NO_GLOB_SUBST
67152else
67153  case `(set -o) 2>/dev/null` in #(
67154  *posix*) :
67155    set -o posix ;; #(
67156  *) :
67157     ;;
67158esac
67159fi
67160
67161
67162as_nl='
67163'
67164export as_nl
67165# Printing a long string crashes Solaris 7 /usr/bin/printf.
67166as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67167as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67168as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67169# Prefer a ksh shell builtin over an external printf program on Solaris,
67170# but without wasting forks for bash or zsh.
67171if test -z "$BASH_VERSION$ZSH_VERSION" \
67172    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67173  as_echo='print -r --'
67174  as_echo_n='print -rn --'
67175elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67176  as_echo='printf %s\n'
67177  as_echo_n='printf %s'
67178else
67179  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67180    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67181    as_echo_n='/usr/ucb/echo -n'
67182  else
67183    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67184    as_echo_n_body='eval
67185      arg=$1;
67186      case $arg in #(
67187      *"$as_nl"*)
67188	expr "X$arg" : "X\\(.*\\)$as_nl";
67189	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67190      esac;
67191      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67192    '
67193    export as_echo_n_body
67194    as_echo_n='sh -c $as_echo_n_body as_echo'
67195  fi
67196  export as_echo_body
67197  as_echo='sh -c $as_echo_body as_echo'
67198fi
67199
67200# The user is always right.
67201if test "${PATH_SEPARATOR+set}" != set; then
67202  PATH_SEPARATOR=:
67203  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67204    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67205      PATH_SEPARATOR=';'
67206  }
67207fi
67208
67209
67210# IFS
67211# We need space, tab and new line, in precisely that order.  Quoting is
67212# there to prevent editors from complaining about space-tab.
67213# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67214# splitting by setting IFS to empty value.)
67215IFS=" ""	$as_nl"
67216
67217# Find who we are.  Look in the path if we contain no directory separator.
67218as_myself=
67219case $0 in #((
67220  *[\\/]* ) as_myself=$0 ;;
67221  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67222for as_dir in $PATH
67223do
67224  IFS=$as_save_IFS
67225  test -z "$as_dir" && as_dir=.
67226    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67227  done
67228IFS=$as_save_IFS
67229
67230     ;;
67231esac
67232# We did not find ourselves, most probably we were run as `sh COMMAND'
67233# in which case we are not to be found in the path.
67234if test "x$as_myself" = x; then
67235  as_myself=$0
67236fi
67237if test ! -f "$as_myself"; then
67238  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67239  exit 1
67240fi
67241
67242# Unset variables that we do not need and which cause bugs (e.g. in
67243# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67244# suppresses any "Segmentation fault" message there.  '((' could
67245# trigger a bug in pdksh 5.2.14.
67246for as_var in BASH_ENV ENV MAIL MAILPATH
67247do eval test x\${$as_var+set} = xset \
67248  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67249done
67250PS1='$ '
67251PS2='> '
67252PS4='+ '
67253
67254# NLS nuisances.
67255LC_ALL=C
67256export LC_ALL
67257LANGUAGE=C
67258export LANGUAGE
67259
67260# CDPATH.
67261(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67262
67263
67264# as_fn_error STATUS ERROR [LINENO LOG_FD]
67265# ----------------------------------------
67266# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67267# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67268# script with STATUS, using 1 if that was 0.
67269as_fn_error ()
67270{
67271  as_status=$1; test $as_status -eq 0 && as_status=1
67272  if test "$4"; then
67273    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67274    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67275  fi
67276  $as_echo "$as_me: error: $2" >&2
67277  as_fn_exit $as_status
67278} # as_fn_error
67279
67280
67281# as_fn_set_status STATUS
67282# -----------------------
67283# Set $? to STATUS, without forking.
67284as_fn_set_status ()
67285{
67286  return $1
67287} # as_fn_set_status
67288
67289# as_fn_exit STATUS
67290# -----------------
67291# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67292as_fn_exit ()
67293{
67294  set +e
67295  as_fn_set_status $1
67296  exit $1
67297} # as_fn_exit
67298
67299# as_fn_unset VAR
67300# ---------------
67301# Portably unset VAR.
67302as_fn_unset ()
67303{
67304  { eval $1=; unset $1;}
67305}
67306as_unset=as_fn_unset
67307# as_fn_append VAR VALUE
67308# ----------------------
67309# Append the text in VALUE to the end of the definition contained in VAR. Take
67310# advantage of any shell optimizations that allow amortized linear growth over
67311# repeated appends, instead of the typical quadratic growth present in naive
67312# implementations.
67313if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67314  eval 'as_fn_append ()
67315  {
67316    eval $1+=\$2
67317  }'
67318else
67319  as_fn_append ()
67320  {
67321    eval $1=\$$1\$2
67322  }
67323fi # as_fn_append
67324
67325# as_fn_arith ARG...
67326# ------------------
67327# Perform arithmetic evaluation on the ARGs, and store the result in the
67328# global $as_val. Take advantage of shells that can avoid forks. The arguments
67329# must be portable across $(()) and expr.
67330if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67331  eval 'as_fn_arith ()
67332  {
67333    as_val=$(( $* ))
67334  }'
67335else
67336  as_fn_arith ()
67337  {
67338    as_val=`expr "$@" || test $? -eq 1`
67339  }
67340fi # as_fn_arith
67341
67342
67343if expr a : '\(a\)' >/dev/null 2>&1 &&
67344   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67345  as_expr=expr
67346else
67347  as_expr=false
67348fi
67349
67350if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67351  as_basename=basename
67352else
67353  as_basename=false
67354fi
67355
67356if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67357  as_dirname=dirname
67358else
67359  as_dirname=false
67360fi
67361
67362as_me=`$as_basename -- "$0" ||
67363$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67364	 X"$0" : 'X\(//\)$' \| \
67365	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67366$as_echo X/"$0" |
67367    sed '/^.*\/\([^/][^/]*\)\/*$/{
67368	    s//\1/
67369	    q
67370	  }
67371	  /^X\/\(\/\/\)$/{
67372	    s//\1/
67373	    q
67374	  }
67375	  /^X\/\(\/\).*/{
67376	    s//\1/
67377	    q
67378	  }
67379	  s/.*/./; q'`
67380
67381# Avoid depending upon Character Ranges.
67382as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67383as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67384as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67385as_cr_digits='0123456789'
67386as_cr_alnum=$as_cr_Letters$as_cr_digits
67387
67388ECHO_C= ECHO_N= ECHO_T=
67389case `echo -n x` in #(((((
67390-n*)
67391  case `echo 'xy\c'` in
67392  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67393  xy)  ECHO_C='\c';;
67394  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67395       ECHO_T='	';;
67396  esac;;
67397*)
67398  ECHO_N='-n';;
67399esac
67400
67401rm -f conf$$ conf$$.exe conf$$.file
67402if test -d conf$$.dir; then
67403  rm -f conf$$.dir/conf$$.file
67404else
67405  rm -f conf$$.dir
67406  mkdir conf$$.dir 2>/dev/null
67407fi
67408if (echo >conf$$.file) 2>/dev/null; then
67409  if ln -s conf$$.file conf$$ 2>/dev/null; then
67410    as_ln_s='ln -s'
67411    # ... but there are two gotchas:
67412    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67413    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67414    # In both cases, we have to default to `cp -pR'.
67415    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67416      as_ln_s='cp -pR'
67417  elif ln conf$$.file conf$$ 2>/dev/null; then
67418    as_ln_s=ln
67419  else
67420    as_ln_s='cp -pR'
67421  fi
67422else
67423  as_ln_s='cp -pR'
67424fi
67425rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67426rmdir conf$$.dir 2>/dev/null
67427
67428
67429# as_fn_mkdir_p
67430# -------------
67431# Create "$as_dir" as a directory, including parents if necessary.
67432as_fn_mkdir_p ()
67433{
67434
67435  case $as_dir in #(
67436  -*) as_dir=./$as_dir;;
67437  esac
67438  test -d "$as_dir" || eval $as_mkdir_p || {
67439    as_dirs=
67440    while :; do
67441      case $as_dir in #(
67442      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67443      *) as_qdir=$as_dir;;
67444      esac
67445      as_dirs="'$as_qdir' $as_dirs"
67446      as_dir=`$as_dirname -- "$as_dir" ||
67447$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67448	 X"$as_dir" : 'X\(//\)[^/]' \| \
67449	 X"$as_dir" : 'X\(//\)$' \| \
67450	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67451$as_echo X"$as_dir" |
67452    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67453	    s//\1/
67454	    q
67455	  }
67456	  /^X\(\/\/\)[^/].*/{
67457	    s//\1/
67458	    q
67459	  }
67460	  /^X\(\/\/\)$/{
67461	    s//\1/
67462	    q
67463	  }
67464	  /^X\(\/\).*/{
67465	    s//\1/
67466	    q
67467	  }
67468	  s/.*/./; q'`
67469      test -d "$as_dir" && break
67470    done
67471    test -z "$as_dirs" || eval "mkdir $as_dirs"
67472  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67473
67474
67475} # as_fn_mkdir_p
67476if mkdir -p . 2>/dev/null; then
67477  as_mkdir_p='mkdir -p "$as_dir"'
67478else
67479  test -d ./-p && rmdir ./-p
67480  as_mkdir_p=false
67481fi
67482
67483
67484# as_fn_executable_p FILE
67485# -----------------------
67486# Test if FILE is an executable regular file.
67487as_fn_executable_p ()
67488{
67489  test -f "$1" && test -x "$1"
67490} # as_fn_executable_p
67491as_test_x='test -x'
67492as_executable_p=as_fn_executable_p
67493
67494# Sed expression to map a string onto a valid CPP name.
67495as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67496
67497# Sed expression to map a string onto a valid variable name.
67498as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67499
67500
67501exec 6>&1
67502## ----------------------------------- ##
67503## Main body of $CONFIG_STATUS script. ##
67504## ----------------------------------- ##
67505_ASEOF
67506test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67507
67508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67509# Save the log message, to keep $0 and so on meaningful, and to
67510# report actual input values of CONFIG_FILES etc. instead of their
67511# values after options handling.
67512ac_log="
67513This file was extended by OpenJDK $as_me jdk9, which was
67514generated by GNU Autoconf 2.69.  Invocation command line was
67515
67516  CONFIG_FILES    = $CONFIG_FILES
67517  CONFIG_HEADERS  = $CONFIG_HEADERS
67518  CONFIG_LINKS    = $CONFIG_LINKS
67519  CONFIG_COMMANDS = $CONFIG_COMMANDS
67520  $ $0 $@
67521
67522on `(hostname || uname -n) 2>/dev/null | sed 1q`
67523"
67524
67525_ACEOF
67526
67527case $ac_config_files in *"
67528"*) set x $ac_config_files; shift; ac_config_files=$*;;
67529esac
67530
67531
67532
67533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67534# Files that config.status was made for.
67535config_files="$ac_config_files"
67536
67537_ACEOF
67538
67539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67540ac_cs_usage="\
67541\`$as_me' instantiates files and other configuration actions
67542from templates according to the current configuration.  Unless the files
67543and actions are specified as TAGs, all are instantiated by default.
67544
67545Usage: $0 [OPTION]... [TAG]...
67546
67547  -h, --help       print this help, then exit
67548  -V, --version    print version number and configuration settings, then exit
67549      --config     print configuration, then exit
67550  -q, --quiet, --silent
67551                   do not print progress messages
67552  -d, --debug      don't remove temporary files
67553      --recheck    update $as_me by reconfiguring in the same conditions
67554      --file=FILE[:TEMPLATE]
67555                   instantiate the configuration file FILE
67556
67557Configuration files:
67558$config_files
67559
67560Report bugs to <build-dev@openjdk.java.net>.
67561OpenJDK home page: <http://openjdk.java.net>."
67562
67563_ACEOF
67564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67565ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67566ac_cs_version="\\
67567OpenJDK config.status jdk9
67568configured by $0, generated by GNU Autoconf 2.69,
67569  with options \\"\$ac_cs_config\\"
67570
67571Copyright (C) 2012 Free Software Foundation, Inc.
67572This config.status script is free software; the Free Software Foundation
67573gives unlimited permission to copy, distribute and modify it."
67574
67575ac_pwd='$ac_pwd'
67576srcdir='$srcdir'
67577AWK='$AWK'
67578test -n "\$AWK" || AWK=awk
67579_ACEOF
67580
67581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67582# The default lists apply if the user does not specify any file.
67583ac_need_defaults=:
67584while test $# != 0
67585do
67586  case $1 in
67587  --*=?*)
67588    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67589    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67590    ac_shift=:
67591    ;;
67592  --*=)
67593    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67594    ac_optarg=
67595    ac_shift=:
67596    ;;
67597  *)
67598    ac_option=$1
67599    ac_optarg=$2
67600    ac_shift=shift
67601    ;;
67602  esac
67603
67604  case $ac_option in
67605  # Handling of the options.
67606  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67607    ac_cs_recheck=: ;;
67608  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67609    $as_echo "$ac_cs_version"; exit ;;
67610  --config | --confi | --conf | --con | --co | --c )
67611    $as_echo "$ac_cs_config"; exit ;;
67612  --debug | --debu | --deb | --de | --d | -d )
67613    debug=: ;;
67614  --file | --fil | --fi | --f )
67615    $ac_shift
67616    case $ac_optarg in
67617    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67618    '') as_fn_error $? "missing file argument" ;;
67619    esac
67620    as_fn_append CONFIG_FILES " '$ac_optarg'"
67621    ac_need_defaults=false;;
67622  --he | --h |  --help | --hel | -h )
67623    $as_echo "$ac_cs_usage"; exit ;;
67624  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67625  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67626    ac_cs_silent=: ;;
67627
67628  # This is an error.
67629  -*) as_fn_error $? "unrecognized option: \`$1'
67630Try \`$0 --help' for more information." ;;
67631
67632  *) as_fn_append ac_config_targets " $1"
67633     ac_need_defaults=false ;;
67634
67635  esac
67636  shift
67637done
67638
67639ac_configure_extra_args=
67640
67641if $ac_cs_silent; then
67642  exec 6>/dev/null
67643  ac_configure_extra_args="$ac_configure_extra_args --silent"
67644fi
67645
67646_ACEOF
67647cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67648if \$ac_cs_recheck; then
67649  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67650  shift
67651  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67652  CONFIG_SHELL='$SHELL'
67653  export CONFIG_SHELL
67654  exec "\$@"
67655fi
67656
67657_ACEOF
67658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67659exec 5>>config.log
67660{
67661  echo
67662  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67663## Running $as_me. ##
67664_ASBOX
67665  $as_echo "$ac_log"
67666} >&5
67667
67668_ACEOF
67669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67670_ACEOF
67671
67672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67673
67674# Handling of arguments.
67675for ac_config_target in $ac_config_targets
67676do
67677  case $ac_config_target in
67678    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67679    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67680    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67681    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67682    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67683
67684  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67685  esac
67686done
67687
67688
67689# If the user did not use the arguments to specify the items to instantiate,
67690# then the envvar interface is used.  Set only those that are not.
67691# We use the long form for the default assignment because of an extremely
67692# bizarre bug on SunOS 4.1.3.
67693if $ac_need_defaults; then
67694  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67695fi
67696
67697# Have a temporary directory for convenience.  Make it in the build tree
67698# simply because there is no reason against having it here, and in addition,
67699# creating and moving files from /tmp can sometimes cause problems.
67700# Hook for its removal unless debugging.
67701# Note that there is a small window in which the directory will not be cleaned:
67702# after its creation but before its name has been assigned to `$tmp'.
67703$debug ||
67704{
67705  tmp= ac_tmp=
67706  trap 'exit_status=$?
67707  : "${ac_tmp:=$tmp}"
67708  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67709' 0
67710  trap 'as_fn_exit 1' 1 2 13 15
67711}
67712# Create a (secure) tmp directory for tmp files.
67713
67714{
67715  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67716  test -d "$tmp"
67717}  ||
67718{
67719  tmp=./conf$$-$RANDOM
67720  (umask 077 && mkdir "$tmp")
67721} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67722ac_tmp=$tmp
67723
67724# Set up the scripts for CONFIG_FILES section.
67725# No need to generate them if there are no CONFIG_FILES.
67726# This happens for instance with `./config.status config.h'.
67727if test -n "$CONFIG_FILES"; then
67728
67729
67730ac_cr=`echo X | tr X '\015'`
67731# On cygwin, bash can eat \r inside `` if the user requested igncr.
67732# But we know of no other shell where ac_cr would be empty at this
67733# point, so we can use a bashism as a fallback.
67734if test "x$ac_cr" = x; then
67735  eval ac_cr=\$\'\\r\'
67736fi
67737ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67738if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67739  ac_cs_awk_cr='\\r'
67740else
67741  ac_cs_awk_cr=$ac_cr
67742fi
67743
67744echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67745_ACEOF
67746
67747
67748{
67749  echo "cat >conf$$subs.awk <<_ACEOF" &&
67750  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67751  echo "_ACEOF"
67752} >conf$$subs.sh ||
67753  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67754ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67755ac_delim='%!_!# '
67756for ac_last_try in false false false false false :; do
67757  . ./conf$$subs.sh ||
67758    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67759
67760  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67761  if test $ac_delim_n = $ac_delim_num; then
67762    break
67763  elif $ac_last_try; then
67764    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67765  else
67766    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67767  fi
67768done
67769rm -f conf$$subs.sh
67770
67771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67772cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67773_ACEOF
67774sed -n '
67775h
67776s/^/S["/; s/!.*/"]=/
67777p
67778g
67779s/^[^!]*!//
67780:repl
67781t repl
67782s/'"$ac_delim"'$//
67783t delim
67784:nl
67785h
67786s/\(.\{148\}\)..*/\1/
67787t more1
67788s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67789p
67790n
67791b repl
67792:more1
67793s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67794p
67795g
67796s/.\{148\}//
67797t nl
67798:delim
67799h
67800s/\(.\{148\}\)..*/\1/
67801t more2
67802s/["\\]/\\&/g; s/^/"/; s/$/"/
67803p
67804b
67805:more2
67806s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67807p
67808g
67809s/.\{148\}//
67810t delim
67811' <conf$$subs.awk | sed '
67812/^[^""]/{
67813  N
67814  s/\n//
67815}
67816' >>$CONFIG_STATUS || ac_write_fail=1
67817rm -f conf$$subs.awk
67818cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67819_ACAWK
67820cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67821  for (key in S) S_is_set[key] = 1
67822  FS = ""
67823
67824}
67825{
67826  line = $ 0
67827  nfields = split(line, field, "@")
67828  substed = 0
67829  len = length(field[1])
67830  for (i = 2; i < nfields; i++) {
67831    key = field[i]
67832    keylen = length(key)
67833    if (S_is_set[key]) {
67834      value = S[key]
67835      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67836      len += length(value) + length(field[++i])
67837      substed = 1
67838    } else
67839      len += 1 + keylen
67840  }
67841
67842  print line
67843}
67844
67845_ACAWK
67846_ACEOF
67847cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67848if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67849  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67850else
67851  cat
67852fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67853  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67854_ACEOF
67855
67856# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67857# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67858# trailing colons and then remove the whole line if VPATH becomes empty
67859# (actually we leave an empty line to preserve line numbers).
67860if test "x$srcdir" = x.; then
67861  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67862h
67863s///
67864s/^/:/
67865s/[	 ]*$/:/
67866s/:\$(srcdir):/:/g
67867s/:\${srcdir}:/:/g
67868s/:@srcdir@:/:/g
67869s/^:*//
67870s/:*$//
67871x
67872s/\(=[	 ]*\).*/\1/
67873G
67874s/\n//
67875s/^[^=]*=[	 ]*$//
67876}'
67877fi
67878
67879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67880fi # test -n "$CONFIG_FILES"
67881
67882
67883eval set X "  :F $CONFIG_FILES      "
67884shift
67885for ac_tag
67886do
67887  case $ac_tag in
67888  :[FHLC]) ac_mode=$ac_tag; continue;;
67889  esac
67890  case $ac_mode$ac_tag in
67891  :[FHL]*:*);;
67892  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67893  :[FH]-) ac_tag=-:-;;
67894  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67895  esac
67896  ac_save_IFS=$IFS
67897  IFS=:
67898  set x $ac_tag
67899  IFS=$ac_save_IFS
67900  shift
67901  ac_file=$1
67902  shift
67903
67904  case $ac_mode in
67905  :L) ac_source=$1;;
67906  :[FH])
67907    ac_file_inputs=
67908    for ac_f
67909    do
67910      case $ac_f in
67911      -) ac_f="$ac_tmp/stdin";;
67912      *) # Look for the file first in the build tree, then in the source tree
67913	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67914	 # because $ac_f cannot contain `:'.
67915	 test -f "$ac_f" ||
67916	   case $ac_f in
67917	   [\\/$]*) false;;
67918	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67919	   esac ||
67920	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67921      esac
67922      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67923      as_fn_append ac_file_inputs " '$ac_f'"
67924    done
67925
67926    # Let's still pretend it is `configure' which instantiates (i.e., don't
67927    # use $as_me), people would be surprised to read:
67928    #    /* config.h.  Generated by config.status.  */
67929    configure_input='Generated from '`
67930	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67931	`' by configure.'
67932    if test x"$ac_file" != x-; then
67933      configure_input="$ac_file.  $configure_input"
67934      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67935$as_echo "$as_me: creating $ac_file" >&6;}
67936    fi
67937    # Neutralize special characters interpreted by sed in replacement strings.
67938    case $configure_input in #(
67939    *\&* | *\|* | *\\* )
67940       ac_sed_conf_input=`$as_echo "$configure_input" |
67941       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67942    *) ac_sed_conf_input=$configure_input;;
67943    esac
67944
67945    case $ac_tag in
67946    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67947      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67948    esac
67949    ;;
67950  esac
67951
67952  ac_dir=`$as_dirname -- "$ac_file" ||
67953$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67954	 X"$ac_file" : 'X\(//\)[^/]' \| \
67955	 X"$ac_file" : 'X\(//\)$' \| \
67956	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67957$as_echo X"$ac_file" |
67958    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67959	    s//\1/
67960	    q
67961	  }
67962	  /^X\(\/\/\)[^/].*/{
67963	    s//\1/
67964	    q
67965	  }
67966	  /^X\(\/\/\)$/{
67967	    s//\1/
67968	    q
67969	  }
67970	  /^X\(\/\).*/{
67971	    s//\1/
67972	    q
67973	  }
67974	  s/.*/./; q'`
67975  as_dir="$ac_dir"; as_fn_mkdir_p
67976  ac_builddir=.
67977
67978case "$ac_dir" in
67979.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67980*)
67981  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67982  # A ".." for each directory in $ac_dir_suffix.
67983  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67984  case $ac_top_builddir_sub in
67985  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67986  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67987  esac ;;
67988esac
67989ac_abs_top_builddir=$ac_pwd
67990ac_abs_builddir=$ac_pwd$ac_dir_suffix
67991# for backward compatibility:
67992ac_top_builddir=$ac_top_build_prefix
67993
67994case $srcdir in
67995  .)  # We are building in place.
67996    ac_srcdir=.
67997    ac_top_srcdir=$ac_top_builddir_sub
67998    ac_abs_top_srcdir=$ac_pwd ;;
67999  [\\/]* | ?:[\\/]* )  # Absolute name.
68000    ac_srcdir=$srcdir$ac_dir_suffix;
68001    ac_top_srcdir=$srcdir
68002    ac_abs_top_srcdir=$srcdir ;;
68003  *) # Relative name.
68004    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68005    ac_top_srcdir=$ac_top_build_prefix$srcdir
68006    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68007esac
68008ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68009
68010
68011  case $ac_mode in
68012  :F)
68013  #
68014  # CONFIG_FILE
68015  #
68016
68017_ACEOF
68018
68019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68020# If the template does not know about datarootdir, expand it.
68021# FIXME: This hack should be removed a few years after 2.60.
68022ac_datarootdir_hack=; ac_datarootdir_seen=
68023ac_sed_dataroot='
68024/datarootdir/ {
68025  p
68026  q
68027}
68028/@datadir@/p
68029/@docdir@/p
68030/@infodir@/p
68031/@localedir@/p
68032/@mandir@/p'
68033case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68034*datarootdir*) ac_datarootdir_seen=yes;;
68035*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68036  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68037$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68038_ACEOF
68039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68040  ac_datarootdir_hack='
68041  s&@datadir@&$datadir&g
68042  s&@docdir@&$docdir&g
68043  s&@infodir@&$infodir&g
68044  s&@localedir@&$localedir&g
68045  s&@mandir@&$mandir&g
68046  s&\\\${datarootdir}&$datarootdir&g' ;;
68047esac
68048_ACEOF
68049
68050# Neutralize VPATH when `$srcdir' = `.'.
68051# Shell code in configure.ac might set extrasub.
68052# FIXME: do we really want to maintain this feature?
68053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68054ac_sed_extra="$ac_vpsub
68055$extrasub
68056_ACEOF
68057cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68058:t
68059/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68060s|@configure_input@|$ac_sed_conf_input|;t t
68061s&@top_builddir@&$ac_top_builddir_sub&;t t
68062s&@top_build_prefix@&$ac_top_build_prefix&;t t
68063s&@srcdir@&$ac_srcdir&;t t
68064s&@abs_srcdir@&$ac_abs_srcdir&;t t
68065s&@top_srcdir@&$ac_top_srcdir&;t t
68066s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68067s&@builddir@&$ac_builddir&;t t
68068s&@abs_builddir@&$ac_abs_builddir&;t t
68069s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68070$ac_datarootdir_hack
68071"
68072eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68073  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68074
68075test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68076  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68077  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68078      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68079  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68080which seems to be undefined.  Please make sure it is defined" >&5
68081$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68082which seems to be undefined.  Please make sure it is defined" >&2;}
68083
68084  rm -f "$ac_tmp/stdin"
68085  case $ac_file in
68086  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68087  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68088  esac \
68089  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68090 ;;
68091
68092
68093
68094  esac
68095
68096done # for ac_tag
68097
68098
68099as_fn_exit 0
68100_ACEOF
68101ac_clean_files=$ac_clean_files_save
68102
68103test $ac_write_fail = 0 ||
68104  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68105
68106
68107# configure is writing to config.log, and then calls config.status.
68108# config.status does its own redirection, appending to config.log.
68109# Unfortunately, on DOS this fails, as config.log is still kept open
68110# by configure, so config.status won't be able to write to it; its
68111# output is simply discarded.  So we exec the FD to /dev/null,
68112# effectively closing config.log, so it can be properly (re)opened and
68113# appended to by config.status.  When coming back to configure, we
68114# need to make the FD available again.
68115if test "$no_create" != yes; then
68116  ac_cs_success=:
68117  ac_config_status_args=
68118  test "$silent" = yes &&
68119    ac_config_status_args="$ac_config_status_args --quiet"
68120  exec 5>/dev/null
68121  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68122  exec 5>>config.log
68123  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68124  # would make configure fail if this is the last instruction.
68125  $ac_cs_success || as_fn_exit 1
68126fi
68127if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68128  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68129$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68130fi
68131
68132
68133# After AC_OUTPUT, we need to do final work
68134
68135
68136  # Try to move config.log (generated by autoconf) to the configure-support directory.
68137  if test -e ./config.log; then
68138    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68139  fi
68140
68141  # Rotate our log file (configure.log)
68142  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68143    $RM -f "$OUTPUT_ROOT/configure.log.old"
68144  fi
68145  if test -e "$OUTPUT_ROOT/configure.log"; then
68146    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68147  fi
68148
68149  # Move configure.log from current directory to the build output root
68150  if test -e ./configure.log; then
68151    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68152  fi
68153
68154  # Make the compare script executable
68155  $CHMOD +x $OUTPUT_ROOT/compare.sh
68156
68157
68158# Finally output some useful information to the user
68159
68160  # Finally output some useful information to the user
68161
68162  printf "\n"
68163  printf "====================================================\n"
68164  if test "x$no_create" != "xyes"; then
68165    if test "x$IS_RECONFIGURE" != "xyes"; then
68166      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68167    else
68168      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68169    fi
68170  else
68171    if test "x$IS_RECONFIGURE" != "xyes"; then
68172      printf "A configuration has been successfully checked but not created\n"
68173    else
68174      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68175    fi
68176  fi
68177  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68178    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68179  else
68180    printf "using default settings.\n"
68181  fi
68182
68183  printf "\n"
68184  printf "Configuration summary:\n"
68185  printf "* Debug level:    $DEBUG_LEVEL\n"
68186  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68187  printf "* JDK variant:    $JDK_VARIANT\n"
68188  printf "* JVM variants:   $JVM_VARIANTS\n"
68189  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68190  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68191
68192  printf "\n"
68193  printf "Tools summary:\n"
68194  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68195    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68196  fi
68197  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68198  if test "x$TOOLCHAIN_VERSION" != "x"; then
68199    print_version=" $TOOLCHAIN_VERSION"
68200  fi
68201  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68202  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68203  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68204
68205  printf "\n"
68206  printf "Build performance summary:\n"
68207  printf "* Cores to use:   $JOBS\n"
68208  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68209  if test "x$CCACHE_STATUS" != "x"; then
68210    printf "* ccache status:  $CCACHE_STATUS\n"
68211  fi
68212  printf "\n"
68213
68214  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68215    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68216    printf "will result in longer build times.\n"
68217    printf "\n"
68218  fi
68219
68220  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68221    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68222    printf "These are not respected, and will be ignored. It is recommended\n"
68223    printf "that you clean your environment. The following variables are set:\n"
68224    printf "$FOUND_ALT_VARIABLES\n"
68225    printf "\n"
68226  fi
68227
68228  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68229    printf "WARNING: Your build output directory is not on a local disk.\n"
68230    printf "This will severely degrade build performance!\n"
68231    printf "It is recommended that you create an output directory on a local disk,\n"
68232    printf "and run the configure script again from that directory.\n"
68233    printf "\n"
68234  fi
68235
68236  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68237    printf "WARNING: The result of this configuration has overridden an older\n"
68238    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68239    printf "proper build. Failure to do so might result in strange build problems.\n"
68240    printf "\n"
68241  fi
68242
68243  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68244    printf "WARNING: The result of this configuration was not saved.\n"
68245    printf "You should run without '--no-create | -n' to create the configuration.\n"
68246    printf "\n"
68247  fi
68248
68249
68250
68251  # Locate config.log.
68252  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68253    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68254  elif test -e "./config.log"; then
68255    CONFIG_LOG_PATH="."
68256  fi
68257
68258  if test -e "$CONFIG_LOG_PATH/config.log"; then
68259    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68260    if test $? -eq 0; then
68261      printf "The following warnings were produced. Repeated here for convenience:\n"
68262      # We must quote sed expression (using []) to stop m4 from eating the [].
68263      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68264      printf "\n"
68265    fi
68266  fi
68267
68268