generated-configure.sh revision 2431:47f2a1a3bc8c
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
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707INCLUDE_DTRACE
708GCOV_ENABLED
709ZIP_EXTERNAL_DEBUG_SYMBOLS
710COPY_DEBUG_SYMBOLS
711COMPILE_WITH_DEBUG_SYMBOLS
712CFLAGS_WARNINGS_ARE_ERRORS
713BUILD_CC_DISABLE_WARNING_PREFIX
714DISABLE_WARNING_PREFIX
715HOTSPOT_SET_WARNINGS_AS_ERRORS
716WARNINGS_AS_ERRORS
717COMPILER_SUPPORTS_TARGET_BITS_FLAG
718ZERO_ARCHFLAG
719LDFLAGS_TESTEXE
720LDFLAGS_TESTLIB
721CXXFLAGS_TESTEXE
722CXXFLAGS_TESTLIB
723CFLAGS_TESTEXE
724CFLAGS_TESTLIB
725OPENJDK_BUILD_JVM_LIBS
726OPENJDK_BUILD_JVM_ASFLAGS
727OPENJDK_BUILD_JVM_LDFLAGS
728OPENJDK_BUILD_JVM_CFLAGS
729OPENJDK_BUILD_LDFLAGS_HASH_STYLE
730OPENJDK_BUILD_LDFLAGS_CXX_JDK
731OPENJDK_BUILD_JDKEXE_LIBS
732OPENJDK_BUILD_JDKLIB_LIBS
733OPENJDK_BUILD_LDFLAGS_JDKEXE
734OPENJDK_BUILD_LDFLAGS_JDKLIB
735OPENJDK_BUILD_CXXFLAGS_JDKEXE
736OPENJDK_BUILD_CXXFLAGS_JDKLIB
737OPENJDK_BUILD_CFLAGS_JDKEXE
738OPENJDK_BUILD_CFLAGS_JDKLIB
739OPENJDK_BUILD_CXXSTD_CXXFLAG
740JVM_LIBS
741JVM_ASFLAGS
742JVM_LDFLAGS
743JVM_CFLAGS
744LDFLAGS_HASH_STYLE
745LDFLAGS_CXX_JDK
746JDKEXE_LIBS
747JDKLIB_LIBS
748LDFLAGS_JDKEXE
749LDFLAGS_JDKLIB
750CXXFLAGS_JDKEXE
751CXXFLAGS_JDKLIB
752CFLAGS_JDKEXE
753CFLAGS_JDKLIB
754MACOSX_VERSION_MIN
755CXXSTD_CXXFLAG
756JDK_ARCH_ABI_PROP_NAME
757CXX_O_FLAG_SIZE
758CXX_O_FLAG_NONE
759CXX_O_FLAG_DEBUG
760CXX_O_FLAG_NORM
761CXX_O_FLAG_HI
762CXX_O_FLAG_HIGHEST
763CXX_O_FLAG_HIGHEST_JVM
764C_O_FLAG_SIZE
765C_O_FLAG_NONE
766C_O_FLAG_DEBUG
767C_O_FLAG_NORM
768C_O_FLAG_HI
769C_O_FLAG_HIGHEST
770C_O_FLAG_HIGHEST_JVM
771JVM_CFLAGS_SYMBOLS
772CXXFLAGS_DEBUG_SYMBOLS
773CFLAGS_DEBUG_SYMBOLS
774CXX_FLAG_DEPS
775C_FLAG_DEPS
776SHARED_LIBRARY_FLAGS
777SET_SHARED_LIBRARY_MAPFILE
778SET_SHARED_LIBRARY_NAME
779SET_SHARED_LIBRARY_ORIGIN
780SET_EXECUTABLE_ORIGIN
781CXX_FLAG_REORDER
782C_FLAG_REORDER
783JVM_RCFLAGS
784RC_FLAGS
785AR_OUT_OPTION
786LD_OUT_OPTION
787EXE_OUT_OPTION
788CC_OUT_OPTION
789STRIPFLAGS
790ARFLAGS
791COMPILER_BINDCMD_FILE_FLAG
792COMPILER_COMMAND_FILE_FLAG
793COMPILER_TARGET_BITS_FLAG
794JT_HOME
795JTREGEXE
796HOTSPOT_TOOLCHAIN_TYPE
797USING_BROKEN_SUSE_LD
798PACKAGE_PATH
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857EXE_SUFFIX
858OBJ_SUFFIX
859STATIC_LIBRARY
860SHARED_LIBRARY
861STATIC_LIBRARY_SUFFIX
862SHARED_LIBRARY_SUFFIX
863LIBRARY_PREFIX
864TOOLCHAIN_TYPE
865STATIC_BUILD
866IMPORT_MODULES_MAKE
867IMPORT_MODULES_SRC
868IMPORT_MODULES_MAN
869IMPORT_MODULES_LEGAL
870IMPORT_MODULES_CONF
871IMPORT_MODULES_LIBS
872IMPORT_MODULES_CMDS
873IMPORT_MODULES_CLASSES
874BUILD_OUTPUT
875JDK_TOPDIR
876NASHORN_TOPDIR
877HOTSPOT_TOPDIR
878JAXWS_TOPDIR
879JAXP_TOPDIR
880CORBA_TOPDIR
881LANGTOOLS_TOPDIR
882EXTERNAL_BUILDJDK
883BUILD_JDK
884CREATE_BUILDJDK
885JLINK
886JMOD
887BOOT_JDK_BITS
888JAVAC_FLAGS
889BOOT_JDK_MODULAR
890BOOT_JDK_SOURCETARGET
891JARSIGNER
892JAR
893JAVAH
894JAVAC
895JAVA
896BOOT_JDK
897JAVA_CHECK
898JAVAC_CHECK
899VERSION_IS_GA
900VERSION_SHORT
901VERSION_STRING
902VERSION_NUMBER_FOUR_POSITIONS
903VERSION_NUMBER
904VERSION_OPT
905VERSION_BUILD
906VERSION_PRE
907VERSION_PATCH
908VERSION_SECURITY
909VERSION_MINOR
910VERSION_MAJOR
911MACOSX_BUNDLE_ID_BASE
912MACOSX_BUNDLE_NAME_BASE
913HOTSPOT_VM_DISTRO
914COMPANY_NAME
915JDK_RC_PLATFORM_NAME
916PRODUCT_SUFFIX
917PRODUCT_NAME
918LAUNCHER_NAME
919JLINK_KEEP_PACKAGED_MODULES
920COPYRIGHT_YEAR
921COMPRESS_JARS
922INCLUDE_SA
923UNLIMITED_CRYPTO
924CACERTS_FILE
925ENABLE_HEADLESS_ONLY
926DEFAULT_MAKE_TARGET
927OS_VERSION_MICRO
928OS_VERSION_MINOR
929OS_VERSION_MAJOR
930PKG_CONFIG
931BASH_ARGS
932SETFILE
933CODESIGN
934XATTR
935DSYMUTIL
936IS_GNU_TIME
937PATCH
938DTRACE
939TIME
940STAT
941HG
942READELF
943OTOOL
944LDD
945ZIPEXE
946UNZIP
947TAR_SUPPORTS_TRANSFORM
948TAR_INCLUDE_PARAM
949TAR_CREATE_EXTRA_PARAM
950TAR_TYPE
951FIND_DELETE
952OUTPUT_SYNC
953OUTPUT_SYNC_SUPPORTED
954CHECK_TOOLSDIR_MAKE
955CHECK_TOOLSDIR_GMAKE
956CHECK_MAKE
957CHECK_GMAKE
958MAKE
959PKGHANDLER
960CONFIGURESUPPORT_OUTPUTDIR
961OUTPUT_ROOT
962CONF_NAME
963SPEC
964SDKROOT
965XCODEBUILD
966JVM_VARIANT_MAIN
967VALID_JVM_VARIANTS
968JVM_VARIANTS
969DEBUG_LEVEL
970HOTSPOT_DEBUG_LEVEL
971JDK_VARIANT
972USERNAME
973CANONICAL_TOPDIR
974ORIGINAL_TOPDIR
975TOPDIR
976PATH_SEP
977ZERO_ARCHDEF
978HOTSPOT_BUILD_CPU_DEFINE
979HOTSPOT_BUILD_CPU_ARCH
980HOTSPOT_BUILD_CPU
981HOTSPOT_BUILD_OS_TYPE
982HOTSPOT_BUILD_OS
983OPENJDK_BUILD_BUNDLE_PLATFORM
984OPENJDK_BUILD_CPU_BUNDLE
985OPENJDK_BUILD_OS_BUNDLE
986OPENJDK_BUILD_OS_EXPORT_DIR
987OPENJDK_BUILD_CPU_OSARCH
988OPENJDK_BUILD_CPU_ISADIR
989OPENJDK_BUILD_CPU_LEGACY_LIB
990OPENJDK_BUILD_CPU_LEGACY
991HOTSPOT_TARGET_CPU_DEFINE
992HOTSPOT_TARGET_CPU_ARCH
993HOTSPOT_TARGET_CPU
994HOTSPOT_TARGET_OS_TYPE
995HOTSPOT_TARGET_OS
996DEFINE_CROSS_COMPILE_ARCH
997LP64
998OPENJDK_TARGET_BUNDLE_PLATFORM
999OPENJDK_TARGET_CPU_BUNDLE
1000OPENJDK_TARGET_OS_BUNDLE
1001OPENJDK_TARGET_OS_EXPORT_DIR
1002OPENJDK_TARGET_CPU_OSARCH
1003OPENJDK_TARGET_CPU_ISADIR
1004OPENJDK_TARGET_CPU_LEGACY_LIB
1005OPENJDK_TARGET_CPU_LEGACY
1006REQUIRED_OS_VERSION
1007REQUIRED_OS_NAME
1008COMPILE_TYPE
1009OPENJDK_TARGET_CPU_ENDIAN
1010OPENJDK_TARGET_CPU_BITS
1011OPENJDK_TARGET_CPU_ARCH
1012OPENJDK_TARGET_CPU
1013OPENJDK_TARGET_OS_ENV
1014OPENJDK_TARGET_OS_TYPE
1015OPENJDK_TARGET_OS
1016OPENJDK_BUILD_CPU_ENDIAN
1017OPENJDK_BUILD_CPU_BITS
1018OPENJDK_BUILD_CPU_ARCH
1019OPENJDK_BUILD_CPU
1020OPENJDK_BUILD_OS_ENV
1021OPENJDK_BUILD_OS_TYPE
1022OPENJDK_BUILD_OS
1023OPENJDK_BUILD_AUTOCONF_NAME
1024OPENJDK_TARGET_AUTOCONF_NAME
1025target_os
1026target_vendor
1027target_cpu
1028target
1029host_os
1030host_vendor
1031host_cpu
1032host
1033build_os
1034build_vendor
1035build_cpu
1036build
1037NICE
1038CPIO
1039DF
1040READLINK
1041CYGPATH
1042SED
1043FGREP
1044EGREP
1045GREP
1046AWK
1047XARGS
1048WHICH
1049WC
1050UNIQ
1051UNAME
1052TR
1053TOUCH
1054TEE
1055TAR
1056TAIL
1057SORT
1058SH
1059RMDIR
1060RM
1061PRINTF
1062NAWK
1063MV
1064MKTEMP
1065MKDIR
1066LS
1067LN
1068GZIP
1069GUNZIP
1070HEAD
1071FIND
1072FILE
1073EXPR
1074ECHO
1075DIRNAME
1076DIFF
1077DATE
1078CUT
1079CP
1080COMM
1081CMP
1082CHMOD
1083CAT
1084BASH
1085BASENAME
1086DATE_WHEN_CONFIGURED
1087ORIGINAL_PATH
1088CONFIGURE_COMMAND_LINE
1089target_alias
1090host_alias
1091build_alias
1092LIBS
1093ECHO_T
1094ECHO_N
1095ECHO_C
1096DEFS
1097mandir
1098localedir
1099libdir
1100psdir
1101pdfdir
1102dvidir
1103htmldir
1104infodir
1105docdir
1106oldincludedir
1107includedir
1108localstatedir
1109sharedstatedir
1110sysconfdir
1111datadir
1112datarootdir
1113libexecdir
1114sbindir
1115bindir
1116program_transform_name
1117prefix
1118exec_prefix
1119PACKAGE_URL
1120PACKAGE_BUGREPORT
1121PACKAGE_STRING
1122PACKAGE_VERSION
1123PACKAGE_TARNAME
1124PACKAGE_NAME
1125PATH_SEPARATOR
1126SHELL'
1127ac_subst_files=''
1128ac_user_opts='
1129enable_option_checking
1130with_target_bits
1131enable_openjdk_only
1132with_custom_make_dir
1133with_jdk_variant
1134enable_debug
1135with_debug_level
1136with_jvm_variants
1137with_cpu_port
1138with_devkit
1139with_sys_root
1140with_sysroot
1141with_tools_dir
1142with_toolchain_path
1143with_extra_path
1144with_sdk_name
1145with_conf_name
1146with_output_sync
1147with_default_make_target
1148enable_headless_only
1149with_cacerts_file
1150enable_unlimited_crypto
1151with_copyright_year
1152enable_keep_packaged_modules
1153with_milestone
1154with_update_version
1155with_user_release_suffix
1156with_build_number
1157with_version_string
1158with_version_pre
1159with_version_opt
1160with_version_build
1161with_version_major
1162with_version_minor
1163with_version_security
1164with_version_patch
1165with_boot_jdk
1166with_build_jdk
1167with_add_source_root
1168with_override_source_root
1169with_adds_and_overrides
1170with_override_langtools
1171with_override_corba
1172with_override_jaxp
1173with_override_jaxws
1174with_override_hotspot
1175with_override_nashorn
1176with_override_jdk
1177with_import_hotspot
1178with_import_modules
1179enable_static_build
1180with_toolchain_type
1181with_extra_cflags
1182with_extra_cxxflags
1183with_extra_ldflags
1184with_toolchain_version
1185with_build_devkit
1186with_jtreg
1187with_abi_profile
1188enable_warnings_as_errors
1189with_native_debug_symbols
1190enable_debug_symbols
1191enable_zip_debug_info
1192enable_native_coverage
1193enable_dtrace
1194enable_aot
1195enable_hotspot_gtest
1196with_stdc__lib
1197with_msvcr_dll
1198with_msvcp_dll
1199with_x
1200with_cups
1201with_cups_include
1202with_freetype
1203with_freetype_include
1204with_freetype_lib
1205with_freetype_src
1206enable_freetype_bundling
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213enable_libffi_bundling
1214with_libjpeg
1215with_giflib
1216with_libpng
1217with_zlib
1218with_lcms
1219with_dxsdk
1220with_dxsdk_lib
1221with_dxsdk_include
1222with_libelf
1223with_libelf_include
1224with_libelf_lib
1225with_jvm_features
1226with_jvm_interpreter
1227enable_jtreg_failure_handler
1228enable_generate_classlist
1229with_num_cores
1230with_memory_size
1231with_jobs
1232with_test_jobs
1233with_boot_jdk_jvmargs
1234with_sjavac_server_java
1235enable_sjavac
1236enable_javac_server
1237enable_icecc
1238enable_precompiled_headers
1239enable_ccache
1240with_ccache_dir
1241'
1242      ac_precious_vars='build_alias
1243host_alias
1244target_alias
1245BASENAME
1246BASH
1247CAT
1248CHMOD
1249CMP
1250COMM
1251CP
1252CUT
1253DATE
1254DIFF
1255DIRNAME
1256ECHO
1257EXPR
1258FILE
1259FIND
1260HEAD
1261GUNZIP
1262GZIP
1263LN
1264LS
1265MKDIR
1266MKTEMP
1267MV
1268NAWK
1269PRINTF
1270RM
1271RMDIR
1272SH
1273SORT
1274TAIL
1275TAR
1276TEE
1277TOUCH
1278TR
1279UNAME
1280UNIQ
1281WC
1282WHICH
1283XARGS
1284AWK
1285GREP
1286EGREP
1287FGREP
1288SED
1289CYGPATH
1290READLINK
1291DF
1292CPIO
1293NICE
1294MAKE
1295UNZIP
1296ZIPEXE
1297LDD
1298OTOOL
1299READELF
1300HG
1301STAT
1302TIME
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ELF_CFLAGS
1352ELF_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --enable-headless-only  only build headless (no GUI) support [disabled]
1980  --disable-unlimited-crypto
1981                          Disable unlimited crypto policy [enabled]
1982  --disable-keep-packaged-modules
1983                          Do not keep packaged modules in jdk image [enable]
1984  --enable-static-build   enable static library build [disabled]
1985  --disable-warnings-as-errors
1986                          do not consider native warnings to be an error
1987                          [enabled]
1988  --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-native-coverage
1993                          enable native compilation with code coverage
1994                          data[disabled]
1995  --enable-dtrace[=yes/no/auto]
1996                          enable dtrace. Default is auto, where dtrace is
1997                          enabled if all dependencies are present.
1998  --enable-aot[=yes/no/auto]
1999                          enable ahead of time compilation feature. Default is
2000                          auto, where aot is enabled if all dependencies are
2001                          present.
2002  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003  --disable-freetype-bundling
2004                          disable bundling of the freetype library with the
2005                          build result [enabled on Windows or when using
2006                          --with-freetype, disabled otherwise]
2007  --enable-libffi-bundling
2008                          enable bundling of libffi.so to make the built JDK
2009                          runnable on more systems
2010  --enable-jtreg-failure-handler
2011                          forces build of the jtreg failure handler to be
2012                          enabled, missing dependencies become fatal errors.
2013                          Default is auto, where the failure handler is built
2014                          if all dependencies are present and otherwise just
2015                          disabled.
2016  --disable-generate-classlist
2017                          forces enabling or disabling of the generation of a
2018                          CDS classlist at build time. Default is to generate
2019                          it when either the server or client JVMs are built.
2020  --enable-sjavac         use sjavac to do fast incremental compiles
2021                          [disabled]
2022  --disable-javac-server  disable javac server [enabled]
2023  --enable-icecc          enable distribted compilation of native code using
2024                          icecc/icecream [disabled]
2025  --disable-precompiled-headers
2026                          disable using precompiled headers when compiling C++
2027                          [enabled]
2028  --enable-ccache         enable using ccache to speed up recompilations
2029                          [disabled]
2030
2031Optional Packages:
2032  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                          support it), e.g. --with-target-bits=32 [guessed]
2036  --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-jdk-variant      JDK variant to build (normal) [normal]
2039  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                          optimized) [release]
2041  --with-jvm-variants     JVM variants (separated by commas) to build
2042                          (server,client,minimal,core,zero,zeroshark,custom)
2043                          [server]
2044  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                          (arm64,aarch64) [aarch64]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import_hotspot   Deprecated. Option is kept for backwards
2114                          compatibility and is ignored
2115  --with-import-modules   import a set of prebuilt modules either as a zip
2116                          file or an exploded directory
2117  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                          to show possible values [platform dependent]
2119  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121  --with-extra-ldflags    extra flags to be used when linking jdk
2122  --with-toolchain-version
2123                          the version of the toolchain to look for, use
2124                          '--help' to show possible values [platform
2125                          dependent]
2126  --with-build-devkit     Devkit to use for the build platform toolchain
2127  --with-jtreg            Regression Test Harness [probed]
2128  --with-abi-profile      specify ABI profile for ARM builds
2129                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2130                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2131                          [toolchain dependent]
2132  --with-native-debug-symbols
2133                          set the native debug symbol configuration (none,
2134                          internal, external, zipped) [varying]
2135  --with-stdc++lib=<static>,<dynamic>,<default>
2136                          force linking of the C++ runtime on Linux to either
2137                          static or dynamic, default is static with dynamic as
2138                          fallback
2139  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2140                          (Windows only) [probed]
2141  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2142                          (Windows only) [probed]
2143  --with-x                use the X Window System
2144  --with-cups             specify prefix directory for the cups package
2145                          (expecting the headers under PATH/include)
2146  --with-cups-include     specify directory for the cups include files
2147  --with-freetype         specify prefix directory for the freetype package
2148                          (expecting the libraries under PATH/lib and the
2149                          headers under PATH/include)
2150  --with-freetype-include specify directory for the freetype include files
2151  --with-freetype-lib     specify directory for the freetype library
2152  --with-freetype-src     specify directory with freetype sources to
2153                          automatically build the library (experimental,
2154                          Windows-only)
2155  --with-alsa             specify prefix directory for the alsa package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-alsa-include     specify directory for the alsa include files
2159  --with-alsa-lib         specify directory for the alsa library
2160  --with-libffi           specify prefix directory for the libffi package
2161                          (expecting the libraries under PATH/lib and the
2162                          headers under PATH/include)
2163  --with-libffi-include   specify directory for the libffi include files
2164  --with-libffi-lib       specify directory for the libffi library
2165  --with-libjpeg          use libjpeg from build system or OpenJDK source
2166                          (system, bundled) [bundled]
2167  --with-giflib           use giflib from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-libpng           use libpng from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-zlib             use zlib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-lcms             use lcms2 from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-dxsdk            Deprecated. Option is kept for backwards
2176                          compatibility and is ignored
2177  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-dxsdk-include    Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-libelf           specify prefix directory for the libelf package
2182                          (expecting the libraries under PATH/lib and the
2183                          headers under PATH/include)
2184  --with-libelf-include   specify directory for the libelf include files
2185  --with-libelf-lib       specify directory for the libelf library
2186  --with-jvm-features     additional JVM features to enable (separated by
2187                          comma), use '--help' to show possible values [none]
2188  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2189                          compatibility and is ignored
2190  --with-num-cores        number of cores in the build system, e.g.
2191                          --with-num-cores=8 [probed]
2192  --with-memory-size      memory (in MB) available in the build system, e.g.
2193                          --with-memory-size=1024 [probed]
2194  --with-jobs             number of parallel jobs to let make run [calculated
2195                          based on cores and memory]
2196  --with-test-jobs        number of parallel tests jobs to run [based on build
2197                          jobs]
2198  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2199                          invocations of boot JDK, overriding the default
2200                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2201                          -enableassertions"
2202  --with-sjavac-server-java
2203                          use this java binary for running the sjavac
2204                          background server [Boot JDK java]
2205  --with-ccache-dir       where to store ccache files [~/.ccache]
2206
2207Some influential environment variables:
2208  BASENAME    Override default value for BASENAME
2209  BASH        Override default value for BASH
2210  CAT         Override default value for CAT
2211  CHMOD       Override default value for CHMOD
2212  CMP         Override default value for CMP
2213  COMM        Override default value for COMM
2214  CP          Override default value for CP
2215  CUT         Override default value for CUT
2216  DATE        Override default value for DATE
2217  DIFF        Override default value for DIFF
2218  DIRNAME     Override default value for DIRNAME
2219  ECHO        Override default value for ECHO
2220  EXPR        Override default value for EXPR
2221  FILE        Override default value for FILE
2222  FIND        Override default value for FIND
2223  HEAD        Override default value for HEAD
2224  GUNZIP      Override default value for GUNZIP
2225  GZIP        Override default value for GZIP
2226  LN          Override default value for LN
2227  LS          Override default value for LS
2228  MKDIR       Override default value for MKDIR
2229  MKTEMP      Override default value for MKTEMP
2230  MV          Override default value for MV
2231  NAWK        Override default value for NAWK
2232  PRINTF      Override default value for PRINTF
2233  RM          Override default value for RM
2234  RMDIR       Override default value for RMDIR
2235  SH          Override default value for SH
2236  SORT        Override default value for SORT
2237  TAIL        Override default value for TAIL
2238  TAR         Override default value for TAR
2239  TEE         Override default value for TEE
2240  TOUCH       Override default value for TOUCH
2241  TR          Override default value for TR
2242  UNAME       Override default value for UNAME
2243  UNIQ        Override default value for UNIQ
2244  WC          Override default value for WC
2245  WHICH       Override default value for WHICH
2246  XARGS       Override default value for XARGS
2247  AWK         Override default value for AWK
2248  GREP        Override default value for GREP
2249  EGREP       Override default value for EGREP
2250  FGREP       Override default value for FGREP
2251  SED         Override default value for SED
2252  CYGPATH     Override default value for CYGPATH
2253  READLINK    Override default value for READLINK
2254  DF          Override default value for DF
2255  CPIO        Override default value for CPIO
2256  NICE        Override default value for NICE
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  HG          Override default value for HG
2264  STAT        Override default value for STAT
2265  TIME        Override default value for TIME
2266  DTRACE      Override default value for DTRACE
2267  PATCH       Override default value for PATCH
2268  DSYMUTIL    Override default value for DSYMUTIL
2269  XATTR       Override default value for XATTR
2270  CODESIGN    Override default value for CODESIGN
2271  SETFILE     Override default value for SETFILE
2272  PKG_CONFIG  path to pkg-config utility
2273  JAVA        Override default value for JAVA
2274  JAVAC       Override default value for JAVAC
2275  JAVAH       Override default value for JAVAH
2276  JAR         Override default value for JAR
2277  JARSIGNER   Override default value for JARSIGNER
2278  CC          C compiler command
2279  CFLAGS      C compiler flags
2280  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2281              nonstandard directory <lib dir>
2282  LIBS        libraries to pass to the linker, e.g. -l<library>
2283  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284              you have headers in a nonstandard directory <include dir>
2285  CXX         C++ compiler command
2286  CXXFLAGS    C++ compiler flags
2287  CPP         C preprocessor
2288  CXXCPP      C++ preprocessor
2289  AS          Override default value for AS
2290  AR          Override default value for AR
2291  LIPO        Override default value for LIPO
2292  STRIP       Override default value for STRIP
2293  NM          Override default value for NM
2294  GNM         Override default value for GNM
2295  OBJCOPY     Override default value for OBJCOPY
2296  OBJDUMP     Override default value for OBJDUMP
2297  BUILD_CC    Override default value for BUILD_CC
2298  BUILD_CXX   Override default value for BUILD_CXX
2299  BUILD_NM    Override default value for BUILD_NM
2300  BUILD_AR    Override default value for BUILD_AR
2301  BUILD_OBJCOPY
2302              Override default value for BUILD_OBJCOPY
2303  BUILD_STRIP Override default value for BUILD_STRIP
2304  JTREGEXE    Override default value for JTREGEXE
2305  XMKMF       Path to xmkmf, Makefile generator for X Window System
2306  FREETYPE_CFLAGS
2307              C compiler flags for FREETYPE, overriding pkg-config
2308  FREETYPE_LIBS
2309              linker flags for FREETYPE, overriding pkg-config
2310  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2311  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2312  LIBFFI_CFLAGS
2313              C compiler flags for LIBFFI, overriding pkg-config
2314  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2315  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2316  PNG_LIBS    linker flags for PNG, overriding pkg-config
2317  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2318  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2319  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2320  ELF_LIBS    linker flags for ELF, overriding pkg-config
2321  ICECC_CMD   Override default value for ICECC_CMD
2322  ICECC_CREATE_ENV
2323              Override default value for ICECC_CREATE_ENV
2324  ICECC_WRAPPER
2325              Override default value for ICECC_WRAPPER
2326  CCACHE      Override default value for CCACHE
2327
2328Use these variables to override the choices made by `configure' or to help
2329it to find libraries and programs with nonstandard names/locations.
2330
2331Report bugs to <build-dev@openjdk.java.net>.
2332OpenJDK home page: <http://openjdk.java.net>.
2333_ACEOF
2334ac_status=$?
2335fi
2336
2337if test "$ac_init_help" = "recursive"; then
2338  # If there are subdirs, report their specific --help.
2339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340    test -d "$ac_dir" ||
2341      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342      continue
2343    ac_builddir=.
2344
2345case "$ac_dir" in
2346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347*)
2348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349  # A ".." for each directory in $ac_dir_suffix.
2350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351  case $ac_top_builddir_sub in
2352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354  esac ;;
2355esac
2356ac_abs_top_builddir=$ac_pwd
2357ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358# for backward compatibility:
2359ac_top_builddir=$ac_top_build_prefix
2360
2361case $srcdir in
2362  .)  # We are building in place.
2363    ac_srcdir=.
2364    ac_top_srcdir=$ac_top_builddir_sub
2365    ac_abs_top_srcdir=$ac_pwd ;;
2366  [\\/]* | ?:[\\/]* )  # Absolute name.
2367    ac_srcdir=$srcdir$ac_dir_suffix;
2368    ac_top_srcdir=$srcdir
2369    ac_abs_top_srcdir=$srcdir ;;
2370  *) # Relative name.
2371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372    ac_top_srcdir=$ac_top_build_prefix$srcdir
2373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374esac
2375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376
2377    cd "$ac_dir" || { ac_status=$?; continue; }
2378    # Check for guested configure.
2379    if test -f "$ac_srcdir/configure.gnu"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382    elif test -f "$ac_srcdir/configure"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure" --help=recursive
2385    else
2386      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387    fi || ac_status=$?
2388    cd "$ac_pwd" || { ac_status=$?; break; }
2389  done
2390fi
2391
2392test -n "$ac_init_help" && exit $ac_status
2393if $ac_init_version; then
2394  cat <<\_ACEOF
2395OpenJDK configure jdk9
2396generated by GNU Autoconf 2.69
2397
2398Copyright (C) 2012 Free Software Foundation, Inc.
2399This configure script is free software; the Free Software Foundation
2400gives unlimited permission to copy, distribute and modify it.
2401_ACEOF
2402  exit
2403fi
2404
2405## ------------------------ ##
2406## Autoconf initialization. ##
2407## ------------------------ ##
2408
2409# ac_fn_c_try_compile LINENO
2410# --------------------------
2411# Try to compile conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_compile ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext
2416  if { { ac_try="$ac_compile"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_compile") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest.$ac_objext; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_c_try_compile
2446
2447# ac_fn_cxx_try_compile LINENO
2448# ----------------------------
2449# Try to compile conftest.$ac_ext, and return whether this succeeded.
2450ac_fn_cxx_try_compile ()
2451{
2452  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453  rm -f conftest.$ac_objext
2454  if { { ac_try="$ac_compile"
2455case "(($ac_try" in
2456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457  *) ac_try_echo=$ac_try;;
2458esac
2459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460$as_echo "$ac_try_echo"; } >&5
2461  (eval "$ac_compile") 2>conftest.err
2462  ac_status=$?
2463  if test -s conftest.err; then
2464    grep -v '^ *+' conftest.err >conftest.er1
2465    cat conftest.er1 >&5
2466    mv -f conftest.er1 conftest.err
2467  fi
2468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469  test $ac_status = 0; } && {
2470	 test -z "$ac_cxx_werror_flag" ||
2471	 test ! -s conftest.err
2472       } && test -s conftest.$ac_objext; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_compile
2484
2485# ac_fn_c_try_cpp LINENO
2486# ----------------------
2487# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_c_try_cpp ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_cpp conftest.$ac_ext"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } > conftest.i && {
2507	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508	 test ! -s conftest.err
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515    ac_retval=1
2516fi
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_c_try_cpp
2521
2522# ac_fn_cxx_try_cpp LINENO
2523# ------------------------
2524# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_cpp ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  if { { ac_try="$ac_cpp conftest.$ac_ext"
2529case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536  ac_status=$?
2537  if test -s conftest.err; then
2538    grep -v '^ *+' conftest.err >conftest.er1
2539    cat conftest.er1 >&5
2540    mv -f conftest.er1 conftest.err
2541  fi
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; } > conftest.i && {
2544	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545	 test ! -s conftest.err
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552    ac_retval=1
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_cpp
2558
2559# ac_fn_c_try_link LINENO
2560# -----------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded.
2562ac_fn_c_try_link ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  rm -f conftest.$ac_objext conftest$ac_exeext
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>conftest.err
2574  ac_status=$?
2575  if test -s conftest.err; then
2576    grep -v '^ *+' conftest.err >conftest.er1
2577    cat conftest.er1 >&5
2578    mv -f conftest.er1 conftest.err
2579  fi
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && {
2582	 test -z "$ac_c_werror_flag" ||
2583	 test ! -s conftest.err
2584       } && test -s conftest$ac_exeext && {
2585	 test "$cross_compiling" = yes ||
2586	 test -x conftest$ac_exeext
2587       }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593	ac_retval=1
2594fi
2595  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597  # interfere with the next link command; also delete a directory that is
2598  # left behind by Apple's compiler.  We do this before executing the actions.
2599  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601  as_fn_set_status $ac_retval
2602
2603} # ac_fn_c_try_link
2604
2605# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606# ---------------------------------------------------------
2607# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608# the include files in INCLUDES and setting the cache variable VAR
2609# accordingly.
2610ac_fn_cxx_check_header_mongrel ()
2611{
2612  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613  if eval \${$3+:} false; then :
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if eval \${$3+:} false; then :
2617  $as_echo_n "(cached) " >&6
2618fi
2619eval ac_res=\$$3
2620	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622else
2623  # Is the header compilable?
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625$as_echo_n "checking $2 usability... " >&6; }
2626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_header_compiler=yes
2633else
2634  ac_header_compiler=no
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638$as_echo "$ac_header_compiler" >&6; }
2639
2640# Is the header present?
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642$as_echo_n "checking $2 presence... " >&6; }
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645#include <$2>
2646_ACEOF
2647if ac_fn_cxx_try_cpp "$LINENO"; then :
2648  ac_header_preproc=yes
2649else
2650  ac_header_preproc=no
2651fi
2652rm -f conftest.err conftest.i conftest.$ac_ext
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654$as_echo "$ac_header_preproc" >&6; }
2655
2656# So?  What about this header?
2657case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658  yes:no: )
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663    ;;
2664  no:yes:* )
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675( $as_echo "## ----------------------------------------- ##
2676## Report this to build-dev@openjdk.java.net ##
2677## ----------------------------------------- ##"
2678     ) | sed "s/^/$as_me: WARNING:     /" >&2
2679    ;;
2680esac
2681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682$as_echo_n "checking for $2... " >&6; }
2683if eval \${$3+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  eval "$3=\$ac_header_compiler"
2687fi
2688eval ac_res=\$$3
2689	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690$as_echo "$ac_res" >&6; }
2691fi
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693
2694} # ac_fn_cxx_check_header_mongrel
2695
2696# ac_fn_cxx_try_run LINENO
2697# ------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699# that executables *can* be run.
2700ac_fn_cxx_try_run ()
2701{
2702  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703  if { { ac_try="$ac_link"
2704case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_link") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714  { { case "(($ac_try" in
2715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716  *) ac_try_echo=$ac_try;;
2717esac
2718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719$as_echo "$ac_try_echo"; } >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723  test $ac_status = 0; }; }; then :
2724  ac_retval=0
2725else
2726  $as_echo "$as_me: program exited with status $ac_status" >&5
2727       $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730       ac_retval=$ac_status
2731fi
2732  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_try_run
2737
2738# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739# ---------------------------------------------------------
2740# Tests whether HEADER exists and can be compiled using the include files in
2741# INCLUDES, setting the cache variable VAR accordingly.
2742ac_fn_cxx_check_header_compile ()
2743{
2744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746$as_echo_n "checking for $2... " >&6; }
2747if eval \${$3+:} false; then :
2748  $as_echo_n "(cached) " >&6
2749else
2750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753#include <$2>
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  eval "$3=yes"
2757else
2758  eval "$3=no"
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767} # ac_fn_cxx_check_header_compile
2768
2769# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770# ----------------------------------------------
2771# Tries to find the compile-time value of EXPR in a program that includes
2772# INCLUDES, setting VAR accordingly. Returns whether the value could be
2773# computed
2774ac_fn_cxx_compute_int ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  if test "$cross_compiling" = yes; then
2778    # Depending upon the size, compute the lo and hi bounds.
2779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_lo=0 ac_mid=0
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=$ac_mid; break
2812else
2813  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814			if test $ac_lo -le $ac_mid; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) < 0)];
2830test_array [0] = 0;
2831return test_array [0];
2832
2833  ;
2834  return 0;
2835}
2836_ACEOF
2837if ac_fn_cxx_try_compile "$LINENO"; then :
2838  ac_hi=-1 ac_mid=-1
2839  while :; do
2840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h.  */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847test_array [0] = 0;
2848return test_array [0];
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854if ac_fn_cxx_try_compile "$LINENO"; then :
2855  ac_lo=$ac_mid; break
2856else
2857  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858			if test $ac_mid -le $ac_hi; then
2859			  ac_lo= ac_hi=
2860			  break
2861			fi
2862			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865  done
2866else
2867  ac_lo= ac_hi=
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872# Binary search between lo and hi bounds.
2873while test "x$ac_lo" != "x$ac_hi"; do
2874  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876/* end confdefs.h.  */
2877$4
2878int
2879main ()
2880{
2881static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882test_array [0] = 0;
2883return test_array [0];
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889if ac_fn_cxx_try_compile "$LINENO"; then :
2890  ac_hi=$ac_mid
2891else
2892  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893fi
2894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895done
2896case $ac_lo in #((
2897?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898'') ac_retval=1 ;;
2899esac
2900  else
2901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902/* end confdefs.h.  */
2903$4
2904static long int longval () { return $2; }
2905static unsigned long int ulongval () { return $2; }
2906#include <stdio.h>
2907#include <stdlib.h>
2908int
2909main ()
2910{
2911
2912  FILE *f = fopen ("conftest.val", "w");
2913  if (! f)
2914    return 1;
2915  if (($2) < 0)
2916    {
2917      long int i = longval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%ld", i);
2921    }
2922  else
2923    {
2924      unsigned long int i = ulongval ();
2925      if (i != ($2))
2926	return 1;
2927      fprintf (f, "%lu", i);
2928    }
2929  /* Do not output a trailing newline, as this causes \r\n confusion
2930     on some platforms.  */
2931  return ferror (f) || fclose (f) != 0;
2932
2933  ;
2934  return 0;
2935}
2936_ACEOF
2937if ac_fn_cxx_try_run "$LINENO"; then :
2938  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939else
2940  ac_retval=1
2941fi
2942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943  conftest.$ac_objext conftest.beam conftest.$ac_ext
2944rm -f conftest.val
2945
2946  fi
2947  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948  as_fn_set_status $ac_retval
2949
2950} # ac_fn_cxx_compute_int
2951
2952# ac_fn_cxx_try_link LINENO
2953# -------------------------
2954# Try to link conftest.$ac_ext, and return whether this succeeded.
2955ac_fn_cxx_try_link ()
2956{
2957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958  rm -f conftest.$ac_objext conftest$ac_exeext
2959  if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>conftest.err
2967  ac_status=$?
2968  if test -s conftest.err; then
2969    grep -v '^ *+' conftest.err >conftest.er1
2970    cat conftest.er1 >&5
2971    mv -f conftest.er1 conftest.err
2972  fi
2973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974  test $ac_status = 0; } && {
2975	 test -z "$ac_cxx_werror_flag" ||
2976	 test ! -s conftest.err
2977       } && test -s conftest$ac_exeext && {
2978	 test "$cross_compiling" = yes ||
2979	 test -x conftest$ac_exeext
2980       }; then :
2981  ac_retval=0
2982else
2983  $as_echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986	ac_retval=1
2987fi
2988  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990  # interfere with the next link command; also delete a directory that is
2991  # left behind by Apple's compiler.  We do this before executing the actions.
2992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994  as_fn_set_status $ac_retval
2995
2996} # ac_fn_cxx_try_link
2997
2998# ac_fn_cxx_check_func LINENO FUNC VAR
2999# ------------------------------------
3000# Tests whether FUNC exists, setting the cache variable VAR accordingly
3001ac_fn_cxx_check_func ()
3002{
3003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005$as_echo_n "checking for $2... " >&6; }
3006if eval \${$3+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010/* end confdefs.h.  */
3011/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013#define $2 innocuous_$2
3014
3015/* System header to define __stub macros and hopefully few prototypes,
3016    which can conflict with char $2 (); below.
3017    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018    <limits.h> exists even on freestanding compilers.  */
3019
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
3025
3026#undef $2
3027
3028/* Override any GCC internal prototype to avoid an error.
3029   Use char because int might match the return type of a GCC
3030   builtin and then its argument prototype would still apply.  */
3031#ifdef __cplusplus
3032extern "C"
3033#endif
3034char $2 ();
3035/* The GNU C library defines this for functions which it implements
3036    to always fail with ENOSYS.  Some functions are actually named
3037    something starting with __ and the normal name is an alias.  */
3038#if defined __stub_$2 || defined __stub___$2
3039choke me
3040#endif
3041
3042int
3043main ()
3044{
3045return $2 ();
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050if ac_fn_cxx_try_link "$LINENO"; then :
3051  eval "$3=yes"
3052else
3053  eval "$3=no"
3054fi
3055rm -f core conftest.err conftest.$ac_objext \
3056    conftest$ac_exeext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_cxx_check_func
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073$as_echo_n "checking for $2... " >&6; }
3074if eval \${$3+:} false; then :
3075  $as_echo_n "(cached) " >&6
3076else
3077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078/* end confdefs.h.  */
3079$4
3080#include <$2>
3081_ACEOF
3082if ac_fn_c_try_compile "$LINENO"; then :
3083  eval "$3=yes"
3084else
3085  eval "$3=no"
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093
3094} # ac_fn_c_check_header_compile
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
3099It was created by OpenJDK $as_me jdk9, which was
3100generated by GNU Autoconf 2.69.  Invocation command line was
3101
3102  $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120
3121/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134  IFS=$as_save_IFS
3135  test -z "$as_dir" && as_dir=.
3136    $as_echo "PATH: $as_dir"
3137  done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163  for ac_arg
3164  do
3165    case $ac_arg in
3166    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168    | -silent | --silent | --silen | --sile | --sil)
3169      continue ;;
3170    *\'*)
3171      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172    esac
3173    case $ac_pass in
3174    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175    2)
3176      as_fn_append ac_configure_args1 " '$ac_arg'"
3177      if test $ac_must_keep_next = true; then
3178	ac_must_keep_next=false # Got value, back to normal.
3179      else
3180	case $ac_arg in
3181	  *=* | --config-cache | -C | -disable-* | --disable-* \
3182	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184	  | -with-* | --with-* | -without-* | --without-* | --x)
3185	    case "$ac_configure_args0 " in
3186	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187	    esac
3188	    ;;
3189	  -* ) ac_must_keep_next=true ;;
3190	esac
3191      fi
3192      as_fn_append ac_configure_args " '$ac_arg'"
3193      ;;
3194    esac
3195  done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log.  We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206  # Save into config.log some information that might help in debugging.
3207  {
3208    echo
3209
3210    $as_echo "## ---------------- ##
3211## Cache variables. ##
3212## ---------------- ##"
3213    echo
3214    # The following way of writing the cache mishandles newlines in values,
3215(
3216  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217    eval ac_val=\$$ac_var
3218    case $ac_val in #(
3219    *${as_nl}*)
3220      case $ac_var in #(
3221      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223      esac
3224      case $ac_var in #(
3225      _ | IFS | as_nl) ;; #(
3226      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227      *) { eval $ac_var=; unset $ac_var;} ;;
3228      esac ;;
3229    esac
3230  done
3231  (set) 2>&1 |
3232    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233    *${as_nl}ac_space=\ *)
3234      sed -n \
3235	"s/'\''/'\''\\\\'\'''\''/g;
3236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237      ;; #(
3238    *)
3239      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240      ;;
3241    esac |
3242    sort
3243)
3244    echo
3245
3246    $as_echo "## ----------------- ##
3247## Output variables. ##
3248## ----------------- ##"
3249    echo
3250    for ac_var in $ac_subst_vars
3251    do
3252      eval ac_val=\$$ac_var
3253      case $ac_val in
3254      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255      esac
3256      $as_echo "$ac_var='\''$ac_val'\''"
3257    done | sort
3258    echo
3259
3260    if test -n "$ac_subst_files"; then
3261      $as_echo "## ------------------- ##
3262## File substitutions. ##
3263## ------------------- ##"
3264      echo
3265      for ac_var in $ac_subst_files
3266      do
3267	eval ac_val=\$$ac_var
3268	case $ac_val in
3269	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270	esac
3271	$as_echo "$ac_var='\''$ac_val'\''"
3272      done | sort
3273      echo
3274    fi
3275
3276    if test -s confdefs.h; then
3277      $as_echo "## ----------- ##
3278## confdefs.h. ##
3279## ----------- ##"
3280      echo
3281      cat confdefs.h
3282      echo
3283    fi
3284    test "$ac_signal" != 0 &&
3285      $as_echo "$as_me: caught signal $ac_signal"
3286    $as_echo "$as_me: exit $exit_status"
3287  } >&5
3288  rm -f core *.core core.conftest.* &&
3289    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290    exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
3334  # We do not want a PATH search for config.site.
3335  case $CONFIG_SITE in #((
3336    -*)  ac_site_file1=./$CONFIG_SITE;;
3337    */*) ac_site_file1=$CONFIG_SITE;;
3338    *)   ac_site_file1=./$CONFIG_SITE;;
3339  esac
3340elif test "x$prefix" != xNONE; then
3341  ac_site_file1=$prefix/share/config.site
3342  ac_site_file2=$prefix/etc/config.site
3343else
3344  ac_site_file1=$ac_default_prefix/share/config.site
3345  ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349  test "x$ac_site_file" = xNONE && continue
3350  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353    sed 's/^/| /' "$ac_site_file" >&5
3354    . "$ac_site_file" \
3355      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
3359  fi
3360done
3361
3362if test -r "$cache_file"; then
3363  # Some versions of bash will fail to source /dev/null (special files
3364  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368    case $cache_file in
3369      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370      *)                      . "./$cache_file";;
3371    esac
3372  fi
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376  >$cache_file
3377fi
3378
3379# Check that the precious variables saved in the cache have kept the same
3380# value.
3381ac_cache_corrupted=false
3382for ac_var in $ac_precious_vars; do
3383  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384  eval ac_new_set=\$ac_env_${ac_var}_set
3385  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386  eval ac_new_val=\$ac_env_${ac_var}_value
3387  case $ac_old_set,$ac_new_set in
3388    set,)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,set)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,);;
3397    *)
3398      if test "x$ac_old_val" != "x$ac_new_val"; then
3399	# differences in whitespace do not lead to failure.
3400	ac_old_val_w=`echo x $ac_old_val`
3401	ac_new_val_w=`echo x $ac_new_val`
3402	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405	  ac_cache_corrupted=:
3406	else
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409	  eval $ac_var=\$ac_old_val
3410	fi
3411	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415      fi;;
3416  esac
3417  # Pass precious variables to config.status.
3418  if test "$ac_new_set" = set; then
3419    case $ac_new_val in
3420    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421    *) ac_arg=$ac_var=$ac_new_val ;;
3422    esac
3423    case " $ac_configure_args " in
3424      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426    esac
3427  fi
3428done
3429if $ac_cache_corrupted; then
3430  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435fi
3436## -------------------- ##
3437## Main body of script. ##
3438## -------------------- ##
3439
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446
3447
3448ac_aux_dir=
3449for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450  if test -f "$ac_dir/install-sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install-sh -c"
3453    break
3454  elif test -f "$ac_dir/install.sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install.sh -c"
3457    break
3458  elif test -f "$ac_dir/shtool"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/shtool install -c"
3461    break
3462  fi
3463done
3464if test -z "$ac_aux_dir"; then
3465  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
3466fi
3467
3468# These three variables are undocumented and unsupported,
3469# and are intended to be withdrawn in a future Autoconf release.
3470# They can cause serious problems if a builder's source tree is in a directory
3471# whose full name contains unusual characters.
3472ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475
3476
3477# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478
3479#
3480# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504#
3505# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3506#
3507# This program is free software; you can redistribute it and/or modify
3508# it under the terms of the GNU General Public License as published by
3509# the Free Software Foundation; either version 2 of the License, or
3510# (at your option) any later version.
3511#
3512# This program is distributed in the hope that it will be useful, but
3513# WITHOUT ANY WARRANTY; without even the implied warranty of
3514# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515# General Public License for more details.
3516#
3517# You should have received a copy of the GNU General Public License
3518# along with this program; if not, write to the Free Software
3519# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520#
3521# As a special exception to the GNU General Public License, if you
3522# distribute this file as part of a program that contains a
3523# configuration script generated by Autoconf, you may include it under
3524# the same distribution terms that you use for the rest of that program.
3525
3526# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527# ----------------------------------
3528# PKG_PROG_PKG_CONFIG
3529
3530# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531#
3532# Check to see whether a particular set of modules exists.  Similar
3533# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534#
3535#
3536# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537# this or PKG_CHECK_MODULES is called, or make sure to call
3538# PKG_CHECK_EXISTS manually
3539# --------------------------------------------------------------
3540
3541
3542
3543# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544# ---------------------------------------------
3545# _PKG_CONFIG
3546
3547# _PKG_SHORT_ERRORS_SUPPORTED
3548# -----------------------------
3549# _PKG_SHORT_ERRORS_SUPPORTED
3550
3551
3552# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553# [ACTION-IF-NOT-FOUND])
3554#
3555#
3556# Note that if there is a possibility the first call to
3557# PKG_CHECK_MODULES might not happen, you should be sure to include an
3558# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559#
3560#
3561# --------------------------------------------------------------
3562# PKG_CHECK_MODULES
3563
3564
3565# Include these first...
3566#
3567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591# Create a function/macro that takes a series of named arguments. The call is
3592# similar to AC_DEFUN, but the setup of the function looks like this:
3593# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594# ... do something
3595#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596# ])
3597# A star (*) in front of a named argument means that it is required and it's
3598# presence will be verified. To pass e.g. the first value as a normal indexed
3599# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601# "ARG_FOO".
3602#
3603# The generated function can be called like this:
3604# MYFUNC(FOO: [foo-val],
3605#     BAR: [
3606#         $ECHO hello world
3607#     ])
3608# Note that the argument value must start on the same line as the argument name.
3609#
3610# Argument 1: Name of the function to define
3611# Argument 2: List of legal named arguments, with a * prefix for required arguments
3612# Argument 3: Argument array to treat as named, typically $@
3613# Argument 4: The main function body
3614
3615
3616# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617# If so, then append $1 to $2 \
3618# Also set JVM_ARG_OK to true/false depending on outcome.
3619
3620
3621# Appends a string to a path variable, only adding the : when needed.
3622
3623
3624# Prepends a string to a path variable, only adding the : when needed.
3625
3626
3627# This will make sure the given variable points to a full and proper
3628# path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# $1: The name of the variable to fix
3635
3636
3637# This will make sure the given variable points to a executable
3638# with a full and proper path. This means:
3639# 1) There will be no spaces in the path. On unix platforms,
3640#    spaces in the path will result in an error. On Windows,
3641#    the path will be rewritten using short-style to be space-free.
3642# 2) The path will be absolute, and it will be in unix-style (on
3643#     cygwin).
3644# Any arguments given to the executable is preserved.
3645# If the input variable does not have a directory specification, then
3646# it need to be in the PATH.
3647# $1: The name of the variable to fix
3648
3649
3650
3651
3652# Register a --with argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --with-
3654
3655
3656# Register a --enable argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --enable-
3658# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659# $3: Messages to user.
3660
3661
3662
3663
3664# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665# $1: variable to check
3666
3667
3668# Check that there are no unprocessed overridden variables left.
3669# If so, they are an incorrect argument and we will exit with an error.
3670
3671
3672# Setup a tool for the given variable. If correctly specified by the user,
3673# use that value, otherwise search for the tool using the supplied code snippet.
3674# $1: variable to set
3675# $2: code snippet to call to look for the tool
3676# $3: code snippet to call if variable was used to find tool
3677
3678
3679# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682# $3: [path]
3683
3684
3685# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686# $1: variable to set
3687# $2: executable name (or list of names) to look for
3688
3689
3690# Like BASIC_PATH_PROGS but fails if no tool was found.
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693# $3: [path]
3694
3695
3696# Like BASIC_SETUP_TOOL but fails if no tool was found.
3697# $1: variable to set
3698# $2: autoconf macro to call to look for the special tool
3699
3700
3701# Setup the most fundamental tools that relies on not much else to set up,
3702# but is used by much of the early bootstrap code.
3703
3704
3705# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706
3707
3708# Evaluates platform specific overrides for devkit variables.
3709# $1: Name of variable
3710
3711
3712
3713
3714
3715
3716#%%% Simple tools %%%
3717
3718# Check if we have found a usable version of make
3719# $1: the path to a potential make binary (or empty)
3720# $2: the description on how we found this
3721
3722
3723
3724
3725# Goes looking for a usable version of GNU make.
3726
3727
3728
3729
3730
3731
3732
3733
3734# Check if build directory is on local disk. If not possible to determine,
3735# we prefer to claim it's local.
3736# Argument 1: directory to test
3737# Argument 2: what to do if it is on local disk
3738# Argument 3: what to do otherwise (remote disk or failure)
3739
3740
3741# Check that source files have basic read permissions set. This might
3742# not be the case in cygwin in certain conditions.
3743
3744
3745
3746
3747# Check for support for specific options in bash
3748
3749
3750################################################################################
3751#
3752# Default make target
3753#
3754
3755
3756# Code to run after AC_OUTPUT
3757
3758
3759#
3760# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3761# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3762#
3763# This code is free software; you can redistribute it and/or modify it
3764# under the terms of the GNU General Public License version 2 only, as
3765# published by the Free Software Foundation.  Oracle designates this
3766# particular file as subject to the "Classpath" exception as provided
3767# by Oracle in the LICENSE file that accompanied this code.
3768#
3769# This code is distributed in the hope that it will be useful, but WITHOUT
3770# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3771# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3772# version 2 for more details (a copy is included in the LICENSE file that
3773# accompanied this code).
3774#
3775# You should have received a copy of the GNU General Public License version
3776# 2 along with this work; if not, write to the Free Software Foundation,
3777# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3778#
3779# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3780# or visit www.oracle.com if you need additional information or have any
3781# questions.
3782#
3783
3784
3785
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# Helper function which possibly converts a path using DOS-style short mode.
3794# If so, the updated path is stored in $new_path.
3795# $1: The path to check
3796
3797
3798# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3799# and could probably be heavily simplified. However, all changes in this
3800# area tend to need lot of testing in different scenarios, and in lack of
3801# proper unit testing, cleaning this up has not been deemed worth the effort
3802# at the moment.
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3813
3814
3815
3816
3817# ... then the rest
3818#
3819# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3820# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3821#
3822# This code is free software; you can redistribute it and/or modify it
3823# under the terms of the GNU General Public License version 2 only, as
3824# published by the Free Software Foundation.  Oracle designates this
3825# particular file as subject to the "Classpath" exception as provided
3826# by Oracle in the LICENSE file that accompanied this code.
3827#
3828# This code is distributed in the hope that it will be useful, but WITHOUT
3829# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3830# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3831# version 2 for more details (a copy is included in the LICENSE file that
3832# accompanied this code).
3833#
3834# You should have received a copy of the GNU General Public License version
3835# 2 along with this work; if not, write to the Free Software Foundation,
3836# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3837#
3838# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3839# or visit www.oracle.com if you need additional information or have any
3840# questions.
3841#
3842
3843########################################################################
3844# This file handles detection of the Boot JDK. The Boot JDK detection
3845# process has been developed as a response to solve a complex real-world
3846# problem. Initially, it was simple, but it has grown as platform after
3847# platform, idiosyncracy after idiosyncracy has been supported.
3848#
3849# The basic idea is this:
3850# 1) You need an acceptable *) JDK to use as a Boot JDK
3851# 2) There are several ways to locate a JDK, that are mostly platform
3852#    dependent **)
3853# 3) You can have multiple JDKs installed
3854# 4) If possible, configure should try to dig out an acceptable JDK
3855#    automatically, without having to resort to command-line options
3856#
3857# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3858#     javac) and not a JRE, etc.
3859#
3860# **) On Windows we typically use a well-known path.
3861#     On MacOSX we typically use the tool java_home.
3862#     On Linux we typically find javac in the $PATH, and then follow a
3863#     chain of symlinks that often ends up in a real JDK.
3864#
3865# This leads to the code where we check in different ways to locate a
3866# JDK, and if one is found, check if it is acceptable. If not, we print
3867# our reasons for rejecting it (useful when debugging non-working
3868# configure situations) and continue checking the next one.
3869########################################################################
3870
3871# Execute the check given as argument, and verify the result
3872# If the Boot JDK was previously found, do nothing
3873# $1 A command line (typically autoconf macro) to execute
3874
3875
3876# Test: Is bootjdk explicitly set by command line arguments?
3877
3878
3879# Test: Is $JAVA_HOME set?
3880
3881
3882# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3883
3884
3885# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3886# $1: Argument to the java_home binary (optional)
3887
3888
3889# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3890
3891
3892# Look for a jdk in the given path. If there are multiple, try to select the newest.
3893# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3894# $1 = Path to directory containing jdk installations.
3895# $2 = String to append to the found JDK directory to get the proper JDK home
3896
3897
3898# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3899# environmental variable as base for where to look.
3900# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3901
3902
3903# Test: Is there a JDK installed in default, well-known locations?
3904
3905
3906# Check that a command-line tool in the Boot JDK is correct
3907# $1 = name of variable to assign
3908# $2 = name of binary
3909
3910
3911###############################################################################
3912#
3913# We need a Boot JDK to bootstrap the build.
3914#
3915
3916
3917
3918
3919
3920# BUILD_JDK: the location of the latest JDK that can run
3921#   on the host system and supports the target class file version
3922#   generated in this JDK build.  This variable should only be
3923#   used after the launchers are built.
3924#
3925
3926# Execute the check given as argument, and verify the result.
3927# If the JDK was previously found, do nothing.
3928# $1 A command line (typically autoconf macro) to execute
3929
3930
3931# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3932# is different than the host system doing the build (e.g. cross-compilation),
3933# a special BUILD_JDK is built as part of the build process.  An external
3934# prebuilt BUILD_JDK can also be supplied.
3935
3936
3937#
3938# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3939# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3940#
3941# This code is free software; you can redistribute it and/or modify it
3942# under the terms of the GNU General Public License version 2 only, as
3943# published by the Free Software Foundation.  Oracle designates this
3944# particular file as subject to the "Classpath" exception as provided
3945# by Oracle in the LICENSE file that accompanied this code.
3946#
3947# This code is distributed in the hope that it will be useful, but WITHOUT
3948# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3949# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3950# version 2 for more details (a copy is included in the LICENSE file that
3951# accompanied this code).
3952#
3953# You should have received a copy of the GNU General Public License version
3954# 2 along with this work; if not, write to the Free Software Foundation,
3955# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3956#
3957# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3958# or visit www.oracle.com if you need additional information or have any
3959# questions.
3960#
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978################################################################################
3979#
3980# Runs icecc-create-env once and prints the error if it fails
3981#
3982# $1: arguments to icecc-create-env
3983# $2: log file
3984#
3985
3986
3987################################################################################
3988#
3989# Optionally enable distributed compilation of native code using icecc/icecream
3990#
3991
3992
3993
3994
3995
3996
3997
3998#
3999# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4000# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4001#
4002# This code is free software; you can redistribute it and/or modify it
4003# under the terms of the GNU General Public License version 2 only, as
4004# published by the Free Software Foundation.  Oracle designates this
4005# particular file as subject to the "Classpath" exception as provided
4006# by Oracle in the LICENSE file that accompanied this code.
4007#
4008# This code is distributed in the hope that it will be useful, but WITHOUT
4009# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4010# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4011# version 2 for more details (a copy is included in the LICENSE file that
4012# accompanied this code).
4013#
4014# You should have received a copy of the GNU General Public License version
4015# 2 along with this work; if not, write to the Free Software Foundation,
4016# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4017#
4018# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4019# or visit www.oracle.com if you need additional information or have any
4020# questions.
4021#
4022
4023################################################################################
4024#
4025# Setup ABI profile (for arm)
4026#
4027
4028
4029# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4030# corresponding configure arguments instead
4031
4032
4033# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4034# that configure can use them while detecting compilers.
4035# TOOLCHAIN_TYPE is available here.
4036# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4037
4038
4039
4040
4041
4042
4043# Documentation on common flags used for solstudio in HIGHEST.
4044#
4045# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4046#          done with care, there are some assumptions below that need to
4047#          be understood about the use of pointers, and IEEE behavior.
4048#
4049# -fns: Use non-standard floating point mode (not IEEE 754)
4050# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4051# -fsingle: Use single precision floating point with 'float'
4052# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4053#   (Source with excessing pointer casting and data access with mixed
4054#    pointer types are not recommended)
4055# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4056#   (If you expect perfect errno behavior, do not use this)
4057# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4058# -xrestrict: Pointer parameters to functions do not overlap
4059#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4060#    If you pass in multiple pointers to the same data, do not use this)
4061# -xlibmil: Inline some library routines
4062#   (If you expect perfect errno behavior, do not use this)
4063# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4064#   (If you expect perfect errno behavior, do not use this)
4065#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4066
4067    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4068    # Bug?
4069    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4070    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4071    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4072    #fi
4073
4074
4075
4076
4077
4078
4079################################################################################
4080# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4081#      conditionals against.
4082# $2 - Optional prefix for each variable defined.
4083
4084
4085# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                  IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the C compiler supports an argument
4089
4090
4091
4092
4093# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094#                                    IF_FALSE: [RUN-IF-FALSE])
4095# ------------------------------------------------------------
4096# Check that the C++ compiler supports an argument
4097
4098
4099
4100
4101# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4102#                                IF_FALSE: [RUN-IF-FALSE])
4103# ------------------------------------------------------------
4104# Check that the C and C++ compilers support an argument
4105
4106
4107
4108
4109# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4110#                                   IF_FALSE: [RUN-IF-FALSE])
4111# ------------------------------------------------------------
4112# Check that the linker support an argument
4113
4114
4115
4116
4117
4118
4119# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4120# Arguments:
4121# $1 - Optional prefix for each variable defined.
4122
4123
4124#
4125# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4126# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4127#
4128# This code is free software; you can redistribute it and/or modify it
4129# under the terms of the GNU General Public License version 2 only, as
4130# published by the Free Software Foundation.  Oracle designates this
4131# particular file as subject to the "Classpath" exception as provided
4132# by Oracle in the LICENSE file that accompanied this code.
4133#
4134# This code is distributed in the hope that it will be useful, but WITHOUT
4135# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4136# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4137# version 2 for more details (a copy is included in the LICENSE file that
4138# accompanied this code).
4139#
4140# You should have received a copy of the GNU General Public License version
4141# 2 along with this work; if not, write to the Free Software Foundation,
4142# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4143#
4144# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4145# or visit www.oracle.com if you need additional information or have any
4146# questions.
4147#
4148
4149
4150
4151
4152
4153cygwin_help() {
4154  case $1 in
4155    unzip)
4156      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4157      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4158      ;;
4159    zip)
4160      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4161      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4162      ;;
4163    make)
4164      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4165      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4166      ;;
4167    freetype)
4168      HELP_MSG="
4169The freetype library can now be build during the configure process.
4170Download the freetype sources and unpack them into an arbitrary directory:
4171
4172wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4173tar -xzf freetype-2.5.3.tar.gz
4174
4175Then run configure with '--with-freetype-src=<freetype_src>'. This will
4176automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4177builds or into '<freetype_src>/lib32' for 32-bit builds.
4178Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4179and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4180
4181Alternatively you can unpack the sources like this to use the default directory:
4182
4183tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4184      ;;
4185  esac
4186}
4187
4188msys_help() {
4189  PKGHANDLER_COMMAND=""
4190}
4191
4192apt_help() {
4193  case $1 in
4194    reduced)
4195      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4196    devkit)
4197      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4198    openjdk)
4199      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4200    alsa)
4201      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4202    cups)
4203      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4204    freetype)
4205      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4206    ffi)
4207      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4208    x11)
4209      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4210    ccache)
4211      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4212    dtrace)
4213      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4214    elf)
4215      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4216  esac
4217}
4218
4219yum_help() {
4220  case $1 in
4221    devkit)
4222      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4223    openjdk)
4224      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4225    alsa)
4226      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4227    cups)
4228      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4229    freetype)
4230      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4231    x11)
4232      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4233    ccache)
4234      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4235    elf)
4236      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4237  esac
4238}
4239
4240brew_help() {
4241  case $1 in
4242    openjdk)
4243      PKGHANDLER_COMMAND="brew cask install java" ;;
4244    freetype)
4245      PKGHANDLER_COMMAND="brew install freetype" ;;
4246    ccache)
4247      PKGHANDLER_COMMAND="brew install ccache" ;;
4248  esac
4249}
4250
4251port_help() {
4252  PKGHANDLER_COMMAND=""
4253}
4254
4255pkgutil_help() {
4256  PKGHANDLER_COMMAND=""
4257}
4258
4259pkgadd_help() {
4260  PKGHANDLER_COMMAND=""
4261}
4262
4263# This function will check if we're called from the "configure" wrapper while
4264# printing --help. If so, we will print out additional information that can
4265# only be extracted within the autoconf script, and then exit. This must be
4266# called at the very beginning in configure.ac.
4267
4268
4269
4270
4271
4272
4273#
4274# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4275# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4276#
4277# This code is free software; you can redistribute it and/or modify it
4278# under the terms of the GNU General Public License version 2 only, as
4279# published by the Free Software Foundation.  Oracle designates this
4280# particular file as subject to the "Classpath" exception as provided
4281# by Oracle in the LICENSE file that accompanied this code.
4282#
4283# This code is distributed in the hope that it will be useful, but WITHOUT
4284# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4285# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4286# version 2 for more details (a copy is included in the LICENSE file that
4287# accompanied this code).
4288#
4289# You should have received a copy of the GNU General Public License version
4290# 2 along with this work; if not, write to the Free Software Foundation,
4291# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4292#
4293# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4294# or visit www.oracle.com if you need additional information or have any
4295# questions.
4296#
4297
4298# All valid JVM features, regardless of platform
4299VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4300    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4301    static-build link-time-opt aot"
4302
4303# All valid JVM variants
4304VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4305
4306###############################################################################
4307# Check if the specified JVM variant should be built. To be used in shell if
4308# constructs, like this:
4309# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4310#
4311# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4312
4313# Definition kept in one line to allow inlining in if statements.
4314# Additional [] needed to keep m4 from mangling shell constructs.
4315
4316
4317###############################################################################
4318# Check if the specified JVM features are explicitly enabled. To be used in
4319# shell if constructs, like this:
4320# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4321#
4322# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4323
4324# Definition kept in one line to allow inlining in if statements.
4325# Additional [] needed to keep m4 from mangling shell constructs.
4326
4327
4328###############################################################################
4329# Check which variants of the JVM that we want to build. Available variants are:
4330#   server: normal interpreter, and a tiered C1/C2 compiler
4331#   client: normal interpreter, and C1 (no C2 compiler)
4332#   minimal: reduced form of client with optional features stripped out
4333#   core: normal interpreter only, no compiler
4334#   zero: C++ based interpreter only, no compiler
4335#   zeroshark: C++ based interpreter, and a llvm-based compiler
4336#   custom: baseline JVM with no default features
4337#
4338
4339
4340###############################################################################
4341# Check if dtrace should be enabled and has all prerequisites present.
4342#
4343
4344
4345################################################################################
4346# Check if AOT should be enabled
4347#
4348
4349
4350###############################################################################
4351# Set up all JVM features for each JVM variant.
4352#
4353
4354
4355###############################################################################
4356# Validate JVM features once all setup is complete, including custom setup.
4357#
4358
4359
4360################################################################################
4361#
4362# Specify which sources will be used to build the 64-bit ARM port
4363#
4364# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4365# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4366#
4367
4368
4369
4370################################################################################
4371# Check if gtest should be built
4372#
4373
4374
4375#
4376# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4377# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4378#
4379# This code is free software; you can redistribute it and/or modify it
4380# under the terms of the GNU General Public License version 2 only, as
4381# published by the Free Software Foundation.  Oracle designates this
4382# particular file as subject to the "Classpath" exception as provided
4383# by Oracle in the LICENSE file that accompanied this code.
4384#
4385# This code is distributed in the hope that it will be useful, but WITHOUT
4386# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4387# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4388# version 2 for more details (a copy is included in the LICENSE file that
4389# accompanied this code).
4390#
4391# You should have received a copy of the GNU General Public License version
4392# 2 along with this work; if not, write to the Free Software Foundation,
4393# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4394#
4395# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4396# or visit www.oracle.com if you need additional information or have any
4397# questions.
4398#
4399
4400###############################################################################
4401# Check which variant of the JDK that we want to build.
4402# Currently we have:
4403#    normal:   standard edition
4404# but the custom make system may add other variants
4405#
4406# Effectively the JDK variant gives a name to a specific set of
4407# modules to compile into the JDK.
4408
4409
4410###############################################################################
4411# Set the debug level
4412#    release: no debug information, all optimizations, no asserts.
4413#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4414#    fastdebug: debug information (-g), all optimizations, all asserts
4415#    slowdebug: debug information (-g), no optimizations, all asserts
4416
4417
4418###############################################################################
4419#
4420# Should we build only OpenJDK even if closed sources are present?
4421#
4422
4423
4424
4425
4426###############################################################################
4427#
4428# Enable or disable the elliptic curve crypto implementation
4429#
4430
4431
4432
4433
4434################################################################################
4435#
4436# Gcov coverage data for hotspot
4437#
4438
4439
4440################################################################################
4441#
4442# Static build support.  When enabled will generate static
4443# libraries instead of shared libraries for all JDK libs.
4444#
4445
4446
4447################################################################################
4448#
4449# jlink options.
4450# We always keep packaged modules in JDK image.
4451#
4452
4453
4454################################################################################
4455#
4456# Check if building of the jtreg failure handler should be enabled.
4457#
4458
4459
4460################################################################################
4461#
4462# Enable or disable generation of the classlist at build time
4463#
4464
4465
4466#
4467# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4468# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4469#
4470# This code is free software; you can redistribute it and/or modify it
4471# under the terms of the GNU General Public License version 2 only, as
4472# published by the Free Software Foundation.  Oracle designates this
4473# particular file as subject to the "Classpath" exception as provided
4474# by Oracle in the LICENSE file that accompanied this code.
4475#
4476# This code is distributed in the hope that it will be useful, but WITHOUT
4477# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4478# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4479# version 2 for more details (a copy is included in the LICENSE file that
4480# accompanied this code).
4481#
4482# You should have received a copy of the GNU General Public License version
4483# 2 along with this work; if not, write to the Free Software Foundation,
4484# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4485#
4486# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4487# or visit www.oracle.com if you need additional information or have any
4488# questions.
4489#
4490
4491###############################################################################
4492#
4493# Setup version numbers
4494#
4495
4496# Verify that a given string represents a valid version number, and assign it
4497# to a variable.
4498
4499# Argument 1: the variable to assign to
4500# Argument 2: the value given by the user
4501
4502
4503
4504
4505#
4506# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4508#
4509# This code is free software; you can redistribute it and/or modify it
4510# under the terms of the GNU General Public License version 2 only, as
4511# published by the Free Software Foundation.  Oracle designates this
4512# particular file as subject to the "Classpath" exception as provided
4513# by Oracle in the LICENSE file that accompanied this code.
4514#
4515# This code is distributed in the hope that it will be useful, but WITHOUT
4516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4518# version 2 for more details (a copy is included in the LICENSE file that
4519# accompanied this code).
4520#
4521# You should have received a copy of the GNU General Public License version
4522# 2 along with this work; if not, write to the Free Software Foundation,
4523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4524#
4525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4526# or visit www.oracle.com if you need additional information or have any
4527# questions.
4528#
4529
4530# Major library component reside in separate files.
4531#
4532# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4533# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4534#
4535# This code is free software; you can redistribute it and/or modify it
4536# under the terms of the GNU General Public License version 2 only, as
4537# published by the Free Software Foundation.  Oracle designates this
4538# particular file as subject to the "Classpath" exception as provided
4539# by Oracle in the LICENSE file that accompanied this code.
4540#
4541# This code is distributed in the hope that it will be useful, but WITHOUT
4542# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4543# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4544# version 2 for more details (a copy is included in the LICENSE file that
4545# accompanied this code).
4546#
4547# You should have received a copy of the GNU General Public License version
4548# 2 along with this work; if not, write to the Free Software Foundation,
4549# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4550#
4551# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4552# or visit www.oracle.com if you need additional information or have any
4553# questions.
4554#
4555
4556################################################################################
4557# Setup alsa (Advanced Linux Sound Architecture)
4558################################################################################
4559
4560
4561#
4562# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586################################################################################
4587# Setup bundled libraries.
4588#
4589# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4590# OpenJDK repository. Default is to use these libraries as bundled, but they
4591# might be replaced by en external version by the user.
4592################################################################################
4593
4594
4595################################################################################
4596# Setup libjpeg
4597################################################################################
4598
4599
4600################################################################################
4601# Setup giflib
4602################################################################################
4603
4604
4605################################################################################
4606# Setup libpng
4607################################################################################
4608
4609
4610################################################################################
4611# Setup zlib
4612################################################################################
4613
4614
4615################################################################################
4616# Setup lcms (Little CMS)
4617################################################################################
4618
4619
4620#
4621# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4622# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4623#
4624# This code is free software; you can redistribute it and/or modify it
4625# under the terms of the GNU General Public License version 2 only, as
4626# published by the Free Software Foundation.  Oracle designates this
4627# particular file as subject to the "Classpath" exception as provided
4628# by Oracle in the LICENSE file that accompanied this code.
4629#
4630# This code is distributed in the hope that it will be useful, but WITHOUT
4631# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4632# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4633# version 2 for more details (a copy is included in the LICENSE file that
4634# accompanied this code).
4635#
4636# You should have received a copy of the GNU General Public License version
4637# 2 along with this work; if not, write to the Free Software Foundation,
4638# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4639#
4640# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4641# or visit www.oracle.com if you need additional information or have any
4642# questions.
4643#
4644
4645################################################################################
4646# Setup cups (Common Unix Printing System)
4647################################################################################
4648
4649
4650#
4651# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4652# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4653#
4654# This code is free software; you can redistribute it and/or modify it
4655# under the terms of the GNU General Public License version 2 only, as
4656# published by the Free Software Foundation.  Oracle designates this
4657# particular file as subject to the "Classpath" exception as provided
4658# by Oracle in the LICENSE file that accompanied this code.
4659#
4660# This code is distributed in the hope that it will be useful, but WITHOUT
4661# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4662# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4663# version 2 for more details (a copy is included in the LICENSE file that
4664# accompanied this code).
4665#
4666# You should have received a copy of the GNU General Public License version
4667# 2 along with this work; if not, write to the Free Software Foundation,
4668# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4669#
4670# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4671# or visit www.oracle.com if you need additional information or have any
4672# questions.
4673#
4674
4675################################################################################
4676# Setup libffi (Foreign Function Interface)
4677################################################################################
4678
4679
4680#
4681# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4683#
4684# This code is free software; you can redistribute it and/or modify it
4685# under the terms of the GNU General Public License version 2 only, as
4686# published by the Free Software Foundation.  Oracle designates this
4687# particular file as subject to the "Classpath" exception as provided
4688# by Oracle in the LICENSE file that accompanied this code.
4689#
4690# This code is distributed in the hope that it will be useful, but WITHOUT
4691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4693# version 2 for more details (a copy is included in the LICENSE file that
4694# accompanied this code).
4695#
4696# You should have received a copy of the GNU General Public License version
4697# 2 along with this work; if not, write to the Free Software Foundation,
4698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4699#
4700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4701# or visit www.oracle.com if you need additional information or have any
4702# questions.
4703#
4704
4705################################################################################
4706# Build the freetype lib from source
4707################################################################################
4708
4709
4710################################################################################
4711# Check if a potential freeype library match is correct and usable
4712################################################################################
4713
4714
4715################################################################################
4716# Setup freetype (The FreeType2 font rendering library)
4717################################################################################
4718
4719
4720#
4721# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4722# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4723#
4724# This code is free software; you can redistribute it and/or modify it
4725# under the terms of the GNU General Public License version 2 only, as
4726# published by the Free Software Foundation.  Oracle designates this
4727# particular file as subject to the "Classpath" exception as provided
4728# by Oracle in the LICENSE file that accompanied this code.
4729#
4730# This code is distributed in the hope that it will be useful, but WITHOUT
4731# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4732# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4733# version 2 for more details (a copy is included in the LICENSE file that
4734# accompanied this code).
4735#
4736# You should have received a copy of the GNU General Public License version
4737# 2 along with this work; if not, write to the Free Software Foundation,
4738# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4739#
4740# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4741# or visit www.oracle.com if you need additional information or have any
4742# questions.
4743#
4744
4745################################################################################
4746# Setup the standard C/C++ runtime libraries.
4747#
4748# Most importantly, determine if stdc++ should be linked statically or
4749# dynamically.
4750################################################################################
4751
4752
4753#
4754# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4756#
4757# This code is free software; you can redistribute it and/or modify it
4758# under the terms of the GNU General Public License version 2 only, as
4759# published by the Free Software Foundation.  Oracle designates this
4760# particular file as subject to the "Classpath" exception as provided
4761# by Oracle in the LICENSE file that accompanied this code.
4762#
4763# This code is distributed in the hope that it will be useful, but WITHOUT
4764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4766# version 2 for more details (a copy is included in the LICENSE file that
4767# accompanied this code).
4768#
4769# You should have received a copy of the GNU General Public License version
4770# 2 along with this work; if not, write to the Free Software Foundation,
4771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4772#
4773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4774# or visit www.oracle.com if you need additional information or have any
4775# questions.
4776#
4777
4778################################################################################
4779# Setup X11 Windows system
4780################################################################################
4781
4782
4783#
4784# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4785# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4786#
4787# This code is free software; you can redistribute it and/or modify it
4788# under the terms of the GNU General Public License version 2 only, as
4789# published by the Free Software Foundation.  Oracle designates this
4790# particular file as subject to the "Classpath" exception as provided
4791# by Oracle in the LICENSE file that accompanied this code.
4792#
4793# This code is distributed in the hope that it will be useful, but WITHOUT
4794# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4795# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4796# version 2 for more details (a copy is included in the LICENSE file that
4797# accompanied this code).
4798#
4799# You should have received a copy of the GNU General Public License version
4800# 2 along with this work; if not, write to the Free Software Foundation,
4801# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4802#
4803# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4804# or visit www.oracle.com if you need additional information or have any
4805# questions.
4806#
4807
4808################################################################################
4809# Setup libelf (ELF library)
4810################################################################################
4811
4812
4813
4814################################################################################
4815# Determine which libraries are needed for this configuration
4816################################################################################
4817
4818
4819################################################################################
4820# Parse library options, and setup needed libraries
4821################################################################################
4822
4823
4824################################################################################
4825# Setup llvm (Low-Level VM)
4826################################################################################
4827
4828
4829################################################################################
4830# Setup various libraries, typically small system libraries
4831################################################################################
4832
4833
4834################################################################################
4835# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4836# redistribute it in the test image.
4837################################################################################
4838
4839
4840
4841#
4842# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4843# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4844#
4845# This code is free software; you can redistribute it and/or modify it
4846# under the terms of the GNU General Public License version 2 only, as
4847# published by the Free Software Foundation.  Oracle designates this
4848# particular file as subject to the "Classpath" exception as provided
4849# by Oracle in the LICENSE file that accompanied this code.
4850#
4851# This code is distributed in the hope that it will be useful, but WITHOUT
4852# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4853# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4854# version 2 for more details (a copy is included in the LICENSE file that
4855# accompanied this code).
4856#
4857# You should have received a copy of the GNU General Public License version
4858# 2 along with this work; if not, write to the Free Software Foundation,
4859# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4860#
4861# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4862# or visit www.oracle.com if you need additional information or have any
4863# questions.
4864#
4865
4866# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4867# Converts autoconf style CPU name to OpenJDK style, into
4868# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4869
4870
4871# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4872# Converts autoconf style OS name to OpenJDK style, into
4873# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4874
4875
4876# Expects $host_os $host_cpu $build_os and $build_cpu
4877# and $with_target_bits to have been setup!
4878#
4879# Translate the standard triplet(quadruplet) definition
4880# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4881# OPENJDK_BUILD_OS, etc.
4882
4883
4884# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4885# accordingly. Must be done after setting up build and target system, but before
4886# doing anything else with these values.
4887
4888
4889# Setup the legacy variables, for controlling the old makefiles.
4890#
4891
4892
4893# $1 - Either TARGET or BUILD to setup the variables for.
4894
4895
4896
4897
4898#%%% Build and target systems %%%
4899
4900
4901
4902
4903# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4904# Add -mX to various FLAGS variables.
4905
4906
4907
4908
4909
4910
4911#
4912# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4913# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4914#
4915# This code is free software; you can redistribute it and/or modify it
4916# under the terms of the GNU General Public License version 2 only, as
4917# published by the Free Software Foundation.  Oracle designates this
4918# particular file as subject to the "Classpath" exception as provided
4919# by Oracle in the LICENSE file that accompanied this code.
4920#
4921# This code is distributed in the hope that it will be useful, but WITHOUT
4922# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4923# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4924# version 2 for more details (a copy is included in the LICENSE file that
4925# accompanied this code).
4926#
4927# You should have received a copy of the GNU General Public License version
4928# 2 along with this work; if not, write to the Free Software Foundation,
4929# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4930#
4931# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4932# or visit www.oracle.com if you need additional information or have any
4933# questions.
4934#
4935
4936
4937
4938
4939
4940
4941
4942################################################################################
4943# Define a mechanism for importing extra prebuilt modules
4944#
4945
4946
4947
4948#
4949# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4950# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4951#
4952# This code is free software; you can redistribute it and/or modify it
4953# under the terms of the GNU General Public License version 2 only, as
4954# published by the Free Software Foundation.  Oracle designates this
4955# particular file as subject to the "Classpath" exception as provided
4956# by Oracle in the LICENSE file that accompanied this code.
4957#
4958# This code is distributed in the hope that it will be useful, but WITHOUT
4959# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4960# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4961# version 2 for more details (a copy is included in the LICENSE file that
4962# accompanied this code).
4963#
4964# You should have received a copy of the GNU General Public License version
4965# 2 along with this work; if not, write to the Free Software Foundation,
4966# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4967#
4968# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4969# or visit www.oracle.com if you need additional information or have any
4970# questions.
4971#
4972
4973########################################################################
4974# This file is responsible for detecting, verifying and setting up the
4975# toolchain, i.e. the compiler, linker and related utilities. It will setup
4976# proper paths to the binaries, but it will not setup any flags.
4977#
4978# The binaries used is determined by the toolchain type, which is the family of
4979# compilers and related tools that are used.
4980########################################################################
4981
4982
4983# All valid toolchains, regardless of platform (used by help.m4)
4984VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4985
4986# These toolchains are valid on different platforms
4987VALID_TOOLCHAINS_linux="gcc clang"
4988VALID_TOOLCHAINS_solaris="solstudio"
4989VALID_TOOLCHAINS_macosx="gcc clang"
4990VALID_TOOLCHAINS_aix="xlc"
4991VALID_TOOLCHAINS_windows="microsoft"
4992
4993# Toolchain descriptions
4994TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4995TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4996TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4997TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4998TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4999
5000# Minimum supported versions, empty means unspecified
5001TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5002TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5003TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5004TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5005TOOLCHAIN_MINIMUM_VERSION_xlc=""
5006
5007# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5008# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5009# $1 - optional variable prefix for compiler and version variables (BUILD_)
5010# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5011
5012
5013# Check if the configured compiler (C and C++) is of a specific version or
5014# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5015#
5016# Arguments:
5017#   VERSION:   The version string to check against the found version
5018#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5019#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5020#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5021
5022
5023
5024
5025# Setup a number of variables describing how native output files are
5026# named on this platform/toolchain.
5027
5028
5029# Determine which toolchain type to use, and make sure it is valid for this
5030# platform. Setup various information about the selected toolchain.
5031
5032
5033# Before we start detecting the toolchain executables, we might need some
5034# special setup, e.g. additional paths etc.
5035
5036
5037# Restore path, etc
5038
5039
5040# Check if a compiler is of the toolchain type we expect, and save the version
5041# information from it. If the compiler does not match the expected type,
5042# this function will abort using AC_MSG_ERROR. If it matches, the version will
5043# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5044# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5045#
5046# $1 = compiler to test (CC or CXX)
5047# $2 = human readable name of compiler (C or C++)
5048
5049
5050# Try to locate the given C or C++ compiler in the path, or otherwise.
5051#
5052# $1 = compiler to test (CC or CXX)
5053# $2 = human readable name of compiler (C or C++)
5054# $3 = list of compiler names to search for
5055
5056
5057# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5058# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5059# archiver (AR). Verify that the compilers are correct according to the
5060# toolchain type.
5061
5062
5063# Setup additional tools that is considered a part of the toolchain, but not the
5064# core part. Many of these are highly platform-specific and do not exist,
5065# and/or are not needed on all platforms.
5066
5067
5068# Setup the build tools (i.e, the compiler and linker used to build programs
5069# that should be run on the build platform, not the target platform, as a build
5070# helper). Since the non-cross-compile case uses the normal, target compilers
5071# for this, we can only do this after these have been setup.
5072
5073
5074# Do some additional checks on the detected tools.
5075
5076
5077# Setup the JTReg Regression Test Harness.
5078
5079
5080#
5081# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5082# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5083#
5084# This code is free software; you can redistribute it and/or modify it
5085# under the terms of the GNU General Public License version 2 only, as
5086# published by the Free Software Foundation.  Oracle designates this
5087# particular file as subject to the "Classpath" exception as provided
5088# by Oracle in the LICENSE file that accompanied this code.
5089#
5090# This code is distributed in the hope that it will be useful, but WITHOUT
5091# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5092# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5093# version 2 for more details (a copy is included in the LICENSE file that
5094# accompanied this code).
5095#
5096# You should have received a copy of the GNU General Public License version
5097# 2 along with this work; if not, write to the Free Software Foundation,
5098# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5099#
5100# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5101# or visit www.oracle.com if you need additional information or have any
5102# questions.
5103#
5104
5105################################################################################
5106# The order of these defines the priority by which we try to find them.
5107VALID_VS_VERSIONS="2013 2012 2010"
5108
5109VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5110VS_VERSION_INTERNAL_2010=100
5111VS_MSVCR_2010=msvcr100.dll
5112# We don't use msvcp on Visual Studio 2010
5113#VS_MSVCP_2010=msvcp100.dll
5114VS_ENVVAR_2010="VS100COMNTOOLS"
5115VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5116VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5117VS_VS_PLATFORM_NAME_2010="v100"
5118VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5119
5120VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5121VS_VERSION_INTERNAL_2012=110
5122VS_MSVCR_2012=msvcr110.dll
5123VS_MSVCP_2012=msvcp110.dll
5124VS_ENVVAR_2012="VS110COMNTOOLS"
5125VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5126VS_SDK_INSTALLDIR_2012=
5127VS_VS_PLATFORM_NAME_2012="v110"
5128VS_SDK_PLATFORM_NAME_2012=
5129
5130VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5131VS_VERSION_INTERNAL_2013=120
5132VS_MSVCR_2013=msvcr120.dll
5133VS_MSVCP_2013=msvcp120.dll
5134VS_ENVVAR_2013="VS120COMNTOOLS"
5135VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5136VS_SDK_INSTALLDIR_2013=
5137VS_VS_PLATFORM_NAME_2013="v120"
5138VS_SDK_PLATFORM_NAME_2013=
5139
5140################################################################################
5141
5142
5143
5144################################################################################
5145
5146
5147
5148################################################################################
5149# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5150# build environment and assigns it to VS_ENV_CMD
5151
5152
5153################################################################################
5154
5155
5156
5157################################################################################
5158# Check if the VS env variables were setup prior to running configure.
5159# If not, then find vcvarsall.bat and run it automatically, and integrate
5160# the set env variables into the spec file.
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175# This line needs to be here, verbatim, after all includes and the dummy hook
5176# definitions. It is replaced with custom functionality when building
5177# custom sources.
5178#CUSTOM_AUTOCONF_INCLUDE
5179
5180# Do not change or remove the following line, it is needed for consistency checks:
5181DATE_WHEN_GENERATED=1484135958
5182
5183###############################################################################
5184#
5185# Initialization / Boot-strapping
5186#
5187# The bootstrapping process needs to solve the "chicken or the egg" problem,
5188# thus it jumps back and forth, each time gaining something needed later on.
5189#
5190###############################################################################
5191
5192# If we are requested to print additional help, do that and then exit.
5193# This must be the very first call.
5194
5195  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5196
5197    # Print available toolchains
5198    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5199    $PRINTF "Which are valid to use depends on the build platform.\n"
5200    for toolchain in $VALID_TOOLCHAINS_all; do
5201      # Use indirect variable referencing
5202      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5203      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5204      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5205    done
5206    $PRINTF "\n"
5207
5208    # Print available jvm features
5209    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5210    $PRINTF "Which are valid to use depends on the target platform.\n  "
5211    $PRINTF "%s " $VALID_JVM_FEATURES
5212    $PRINTF "\n"
5213
5214    # And now exit directly
5215    exit 0
5216  fi
5217
5218
5219# Basic initialization that must happen first of all in the normal process.
5220
5221  # Save the original command line. This is passed to us by the wrapper configure script.
5222
5223  # Save the path variable before it gets changed
5224  ORIGINAL_PATH="$PATH"
5225
5226  DATE_WHEN_CONFIGURED=`LANG=C date`
5227
5228  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5229$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5231$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5232
5233
5234  # Start with tools that do not need have cross compilation support
5235  # and can be expected to be found in the default PATH. These tools are
5236  # used by configure.
5237
5238  # First are all the simple required tools.
5239
5240
5241
5242  # Publish this variable in the help.
5243
5244
5245  if [ -z "${BASENAME+x}" ]; then
5246    # The variable is not set by user, try to locate tool using the code snippet
5247    for ac_prog in basename
5248do
5249  # Extract the first word of "$ac_prog", so it can be a program name with args.
5250set dummy $ac_prog; ac_word=$2
5251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5252$as_echo_n "checking for $ac_word... " >&6; }
5253if ${ac_cv_path_BASENAME+:} false; then :
5254  $as_echo_n "(cached) " >&6
5255else
5256  case $BASENAME in
5257  [\\/]* | ?:[\\/]*)
5258  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5259  ;;
5260  *)
5261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5262for as_dir in $PATH
5263do
5264  IFS=$as_save_IFS
5265  test -z "$as_dir" && as_dir=.
5266    for ac_exec_ext in '' $ac_executable_extensions; do
5267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5268    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5270    break 2
5271  fi
5272done
5273  done
5274IFS=$as_save_IFS
5275
5276  ;;
5277esac
5278fi
5279BASENAME=$ac_cv_path_BASENAME
5280if test -n "$BASENAME"; then
5281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5282$as_echo "$BASENAME" >&6; }
5283else
5284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5285$as_echo "no" >&6; }
5286fi
5287
5288
5289  test -n "$BASENAME" && break
5290done
5291
5292  else
5293    # The variable is set, but is it from the command line or the environment?
5294
5295    # Try to remove the string !BASENAME! from our list.
5296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5298      # If it failed, the variable was not from the command line. Ignore it,
5299      # but warn the user (except for BASH, which is always set by the calling BASH).
5300      if test "xBASENAME" != xBASH; then
5301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5302$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5303      fi
5304      # Try to locate tool using the code snippet
5305      for ac_prog in basename
5306do
5307  # Extract the first word of "$ac_prog", so it can be a program name with args.
5308set dummy $ac_prog; ac_word=$2
5309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5310$as_echo_n "checking for $ac_word... " >&6; }
5311if ${ac_cv_path_BASENAME+:} false; then :
5312  $as_echo_n "(cached) " >&6
5313else
5314  case $BASENAME in
5315  [\\/]* | ?:[\\/]*)
5316  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5317  ;;
5318  *)
5319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5320for as_dir in $PATH
5321do
5322  IFS=$as_save_IFS
5323  test -z "$as_dir" && as_dir=.
5324    for ac_exec_ext in '' $ac_executable_extensions; do
5325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5326    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5328    break 2
5329  fi
5330done
5331  done
5332IFS=$as_save_IFS
5333
5334  ;;
5335esac
5336fi
5337BASENAME=$ac_cv_path_BASENAME
5338if test -n "$BASENAME"; then
5339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5340$as_echo "$BASENAME" >&6; }
5341else
5342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
5344fi
5345
5346
5347  test -n "$BASENAME" && break
5348done
5349
5350    else
5351      # If it succeeded, then it was overridden by the user. We will use it
5352      # for the tool.
5353
5354      # First remove it from the list of overridden variables, so we can test
5355      # for unknown variables in the end.
5356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5357
5358      # Check if we try to supply an empty value
5359      if test "x$BASENAME" = x; then
5360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5361$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5363$as_echo_n "checking for BASENAME... " >&6; }
5364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5365$as_echo "disabled" >&6; }
5366      else
5367        # Check if the provided tool contains a complete path.
5368        tool_specified="$BASENAME"
5369        tool_basename="${tool_specified##*/}"
5370        if test "x$tool_basename" = "x$tool_specified"; then
5371          # A command without a complete path is provided, search $PATH.
5372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5373$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5374          # Extract the first word of "$tool_basename", so it can be a program name with args.
5375set dummy $tool_basename; ac_word=$2
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5377$as_echo_n "checking for $ac_word... " >&6; }
5378if ${ac_cv_path_BASENAME+:} false; then :
5379  $as_echo_n "(cached) " >&6
5380else
5381  case $BASENAME in
5382  [\\/]* | ?:[\\/]*)
5383  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5384  ;;
5385  *)
5386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387for as_dir in $PATH
5388do
5389  IFS=$as_save_IFS
5390  test -z "$as_dir" && as_dir=.
5391    for ac_exec_ext in '' $ac_executable_extensions; do
5392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5393    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5395    break 2
5396  fi
5397done
5398  done
5399IFS=$as_save_IFS
5400
5401  ;;
5402esac
5403fi
5404BASENAME=$ac_cv_path_BASENAME
5405if test -n "$BASENAME"; then
5406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5407$as_echo "$BASENAME" >&6; }
5408else
5409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5410$as_echo "no" >&6; }
5411fi
5412
5413
5414          if test "x$BASENAME" = x; then
5415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5416          fi
5417        else
5418          # Otherwise we believe it is a complete path. Use it as it is.
5419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5420$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5422$as_echo_n "checking for BASENAME... " >&6; }
5423          if test ! -x "$tool_specified"; then
5424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5425$as_echo "not found" >&6; }
5426            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5427          fi
5428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5429$as_echo "$tool_specified" >&6; }
5430        fi
5431      fi
5432    fi
5433
5434  fi
5435
5436
5437
5438  if test "x$BASENAME" = x; then
5439    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5440  fi
5441
5442
5443
5444
5445
5446  # Publish this variable in the help.
5447
5448
5449  if [ -z "${BASH+x}" ]; then
5450    # The variable is not set by user, try to locate tool using the code snippet
5451    for ac_prog in bash
5452do
5453  # Extract the first word of "$ac_prog", so it can be a program name with args.
5454set dummy $ac_prog; ac_word=$2
5455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5456$as_echo_n "checking for $ac_word... " >&6; }
5457if ${ac_cv_path_BASH+:} false; then :
5458  $as_echo_n "(cached) " >&6
5459else
5460  case $BASH in
5461  [\\/]* | ?:[\\/]*)
5462  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5463  ;;
5464  *)
5465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in $PATH
5467do
5468  IFS=$as_save_IFS
5469  test -z "$as_dir" && as_dir=.
5470    for ac_exec_ext in '' $ac_executable_extensions; do
5471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5472    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5474    break 2
5475  fi
5476done
5477  done
5478IFS=$as_save_IFS
5479
5480  ;;
5481esac
5482fi
5483BASH=$ac_cv_path_BASH
5484if test -n "$BASH"; then
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5486$as_echo "$BASH" >&6; }
5487else
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5489$as_echo "no" >&6; }
5490fi
5491
5492
5493  test -n "$BASH" && break
5494done
5495
5496  else
5497    # The variable is set, but is it from the command line or the environment?
5498
5499    # Try to remove the string !BASH! from our list.
5500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5502      # If it failed, the variable was not from the command line. Ignore it,
5503      # but warn the user (except for BASH, which is always set by the calling BASH).
5504      if test "xBASH" != xBASH; then
5505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5506$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5507      fi
5508      # Try to locate tool using the code snippet
5509      for ac_prog in bash
5510do
5511  # Extract the first word of "$ac_prog", so it can be a program name with args.
5512set dummy $ac_prog; ac_word=$2
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5514$as_echo_n "checking for $ac_word... " >&6; }
5515if ${ac_cv_path_BASH+:} false; then :
5516  $as_echo_n "(cached) " >&6
5517else
5518  case $BASH in
5519  [\\/]* | ?:[\\/]*)
5520  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5521  ;;
5522  *)
5523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5524for as_dir in $PATH
5525do
5526  IFS=$as_save_IFS
5527  test -z "$as_dir" && as_dir=.
5528    for ac_exec_ext in '' $ac_executable_extensions; do
5529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5530    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5532    break 2
5533  fi
5534done
5535  done
5536IFS=$as_save_IFS
5537
5538  ;;
5539esac
5540fi
5541BASH=$ac_cv_path_BASH
5542if test -n "$BASH"; then
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5544$as_echo "$BASH" >&6; }
5545else
5546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547$as_echo "no" >&6; }
5548fi
5549
5550
5551  test -n "$BASH" && break
5552done
5553
5554    else
5555      # If it succeeded, then it was overridden by the user. We will use it
5556      # for the tool.
5557
5558      # First remove it from the list of overridden variables, so we can test
5559      # for unknown variables in the end.
5560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5561
5562      # Check if we try to supply an empty value
5563      if test "x$BASH" = x; then
5564        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5565$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5567$as_echo_n "checking for BASH... " >&6; }
5568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5569$as_echo "disabled" >&6; }
5570      else
5571        # Check if the provided tool contains a complete path.
5572        tool_specified="$BASH"
5573        tool_basename="${tool_specified##*/}"
5574        if test "x$tool_basename" = "x$tool_specified"; then
5575          # A command without a complete path is provided, search $PATH.
5576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5577$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5578          # Extract the first word of "$tool_basename", so it can be a program name with args.
5579set dummy $tool_basename; ac_word=$2
5580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5581$as_echo_n "checking for $ac_word... " >&6; }
5582if ${ac_cv_path_BASH+:} false; then :
5583  $as_echo_n "(cached) " >&6
5584else
5585  case $BASH in
5586  [\\/]* | ?:[\\/]*)
5587  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5588  ;;
5589  *)
5590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591for as_dir in $PATH
5592do
5593  IFS=$as_save_IFS
5594  test -z "$as_dir" && as_dir=.
5595    for ac_exec_ext in '' $ac_executable_extensions; do
5596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5597    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599    break 2
5600  fi
5601done
5602  done
5603IFS=$as_save_IFS
5604
5605  ;;
5606esac
5607fi
5608BASH=$ac_cv_path_BASH
5609if test -n "$BASH"; then
5610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5611$as_echo "$BASH" >&6; }
5612else
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614$as_echo "no" >&6; }
5615fi
5616
5617
5618          if test "x$BASH" = x; then
5619            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5620          fi
5621        else
5622          # Otherwise we believe it is a complete path. Use it as it is.
5623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5624$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5625          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5626$as_echo_n "checking for BASH... " >&6; }
5627          if test ! -x "$tool_specified"; then
5628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5629$as_echo "not found" >&6; }
5630            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5631          fi
5632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5633$as_echo "$tool_specified" >&6; }
5634        fi
5635      fi
5636    fi
5637
5638  fi
5639
5640
5641
5642  if test "x$BASH" = x; then
5643    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5644  fi
5645
5646
5647
5648
5649
5650  # Publish this variable in the help.
5651
5652
5653  if [ -z "${CAT+x}" ]; then
5654    # The variable is not set by user, try to locate tool using the code snippet
5655    for ac_prog in cat
5656do
5657  # Extract the first word of "$ac_prog", so it can be a program name with args.
5658set dummy $ac_prog; ac_word=$2
5659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5660$as_echo_n "checking for $ac_word... " >&6; }
5661if ${ac_cv_path_CAT+:} false; then :
5662  $as_echo_n "(cached) " >&6
5663else
5664  case $CAT in
5665  [\\/]* | ?:[\\/]*)
5666  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5667  ;;
5668  *)
5669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5670for as_dir in $PATH
5671do
5672  IFS=$as_save_IFS
5673  test -z "$as_dir" && as_dir=.
5674    for ac_exec_ext in '' $ac_executable_extensions; do
5675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5676    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5678    break 2
5679  fi
5680done
5681  done
5682IFS=$as_save_IFS
5683
5684  ;;
5685esac
5686fi
5687CAT=$ac_cv_path_CAT
5688if test -n "$CAT"; then
5689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5690$as_echo "$CAT" >&6; }
5691else
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
5694fi
5695
5696
5697  test -n "$CAT" && break
5698done
5699
5700  else
5701    # The variable is set, but is it from the command line or the environment?
5702
5703    # Try to remove the string !CAT! from our list.
5704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5706      # If it failed, the variable was not from the command line. Ignore it,
5707      # but warn the user (except for BASH, which is always set by the calling BASH).
5708      if test "xCAT" != xBASH; then
5709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5710$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5711      fi
5712      # Try to locate tool using the code snippet
5713      for ac_prog in cat
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if ${ac_cv_path_CAT+:} false; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $CAT in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5734    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745CAT=$ac_cv_path_CAT
5746if test -n "$CAT"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5748$as_echo "$CAT" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$CAT" && break
5756done
5757
5758    else
5759      # If it succeeded, then it was overridden by the user. We will use it
5760      # for the tool.
5761
5762      # First remove it from the list of overridden variables, so we can test
5763      # for unknown variables in the end.
5764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5765
5766      # Check if we try to supply an empty value
5767      if test "x$CAT" = x; then
5768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5769$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5771$as_echo_n "checking for CAT... " >&6; }
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5773$as_echo "disabled" >&6; }
5774      else
5775        # Check if the provided tool contains a complete path.
5776        tool_specified="$CAT"
5777        tool_basename="${tool_specified##*/}"
5778        if test "x$tool_basename" = "x$tool_specified"; then
5779          # A command without a complete path is provided, search $PATH.
5780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5781$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5782          # Extract the first word of "$tool_basename", so it can be a program name with args.
5783set dummy $tool_basename; ac_word=$2
5784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5785$as_echo_n "checking for $ac_word... " >&6; }
5786if ${ac_cv_path_CAT+:} false; then :
5787  $as_echo_n "(cached) " >&6
5788else
5789  case $CAT in
5790  [\\/]* | ?:[\\/]*)
5791  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5792  ;;
5793  *)
5794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5795for as_dir in $PATH
5796do
5797  IFS=$as_save_IFS
5798  test -z "$as_dir" && as_dir=.
5799    for ac_exec_ext in '' $ac_executable_extensions; do
5800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5801    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5803    break 2
5804  fi
5805done
5806  done
5807IFS=$as_save_IFS
5808
5809  ;;
5810esac
5811fi
5812CAT=$ac_cv_path_CAT
5813if test -n "$CAT"; then
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5815$as_echo "$CAT" >&6; }
5816else
5817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5818$as_echo "no" >&6; }
5819fi
5820
5821
5822          if test "x$CAT" = x; then
5823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5824          fi
5825        else
5826          # Otherwise we believe it is a complete path. Use it as it is.
5827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5828$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5830$as_echo_n "checking for CAT... " >&6; }
5831          if test ! -x "$tool_specified"; then
5832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5833$as_echo "not found" >&6; }
5834            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5835          fi
5836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5837$as_echo "$tool_specified" >&6; }
5838        fi
5839      fi
5840    fi
5841
5842  fi
5843
5844
5845
5846  if test "x$CAT" = x; then
5847    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5848  fi
5849
5850
5851
5852
5853
5854  # Publish this variable in the help.
5855
5856
5857  if [ -z "${CHMOD+x}" ]; then
5858    # The variable is not set by user, try to locate tool using the code snippet
5859    for ac_prog in chmod
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_CHMOD+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $CHMOD in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891CHMOD=$ac_cv_path_CHMOD
5892if test -n "$CHMOD"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5894$as_echo "$CHMOD" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$CHMOD" && break
5902done
5903
5904  else
5905    # The variable is set, but is it from the command line or the environment?
5906
5907    # Try to remove the string !CHMOD! from our list.
5908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5910      # If it failed, the variable was not from the command line. Ignore it,
5911      # but warn the user (except for BASH, which is always set by the calling BASH).
5912      if test "xCHMOD" != xBASH; then
5913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5914$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5915      fi
5916      # Try to locate tool using the code snippet
5917      for ac_prog in chmod
5918do
5919  # Extract the first word of "$ac_prog", so it can be a program name with args.
5920set dummy $ac_prog; ac_word=$2
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5922$as_echo_n "checking for $ac_word... " >&6; }
5923if ${ac_cv_path_CHMOD+:} false; then :
5924  $as_echo_n "(cached) " >&6
5925else
5926  case $CHMOD in
5927  [\\/]* | ?:[\\/]*)
5928  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5929  ;;
5930  *)
5931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5932for as_dir in $PATH
5933do
5934  IFS=$as_save_IFS
5935  test -z "$as_dir" && as_dir=.
5936    for ac_exec_ext in '' $ac_executable_extensions; do
5937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5938    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5940    break 2
5941  fi
5942done
5943  done
5944IFS=$as_save_IFS
5945
5946  ;;
5947esac
5948fi
5949CHMOD=$ac_cv_path_CHMOD
5950if test -n "$CHMOD"; then
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5952$as_echo "$CHMOD" >&6; }
5953else
5954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955$as_echo "no" >&6; }
5956fi
5957
5958
5959  test -n "$CHMOD" && break
5960done
5961
5962    else
5963      # If it succeeded, then it was overridden by the user. We will use it
5964      # for the tool.
5965
5966      # First remove it from the list of overridden variables, so we can test
5967      # for unknown variables in the end.
5968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5969
5970      # Check if we try to supply an empty value
5971      if test "x$CHMOD" = x; then
5972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5973$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5975$as_echo_n "checking for CHMOD... " >&6; }
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5977$as_echo "disabled" >&6; }
5978      else
5979        # Check if the provided tool contains a complete path.
5980        tool_specified="$CHMOD"
5981        tool_basename="${tool_specified##*/}"
5982        if test "x$tool_basename" = "x$tool_specified"; then
5983          # A command without a complete path is provided, search $PATH.
5984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5985$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5986          # Extract the first word of "$tool_basename", so it can be a program name with args.
5987set dummy $tool_basename; ac_word=$2
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5989$as_echo_n "checking for $ac_word... " >&6; }
5990if ${ac_cv_path_CHMOD+:} false; then :
5991  $as_echo_n "(cached) " >&6
5992else
5993  case $CHMOD in
5994  [\\/]* | ?:[\\/]*)
5995  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5996  ;;
5997  *)
5998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001  IFS=$as_save_IFS
6002  test -z "$as_dir" && as_dir=.
6003    for ac_exec_ext in '' $ac_executable_extensions; do
6004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6005    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6007    break 2
6008  fi
6009done
6010  done
6011IFS=$as_save_IFS
6012
6013  ;;
6014esac
6015fi
6016CHMOD=$ac_cv_path_CHMOD
6017if test -n "$CHMOD"; then
6018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6019$as_echo "$CHMOD" >&6; }
6020else
6021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6022$as_echo "no" >&6; }
6023fi
6024
6025
6026          if test "x$CHMOD" = x; then
6027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6028          fi
6029        else
6030          # Otherwise we believe it is a complete path. Use it as it is.
6031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6032$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6034$as_echo_n "checking for CHMOD... " >&6; }
6035          if test ! -x "$tool_specified"; then
6036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6037$as_echo "not found" >&6; }
6038            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6039          fi
6040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6041$as_echo "$tool_specified" >&6; }
6042        fi
6043      fi
6044    fi
6045
6046  fi
6047
6048
6049
6050  if test "x$CHMOD" = x; then
6051    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6052  fi
6053
6054
6055
6056
6057
6058  # Publish this variable in the help.
6059
6060
6061  if [ -z "${CMP+x}" ]; then
6062    # The variable is not set by user, try to locate tool using the code snippet
6063    for ac_prog in cmp
6064do
6065  # Extract the first word of "$ac_prog", so it can be a program name with args.
6066set dummy $ac_prog; ac_word=$2
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6068$as_echo_n "checking for $ac_word... " >&6; }
6069if ${ac_cv_path_CMP+:} false; then :
6070  $as_echo_n "(cached) " >&6
6071else
6072  case $CMP in
6073  [\\/]* | ?:[\\/]*)
6074  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6075  ;;
6076  *)
6077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6078for as_dir in $PATH
6079do
6080  IFS=$as_save_IFS
6081  test -z "$as_dir" && as_dir=.
6082    for ac_exec_ext in '' $ac_executable_extensions; do
6083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6084    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6086    break 2
6087  fi
6088done
6089  done
6090IFS=$as_save_IFS
6091
6092  ;;
6093esac
6094fi
6095CMP=$ac_cv_path_CMP
6096if test -n "$CMP"; then
6097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6098$as_echo "$CMP" >&6; }
6099else
6100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
6102fi
6103
6104
6105  test -n "$CMP" && break
6106done
6107
6108  else
6109    # The variable is set, but is it from the command line or the environment?
6110
6111    # Try to remove the string !CMP! from our list.
6112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6114      # If it failed, the variable was not from the command line. Ignore it,
6115      # but warn the user (except for BASH, which is always set by the calling BASH).
6116      if test "xCMP" != xBASH; then
6117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6118$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6119      fi
6120      # Try to locate tool using the code snippet
6121      for ac_prog in cmp
6122do
6123  # Extract the first word of "$ac_prog", so it can be a program name with args.
6124set dummy $ac_prog; ac_word=$2
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126$as_echo_n "checking for $ac_word... " >&6; }
6127if ${ac_cv_path_CMP+:} false; then :
6128  $as_echo_n "(cached) " >&6
6129else
6130  case $CMP in
6131  [\\/]* | ?:[\\/]*)
6132  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6133  ;;
6134  *)
6135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH
6137do
6138  IFS=$as_save_IFS
6139  test -z "$as_dir" && as_dir=.
6140    for ac_exec_ext in '' $ac_executable_extensions; do
6141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6142    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6144    break 2
6145  fi
6146done
6147  done
6148IFS=$as_save_IFS
6149
6150  ;;
6151esac
6152fi
6153CMP=$ac_cv_path_CMP
6154if test -n "$CMP"; then
6155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6156$as_echo "$CMP" >&6; }
6157else
6158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6159$as_echo "no" >&6; }
6160fi
6161
6162
6163  test -n "$CMP" && break
6164done
6165
6166    else
6167      # If it succeeded, then it was overridden by the user. We will use it
6168      # for the tool.
6169
6170      # First remove it from the list of overridden variables, so we can test
6171      # for unknown variables in the end.
6172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6173
6174      # Check if we try to supply an empty value
6175      if test "x$CMP" = x; then
6176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6177$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6179$as_echo_n "checking for CMP... " >&6; }
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6181$as_echo "disabled" >&6; }
6182      else
6183        # Check if the provided tool contains a complete path.
6184        tool_specified="$CMP"
6185        tool_basename="${tool_specified##*/}"
6186        if test "x$tool_basename" = "x$tool_specified"; then
6187          # A command without a complete path is provided, search $PATH.
6188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6189$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6190          # Extract the first word of "$tool_basename", so it can be a program name with args.
6191set dummy $tool_basename; ac_word=$2
6192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6193$as_echo_n "checking for $ac_word... " >&6; }
6194if ${ac_cv_path_CMP+:} false; then :
6195  $as_echo_n "(cached) " >&6
6196else
6197  case $CMP in
6198  [\\/]* | ?:[\\/]*)
6199  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6200  ;;
6201  *)
6202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6203for as_dir in $PATH
6204do
6205  IFS=$as_save_IFS
6206  test -z "$as_dir" && as_dir=.
6207    for ac_exec_ext in '' $ac_executable_extensions; do
6208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6209    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6211    break 2
6212  fi
6213done
6214  done
6215IFS=$as_save_IFS
6216
6217  ;;
6218esac
6219fi
6220CMP=$ac_cv_path_CMP
6221if test -n "$CMP"; then
6222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6223$as_echo "$CMP" >&6; }
6224else
6225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6226$as_echo "no" >&6; }
6227fi
6228
6229
6230          if test "x$CMP" = x; then
6231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6232          fi
6233        else
6234          # Otherwise we believe it is a complete path. Use it as it is.
6235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6236$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6238$as_echo_n "checking for CMP... " >&6; }
6239          if test ! -x "$tool_specified"; then
6240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6241$as_echo "not found" >&6; }
6242            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6243          fi
6244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6245$as_echo "$tool_specified" >&6; }
6246        fi
6247      fi
6248    fi
6249
6250  fi
6251
6252
6253
6254  if test "x$CMP" = x; then
6255    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6256  fi
6257
6258
6259
6260
6261
6262  # Publish this variable in the help.
6263
6264
6265  if [ -z "${COMM+x}" ]; then
6266    # The variable is not set by user, try to locate tool using the code snippet
6267    for ac_prog in comm
6268do
6269  # Extract the first word of "$ac_prog", so it can be a program name with args.
6270set dummy $ac_prog; ac_word=$2
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272$as_echo_n "checking for $ac_word... " >&6; }
6273if ${ac_cv_path_COMM+:} false; then :
6274  $as_echo_n "(cached) " >&6
6275else
6276  case $COMM in
6277  [\\/]* | ?:[\\/]*)
6278  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6279  ;;
6280  *)
6281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282for as_dir in $PATH
6283do
6284  IFS=$as_save_IFS
6285  test -z "$as_dir" && as_dir=.
6286    for ac_exec_ext in '' $ac_executable_extensions; do
6287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6288    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6290    break 2
6291  fi
6292done
6293  done
6294IFS=$as_save_IFS
6295
6296  ;;
6297esac
6298fi
6299COMM=$ac_cv_path_COMM
6300if test -n "$COMM"; then
6301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6302$as_echo "$COMM" >&6; }
6303else
6304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6305$as_echo "no" >&6; }
6306fi
6307
6308
6309  test -n "$COMM" && break
6310done
6311
6312  else
6313    # The variable is set, but is it from the command line or the environment?
6314
6315    # Try to remove the string !COMM! from our list.
6316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6318      # If it failed, the variable was not from the command line. Ignore it,
6319      # but warn the user (except for BASH, which is always set by the calling BASH).
6320      if test "xCOMM" != xBASH; then
6321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6322$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6323      fi
6324      # Try to locate tool using the code snippet
6325      for ac_prog in comm
6326do
6327  # Extract the first word of "$ac_prog", so it can be a program name with args.
6328set dummy $ac_prog; ac_word=$2
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6330$as_echo_n "checking for $ac_word... " >&6; }
6331if ${ac_cv_path_COMM+:} false; then :
6332  $as_echo_n "(cached) " >&6
6333else
6334  case $COMM in
6335  [\\/]* | ?:[\\/]*)
6336  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6337  ;;
6338  *)
6339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6340for as_dir in $PATH
6341do
6342  IFS=$as_save_IFS
6343  test -z "$as_dir" && as_dir=.
6344    for ac_exec_ext in '' $ac_executable_extensions; do
6345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6346    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6348    break 2
6349  fi
6350done
6351  done
6352IFS=$as_save_IFS
6353
6354  ;;
6355esac
6356fi
6357COMM=$ac_cv_path_COMM
6358if test -n "$COMM"; then
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6360$as_echo "$COMM" >&6; }
6361else
6362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; }
6364fi
6365
6366
6367  test -n "$COMM" && break
6368done
6369
6370    else
6371      # If it succeeded, then it was overridden by the user. We will use it
6372      # for the tool.
6373
6374      # First remove it from the list of overridden variables, so we can test
6375      # for unknown variables in the end.
6376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6377
6378      # Check if we try to supply an empty value
6379      if test "x$COMM" = x; then
6380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6381$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6383$as_echo_n "checking for COMM... " >&6; }
6384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6385$as_echo "disabled" >&6; }
6386      else
6387        # Check if the provided tool contains a complete path.
6388        tool_specified="$COMM"
6389        tool_basename="${tool_specified##*/}"
6390        if test "x$tool_basename" = "x$tool_specified"; then
6391          # A command without a complete path is provided, search $PATH.
6392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6393$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6394          # Extract the first word of "$tool_basename", so it can be a program name with args.
6395set dummy $tool_basename; ac_word=$2
6396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6397$as_echo_n "checking for $ac_word... " >&6; }
6398if ${ac_cv_path_COMM+:} false; then :
6399  $as_echo_n "(cached) " >&6
6400else
6401  case $COMM in
6402  [\\/]* | ?:[\\/]*)
6403  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6404  ;;
6405  *)
6406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6407for as_dir in $PATH
6408do
6409  IFS=$as_save_IFS
6410  test -z "$as_dir" && as_dir=.
6411    for ac_exec_ext in '' $ac_executable_extensions; do
6412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6413    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6415    break 2
6416  fi
6417done
6418  done
6419IFS=$as_save_IFS
6420
6421  ;;
6422esac
6423fi
6424COMM=$ac_cv_path_COMM
6425if test -n "$COMM"; then
6426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6427$as_echo "$COMM" >&6; }
6428else
6429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; }
6431fi
6432
6433
6434          if test "x$COMM" = x; then
6435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6436          fi
6437        else
6438          # Otherwise we believe it is a complete path. Use it as it is.
6439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6440$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6442$as_echo_n "checking for COMM... " >&6; }
6443          if test ! -x "$tool_specified"; then
6444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6445$as_echo "not found" >&6; }
6446            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6447          fi
6448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6449$as_echo "$tool_specified" >&6; }
6450        fi
6451      fi
6452    fi
6453
6454  fi
6455
6456
6457
6458  if test "x$COMM" = x; then
6459    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6460  fi
6461
6462
6463
6464
6465
6466  # Publish this variable in the help.
6467
6468
6469  if [ -z "${CP+x}" ]; then
6470    # The variable is not set by user, try to locate tool using the code snippet
6471    for ac_prog in cp
6472do
6473  # Extract the first word of "$ac_prog", so it can be a program name with args.
6474set dummy $ac_prog; ac_word=$2
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476$as_echo_n "checking for $ac_word... " >&6; }
6477if ${ac_cv_path_CP+:} false; then :
6478  $as_echo_n "(cached) " >&6
6479else
6480  case $CP in
6481  [\\/]* | ?:[\\/]*)
6482  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6483  ;;
6484  *)
6485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486for as_dir in $PATH
6487do
6488  IFS=$as_save_IFS
6489  test -z "$as_dir" && as_dir=.
6490    for ac_exec_ext in '' $ac_executable_extensions; do
6491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6492    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494    break 2
6495  fi
6496done
6497  done
6498IFS=$as_save_IFS
6499
6500  ;;
6501esac
6502fi
6503CP=$ac_cv_path_CP
6504if test -n "$CP"; then
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6506$as_echo "$CP" >&6; }
6507else
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510fi
6511
6512
6513  test -n "$CP" && break
6514done
6515
6516  else
6517    # The variable is set, but is it from the command line or the environment?
6518
6519    # Try to remove the string !CP! from our list.
6520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6522      # If it failed, the variable was not from the command line. Ignore it,
6523      # but warn the user (except for BASH, which is always set by the calling BASH).
6524      if test "xCP" != xBASH; then
6525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6526$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6527      fi
6528      # Try to locate tool using the code snippet
6529      for ac_prog in cp
6530do
6531  # Extract the first word of "$ac_prog", so it can be a program name with args.
6532set dummy $ac_prog; ac_word=$2
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534$as_echo_n "checking for $ac_word... " >&6; }
6535if ${ac_cv_path_CP+:} false; then :
6536  $as_echo_n "(cached) " >&6
6537else
6538  case $CP in
6539  [\\/]* | ?:[\\/]*)
6540  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6541  ;;
6542  *)
6543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544for as_dir in $PATH
6545do
6546  IFS=$as_save_IFS
6547  test -z "$as_dir" && as_dir=.
6548    for ac_exec_ext in '' $ac_executable_extensions; do
6549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6550    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6552    break 2
6553  fi
6554done
6555  done
6556IFS=$as_save_IFS
6557
6558  ;;
6559esac
6560fi
6561CP=$ac_cv_path_CP
6562if test -n "$CP"; then
6563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6564$as_echo "$CP" >&6; }
6565else
6566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6567$as_echo "no" >&6; }
6568fi
6569
6570
6571  test -n "$CP" && break
6572done
6573
6574    else
6575      # If it succeeded, then it was overridden by the user. We will use it
6576      # for the tool.
6577
6578      # First remove it from the list of overridden variables, so we can test
6579      # for unknown variables in the end.
6580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6581
6582      # Check if we try to supply an empty value
6583      if test "x$CP" = x; then
6584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6585$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6587$as_echo_n "checking for CP... " >&6; }
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6589$as_echo "disabled" >&6; }
6590      else
6591        # Check if the provided tool contains a complete path.
6592        tool_specified="$CP"
6593        tool_basename="${tool_specified##*/}"
6594        if test "x$tool_basename" = "x$tool_specified"; then
6595          # A command without a complete path is provided, search $PATH.
6596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6597$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6598          # Extract the first word of "$tool_basename", so it can be a program name with args.
6599set dummy $tool_basename; ac_word=$2
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6601$as_echo_n "checking for $ac_word... " >&6; }
6602if ${ac_cv_path_CP+:} false; then :
6603  $as_echo_n "(cached) " >&6
6604else
6605  case $CP in
6606  [\\/]* | ?:[\\/]*)
6607  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6608  ;;
6609  *)
6610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611for as_dir in $PATH
6612do
6613  IFS=$as_save_IFS
6614  test -z "$as_dir" && as_dir=.
6615    for ac_exec_ext in '' $ac_executable_extensions; do
6616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6617    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6619    break 2
6620  fi
6621done
6622  done
6623IFS=$as_save_IFS
6624
6625  ;;
6626esac
6627fi
6628CP=$ac_cv_path_CP
6629if test -n "$CP"; then
6630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6631$as_echo "$CP" >&6; }
6632else
6633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6634$as_echo "no" >&6; }
6635fi
6636
6637
6638          if test "x$CP" = x; then
6639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6640          fi
6641        else
6642          # Otherwise we believe it is a complete path. Use it as it is.
6643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6644$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6646$as_echo_n "checking for CP... " >&6; }
6647          if test ! -x "$tool_specified"; then
6648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6649$as_echo "not found" >&6; }
6650            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6651          fi
6652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6653$as_echo "$tool_specified" >&6; }
6654        fi
6655      fi
6656    fi
6657
6658  fi
6659
6660
6661
6662  if test "x$CP" = x; then
6663    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6664  fi
6665
6666
6667
6668
6669
6670  # Publish this variable in the help.
6671
6672
6673  if [ -z "${CUT+x}" ]; then
6674    # The variable is not set by user, try to locate tool using the code snippet
6675    for ac_prog in cut
6676do
6677  # Extract the first word of "$ac_prog", so it can be a program name with args.
6678set dummy $ac_prog; ac_word=$2
6679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6680$as_echo_n "checking for $ac_word... " >&6; }
6681if ${ac_cv_path_CUT+:} false; then :
6682  $as_echo_n "(cached) " >&6
6683else
6684  case $CUT in
6685  [\\/]* | ?:[\\/]*)
6686  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6687  ;;
6688  *)
6689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6690for as_dir in $PATH
6691do
6692  IFS=$as_save_IFS
6693  test -z "$as_dir" && as_dir=.
6694    for ac_exec_ext in '' $ac_executable_extensions; do
6695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6696    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6698    break 2
6699  fi
6700done
6701  done
6702IFS=$as_save_IFS
6703
6704  ;;
6705esac
6706fi
6707CUT=$ac_cv_path_CUT
6708if test -n "$CUT"; then
6709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6710$as_echo "$CUT" >&6; }
6711else
6712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713$as_echo "no" >&6; }
6714fi
6715
6716
6717  test -n "$CUT" && break
6718done
6719
6720  else
6721    # The variable is set, but is it from the command line or the environment?
6722
6723    # Try to remove the string !CUT! from our list.
6724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6726      # If it failed, the variable was not from the command line. Ignore it,
6727      # but warn the user (except for BASH, which is always set by the calling BASH).
6728      if test "xCUT" != xBASH; then
6729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6730$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6731      fi
6732      # Try to locate tool using the code snippet
6733      for ac_prog in cut
6734do
6735  # Extract the first word of "$ac_prog", so it can be a program name with args.
6736set dummy $ac_prog; ac_word=$2
6737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6738$as_echo_n "checking for $ac_word... " >&6; }
6739if ${ac_cv_path_CUT+:} false; then :
6740  $as_echo_n "(cached) " >&6
6741else
6742  case $CUT in
6743  [\\/]* | ?:[\\/]*)
6744  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6745  ;;
6746  *)
6747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6748for as_dir in $PATH
6749do
6750  IFS=$as_save_IFS
6751  test -z "$as_dir" && as_dir=.
6752    for ac_exec_ext in '' $ac_executable_extensions; do
6753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6754    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6756    break 2
6757  fi
6758done
6759  done
6760IFS=$as_save_IFS
6761
6762  ;;
6763esac
6764fi
6765CUT=$ac_cv_path_CUT
6766if test -n "$CUT"; then
6767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6768$as_echo "$CUT" >&6; }
6769else
6770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6771$as_echo "no" >&6; }
6772fi
6773
6774
6775  test -n "$CUT" && break
6776done
6777
6778    else
6779      # If it succeeded, then it was overridden by the user. We will use it
6780      # for the tool.
6781
6782      # First remove it from the list of overridden variables, so we can test
6783      # for unknown variables in the end.
6784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6785
6786      # Check if we try to supply an empty value
6787      if test "x$CUT" = x; then
6788        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6789$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6791$as_echo_n "checking for CUT... " >&6; }
6792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6793$as_echo "disabled" >&6; }
6794      else
6795        # Check if the provided tool contains a complete path.
6796        tool_specified="$CUT"
6797        tool_basename="${tool_specified##*/}"
6798        if test "x$tool_basename" = "x$tool_specified"; then
6799          # A command without a complete path is provided, search $PATH.
6800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6801$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6802          # Extract the first word of "$tool_basename", so it can be a program name with args.
6803set dummy $tool_basename; ac_word=$2
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6805$as_echo_n "checking for $ac_word... " >&6; }
6806if ${ac_cv_path_CUT+:} false; then :
6807  $as_echo_n "(cached) " >&6
6808else
6809  case $CUT in
6810  [\\/]* | ?:[\\/]*)
6811  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6812  ;;
6813  *)
6814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815for as_dir in $PATH
6816do
6817  IFS=$as_save_IFS
6818  test -z "$as_dir" && as_dir=.
6819    for ac_exec_ext in '' $ac_executable_extensions; do
6820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6821    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6823    break 2
6824  fi
6825done
6826  done
6827IFS=$as_save_IFS
6828
6829  ;;
6830esac
6831fi
6832CUT=$ac_cv_path_CUT
6833if test -n "$CUT"; then
6834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6835$as_echo "$CUT" >&6; }
6836else
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6838$as_echo "no" >&6; }
6839fi
6840
6841
6842          if test "x$CUT" = x; then
6843            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6844          fi
6845        else
6846          # Otherwise we believe it is a complete path. Use it as it is.
6847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6848$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6850$as_echo_n "checking for CUT... " >&6; }
6851          if test ! -x "$tool_specified"; then
6852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6853$as_echo "not found" >&6; }
6854            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6855          fi
6856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6857$as_echo "$tool_specified" >&6; }
6858        fi
6859      fi
6860    fi
6861
6862  fi
6863
6864
6865
6866  if test "x$CUT" = x; then
6867    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6868  fi
6869
6870
6871
6872
6873
6874  # Publish this variable in the help.
6875
6876
6877  if [ -z "${DATE+x}" ]; then
6878    # The variable is not set by user, try to locate tool using the code snippet
6879    for ac_prog in date
6880do
6881  # Extract the first word of "$ac_prog", so it can be a program name with args.
6882set dummy $ac_prog; ac_word=$2
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6884$as_echo_n "checking for $ac_word... " >&6; }
6885if ${ac_cv_path_DATE+:} false; then :
6886  $as_echo_n "(cached) " >&6
6887else
6888  case $DATE in
6889  [\\/]* | ?:[\\/]*)
6890  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6891  ;;
6892  *)
6893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6894for as_dir in $PATH
6895do
6896  IFS=$as_save_IFS
6897  test -z "$as_dir" && as_dir=.
6898    for ac_exec_ext in '' $ac_executable_extensions; do
6899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6900    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6902    break 2
6903  fi
6904done
6905  done
6906IFS=$as_save_IFS
6907
6908  ;;
6909esac
6910fi
6911DATE=$ac_cv_path_DATE
6912if test -n "$DATE"; then
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6914$as_echo "$DATE" >&6; }
6915else
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6917$as_echo "no" >&6; }
6918fi
6919
6920
6921  test -n "$DATE" && break
6922done
6923
6924  else
6925    # The variable is set, but is it from the command line or the environment?
6926
6927    # Try to remove the string !DATE! from our list.
6928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6930      # If it failed, the variable was not from the command line. Ignore it,
6931      # but warn the user (except for BASH, which is always set by the calling BASH).
6932      if test "xDATE" != xBASH; then
6933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6934$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6935      fi
6936      # Try to locate tool using the code snippet
6937      for ac_prog in date
6938do
6939  # Extract the first word of "$ac_prog", so it can be a program name with args.
6940set dummy $ac_prog; ac_word=$2
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6942$as_echo_n "checking for $ac_word... " >&6; }
6943if ${ac_cv_path_DATE+:} false; then :
6944  $as_echo_n "(cached) " >&6
6945else
6946  case $DATE in
6947  [\\/]* | ?:[\\/]*)
6948  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6949  ;;
6950  *)
6951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6952for as_dir in $PATH
6953do
6954  IFS=$as_save_IFS
6955  test -z "$as_dir" && as_dir=.
6956    for ac_exec_ext in '' $ac_executable_extensions; do
6957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6958    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6960    break 2
6961  fi
6962done
6963  done
6964IFS=$as_save_IFS
6965
6966  ;;
6967esac
6968fi
6969DATE=$ac_cv_path_DATE
6970if test -n "$DATE"; then
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6972$as_echo "$DATE" >&6; }
6973else
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6975$as_echo "no" >&6; }
6976fi
6977
6978
6979  test -n "$DATE" && break
6980done
6981
6982    else
6983      # If it succeeded, then it was overridden by the user. We will use it
6984      # for the tool.
6985
6986      # First remove it from the list of overridden variables, so we can test
6987      # for unknown variables in the end.
6988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6989
6990      # Check if we try to supply an empty value
6991      if test "x$DATE" = x; then
6992        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6993$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6995$as_echo_n "checking for DATE... " >&6; }
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6997$as_echo "disabled" >&6; }
6998      else
6999        # Check if the provided tool contains a complete path.
7000        tool_specified="$DATE"
7001        tool_basename="${tool_specified##*/}"
7002        if test "x$tool_basename" = "x$tool_specified"; then
7003          # A command without a complete path is provided, search $PATH.
7004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7005$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7006          # Extract the first word of "$tool_basename", so it can be a program name with args.
7007set dummy $tool_basename; ac_word=$2
7008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7009$as_echo_n "checking for $ac_word... " >&6; }
7010if ${ac_cv_path_DATE+:} false; then :
7011  $as_echo_n "(cached) " >&6
7012else
7013  case $DATE in
7014  [\\/]* | ?:[\\/]*)
7015  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7016  ;;
7017  *)
7018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019for as_dir in $PATH
7020do
7021  IFS=$as_save_IFS
7022  test -z "$as_dir" && as_dir=.
7023    for ac_exec_ext in '' $ac_executable_extensions; do
7024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7025    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7027    break 2
7028  fi
7029done
7030  done
7031IFS=$as_save_IFS
7032
7033  ;;
7034esac
7035fi
7036DATE=$ac_cv_path_DATE
7037if test -n "$DATE"; then
7038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7039$as_echo "$DATE" >&6; }
7040else
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
7043fi
7044
7045
7046          if test "x$DATE" = x; then
7047            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7048          fi
7049        else
7050          # Otherwise we believe it is a complete path. Use it as it is.
7051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7052$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7053          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7054$as_echo_n "checking for DATE... " >&6; }
7055          if test ! -x "$tool_specified"; then
7056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7057$as_echo "not found" >&6; }
7058            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7059          fi
7060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7061$as_echo "$tool_specified" >&6; }
7062        fi
7063      fi
7064    fi
7065
7066  fi
7067
7068
7069
7070  if test "x$DATE" = x; then
7071    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7072  fi
7073
7074
7075
7076
7077
7078  # Publish this variable in the help.
7079
7080
7081  if [ -z "${DIFF+x}" ]; then
7082    # The variable is not set by user, try to locate tool using the code snippet
7083    for ac_prog in gdiff diff
7084do
7085  # Extract the first word of "$ac_prog", so it can be a program name with args.
7086set dummy $ac_prog; ac_word=$2
7087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7088$as_echo_n "checking for $ac_word... " >&6; }
7089if ${ac_cv_path_DIFF+:} false; then :
7090  $as_echo_n "(cached) " >&6
7091else
7092  case $DIFF in
7093  [\\/]* | ?:[\\/]*)
7094  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7095  ;;
7096  *)
7097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7098for as_dir in $PATH
7099do
7100  IFS=$as_save_IFS
7101  test -z "$as_dir" && as_dir=.
7102    for ac_exec_ext in '' $ac_executable_extensions; do
7103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7104    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7106    break 2
7107  fi
7108done
7109  done
7110IFS=$as_save_IFS
7111
7112  ;;
7113esac
7114fi
7115DIFF=$ac_cv_path_DIFF
7116if test -n "$DIFF"; then
7117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7118$as_echo "$DIFF" >&6; }
7119else
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7121$as_echo "no" >&6; }
7122fi
7123
7124
7125  test -n "$DIFF" && break
7126done
7127
7128  else
7129    # The variable is set, but is it from the command line or the environment?
7130
7131    # Try to remove the string !DIFF! from our list.
7132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7134      # If it failed, the variable was not from the command line. Ignore it,
7135      # but warn the user (except for BASH, which is always set by the calling BASH).
7136      if test "xDIFF" != xBASH; then
7137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7138$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7139      fi
7140      # Try to locate tool using the code snippet
7141      for ac_prog in gdiff diff
7142do
7143  # Extract the first word of "$ac_prog", so it can be a program name with args.
7144set dummy $ac_prog; ac_word=$2
7145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7146$as_echo_n "checking for $ac_word... " >&6; }
7147if ${ac_cv_path_DIFF+:} false; then :
7148  $as_echo_n "(cached) " >&6
7149else
7150  case $DIFF in
7151  [\\/]* | ?:[\\/]*)
7152  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7153  ;;
7154  *)
7155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7156for as_dir in $PATH
7157do
7158  IFS=$as_save_IFS
7159  test -z "$as_dir" && as_dir=.
7160    for ac_exec_ext in '' $ac_executable_extensions; do
7161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7162    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7164    break 2
7165  fi
7166done
7167  done
7168IFS=$as_save_IFS
7169
7170  ;;
7171esac
7172fi
7173DIFF=$ac_cv_path_DIFF
7174if test -n "$DIFF"; then
7175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7176$as_echo "$DIFF" >&6; }
7177else
7178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7179$as_echo "no" >&6; }
7180fi
7181
7182
7183  test -n "$DIFF" && break
7184done
7185
7186    else
7187      # If it succeeded, then it was overridden by the user. We will use it
7188      # for the tool.
7189
7190      # First remove it from the list of overridden variables, so we can test
7191      # for unknown variables in the end.
7192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7193
7194      # Check if we try to supply an empty value
7195      if test "x$DIFF" = x; then
7196        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7197$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7199$as_echo_n "checking for DIFF... " >&6; }
7200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7201$as_echo "disabled" >&6; }
7202      else
7203        # Check if the provided tool contains a complete path.
7204        tool_specified="$DIFF"
7205        tool_basename="${tool_specified##*/}"
7206        if test "x$tool_basename" = "x$tool_specified"; then
7207          # A command without a complete path is provided, search $PATH.
7208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7209$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7210          # Extract the first word of "$tool_basename", so it can be a program name with args.
7211set dummy $tool_basename; ac_word=$2
7212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7213$as_echo_n "checking for $ac_word... " >&6; }
7214if ${ac_cv_path_DIFF+:} false; then :
7215  $as_echo_n "(cached) " >&6
7216else
7217  case $DIFF in
7218  [\\/]* | ?:[\\/]*)
7219  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7220  ;;
7221  *)
7222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7223for as_dir in $PATH
7224do
7225  IFS=$as_save_IFS
7226  test -z "$as_dir" && as_dir=.
7227    for ac_exec_ext in '' $ac_executable_extensions; do
7228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7229    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7231    break 2
7232  fi
7233done
7234  done
7235IFS=$as_save_IFS
7236
7237  ;;
7238esac
7239fi
7240DIFF=$ac_cv_path_DIFF
7241if test -n "$DIFF"; then
7242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7243$as_echo "$DIFF" >&6; }
7244else
7245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246$as_echo "no" >&6; }
7247fi
7248
7249
7250          if test "x$DIFF" = x; then
7251            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7252          fi
7253        else
7254          # Otherwise we believe it is a complete path. Use it as it is.
7255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7256$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7257          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7258$as_echo_n "checking for DIFF... " >&6; }
7259          if test ! -x "$tool_specified"; then
7260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7261$as_echo "not found" >&6; }
7262            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7263          fi
7264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7265$as_echo "$tool_specified" >&6; }
7266        fi
7267      fi
7268    fi
7269
7270  fi
7271
7272
7273
7274  if test "x$DIFF" = x; then
7275    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7276  fi
7277
7278
7279
7280
7281
7282  # Publish this variable in the help.
7283
7284
7285  if [ -z "${DIRNAME+x}" ]; then
7286    # The variable is not set by user, try to locate tool using the code snippet
7287    for ac_prog in dirname
7288do
7289  # Extract the first word of "$ac_prog", so it can be a program name with args.
7290set dummy $ac_prog; ac_word=$2
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7292$as_echo_n "checking for $ac_word... " >&6; }
7293if ${ac_cv_path_DIRNAME+:} false; then :
7294  $as_echo_n "(cached) " >&6
7295else
7296  case $DIRNAME in
7297  [\\/]* | ?:[\\/]*)
7298  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7299  ;;
7300  *)
7301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302for as_dir in $PATH
7303do
7304  IFS=$as_save_IFS
7305  test -z "$as_dir" && as_dir=.
7306    for ac_exec_ext in '' $ac_executable_extensions; do
7307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7308    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7310    break 2
7311  fi
7312done
7313  done
7314IFS=$as_save_IFS
7315
7316  ;;
7317esac
7318fi
7319DIRNAME=$ac_cv_path_DIRNAME
7320if test -n "$DIRNAME"; then
7321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7322$as_echo "$DIRNAME" >&6; }
7323else
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7325$as_echo "no" >&6; }
7326fi
7327
7328
7329  test -n "$DIRNAME" && break
7330done
7331
7332  else
7333    # The variable is set, but is it from the command line or the environment?
7334
7335    # Try to remove the string !DIRNAME! from our list.
7336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7338      # If it failed, the variable was not from the command line. Ignore it,
7339      # but warn the user (except for BASH, which is always set by the calling BASH).
7340      if test "xDIRNAME" != xBASH; then
7341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7342$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7343      fi
7344      # Try to locate tool using the code snippet
7345      for ac_prog in dirname
7346do
7347  # Extract the first word of "$ac_prog", so it can be a program name with args.
7348set dummy $ac_prog; ac_word=$2
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
7351if ${ac_cv_path_DIRNAME+:} false; then :
7352  $as_echo_n "(cached) " >&6
7353else
7354  case $DIRNAME in
7355  [\\/]* | ?:[\\/]*)
7356  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7357  ;;
7358  *)
7359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7360for as_dir in $PATH
7361do
7362  IFS=$as_save_IFS
7363  test -z "$as_dir" && as_dir=.
7364    for ac_exec_ext in '' $ac_executable_extensions; do
7365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7366    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7368    break 2
7369  fi
7370done
7371  done
7372IFS=$as_save_IFS
7373
7374  ;;
7375esac
7376fi
7377DIRNAME=$ac_cv_path_DIRNAME
7378if test -n "$DIRNAME"; then
7379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7380$as_echo "$DIRNAME" >&6; }
7381else
7382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7383$as_echo "no" >&6; }
7384fi
7385
7386
7387  test -n "$DIRNAME" && break
7388done
7389
7390    else
7391      # If it succeeded, then it was overridden by the user. We will use it
7392      # for the tool.
7393
7394      # First remove it from the list of overridden variables, so we can test
7395      # for unknown variables in the end.
7396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7397
7398      # Check if we try to supply an empty value
7399      if test "x$DIRNAME" = x; then
7400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7401$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7403$as_echo_n "checking for DIRNAME... " >&6; }
7404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7405$as_echo "disabled" >&6; }
7406      else
7407        # Check if the provided tool contains a complete path.
7408        tool_specified="$DIRNAME"
7409        tool_basename="${tool_specified##*/}"
7410        if test "x$tool_basename" = "x$tool_specified"; then
7411          # A command without a complete path is provided, search $PATH.
7412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7413$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7414          # Extract the first word of "$tool_basename", so it can be a program name with args.
7415set dummy $tool_basename; ac_word=$2
7416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7417$as_echo_n "checking for $ac_word... " >&6; }
7418if ${ac_cv_path_DIRNAME+:} false; then :
7419  $as_echo_n "(cached) " >&6
7420else
7421  case $DIRNAME in
7422  [\\/]* | ?:[\\/]*)
7423  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7424  ;;
7425  *)
7426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7427for as_dir in $PATH
7428do
7429  IFS=$as_save_IFS
7430  test -z "$as_dir" && as_dir=.
7431    for ac_exec_ext in '' $ac_executable_extensions; do
7432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7433    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7435    break 2
7436  fi
7437done
7438  done
7439IFS=$as_save_IFS
7440
7441  ;;
7442esac
7443fi
7444DIRNAME=$ac_cv_path_DIRNAME
7445if test -n "$DIRNAME"; then
7446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7447$as_echo "$DIRNAME" >&6; }
7448else
7449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
7451fi
7452
7453
7454          if test "x$DIRNAME" = x; then
7455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7456          fi
7457        else
7458          # Otherwise we believe it is a complete path. Use it as it is.
7459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7460$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7462$as_echo_n "checking for DIRNAME... " >&6; }
7463          if test ! -x "$tool_specified"; then
7464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7465$as_echo "not found" >&6; }
7466            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7467          fi
7468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7469$as_echo "$tool_specified" >&6; }
7470        fi
7471      fi
7472    fi
7473
7474  fi
7475
7476
7477
7478  if test "x$DIRNAME" = x; then
7479    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7480  fi
7481
7482
7483
7484
7485
7486  # Publish this variable in the help.
7487
7488
7489  if [ -z "${ECHO+x}" ]; then
7490    # The variable is not set by user, try to locate tool using the code snippet
7491    for ac_prog in echo
7492do
7493  # Extract the first word of "$ac_prog", so it can be a program name with args.
7494set dummy $ac_prog; ac_word=$2
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7496$as_echo_n "checking for $ac_word... " >&6; }
7497if ${ac_cv_path_ECHO+:} false; then :
7498  $as_echo_n "(cached) " >&6
7499else
7500  case $ECHO in
7501  [\\/]* | ?:[\\/]*)
7502  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7503  ;;
7504  *)
7505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7506for as_dir in $PATH
7507do
7508  IFS=$as_save_IFS
7509  test -z "$as_dir" && as_dir=.
7510    for ac_exec_ext in '' $ac_executable_extensions; do
7511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7512    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7514    break 2
7515  fi
7516done
7517  done
7518IFS=$as_save_IFS
7519
7520  ;;
7521esac
7522fi
7523ECHO=$ac_cv_path_ECHO
7524if test -n "$ECHO"; then
7525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7526$as_echo "$ECHO" >&6; }
7527else
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7529$as_echo "no" >&6; }
7530fi
7531
7532
7533  test -n "$ECHO" && break
7534done
7535
7536  else
7537    # The variable is set, but is it from the command line or the environment?
7538
7539    # Try to remove the string !ECHO! from our list.
7540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7542      # If it failed, the variable was not from the command line. Ignore it,
7543      # but warn the user (except for BASH, which is always set by the calling BASH).
7544      if test "xECHO" != xBASH; then
7545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7546$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7547      fi
7548      # Try to locate tool using the code snippet
7549      for ac_prog in echo
7550do
7551  # Extract the first word of "$ac_prog", so it can be a program name with args.
7552set dummy $ac_prog; ac_word=$2
7553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7554$as_echo_n "checking for $ac_word... " >&6; }
7555if ${ac_cv_path_ECHO+:} false; then :
7556  $as_echo_n "(cached) " >&6
7557else
7558  case $ECHO in
7559  [\\/]* | ?:[\\/]*)
7560  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7561  ;;
7562  *)
7563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7564for as_dir in $PATH
7565do
7566  IFS=$as_save_IFS
7567  test -z "$as_dir" && as_dir=.
7568    for ac_exec_ext in '' $ac_executable_extensions; do
7569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7570    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7572    break 2
7573  fi
7574done
7575  done
7576IFS=$as_save_IFS
7577
7578  ;;
7579esac
7580fi
7581ECHO=$ac_cv_path_ECHO
7582if test -n "$ECHO"; then
7583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7584$as_echo "$ECHO" >&6; }
7585else
7586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587$as_echo "no" >&6; }
7588fi
7589
7590
7591  test -n "$ECHO" && break
7592done
7593
7594    else
7595      # If it succeeded, then it was overridden by the user. We will use it
7596      # for the tool.
7597
7598      # First remove it from the list of overridden variables, so we can test
7599      # for unknown variables in the end.
7600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7601
7602      # Check if we try to supply an empty value
7603      if test "x$ECHO" = x; then
7604        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7605$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7607$as_echo_n "checking for ECHO... " >&6; }
7608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7609$as_echo "disabled" >&6; }
7610      else
7611        # Check if the provided tool contains a complete path.
7612        tool_specified="$ECHO"
7613        tool_basename="${tool_specified##*/}"
7614        if test "x$tool_basename" = "x$tool_specified"; then
7615          # A command without a complete path is provided, search $PATH.
7616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7617$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7618          # Extract the first word of "$tool_basename", so it can be a program name with args.
7619set dummy $tool_basename; ac_word=$2
7620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7621$as_echo_n "checking for $ac_word... " >&6; }
7622if ${ac_cv_path_ECHO+:} false; then :
7623  $as_echo_n "(cached) " >&6
7624else
7625  case $ECHO in
7626  [\\/]* | ?:[\\/]*)
7627  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7628  ;;
7629  *)
7630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7631for as_dir in $PATH
7632do
7633  IFS=$as_save_IFS
7634  test -z "$as_dir" && as_dir=.
7635    for ac_exec_ext in '' $ac_executable_extensions; do
7636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7637    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7639    break 2
7640  fi
7641done
7642  done
7643IFS=$as_save_IFS
7644
7645  ;;
7646esac
7647fi
7648ECHO=$ac_cv_path_ECHO
7649if test -n "$ECHO"; then
7650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7651$as_echo "$ECHO" >&6; }
7652else
7653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7654$as_echo "no" >&6; }
7655fi
7656
7657
7658          if test "x$ECHO" = x; then
7659            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7660          fi
7661        else
7662          # Otherwise we believe it is a complete path. Use it as it is.
7663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7664$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7665          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7666$as_echo_n "checking for ECHO... " >&6; }
7667          if test ! -x "$tool_specified"; then
7668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7669$as_echo "not found" >&6; }
7670            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7671          fi
7672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7673$as_echo "$tool_specified" >&6; }
7674        fi
7675      fi
7676    fi
7677
7678  fi
7679
7680
7681
7682  if test "x$ECHO" = x; then
7683    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7684  fi
7685
7686
7687
7688
7689
7690  # Publish this variable in the help.
7691
7692
7693  if [ -z "${EXPR+x}" ]; then
7694    # The variable is not set by user, try to locate tool using the code snippet
7695    for ac_prog in expr
7696do
7697  # Extract the first word of "$ac_prog", so it can be a program name with args.
7698set dummy $ac_prog; ac_word=$2
7699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7700$as_echo_n "checking for $ac_word... " >&6; }
7701if ${ac_cv_path_EXPR+:} false; then :
7702  $as_echo_n "(cached) " >&6
7703else
7704  case $EXPR in
7705  [\\/]* | ?:[\\/]*)
7706  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7707  ;;
7708  *)
7709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7710for as_dir in $PATH
7711do
7712  IFS=$as_save_IFS
7713  test -z "$as_dir" && as_dir=.
7714    for ac_exec_ext in '' $ac_executable_extensions; do
7715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7716    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7718    break 2
7719  fi
7720done
7721  done
7722IFS=$as_save_IFS
7723
7724  ;;
7725esac
7726fi
7727EXPR=$ac_cv_path_EXPR
7728if test -n "$EXPR"; then
7729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7730$as_echo "$EXPR" >&6; }
7731else
7732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7733$as_echo "no" >&6; }
7734fi
7735
7736
7737  test -n "$EXPR" && break
7738done
7739
7740  else
7741    # The variable is set, but is it from the command line or the environment?
7742
7743    # Try to remove the string !EXPR! from our list.
7744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7746      # If it failed, the variable was not from the command line. Ignore it,
7747      # but warn the user (except for BASH, which is always set by the calling BASH).
7748      if test "xEXPR" != xBASH; then
7749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7750$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7751      fi
7752      # Try to locate tool using the code snippet
7753      for ac_prog in expr
7754do
7755  # Extract the first word of "$ac_prog", so it can be a program name with args.
7756set dummy $ac_prog; ac_word=$2
7757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7758$as_echo_n "checking for $ac_word... " >&6; }
7759if ${ac_cv_path_EXPR+:} false; then :
7760  $as_echo_n "(cached) " >&6
7761else
7762  case $EXPR in
7763  [\\/]* | ?:[\\/]*)
7764  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7765  ;;
7766  *)
7767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7768for as_dir in $PATH
7769do
7770  IFS=$as_save_IFS
7771  test -z "$as_dir" && as_dir=.
7772    for ac_exec_ext in '' $ac_executable_extensions; do
7773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7774    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7776    break 2
7777  fi
7778done
7779  done
7780IFS=$as_save_IFS
7781
7782  ;;
7783esac
7784fi
7785EXPR=$ac_cv_path_EXPR
7786if test -n "$EXPR"; then
7787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7788$as_echo "$EXPR" >&6; }
7789else
7790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7791$as_echo "no" >&6; }
7792fi
7793
7794
7795  test -n "$EXPR" && break
7796done
7797
7798    else
7799      # If it succeeded, then it was overridden by the user. We will use it
7800      # for the tool.
7801
7802      # First remove it from the list of overridden variables, so we can test
7803      # for unknown variables in the end.
7804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7805
7806      # Check if we try to supply an empty value
7807      if test "x$EXPR" = x; then
7808        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7809$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7811$as_echo_n "checking for EXPR... " >&6; }
7812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7813$as_echo "disabled" >&6; }
7814      else
7815        # Check if the provided tool contains a complete path.
7816        tool_specified="$EXPR"
7817        tool_basename="${tool_specified##*/}"
7818        if test "x$tool_basename" = "x$tool_specified"; then
7819          # A command without a complete path is provided, search $PATH.
7820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7821$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7822          # Extract the first word of "$tool_basename", so it can be a program name with args.
7823set dummy $tool_basename; ac_word=$2
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7825$as_echo_n "checking for $ac_word... " >&6; }
7826if ${ac_cv_path_EXPR+:} false; then :
7827  $as_echo_n "(cached) " >&6
7828else
7829  case $EXPR in
7830  [\\/]* | ?:[\\/]*)
7831  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7832  ;;
7833  *)
7834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7835for as_dir in $PATH
7836do
7837  IFS=$as_save_IFS
7838  test -z "$as_dir" && as_dir=.
7839    for ac_exec_ext in '' $ac_executable_extensions; do
7840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7841    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7843    break 2
7844  fi
7845done
7846  done
7847IFS=$as_save_IFS
7848
7849  ;;
7850esac
7851fi
7852EXPR=$ac_cv_path_EXPR
7853if test -n "$EXPR"; then
7854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7855$as_echo "$EXPR" >&6; }
7856else
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7858$as_echo "no" >&6; }
7859fi
7860
7861
7862          if test "x$EXPR" = x; then
7863            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7864          fi
7865        else
7866          # Otherwise we believe it is a complete path. Use it as it is.
7867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7868$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7869          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7870$as_echo_n "checking for EXPR... " >&6; }
7871          if test ! -x "$tool_specified"; then
7872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7873$as_echo "not found" >&6; }
7874            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7875          fi
7876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7877$as_echo "$tool_specified" >&6; }
7878        fi
7879      fi
7880    fi
7881
7882  fi
7883
7884
7885
7886  if test "x$EXPR" = x; then
7887    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7888  fi
7889
7890
7891
7892
7893
7894  # Publish this variable in the help.
7895
7896
7897  if [ -z "${FILE+x}" ]; then
7898    # The variable is not set by user, try to locate tool using the code snippet
7899    for ac_prog in file
7900do
7901  # Extract the first word of "$ac_prog", so it can be a program name with args.
7902set dummy $ac_prog; ac_word=$2
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7904$as_echo_n "checking for $ac_word... " >&6; }
7905if ${ac_cv_path_FILE+:} false; then :
7906  $as_echo_n "(cached) " >&6
7907else
7908  case $FILE in
7909  [\\/]* | ?:[\\/]*)
7910  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7911  ;;
7912  *)
7913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914for as_dir in $PATH
7915do
7916  IFS=$as_save_IFS
7917  test -z "$as_dir" && as_dir=.
7918    for ac_exec_ext in '' $ac_executable_extensions; do
7919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922    break 2
7923  fi
7924done
7925  done
7926IFS=$as_save_IFS
7927
7928  ;;
7929esac
7930fi
7931FILE=$ac_cv_path_FILE
7932if test -n "$FILE"; then
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7934$as_echo "$FILE" >&6; }
7935else
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7937$as_echo "no" >&6; }
7938fi
7939
7940
7941  test -n "$FILE" && break
7942done
7943
7944  else
7945    # The variable is set, but is it from the command line or the environment?
7946
7947    # Try to remove the string !FILE! from our list.
7948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7950      # If it failed, the variable was not from the command line. Ignore it,
7951      # but warn the user (except for BASH, which is always set by the calling BASH).
7952      if test "xFILE" != xBASH; then
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7954$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7955      fi
7956      # Try to locate tool using the code snippet
7957      for ac_prog in file
7958do
7959  # Extract the first word of "$ac_prog", so it can be a program name with args.
7960set dummy $ac_prog; ac_word=$2
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7962$as_echo_n "checking for $ac_word... " >&6; }
7963if ${ac_cv_path_FILE+:} false; then :
7964  $as_echo_n "(cached) " >&6
7965else
7966  case $FILE in
7967  [\\/]* | ?:[\\/]*)
7968  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7969  ;;
7970  *)
7971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7972for as_dir in $PATH
7973do
7974  IFS=$as_save_IFS
7975  test -z "$as_dir" && as_dir=.
7976    for ac_exec_ext in '' $ac_executable_extensions; do
7977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7978    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7980    break 2
7981  fi
7982done
7983  done
7984IFS=$as_save_IFS
7985
7986  ;;
7987esac
7988fi
7989FILE=$ac_cv_path_FILE
7990if test -n "$FILE"; then
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7992$as_echo "$FILE" >&6; }
7993else
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999  test -n "$FILE" && break
8000done
8001
8002    else
8003      # If it succeeded, then it was overridden by the user. We will use it
8004      # for the tool.
8005
8006      # First remove it from the list of overridden variables, so we can test
8007      # for unknown variables in the end.
8008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8009
8010      # Check if we try to supply an empty value
8011      if test "x$FILE" = x; then
8012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8013$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8015$as_echo_n "checking for FILE... " >&6; }
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8017$as_echo "disabled" >&6; }
8018      else
8019        # Check if the provided tool contains a complete path.
8020        tool_specified="$FILE"
8021        tool_basename="${tool_specified##*/}"
8022        if test "x$tool_basename" = "x$tool_specified"; then
8023          # A command without a complete path is provided, search $PATH.
8024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8025$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8026          # Extract the first word of "$tool_basename", so it can be a program name with args.
8027set dummy $tool_basename; ac_word=$2
8028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8029$as_echo_n "checking for $ac_word... " >&6; }
8030if ${ac_cv_path_FILE+:} false; then :
8031  $as_echo_n "(cached) " >&6
8032else
8033  case $FILE in
8034  [\\/]* | ?:[\\/]*)
8035  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8036  ;;
8037  *)
8038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8039for as_dir in $PATH
8040do
8041  IFS=$as_save_IFS
8042  test -z "$as_dir" && as_dir=.
8043    for ac_exec_ext in '' $ac_executable_extensions; do
8044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8045    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8047    break 2
8048  fi
8049done
8050  done
8051IFS=$as_save_IFS
8052
8053  ;;
8054esac
8055fi
8056FILE=$ac_cv_path_FILE
8057if test -n "$FILE"; then
8058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8059$as_echo "$FILE" >&6; }
8060else
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8062$as_echo "no" >&6; }
8063fi
8064
8065
8066          if test "x$FILE" = x; then
8067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8068          fi
8069        else
8070          # Otherwise we believe it is a complete path. Use it as it is.
8071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8072$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8074$as_echo_n "checking for FILE... " >&6; }
8075          if test ! -x "$tool_specified"; then
8076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8077$as_echo "not found" >&6; }
8078            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8079          fi
8080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8081$as_echo "$tool_specified" >&6; }
8082        fi
8083      fi
8084    fi
8085
8086  fi
8087
8088
8089
8090  if test "x$FILE" = x; then
8091    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8092  fi
8093
8094
8095
8096
8097
8098  # Publish this variable in the help.
8099
8100
8101  if [ -z "${FIND+x}" ]; then
8102    # The variable is not set by user, try to locate tool using the code snippet
8103    for ac_prog in find
8104do
8105  # Extract the first word of "$ac_prog", so it can be a program name with args.
8106set dummy $ac_prog; ac_word=$2
8107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8108$as_echo_n "checking for $ac_word... " >&6; }
8109if ${ac_cv_path_FIND+:} false; then :
8110  $as_echo_n "(cached) " >&6
8111else
8112  case $FIND in
8113  [\\/]* | ?:[\\/]*)
8114  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8115  ;;
8116  *)
8117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8118for as_dir in $PATH
8119do
8120  IFS=$as_save_IFS
8121  test -z "$as_dir" && as_dir=.
8122    for ac_exec_ext in '' $ac_executable_extensions; do
8123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8124    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8126    break 2
8127  fi
8128done
8129  done
8130IFS=$as_save_IFS
8131
8132  ;;
8133esac
8134fi
8135FIND=$ac_cv_path_FIND
8136if test -n "$FIND"; then
8137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8138$as_echo "$FIND" >&6; }
8139else
8140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
8142fi
8143
8144
8145  test -n "$FIND" && break
8146done
8147
8148  else
8149    # The variable is set, but is it from the command line or the environment?
8150
8151    # Try to remove the string !FIND! from our list.
8152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8154      # If it failed, the variable was not from the command line. Ignore it,
8155      # but warn the user (except for BASH, which is always set by the calling BASH).
8156      if test "xFIND" != xBASH; then
8157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8158$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8159      fi
8160      # Try to locate tool using the code snippet
8161      for ac_prog in find
8162do
8163  # Extract the first word of "$ac_prog", so it can be a program name with args.
8164set dummy $ac_prog; ac_word=$2
8165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8166$as_echo_n "checking for $ac_word... " >&6; }
8167if ${ac_cv_path_FIND+:} false; then :
8168  $as_echo_n "(cached) " >&6
8169else
8170  case $FIND in
8171  [\\/]* | ?:[\\/]*)
8172  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8173  ;;
8174  *)
8175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8176for as_dir in $PATH
8177do
8178  IFS=$as_save_IFS
8179  test -z "$as_dir" && as_dir=.
8180    for ac_exec_ext in '' $ac_executable_extensions; do
8181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8182    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8184    break 2
8185  fi
8186done
8187  done
8188IFS=$as_save_IFS
8189
8190  ;;
8191esac
8192fi
8193FIND=$ac_cv_path_FIND
8194if test -n "$FIND"; then
8195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8196$as_echo "$FIND" >&6; }
8197else
8198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8199$as_echo "no" >&6; }
8200fi
8201
8202
8203  test -n "$FIND" && break
8204done
8205
8206    else
8207      # If it succeeded, then it was overridden by the user. We will use it
8208      # for the tool.
8209
8210      # First remove it from the list of overridden variables, so we can test
8211      # for unknown variables in the end.
8212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8213
8214      # Check if we try to supply an empty value
8215      if test "x$FIND" = x; then
8216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8217$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8219$as_echo_n "checking for FIND... " >&6; }
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8221$as_echo "disabled" >&6; }
8222      else
8223        # Check if the provided tool contains a complete path.
8224        tool_specified="$FIND"
8225        tool_basename="${tool_specified##*/}"
8226        if test "x$tool_basename" = "x$tool_specified"; then
8227          # A command without a complete path is provided, search $PATH.
8228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8229$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8230          # Extract the first word of "$tool_basename", so it can be a program name with args.
8231set dummy $tool_basename; ac_word=$2
8232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8233$as_echo_n "checking for $ac_word... " >&6; }
8234if ${ac_cv_path_FIND+:} false; then :
8235  $as_echo_n "(cached) " >&6
8236else
8237  case $FIND in
8238  [\\/]* | ?:[\\/]*)
8239  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8240  ;;
8241  *)
8242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8243for as_dir in $PATH
8244do
8245  IFS=$as_save_IFS
8246  test -z "$as_dir" && as_dir=.
8247    for ac_exec_ext in '' $ac_executable_extensions; do
8248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8249    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8251    break 2
8252  fi
8253done
8254  done
8255IFS=$as_save_IFS
8256
8257  ;;
8258esac
8259fi
8260FIND=$ac_cv_path_FIND
8261if test -n "$FIND"; then
8262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8263$as_echo "$FIND" >&6; }
8264else
8265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8266$as_echo "no" >&6; }
8267fi
8268
8269
8270          if test "x$FIND" = x; then
8271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8272          fi
8273        else
8274          # Otherwise we believe it is a complete path. Use it as it is.
8275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8276$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8278$as_echo_n "checking for FIND... " >&6; }
8279          if test ! -x "$tool_specified"; then
8280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8281$as_echo "not found" >&6; }
8282            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8283          fi
8284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8285$as_echo "$tool_specified" >&6; }
8286        fi
8287      fi
8288    fi
8289
8290  fi
8291
8292
8293
8294  if test "x$FIND" = x; then
8295    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8296  fi
8297
8298
8299
8300
8301
8302  # Publish this variable in the help.
8303
8304
8305  if [ -z "${HEAD+x}" ]; then
8306    # The variable is not set by user, try to locate tool using the code snippet
8307    for ac_prog in head
8308do
8309  # Extract the first word of "$ac_prog", so it can be a program name with args.
8310set dummy $ac_prog; ac_word=$2
8311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8312$as_echo_n "checking for $ac_word... " >&6; }
8313if ${ac_cv_path_HEAD+:} false; then :
8314  $as_echo_n "(cached) " >&6
8315else
8316  case $HEAD in
8317  [\\/]* | ?:[\\/]*)
8318  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8319  ;;
8320  *)
8321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8322for as_dir in $PATH
8323do
8324  IFS=$as_save_IFS
8325  test -z "$as_dir" && as_dir=.
8326    for ac_exec_ext in '' $ac_executable_extensions; do
8327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8328    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8330    break 2
8331  fi
8332done
8333  done
8334IFS=$as_save_IFS
8335
8336  ;;
8337esac
8338fi
8339HEAD=$ac_cv_path_HEAD
8340if test -n "$HEAD"; then
8341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8342$as_echo "$HEAD" >&6; }
8343else
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8345$as_echo "no" >&6; }
8346fi
8347
8348
8349  test -n "$HEAD" && break
8350done
8351
8352  else
8353    # The variable is set, but is it from the command line or the environment?
8354
8355    # Try to remove the string !HEAD! from our list.
8356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8358      # If it failed, the variable was not from the command line. Ignore it,
8359      # but warn the user (except for BASH, which is always set by the calling BASH).
8360      if test "xHEAD" != xBASH; then
8361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8362$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8363      fi
8364      # Try to locate tool using the code snippet
8365      for ac_prog in head
8366do
8367  # Extract the first word of "$ac_prog", so it can be a program name with args.
8368set dummy $ac_prog; ac_word=$2
8369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8370$as_echo_n "checking for $ac_word... " >&6; }
8371if ${ac_cv_path_HEAD+:} false; then :
8372  $as_echo_n "(cached) " >&6
8373else
8374  case $HEAD in
8375  [\\/]* | ?:[\\/]*)
8376  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8377  ;;
8378  *)
8379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8380for as_dir in $PATH
8381do
8382  IFS=$as_save_IFS
8383  test -z "$as_dir" && as_dir=.
8384    for ac_exec_ext in '' $ac_executable_extensions; do
8385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8386    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8388    break 2
8389  fi
8390done
8391  done
8392IFS=$as_save_IFS
8393
8394  ;;
8395esac
8396fi
8397HEAD=$ac_cv_path_HEAD
8398if test -n "$HEAD"; then
8399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8400$as_echo "$HEAD" >&6; }
8401else
8402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403$as_echo "no" >&6; }
8404fi
8405
8406
8407  test -n "$HEAD" && break
8408done
8409
8410    else
8411      # If it succeeded, then it was overridden by the user. We will use it
8412      # for the tool.
8413
8414      # First remove it from the list of overridden variables, so we can test
8415      # for unknown variables in the end.
8416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8417
8418      # Check if we try to supply an empty value
8419      if test "x$HEAD" = x; then
8420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8421$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8423$as_echo_n "checking for HEAD... " >&6; }
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8425$as_echo "disabled" >&6; }
8426      else
8427        # Check if the provided tool contains a complete path.
8428        tool_specified="$HEAD"
8429        tool_basename="${tool_specified##*/}"
8430        if test "x$tool_basename" = "x$tool_specified"; then
8431          # A command without a complete path is provided, search $PATH.
8432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8433$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8434          # Extract the first word of "$tool_basename", so it can be a program name with args.
8435set dummy $tool_basename; ac_word=$2
8436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8437$as_echo_n "checking for $ac_word... " >&6; }
8438if ${ac_cv_path_HEAD+:} false; then :
8439  $as_echo_n "(cached) " >&6
8440else
8441  case $HEAD in
8442  [\\/]* | ?:[\\/]*)
8443  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8444  ;;
8445  *)
8446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8447for as_dir in $PATH
8448do
8449  IFS=$as_save_IFS
8450  test -z "$as_dir" && as_dir=.
8451    for ac_exec_ext in '' $ac_executable_extensions; do
8452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8453    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8455    break 2
8456  fi
8457done
8458  done
8459IFS=$as_save_IFS
8460
8461  ;;
8462esac
8463fi
8464HEAD=$ac_cv_path_HEAD
8465if test -n "$HEAD"; then
8466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8467$as_echo "$HEAD" >&6; }
8468else
8469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8470$as_echo "no" >&6; }
8471fi
8472
8473
8474          if test "x$HEAD" = x; then
8475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8476          fi
8477        else
8478          # Otherwise we believe it is a complete path. Use it as it is.
8479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8480$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8482$as_echo_n "checking for HEAD... " >&6; }
8483          if test ! -x "$tool_specified"; then
8484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8485$as_echo "not found" >&6; }
8486            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8487          fi
8488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8489$as_echo "$tool_specified" >&6; }
8490        fi
8491      fi
8492    fi
8493
8494  fi
8495
8496
8497
8498  if test "x$HEAD" = x; then
8499    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8500  fi
8501
8502
8503
8504
8505
8506  # Publish this variable in the help.
8507
8508
8509  if [ -z "${GUNZIP+x}" ]; then
8510    # The variable is not set by user, try to locate tool using the code snippet
8511    for ac_prog in gunzip
8512do
8513  # Extract the first word of "$ac_prog", so it can be a program name with args.
8514set dummy $ac_prog; ac_word=$2
8515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8516$as_echo_n "checking for $ac_word... " >&6; }
8517if ${ac_cv_path_GUNZIP+:} false; then :
8518  $as_echo_n "(cached) " >&6
8519else
8520  case $GUNZIP in
8521  [\\/]* | ?:[\\/]*)
8522  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8523  ;;
8524  *)
8525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8526for as_dir in $PATH
8527do
8528  IFS=$as_save_IFS
8529  test -z "$as_dir" && as_dir=.
8530    for ac_exec_ext in '' $ac_executable_extensions; do
8531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8532    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8534    break 2
8535  fi
8536done
8537  done
8538IFS=$as_save_IFS
8539
8540  ;;
8541esac
8542fi
8543GUNZIP=$ac_cv_path_GUNZIP
8544if test -n "$GUNZIP"; then
8545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8546$as_echo "$GUNZIP" >&6; }
8547else
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8549$as_echo "no" >&6; }
8550fi
8551
8552
8553  test -n "$GUNZIP" && break
8554done
8555
8556  else
8557    # The variable is set, but is it from the command line or the environment?
8558
8559    # Try to remove the string !GUNZIP! from our list.
8560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8562      # If it failed, the variable was not from the command line. Ignore it,
8563      # but warn the user (except for BASH, which is always set by the calling BASH).
8564      if test "xGUNZIP" != xBASH; then
8565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8566$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8567      fi
8568      # Try to locate tool using the code snippet
8569      for ac_prog in gunzip
8570do
8571  # Extract the first word of "$ac_prog", so it can be a program name with args.
8572set dummy $ac_prog; ac_word=$2
8573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8574$as_echo_n "checking for $ac_word... " >&6; }
8575if ${ac_cv_path_GUNZIP+:} false; then :
8576  $as_echo_n "(cached) " >&6
8577else
8578  case $GUNZIP in
8579  [\\/]* | ?:[\\/]*)
8580  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8581  ;;
8582  *)
8583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8584for as_dir in $PATH
8585do
8586  IFS=$as_save_IFS
8587  test -z "$as_dir" && as_dir=.
8588    for ac_exec_ext in '' $ac_executable_extensions; do
8589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8590    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8592    break 2
8593  fi
8594done
8595  done
8596IFS=$as_save_IFS
8597
8598  ;;
8599esac
8600fi
8601GUNZIP=$ac_cv_path_GUNZIP
8602if test -n "$GUNZIP"; then
8603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8604$as_echo "$GUNZIP" >&6; }
8605else
8606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8607$as_echo "no" >&6; }
8608fi
8609
8610
8611  test -n "$GUNZIP" && break
8612done
8613
8614    else
8615      # If it succeeded, then it was overridden by the user. We will use it
8616      # for the tool.
8617
8618      # First remove it from the list of overridden variables, so we can test
8619      # for unknown variables in the end.
8620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8621
8622      # Check if we try to supply an empty value
8623      if test "x$GUNZIP" = x; then
8624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8625$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8627$as_echo_n "checking for GUNZIP... " >&6; }
8628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8629$as_echo "disabled" >&6; }
8630      else
8631        # Check if the provided tool contains a complete path.
8632        tool_specified="$GUNZIP"
8633        tool_basename="${tool_specified##*/}"
8634        if test "x$tool_basename" = "x$tool_specified"; then
8635          # A command without a complete path is provided, search $PATH.
8636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8637$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8638          # Extract the first word of "$tool_basename", so it can be a program name with args.
8639set dummy $tool_basename; ac_word=$2
8640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8641$as_echo_n "checking for $ac_word... " >&6; }
8642if ${ac_cv_path_GUNZIP+:} false; then :
8643  $as_echo_n "(cached) " >&6
8644else
8645  case $GUNZIP in
8646  [\\/]* | ?:[\\/]*)
8647  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8648  ;;
8649  *)
8650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8651for as_dir in $PATH
8652do
8653  IFS=$as_save_IFS
8654  test -z "$as_dir" && as_dir=.
8655    for ac_exec_ext in '' $ac_executable_extensions; do
8656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8657    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8659    break 2
8660  fi
8661done
8662  done
8663IFS=$as_save_IFS
8664
8665  ;;
8666esac
8667fi
8668GUNZIP=$ac_cv_path_GUNZIP
8669if test -n "$GUNZIP"; then
8670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8671$as_echo "$GUNZIP" >&6; }
8672else
8673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8674$as_echo "no" >&6; }
8675fi
8676
8677
8678          if test "x$GUNZIP" = x; then
8679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8680          fi
8681        else
8682          # Otherwise we believe it is a complete path. Use it as it is.
8683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8684$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8686$as_echo_n "checking for GUNZIP... " >&6; }
8687          if test ! -x "$tool_specified"; then
8688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8689$as_echo "not found" >&6; }
8690            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8691          fi
8692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8693$as_echo "$tool_specified" >&6; }
8694        fi
8695      fi
8696    fi
8697
8698  fi
8699
8700
8701
8702  if test "x$GUNZIP" = x; then
8703    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8704  fi
8705
8706
8707
8708
8709
8710  # Publish this variable in the help.
8711
8712
8713  if [ -z "${GZIP+x}" ]; then
8714    # The variable is not set by user, try to locate tool using the code snippet
8715    for ac_prog in pigz gzip
8716do
8717  # Extract the first word of "$ac_prog", so it can be a program name with args.
8718set dummy $ac_prog; ac_word=$2
8719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8720$as_echo_n "checking for $ac_word... " >&6; }
8721if ${ac_cv_path_GZIP+:} false; then :
8722  $as_echo_n "(cached) " >&6
8723else
8724  case $GZIP in
8725  [\\/]* | ?:[\\/]*)
8726  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8727  ;;
8728  *)
8729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8730for as_dir in $PATH
8731do
8732  IFS=$as_save_IFS
8733  test -z "$as_dir" && as_dir=.
8734    for ac_exec_ext in '' $ac_executable_extensions; do
8735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8736    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8738    break 2
8739  fi
8740done
8741  done
8742IFS=$as_save_IFS
8743
8744  ;;
8745esac
8746fi
8747GZIP=$ac_cv_path_GZIP
8748if test -n "$GZIP"; then
8749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8750$as_echo "$GZIP" >&6; }
8751else
8752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8753$as_echo "no" >&6; }
8754fi
8755
8756
8757  test -n "$GZIP" && break
8758done
8759
8760  else
8761    # The variable is set, but is it from the command line or the environment?
8762
8763    # Try to remove the string !GZIP! from our list.
8764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8766      # If it failed, the variable was not from the command line. Ignore it,
8767      # but warn the user (except for BASH, which is always set by the calling BASH).
8768      if test "xGZIP" != xBASH; then
8769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8770$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8771      fi
8772      # Try to locate tool using the code snippet
8773      for ac_prog in pigz gzip
8774do
8775  # Extract the first word of "$ac_prog", so it can be a program name with args.
8776set dummy $ac_prog; ac_word=$2
8777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8778$as_echo_n "checking for $ac_word... " >&6; }
8779if ${ac_cv_path_GZIP+:} false; then :
8780  $as_echo_n "(cached) " >&6
8781else
8782  case $GZIP in
8783  [\\/]* | ?:[\\/]*)
8784  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8785  ;;
8786  *)
8787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8788for as_dir in $PATH
8789do
8790  IFS=$as_save_IFS
8791  test -z "$as_dir" && as_dir=.
8792    for ac_exec_ext in '' $ac_executable_extensions; do
8793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8794    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8796    break 2
8797  fi
8798done
8799  done
8800IFS=$as_save_IFS
8801
8802  ;;
8803esac
8804fi
8805GZIP=$ac_cv_path_GZIP
8806if test -n "$GZIP"; then
8807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8808$as_echo "$GZIP" >&6; }
8809else
8810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8811$as_echo "no" >&6; }
8812fi
8813
8814
8815  test -n "$GZIP" && break
8816done
8817
8818    else
8819      # If it succeeded, then it was overridden by the user. We will use it
8820      # for the tool.
8821
8822      # First remove it from the list of overridden variables, so we can test
8823      # for unknown variables in the end.
8824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8825
8826      # Check if we try to supply an empty value
8827      if test "x$GZIP" = x; then
8828        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8829$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8831$as_echo_n "checking for GZIP... " >&6; }
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8833$as_echo "disabled" >&6; }
8834      else
8835        # Check if the provided tool contains a complete path.
8836        tool_specified="$GZIP"
8837        tool_basename="${tool_specified##*/}"
8838        if test "x$tool_basename" = "x$tool_specified"; then
8839          # A command without a complete path is provided, search $PATH.
8840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8841$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8842          # Extract the first word of "$tool_basename", so it can be a program name with args.
8843set dummy $tool_basename; ac_word=$2
8844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8845$as_echo_n "checking for $ac_word... " >&6; }
8846if ${ac_cv_path_GZIP+:} false; then :
8847  $as_echo_n "(cached) " >&6
8848else
8849  case $GZIP in
8850  [\\/]* | ?:[\\/]*)
8851  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8852  ;;
8853  *)
8854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8855for as_dir in $PATH
8856do
8857  IFS=$as_save_IFS
8858  test -z "$as_dir" && as_dir=.
8859    for ac_exec_ext in '' $ac_executable_extensions; do
8860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8861    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8863    break 2
8864  fi
8865done
8866  done
8867IFS=$as_save_IFS
8868
8869  ;;
8870esac
8871fi
8872GZIP=$ac_cv_path_GZIP
8873if test -n "$GZIP"; then
8874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8875$as_echo "$GZIP" >&6; }
8876else
8877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8878$as_echo "no" >&6; }
8879fi
8880
8881
8882          if test "x$GZIP" = x; then
8883            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8884          fi
8885        else
8886          # Otherwise we believe it is a complete path. Use it as it is.
8887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8888$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8889          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8890$as_echo_n "checking for GZIP... " >&6; }
8891          if test ! -x "$tool_specified"; then
8892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8893$as_echo "not found" >&6; }
8894            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8895          fi
8896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8897$as_echo "$tool_specified" >&6; }
8898        fi
8899      fi
8900    fi
8901
8902  fi
8903
8904
8905
8906  if test "x$GZIP" = x; then
8907    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8908  fi
8909
8910
8911
8912
8913
8914  # Publish this variable in the help.
8915
8916
8917  if [ -z "${LN+x}" ]; then
8918    # The variable is not set by user, try to locate tool using the code snippet
8919    for ac_prog in ln
8920do
8921  # Extract the first word of "$ac_prog", so it can be a program name with args.
8922set dummy $ac_prog; ac_word=$2
8923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8924$as_echo_n "checking for $ac_word... " >&6; }
8925if ${ac_cv_path_LN+:} false; then :
8926  $as_echo_n "(cached) " >&6
8927else
8928  case $LN in
8929  [\\/]* | ?:[\\/]*)
8930  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8931  ;;
8932  *)
8933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8934for as_dir in $PATH
8935do
8936  IFS=$as_save_IFS
8937  test -z "$as_dir" && as_dir=.
8938    for ac_exec_ext in '' $ac_executable_extensions; do
8939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8940    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8942    break 2
8943  fi
8944done
8945  done
8946IFS=$as_save_IFS
8947
8948  ;;
8949esac
8950fi
8951LN=$ac_cv_path_LN
8952if test -n "$LN"; then
8953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8954$as_echo "$LN" >&6; }
8955else
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957$as_echo "no" >&6; }
8958fi
8959
8960
8961  test -n "$LN" && break
8962done
8963
8964  else
8965    # The variable is set, but is it from the command line or the environment?
8966
8967    # Try to remove the string !LN! from our list.
8968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8970      # If it failed, the variable was not from the command line. Ignore it,
8971      # but warn the user (except for BASH, which is always set by the calling BASH).
8972      if test "xLN" != xBASH; then
8973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8974$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8975      fi
8976      # Try to locate tool using the code snippet
8977      for ac_prog in ln
8978do
8979  # Extract the first word of "$ac_prog", so it can be a program name with args.
8980set dummy $ac_prog; ac_word=$2
8981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8982$as_echo_n "checking for $ac_word... " >&6; }
8983if ${ac_cv_path_LN+:} false; then :
8984  $as_echo_n "(cached) " >&6
8985else
8986  case $LN in
8987  [\\/]* | ?:[\\/]*)
8988  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8989  ;;
8990  *)
8991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8992for as_dir in $PATH
8993do
8994  IFS=$as_save_IFS
8995  test -z "$as_dir" && as_dir=.
8996    for ac_exec_ext in '' $ac_executable_extensions; do
8997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8998    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9000    break 2
9001  fi
9002done
9003  done
9004IFS=$as_save_IFS
9005
9006  ;;
9007esac
9008fi
9009LN=$ac_cv_path_LN
9010if test -n "$LN"; then
9011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9012$as_echo "$LN" >&6; }
9013else
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9015$as_echo "no" >&6; }
9016fi
9017
9018
9019  test -n "$LN" && break
9020done
9021
9022    else
9023      # If it succeeded, then it was overridden by the user. We will use it
9024      # for the tool.
9025
9026      # First remove it from the list of overridden variables, so we can test
9027      # for unknown variables in the end.
9028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9029
9030      # Check if we try to supply an empty value
9031      if test "x$LN" = x; then
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9033$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9035$as_echo_n "checking for LN... " >&6; }
9036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9037$as_echo "disabled" >&6; }
9038      else
9039        # Check if the provided tool contains a complete path.
9040        tool_specified="$LN"
9041        tool_basename="${tool_specified##*/}"
9042        if test "x$tool_basename" = "x$tool_specified"; then
9043          # A command without a complete path is provided, search $PATH.
9044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9045$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9046          # Extract the first word of "$tool_basename", so it can be a program name with args.
9047set dummy $tool_basename; ac_word=$2
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9049$as_echo_n "checking for $ac_word... " >&6; }
9050if ${ac_cv_path_LN+:} false; then :
9051  $as_echo_n "(cached) " >&6
9052else
9053  case $LN in
9054  [\\/]* | ?:[\\/]*)
9055  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9056  ;;
9057  *)
9058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9059for as_dir in $PATH
9060do
9061  IFS=$as_save_IFS
9062  test -z "$as_dir" && as_dir=.
9063    for ac_exec_ext in '' $ac_executable_extensions; do
9064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9065    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9067    break 2
9068  fi
9069done
9070  done
9071IFS=$as_save_IFS
9072
9073  ;;
9074esac
9075fi
9076LN=$ac_cv_path_LN
9077if test -n "$LN"; then
9078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9079$as_echo "$LN" >&6; }
9080else
9081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082$as_echo "no" >&6; }
9083fi
9084
9085
9086          if test "x$LN" = x; then
9087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9088          fi
9089        else
9090          # Otherwise we believe it is a complete path. Use it as it is.
9091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9092$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9094$as_echo_n "checking for LN... " >&6; }
9095          if test ! -x "$tool_specified"; then
9096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9097$as_echo "not found" >&6; }
9098            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9099          fi
9100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9101$as_echo "$tool_specified" >&6; }
9102        fi
9103      fi
9104    fi
9105
9106  fi
9107
9108
9109
9110  if test "x$LN" = x; then
9111    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9112  fi
9113
9114
9115
9116
9117
9118  # Publish this variable in the help.
9119
9120
9121  if [ -z "${LS+x}" ]; then
9122    # The variable is not set by user, try to locate tool using the code snippet
9123    for ac_prog in ls
9124do
9125  # Extract the first word of "$ac_prog", so it can be a program name with args.
9126set dummy $ac_prog; ac_word=$2
9127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9128$as_echo_n "checking for $ac_word... " >&6; }
9129if ${ac_cv_path_LS+:} false; then :
9130  $as_echo_n "(cached) " >&6
9131else
9132  case $LS in
9133  [\\/]* | ?:[\\/]*)
9134  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9135  ;;
9136  *)
9137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9138for as_dir in $PATH
9139do
9140  IFS=$as_save_IFS
9141  test -z "$as_dir" && as_dir=.
9142    for ac_exec_ext in '' $ac_executable_extensions; do
9143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9144    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9146    break 2
9147  fi
9148done
9149  done
9150IFS=$as_save_IFS
9151
9152  ;;
9153esac
9154fi
9155LS=$ac_cv_path_LS
9156if test -n "$LS"; then
9157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9158$as_echo "$LS" >&6; }
9159else
9160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9161$as_echo "no" >&6; }
9162fi
9163
9164
9165  test -n "$LS" && break
9166done
9167
9168  else
9169    # The variable is set, but is it from the command line or the environment?
9170
9171    # Try to remove the string !LS! from our list.
9172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9174      # If it failed, the variable was not from the command line. Ignore it,
9175      # but warn the user (except for BASH, which is always set by the calling BASH).
9176      if test "xLS" != xBASH; then
9177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9178$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9179      fi
9180      # Try to locate tool using the code snippet
9181      for ac_prog in ls
9182do
9183  # Extract the first word of "$ac_prog", so it can be a program name with args.
9184set dummy $ac_prog; ac_word=$2
9185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9186$as_echo_n "checking for $ac_word... " >&6; }
9187if ${ac_cv_path_LS+:} false; then :
9188  $as_echo_n "(cached) " >&6
9189else
9190  case $LS in
9191  [\\/]* | ?:[\\/]*)
9192  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9193  ;;
9194  *)
9195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9196for as_dir in $PATH
9197do
9198  IFS=$as_save_IFS
9199  test -z "$as_dir" && as_dir=.
9200    for ac_exec_ext in '' $ac_executable_extensions; do
9201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9202    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9204    break 2
9205  fi
9206done
9207  done
9208IFS=$as_save_IFS
9209
9210  ;;
9211esac
9212fi
9213LS=$ac_cv_path_LS
9214if test -n "$LS"; then
9215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9216$as_echo "$LS" >&6; }
9217else
9218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9219$as_echo "no" >&6; }
9220fi
9221
9222
9223  test -n "$LS" && break
9224done
9225
9226    else
9227      # If it succeeded, then it was overridden by the user. We will use it
9228      # for the tool.
9229
9230      # First remove it from the list of overridden variables, so we can test
9231      # for unknown variables in the end.
9232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9233
9234      # Check if we try to supply an empty value
9235      if test "x$LS" = x; then
9236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9237$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9239$as_echo_n "checking for LS... " >&6; }
9240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9241$as_echo "disabled" >&6; }
9242      else
9243        # Check if the provided tool contains a complete path.
9244        tool_specified="$LS"
9245        tool_basename="${tool_specified##*/}"
9246        if test "x$tool_basename" = "x$tool_specified"; then
9247          # A command without a complete path is provided, search $PATH.
9248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9249$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9250          # Extract the first word of "$tool_basename", so it can be a program name with args.
9251set dummy $tool_basename; ac_word=$2
9252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9253$as_echo_n "checking for $ac_word... " >&6; }
9254if ${ac_cv_path_LS+:} false; then :
9255  $as_echo_n "(cached) " >&6
9256else
9257  case $LS in
9258  [\\/]* | ?:[\\/]*)
9259  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9260  ;;
9261  *)
9262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9263for as_dir in $PATH
9264do
9265  IFS=$as_save_IFS
9266  test -z "$as_dir" && as_dir=.
9267    for ac_exec_ext in '' $ac_executable_extensions; do
9268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9269    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9271    break 2
9272  fi
9273done
9274  done
9275IFS=$as_save_IFS
9276
9277  ;;
9278esac
9279fi
9280LS=$ac_cv_path_LS
9281if test -n "$LS"; then
9282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9283$as_echo "$LS" >&6; }
9284else
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286$as_echo "no" >&6; }
9287fi
9288
9289
9290          if test "x$LS" = x; then
9291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9292          fi
9293        else
9294          # Otherwise we believe it is a complete path. Use it as it is.
9295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9296$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9298$as_echo_n "checking for LS... " >&6; }
9299          if test ! -x "$tool_specified"; then
9300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9301$as_echo "not found" >&6; }
9302            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9303          fi
9304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9305$as_echo "$tool_specified" >&6; }
9306        fi
9307      fi
9308    fi
9309
9310  fi
9311
9312
9313
9314  if test "x$LS" = x; then
9315    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9316  fi
9317
9318
9319
9320
9321
9322  # Publish this variable in the help.
9323
9324
9325  if [ -z "${MKDIR+x}" ]; then
9326    # The variable is not set by user, try to locate tool using the code snippet
9327    for ac_prog in mkdir
9328do
9329  # Extract the first word of "$ac_prog", so it can be a program name with args.
9330set dummy $ac_prog; ac_word=$2
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9332$as_echo_n "checking for $ac_word... " >&6; }
9333if ${ac_cv_path_MKDIR+:} false; then :
9334  $as_echo_n "(cached) " >&6
9335else
9336  case $MKDIR in
9337  [\\/]* | ?:[\\/]*)
9338  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9339  ;;
9340  *)
9341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9342for as_dir in $PATH
9343do
9344  IFS=$as_save_IFS
9345  test -z "$as_dir" && as_dir=.
9346    for ac_exec_ext in '' $ac_executable_extensions; do
9347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9348    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9350    break 2
9351  fi
9352done
9353  done
9354IFS=$as_save_IFS
9355
9356  ;;
9357esac
9358fi
9359MKDIR=$ac_cv_path_MKDIR
9360if test -n "$MKDIR"; then
9361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9362$as_echo "$MKDIR" >&6; }
9363else
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365$as_echo "no" >&6; }
9366fi
9367
9368
9369  test -n "$MKDIR" && break
9370done
9371
9372  else
9373    # The variable is set, but is it from the command line or the environment?
9374
9375    # Try to remove the string !MKDIR! from our list.
9376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9378      # If it failed, the variable was not from the command line. Ignore it,
9379      # but warn the user (except for BASH, which is always set by the calling BASH).
9380      if test "xMKDIR" != xBASH; then
9381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9382$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9383      fi
9384      # Try to locate tool using the code snippet
9385      for ac_prog in mkdir
9386do
9387  # Extract the first word of "$ac_prog", so it can be a program name with args.
9388set dummy $ac_prog; ac_word=$2
9389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9390$as_echo_n "checking for $ac_word... " >&6; }
9391if ${ac_cv_path_MKDIR+:} false; then :
9392  $as_echo_n "(cached) " >&6
9393else
9394  case $MKDIR in
9395  [\\/]* | ?:[\\/]*)
9396  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9397  ;;
9398  *)
9399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9400for as_dir in $PATH
9401do
9402  IFS=$as_save_IFS
9403  test -z "$as_dir" && as_dir=.
9404    for ac_exec_ext in '' $ac_executable_extensions; do
9405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9406    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9408    break 2
9409  fi
9410done
9411  done
9412IFS=$as_save_IFS
9413
9414  ;;
9415esac
9416fi
9417MKDIR=$ac_cv_path_MKDIR
9418if test -n "$MKDIR"; then
9419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9420$as_echo "$MKDIR" >&6; }
9421else
9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9423$as_echo "no" >&6; }
9424fi
9425
9426
9427  test -n "$MKDIR" && break
9428done
9429
9430    else
9431      # If it succeeded, then it was overridden by the user. We will use it
9432      # for the tool.
9433
9434      # First remove it from the list of overridden variables, so we can test
9435      # for unknown variables in the end.
9436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9437
9438      # Check if we try to supply an empty value
9439      if test "x$MKDIR" = x; then
9440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9441$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9443$as_echo_n "checking for MKDIR... " >&6; }
9444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9445$as_echo "disabled" >&6; }
9446      else
9447        # Check if the provided tool contains a complete path.
9448        tool_specified="$MKDIR"
9449        tool_basename="${tool_specified##*/}"
9450        if test "x$tool_basename" = "x$tool_specified"; then
9451          # A command without a complete path is provided, search $PATH.
9452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9453$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9454          # Extract the first word of "$tool_basename", so it can be a program name with args.
9455set dummy $tool_basename; ac_word=$2
9456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9457$as_echo_n "checking for $ac_word... " >&6; }
9458if ${ac_cv_path_MKDIR+:} false; then :
9459  $as_echo_n "(cached) " >&6
9460else
9461  case $MKDIR in
9462  [\\/]* | ?:[\\/]*)
9463  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9464  ;;
9465  *)
9466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9467for as_dir in $PATH
9468do
9469  IFS=$as_save_IFS
9470  test -z "$as_dir" && as_dir=.
9471    for ac_exec_ext in '' $ac_executable_extensions; do
9472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9473    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9475    break 2
9476  fi
9477done
9478  done
9479IFS=$as_save_IFS
9480
9481  ;;
9482esac
9483fi
9484MKDIR=$ac_cv_path_MKDIR
9485if test -n "$MKDIR"; then
9486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9487$as_echo "$MKDIR" >&6; }
9488else
9489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9490$as_echo "no" >&6; }
9491fi
9492
9493
9494          if test "x$MKDIR" = x; then
9495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9496          fi
9497        else
9498          # Otherwise we believe it is a complete path. Use it as it is.
9499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9500$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9502$as_echo_n "checking for MKDIR... " >&6; }
9503          if test ! -x "$tool_specified"; then
9504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9505$as_echo "not found" >&6; }
9506            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9507          fi
9508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9509$as_echo "$tool_specified" >&6; }
9510        fi
9511      fi
9512    fi
9513
9514  fi
9515
9516
9517
9518  if test "x$MKDIR" = x; then
9519    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9520  fi
9521
9522
9523
9524
9525
9526  # Publish this variable in the help.
9527
9528
9529  if [ -z "${MKTEMP+x}" ]; then
9530    # The variable is not set by user, try to locate tool using the code snippet
9531    for ac_prog in mktemp
9532do
9533  # Extract the first word of "$ac_prog", so it can be a program name with args.
9534set dummy $ac_prog; ac_word=$2
9535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9536$as_echo_n "checking for $ac_word... " >&6; }
9537if ${ac_cv_path_MKTEMP+:} false; then :
9538  $as_echo_n "(cached) " >&6
9539else
9540  case $MKTEMP in
9541  [\\/]* | ?:[\\/]*)
9542  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9543  ;;
9544  *)
9545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9546for as_dir in $PATH
9547do
9548  IFS=$as_save_IFS
9549  test -z "$as_dir" && as_dir=.
9550    for ac_exec_ext in '' $ac_executable_extensions; do
9551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9552    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9554    break 2
9555  fi
9556done
9557  done
9558IFS=$as_save_IFS
9559
9560  ;;
9561esac
9562fi
9563MKTEMP=$ac_cv_path_MKTEMP
9564if test -n "$MKTEMP"; then
9565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9566$as_echo "$MKTEMP" >&6; }
9567else
9568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
9570fi
9571
9572
9573  test -n "$MKTEMP" && break
9574done
9575
9576  else
9577    # The variable is set, but is it from the command line or the environment?
9578
9579    # Try to remove the string !MKTEMP! from our list.
9580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9582      # If it failed, the variable was not from the command line. Ignore it,
9583      # but warn the user (except for BASH, which is always set by the calling BASH).
9584      if test "xMKTEMP" != xBASH; then
9585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9586$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9587      fi
9588      # Try to locate tool using the code snippet
9589      for ac_prog in mktemp
9590do
9591  # Extract the first word of "$ac_prog", so it can be a program name with args.
9592set dummy $ac_prog; ac_word=$2
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594$as_echo_n "checking for $ac_word... " >&6; }
9595if ${ac_cv_path_MKTEMP+:} false; then :
9596  $as_echo_n "(cached) " >&6
9597else
9598  case $MKTEMP in
9599  [\\/]* | ?:[\\/]*)
9600  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9601  ;;
9602  *)
9603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604for as_dir in $PATH
9605do
9606  IFS=$as_save_IFS
9607  test -z "$as_dir" && as_dir=.
9608    for ac_exec_ext in '' $ac_executable_extensions; do
9609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9610    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612    break 2
9613  fi
9614done
9615  done
9616IFS=$as_save_IFS
9617
9618  ;;
9619esac
9620fi
9621MKTEMP=$ac_cv_path_MKTEMP
9622if test -n "$MKTEMP"; then
9623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9624$as_echo "$MKTEMP" >&6; }
9625else
9626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627$as_echo "no" >&6; }
9628fi
9629
9630
9631  test -n "$MKTEMP" && break
9632done
9633
9634    else
9635      # If it succeeded, then it was overridden by the user. We will use it
9636      # for the tool.
9637
9638      # First remove it from the list of overridden variables, so we can test
9639      # for unknown variables in the end.
9640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9641
9642      # Check if we try to supply an empty value
9643      if test "x$MKTEMP" = x; then
9644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9645$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9647$as_echo_n "checking for MKTEMP... " >&6; }
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9649$as_echo "disabled" >&6; }
9650      else
9651        # Check if the provided tool contains a complete path.
9652        tool_specified="$MKTEMP"
9653        tool_basename="${tool_specified##*/}"
9654        if test "x$tool_basename" = "x$tool_specified"; then
9655          # A command without a complete path is provided, search $PATH.
9656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9657$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9658          # Extract the first word of "$tool_basename", so it can be a program name with args.
9659set dummy $tool_basename; ac_word=$2
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9661$as_echo_n "checking for $ac_word... " >&6; }
9662if ${ac_cv_path_MKTEMP+:} false; then :
9663  $as_echo_n "(cached) " >&6
9664else
9665  case $MKTEMP in
9666  [\\/]* | ?:[\\/]*)
9667  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9668  ;;
9669  *)
9670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9671for as_dir in $PATH
9672do
9673  IFS=$as_save_IFS
9674  test -z "$as_dir" && as_dir=.
9675    for ac_exec_ext in '' $ac_executable_extensions; do
9676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9677    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9679    break 2
9680  fi
9681done
9682  done
9683IFS=$as_save_IFS
9684
9685  ;;
9686esac
9687fi
9688MKTEMP=$ac_cv_path_MKTEMP
9689if test -n "$MKTEMP"; then
9690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9691$as_echo "$MKTEMP" >&6; }
9692else
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
9695fi
9696
9697
9698          if test "x$MKTEMP" = x; then
9699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9700          fi
9701        else
9702          # Otherwise we believe it is a complete path. Use it as it is.
9703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9704$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9706$as_echo_n "checking for MKTEMP... " >&6; }
9707          if test ! -x "$tool_specified"; then
9708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9709$as_echo "not found" >&6; }
9710            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9711          fi
9712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9713$as_echo "$tool_specified" >&6; }
9714        fi
9715      fi
9716    fi
9717
9718  fi
9719
9720
9721
9722  if test "x$MKTEMP" = x; then
9723    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9724  fi
9725
9726
9727
9728
9729
9730  # Publish this variable in the help.
9731
9732
9733  if [ -z "${MV+x}" ]; then
9734    # The variable is not set by user, try to locate tool using the code snippet
9735    for ac_prog in mv
9736do
9737  # Extract the first word of "$ac_prog", so it can be a program name with args.
9738set dummy $ac_prog; ac_word=$2
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9740$as_echo_n "checking for $ac_word... " >&6; }
9741if ${ac_cv_path_MV+:} false; then :
9742  $as_echo_n "(cached) " >&6
9743else
9744  case $MV in
9745  [\\/]* | ?:[\\/]*)
9746  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9747  ;;
9748  *)
9749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9750for as_dir in $PATH
9751do
9752  IFS=$as_save_IFS
9753  test -z "$as_dir" && as_dir=.
9754    for ac_exec_ext in '' $ac_executable_extensions; do
9755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9756    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9758    break 2
9759  fi
9760done
9761  done
9762IFS=$as_save_IFS
9763
9764  ;;
9765esac
9766fi
9767MV=$ac_cv_path_MV
9768if test -n "$MV"; then
9769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9770$as_echo "$MV" >&6; }
9771else
9772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
9774fi
9775
9776
9777  test -n "$MV" && break
9778done
9779
9780  else
9781    # The variable is set, but is it from the command line or the environment?
9782
9783    # Try to remove the string !MV! from our list.
9784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9786      # If it failed, the variable was not from the command line. Ignore it,
9787      # but warn the user (except for BASH, which is always set by the calling BASH).
9788      if test "xMV" != xBASH; then
9789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9790$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9791      fi
9792      # Try to locate tool using the code snippet
9793      for ac_prog in mv
9794do
9795  # Extract the first word of "$ac_prog", so it can be a program name with args.
9796set dummy $ac_prog; ac_word=$2
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9798$as_echo_n "checking for $ac_word... " >&6; }
9799if ${ac_cv_path_MV+:} false; then :
9800  $as_echo_n "(cached) " >&6
9801else
9802  case $MV in
9803  [\\/]* | ?:[\\/]*)
9804  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9805  ;;
9806  *)
9807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9808for as_dir in $PATH
9809do
9810  IFS=$as_save_IFS
9811  test -z "$as_dir" && as_dir=.
9812    for ac_exec_ext in '' $ac_executable_extensions; do
9813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9814    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9816    break 2
9817  fi
9818done
9819  done
9820IFS=$as_save_IFS
9821
9822  ;;
9823esac
9824fi
9825MV=$ac_cv_path_MV
9826if test -n "$MV"; then
9827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9828$as_echo "$MV" >&6; }
9829else
9830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831$as_echo "no" >&6; }
9832fi
9833
9834
9835  test -n "$MV" && break
9836done
9837
9838    else
9839      # If it succeeded, then it was overridden by the user. We will use it
9840      # for the tool.
9841
9842      # First remove it from the list of overridden variables, so we can test
9843      # for unknown variables in the end.
9844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9845
9846      # Check if we try to supply an empty value
9847      if test "x$MV" = x; then
9848        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9849$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9851$as_echo_n "checking for MV... " >&6; }
9852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9853$as_echo "disabled" >&6; }
9854      else
9855        # Check if the provided tool contains a complete path.
9856        tool_specified="$MV"
9857        tool_basename="${tool_specified##*/}"
9858        if test "x$tool_basename" = "x$tool_specified"; then
9859          # A command without a complete path is provided, search $PATH.
9860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9861$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9862          # Extract the first word of "$tool_basename", so it can be a program name with args.
9863set dummy $tool_basename; ac_word=$2
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9865$as_echo_n "checking for $ac_word... " >&6; }
9866if ${ac_cv_path_MV+:} false; then :
9867  $as_echo_n "(cached) " >&6
9868else
9869  case $MV in
9870  [\\/]* | ?:[\\/]*)
9871  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9872  ;;
9873  *)
9874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9875for as_dir in $PATH
9876do
9877  IFS=$as_save_IFS
9878  test -z "$as_dir" && as_dir=.
9879    for ac_exec_ext in '' $ac_executable_extensions; do
9880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9881    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9883    break 2
9884  fi
9885done
9886  done
9887IFS=$as_save_IFS
9888
9889  ;;
9890esac
9891fi
9892MV=$ac_cv_path_MV
9893if test -n "$MV"; then
9894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9895$as_echo "$MV" >&6; }
9896else
9897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9898$as_echo "no" >&6; }
9899fi
9900
9901
9902          if test "x$MV" = x; then
9903            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9904          fi
9905        else
9906          # Otherwise we believe it is a complete path. Use it as it is.
9907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9908$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9909          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9910$as_echo_n "checking for MV... " >&6; }
9911          if test ! -x "$tool_specified"; then
9912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9913$as_echo "not found" >&6; }
9914            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9915          fi
9916          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9917$as_echo "$tool_specified" >&6; }
9918        fi
9919      fi
9920    fi
9921
9922  fi
9923
9924
9925
9926  if test "x$MV" = x; then
9927    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9928  fi
9929
9930
9931
9932
9933
9934  # Publish this variable in the help.
9935
9936
9937  if [ -z "${NAWK+x}" ]; then
9938    # The variable is not set by user, try to locate tool using the code snippet
9939    for ac_prog in nawk gawk awk
9940do
9941  # Extract the first word of "$ac_prog", so it can be a program name with args.
9942set dummy $ac_prog; ac_word=$2
9943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9944$as_echo_n "checking for $ac_word... " >&6; }
9945if ${ac_cv_path_NAWK+:} false; then :
9946  $as_echo_n "(cached) " >&6
9947else
9948  case $NAWK in
9949  [\\/]* | ?:[\\/]*)
9950  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9951  ;;
9952  *)
9953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9954for as_dir in $PATH
9955do
9956  IFS=$as_save_IFS
9957  test -z "$as_dir" && as_dir=.
9958    for ac_exec_ext in '' $ac_executable_extensions; do
9959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9960    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9962    break 2
9963  fi
9964done
9965  done
9966IFS=$as_save_IFS
9967
9968  ;;
9969esac
9970fi
9971NAWK=$ac_cv_path_NAWK
9972if test -n "$NAWK"; then
9973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9974$as_echo "$NAWK" >&6; }
9975else
9976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9977$as_echo "no" >&6; }
9978fi
9979
9980
9981  test -n "$NAWK" && break
9982done
9983
9984  else
9985    # The variable is set, but is it from the command line or the environment?
9986
9987    # Try to remove the string !NAWK! from our list.
9988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9990      # If it failed, the variable was not from the command line. Ignore it,
9991      # but warn the user (except for BASH, which is always set by the calling BASH).
9992      if test "xNAWK" != xBASH; then
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9994$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9995      fi
9996      # Try to locate tool using the code snippet
9997      for ac_prog in nawk gawk awk
9998do
9999  # Extract the first word of "$ac_prog", so it can be a program name with args.
10000set dummy $ac_prog; ac_word=$2
10001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10002$as_echo_n "checking for $ac_word... " >&6; }
10003if ${ac_cv_path_NAWK+:} false; then :
10004  $as_echo_n "(cached) " >&6
10005else
10006  case $NAWK in
10007  [\\/]* | ?:[\\/]*)
10008  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10009  ;;
10010  *)
10011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10012for as_dir in $PATH
10013do
10014  IFS=$as_save_IFS
10015  test -z "$as_dir" && as_dir=.
10016    for ac_exec_ext in '' $ac_executable_extensions; do
10017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10018    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10020    break 2
10021  fi
10022done
10023  done
10024IFS=$as_save_IFS
10025
10026  ;;
10027esac
10028fi
10029NAWK=$ac_cv_path_NAWK
10030if test -n "$NAWK"; then
10031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10032$as_echo "$NAWK" >&6; }
10033else
10034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10035$as_echo "no" >&6; }
10036fi
10037
10038
10039  test -n "$NAWK" && break
10040done
10041
10042    else
10043      # If it succeeded, then it was overridden by the user. We will use it
10044      # for the tool.
10045
10046      # First remove it from the list of overridden variables, so we can test
10047      # for unknown variables in the end.
10048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10049
10050      # Check if we try to supply an empty value
10051      if test "x$NAWK" = x; then
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10053$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10055$as_echo_n "checking for NAWK... " >&6; }
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10057$as_echo "disabled" >&6; }
10058      else
10059        # Check if the provided tool contains a complete path.
10060        tool_specified="$NAWK"
10061        tool_basename="${tool_specified##*/}"
10062        if test "x$tool_basename" = "x$tool_specified"; then
10063          # A command without a complete path is provided, search $PATH.
10064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10065$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10066          # Extract the first word of "$tool_basename", so it can be a program name with args.
10067set dummy $tool_basename; ac_word=$2
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10069$as_echo_n "checking for $ac_word... " >&6; }
10070if ${ac_cv_path_NAWK+:} false; then :
10071  $as_echo_n "(cached) " >&6
10072else
10073  case $NAWK in
10074  [\\/]* | ?:[\\/]*)
10075  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10076  ;;
10077  *)
10078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10079for as_dir in $PATH
10080do
10081  IFS=$as_save_IFS
10082  test -z "$as_dir" && as_dir=.
10083    for ac_exec_ext in '' $ac_executable_extensions; do
10084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10085    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10087    break 2
10088  fi
10089done
10090  done
10091IFS=$as_save_IFS
10092
10093  ;;
10094esac
10095fi
10096NAWK=$ac_cv_path_NAWK
10097if test -n "$NAWK"; then
10098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10099$as_echo "$NAWK" >&6; }
10100else
10101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10102$as_echo "no" >&6; }
10103fi
10104
10105
10106          if test "x$NAWK" = x; then
10107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10108          fi
10109        else
10110          # Otherwise we believe it is a complete path. Use it as it is.
10111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10112$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10114$as_echo_n "checking for NAWK... " >&6; }
10115          if test ! -x "$tool_specified"; then
10116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10117$as_echo "not found" >&6; }
10118            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10119          fi
10120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10121$as_echo "$tool_specified" >&6; }
10122        fi
10123      fi
10124    fi
10125
10126  fi
10127
10128
10129
10130  if test "x$NAWK" = x; then
10131    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10132  fi
10133
10134
10135
10136
10137
10138  # Publish this variable in the help.
10139
10140
10141  if [ -z "${PRINTF+x}" ]; then
10142    # The variable is not set by user, try to locate tool using the code snippet
10143    for ac_prog in printf
10144do
10145  # Extract the first word of "$ac_prog", so it can be a program name with args.
10146set dummy $ac_prog; ac_word=$2
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10148$as_echo_n "checking for $ac_word... " >&6; }
10149if ${ac_cv_path_PRINTF+:} false; then :
10150  $as_echo_n "(cached) " >&6
10151else
10152  case $PRINTF in
10153  [\\/]* | ?:[\\/]*)
10154  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10155  ;;
10156  *)
10157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10158for as_dir in $PATH
10159do
10160  IFS=$as_save_IFS
10161  test -z "$as_dir" && as_dir=.
10162    for ac_exec_ext in '' $ac_executable_extensions; do
10163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10164    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10166    break 2
10167  fi
10168done
10169  done
10170IFS=$as_save_IFS
10171
10172  ;;
10173esac
10174fi
10175PRINTF=$ac_cv_path_PRINTF
10176if test -n "$PRINTF"; then
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10178$as_echo "$PRINTF" >&6; }
10179else
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182fi
10183
10184
10185  test -n "$PRINTF" && break
10186done
10187
10188  else
10189    # The variable is set, but is it from the command line or the environment?
10190
10191    # Try to remove the string !PRINTF! from our list.
10192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10194      # If it failed, the variable was not from the command line. Ignore it,
10195      # but warn the user (except for BASH, which is always set by the calling BASH).
10196      if test "xPRINTF" != xBASH; then
10197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10198$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10199      fi
10200      # Try to locate tool using the code snippet
10201      for ac_prog in printf
10202do
10203  # Extract the first word of "$ac_prog", so it can be a program name with args.
10204set dummy $ac_prog; ac_word=$2
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10206$as_echo_n "checking for $ac_word... " >&6; }
10207if ${ac_cv_path_PRINTF+:} false; then :
10208  $as_echo_n "(cached) " >&6
10209else
10210  case $PRINTF in
10211  [\\/]* | ?:[\\/]*)
10212  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10213  ;;
10214  *)
10215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216for as_dir in $PATH
10217do
10218  IFS=$as_save_IFS
10219  test -z "$as_dir" && as_dir=.
10220    for ac_exec_ext in '' $ac_executable_extensions; do
10221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10222    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10224    break 2
10225  fi
10226done
10227  done
10228IFS=$as_save_IFS
10229
10230  ;;
10231esac
10232fi
10233PRINTF=$ac_cv_path_PRINTF
10234if test -n "$PRINTF"; then
10235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10236$as_echo "$PRINTF" >&6; }
10237else
10238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10239$as_echo "no" >&6; }
10240fi
10241
10242
10243  test -n "$PRINTF" && break
10244done
10245
10246    else
10247      # If it succeeded, then it was overridden by the user. We will use it
10248      # for the tool.
10249
10250      # First remove it from the list of overridden variables, so we can test
10251      # for unknown variables in the end.
10252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10253
10254      # Check if we try to supply an empty value
10255      if test "x$PRINTF" = x; then
10256        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10257$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10259$as_echo_n "checking for PRINTF... " >&6; }
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10261$as_echo "disabled" >&6; }
10262      else
10263        # Check if the provided tool contains a complete path.
10264        tool_specified="$PRINTF"
10265        tool_basename="${tool_specified##*/}"
10266        if test "x$tool_basename" = "x$tool_specified"; then
10267          # A command without a complete path is provided, search $PATH.
10268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10269$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10270          # Extract the first word of "$tool_basename", so it can be a program name with args.
10271set dummy $tool_basename; ac_word=$2
10272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10273$as_echo_n "checking for $ac_word... " >&6; }
10274if ${ac_cv_path_PRINTF+:} false; then :
10275  $as_echo_n "(cached) " >&6
10276else
10277  case $PRINTF in
10278  [\\/]* | ?:[\\/]*)
10279  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10280  ;;
10281  *)
10282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10283for as_dir in $PATH
10284do
10285  IFS=$as_save_IFS
10286  test -z "$as_dir" && as_dir=.
10287    for ac_exec_ext in '' $ac_executable_extensions; do
10288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10289    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10291    break 2
10292  fi
10293done
10294  done
10295IFS=$as_save_IFS
10296
10297  ;;
10298esac
10299fi
10300PRINTF=$ac_cv_path_PRINTF
10301if test -n "$PRINTF"; then
10302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10303$as_echo "$PRINTF" >&6; }
10304else
10305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
10307fi
10308
10309
10310          if test "x$PRINTF" = x; then
10311            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10312          fi
10313        else
10314          # Otherwise we believe it is a complete path. Use it as it is.
10315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10316$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10317          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10318$as_echo_n "checking for PRINTF... " >&6; }
10319          if test ! -x "$tool_specified"; then
10320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10321$as_echo "not found" >&6; }
10322            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10323          fi
10324          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10325$as_echo "$tool_specified" >&6; }
10326        fi
10327      fi
10328    fi
10329
10330  fi
10331
10332
10333
10334  if test "x$PRINTF" = x; then
10335    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10336  fi
10337
10338
10339
10340
10341
10342  # Publish this variable in the help.
10343
10344
10345  if [ -z "${RM+x}" ]; then
10346    # The variable is not set by user, try to locate tool using the code snippet
10347    for ac_prog in rm
10348do
10349  # Extract the first word of "$ac_prog", so it can be a program name with args.
10350set dummy $ac_prog; ac_word=$2
10351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10352$as_echo_n "checking for $ac_word... " >&6; }
10353if ${ac_cv_path_RM+:} false; then :
10354  $as_echo_n "(cached) " >&6
10355else
10356  case $RM in
10357  [\\/]* | ?:[\\/]*)
10358  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10359  ;;
10360  *)
10361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10362for as_dir in $PATH
10363do
10364  IFS=$as_save_IFS
10365  test -z "$as_dir" && as_dir=.
10366    for ac_exec_ext in '' $ac_executable_extensions; do
10367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10368    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10370    break 2
10371  fi
10372done
10373  done
10374IFS=$as_save_IFS
10375
10376  ;;
10377esac
10378fi
10379RM=$ac_cv_path_RM
10380if test -n "$RM"; then
10381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10382$as_echo "$RM" >&6; }
10383else
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385$as_echo "no" >&6; }
10386fi
10387
10388
10389  test -n "$RM" && break
10390done
10391
10392  else
10393    # The variable is set, but is it from the command line or the environment?
10394
10395    # Try to remove the string !RM! from our list.
10396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10398      # If it failed, the variable was not from the command line. Ignore it,
10399      # but warn the user (except for BASH, which is always set by the calling BASH).
10400      if test "xRM" != xBASH; then
10401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10402$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10403      fi
10404      # Try to locate tool using the code snippet
10405      for ac_prog in rm
10406do
10407  # Extract the first word of "$ac_prog", so it can be a program name with args.
10408set dummy $ac_prog; ac_word=$2
10409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10410$as_echo_n "checking for $ac_word... " >&6; }
10411if ${ac_cv_path_RM+:} false; then :
10412  $as_echo_n "(cached) " >&6
10413else
10414  case $RM in
10415  [\\/]* | ?:[\\/]*)
10416  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10417  ;;
10418  *)
10419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10420for as_dir in $PATH
10421do
10422  IFS=$as_save_IFS
10423  test -z "$as_dir" && as_dir=.
10424    for ac_exec_ext in '' $ac_executable_extensions; do
10425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10426    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10428    break 2
10429  fi
10430done
10431  done
10432IFS=$as_save_IFS
10433
10434  ;;
10435esac
10436fi
10437RM=$ac_cv_path_RM
10438if test -n "$RM"; then
10439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10440$as_echo "$RM" >&6; }
10441else
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
10444fi
10445
10446
10447  test -n "$RM" && break
10448done
10449
10450    else
10451      # If it succeeded, then it was overridden by the user. We will use it
10452      # for the tool.
10453
10454      # First remove it from the list of overridden variables, so we can test
10455      # for unknown variables in the end.
10456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10457
10458      # Check if we try to supply an empty value
10459      if test "x$RM" = x; then
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10461$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10463$as_echo_n "checking for RM... " >&6; }
10464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10465$as_echo "disabled" >&6; }
10466      else
10467        # Check if the provided tool contains a complete path.
10468        tool_specified="$RM"
10469        tool_basename="${tool_specified##*/}"
10470        if test "x$tool_basename" = "x$tool_specified"; then
10471          # A command without a complete path is provided, search $PATH.
10472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10473$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10474          # Extract the first word of "$tool_basename", so it can be a program name with args.
10475set dummy $tool_basename; ac_word=$2
10476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10477$as_echo_n "checking for $ac_word... " >&6; }
10478if ${ac_cv_path_RM+:} false; then :
10479  $as_echo_n "(cached) " >&6
10480else
10481  case $RM in
10482  [\\/]* | ?:[\\/]*)
10483  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10484  ;;
10485  *)
10486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10487for as_dir in $PATH
10488do
10489  IFS=$as_save_IFS
10490  test -z "$as_dir" && as_dir=.
10491    for ac_exec_ext in '' $ac_executable_extensions; do
10492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10493    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10495    break 2
10496  fi
10497done
10498  done
10499IFS=$as_save_IFS
10500
10501  ;;
10502esac
10503fi
10504RM=$ac_cv_path_RM
10505if test -n "$RM"; then
10506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10507$as_echo "$RM" >&6; }
10508else
10509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10510$as_echo "no" >&6; }
10511fi
10512
10513
10514          if test "x$RM" = x; then
10515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10516          fi
10517        else
10518          # Otherwise we believe it is a complete path. Use it as it is.
10519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10520$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10522$as_echo_n "checking for RM... " >&6; }
10523          if test ! -x "$tool_specified"; then
10524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10525$as_echo "not found" >&6; }
10526            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10527          fi
10528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10529$as_echo "$tool_specified" >&6; }
10530        fi
10531      fi
10532    fi
10533
10534  fi
10535
10536
10537
10538  if test "x$RM" = x; then
10539    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10540  fi
10541
10542
10543
10544
10545
10546  # Publish this variable in the help.
10547
10548
10549  if [ -z "${RMDIR+x}" ]; then
10550    # The variable is not set by user, try to locate tool using the code snippet
10551    for ac_prog in rmdir
10552do
10553  # Extract the first word of "$ac_prog", so it can be a program name with args.
10554set dummy $ac_prog; ac_word=$2
10555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10556$as_echo_n "checking for $ac_word... " >&6; }
10557if ${ac_cv_path_RMDIR+:} false; then :
10558  $as_echo_n "(cached) " >&6
10559else
10560  case $RMDIR in
10561  [\\/]* | ?:[\\/]*)
10562  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10563  ;;
10564  *)
10565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10566for as_dir in $PATH
10567do
10568  IFS=$as_save_IFS
10569  test -z "$as_dir" && as_dir=.
10570    for ac_exec_ext in '' $ac_executable_extensions; do
10571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10572    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10574    break 2
10575  fi
10576done
10577  done
10578IFS=$as_save_IFS
10579
10580  ;;
10581esac
10582fi
10583RMDIR=$ac_cv_path_RMDIR
10584if test -n "$RMDIR"; then
10585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10586$as_echo "$RMDIR" >&6; }
10587else
10588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10589$as_echo "no" >&6; }
10590fi
10591
10592
10593  test -n "$RMDIR" && break
10594done
10595
10596  else
10597    # The variable is set, but is it from the command line or the environment?
10598
10599    # Try to remove the string !RMDIR! from our list.
10600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10602      # If it failed, the variable was not from the command line. Ignore it,
10603      # but warn the user (except for BASH, which is always set by the calling BASH).
10604      if test "xRMDIR" != xBASH; then
10605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10606$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10607      fi
10608      # Try to locate tool using the code snippet
10609      for ac_prog in rmdir
10610do
10611  # Extract the first word of "$ac_prog", so it can be a program name with args.
10612set dummy $ac_prog; ac_word=$2
10613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10614$as_echo_n "checking for $ac_word... " >&6; }
10615if ${ac_cv_path_RMDIR+:} false; then :
10616  $as_echo_n "(cached) " >&6
10617else
10618  case $RMDIR in
10619  [\\/]* | ?:[\\/]*)
10620  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10621  ;;
10622  *)
10623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10624for as_dir in $PATH
10625do
10626  IFS=$as_save_IFS
10627  test -z "$as_dir" && as_dir=.
10628    for ac_exec_ext in '' $ac_executable_extensions; do
10629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10630    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10632    break 2
10633  fi
10634done
10635  done
10636IFS=$as_save_IFS
10637
10638  ;;
10639esac
10640fi
10641RMDIR=$ac_cv_path_RMDIR
10642if test -n "$RMDIR"; then
10643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10644$as_echo "$RMDIR" >&6; }
10645else
10646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
10648fi
10649
10650
10651  test -n "$RMDIR" && break
10652done
10653
10654    else
10655      # If it succeeded, then it was overridden by the user. We will use it
10656      # for the tool.
10657
10658      # First remove it from the list of overridden variables, so we can test
10659      # for unknown variables in the end.
10660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10661
10662      # Check if we try to supply an empty value
10663      if test "x$RMDIR" = x; then
10664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10665$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10667$as_echo_n "checking for RMDIR... " >&6; }
10668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10669$as_echo "disabled" >&6; }
10670      else
10671        # Check if the provided tool contains a complete path.
10672        tool_specified="$RMDIR"
10673        tool_basename="${tool_specified##*/}"
10674        if test "x$tool_basename" = "x$tool_specified"; then
10675          # A command without a complete path is provided, search $PATH.
10676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10677$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10678          # Extract the first word of "$tool_basename", so it can be a program name with args.
10679set dummy $tool_basename; ac_word=$2
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681$as_echo_n "checking for $ac_word... " >&6; }
10682if ${ac_cv_path_RMDIR+:} false; then :
10683  $as_echo_n "(cached) " >&6
10684else
10685  case $RMDIR in
10686  [\\/]* | ?:[\\/]*)
10687  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10688  ;;
10689  *)
10690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10691for as_dir in $PATH
10692do
10693  IFS=$as_save_IFS
10694  test -z "$as_dir" && as_dir=.
10695    for ac_exec_ext in '' $ac_executable_extensions; do
10696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10697    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10699    break 2
10700  fi
10701done
10702  done
10703IFS=$as_save_IFS
10704
10705  ;;
10706esac
10707fi
10708RMDIR=$ac_cv_path_RMDIR
10709if test -n "$RMDIR"; then
10710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10711$as_echo "$RMDIR" >&6; }
10712else
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715fi
10716
10717
10718          if test "x$RMDIR" = x; then
10719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10720          fi
10721        else
10722          # Otherwise we believe it is a complete path. Use it as it is.
10723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10724$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10726$as_echo_n "checking for RMDIR... " >&6; }
10727          if test ! -x "$tool_specified"; then
10728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10729$as_echo "not found" >&6; }
10730            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10731          fi
10732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10733$as_echo "$tool_specified" >&6; }
10734        fi
10735      fi
10736    fi
10737
10738  fi
10739
10740
10741
10742  if test "x$RMDIR" = x; then
10743    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10744  fi
10745
10746
10747
10748
10749
10750  # Publish this variable in the help.
10751
10752
10753  if [ -z "${SH+x}" ]; then
10754    # The variable is not set by user, try to locate tool using the code snippet
10755    for ac_prog in sh
10756do
10757  # Extract the first word of "$ac_prog", so it can be a program name with args.
10758set dummy $ac_prog; ac_word=$2
10759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760$as_echo_n "checking for $ac_word... " >&6; }
10761if ${ac_cv_path_SH+:} false; then :
10762  $as_echo_n "(cached) " >&6
10763else
10764  case $SH in
10765  [\\/]* | ?:[\\/]*)
10766  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10767  ;;
10768  *)
10769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10770for as_dir in $PATH
10771do
10772  IFS=$as_save_IFS
10773  test -z "$as_dir" && as_dir=.
10774    for ac_exec_ext in '' $ac_executable_extensions; do
10775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10776    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10778    break 2
10779  fi
10780done
10781  done
10782IFS=$as_save_IFS
10783
10784  ;;
10785esac
10786fi
10787SH=$ac_cv_path_SH
10788if test -n "$SH"; then
10789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10790$as_echo "$SH" >&6; }
10791else
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793$as_echo "no" >&6; }
10794fi
10795
10796
10797  test -n "$SH" && break
10798done
10799
10800  else
10801    # The variable is set, but is it from the command line or the environment?
10802
10803    # Try to remove the string !SH! from our list.
10804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10806      # If it failed, the variable was not from the command line. Ignore it,
10807      # but warn the user (except for BASH, which is always set by the calling BASH).
10808      if test "xSH" != xBASH; then
10809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10810$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10811      fi
10812      # Try to locate tool using the code snippet
10813      for ac_prog in sh
10814do
10815  # Extract the first word of "$ac_prog", so it can be a program name with args.
10816set dummy $ac_prog; ac_word=$2
10817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10818$as_echo_n "checking for $ac_word... " >&6; }
10819if ${ac_cv_path_SH+:} false; then :
10820  $as_echo_n "(cached) " >&6
10821else
10822  case $SH in
10823  [\\/]* | ?:[\\/]*)
10824  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10825  ;;
10826  *)
10827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10828for as_dir in $PATH
10829do
10830  IFS=$as_save_IFS
10831  test -z "$as_dir" && as_dir=.
10832    for ac_exec_ext in '' $ac_executable_extensions; do
10833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10834    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10836    break 2
10837  fi
10838done
10839  done
10840IFS=$as_save_IFS
10841
10842  ;;
10843esac
10844fi
10845SH=$ac_cv_path_SH
10846if test -n "$SH"; then
10847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10848$as_echo "$SH" >&6; }
10849else
10850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10851$as_echo "no" >&6; }
10852fi
10853
10854
10855  test -n "$SH" && break
10856done
10857
10858    else
10859      # If it succeeded, then it was overridden by the user. We will use it
10860      # for the tool.
10861
10862      # First remove it from the list of overridden variables, so we can test
10863      # for unknown variables in the end.
10864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10865
10866      # Check if we try to supply an empty value
10867      if test "x$SH" = x; then
10868        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10869$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10871$as_echo_n "checking for SH... " >&6; }
10872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10873$as_echo "disabled" >&6; }
10874      else
10875        # Check if the provided tool contains a complete path.
10876        tool_specified="$SH"
10877        tool_basename="${tool_specified##*/}"
10878        if test "x$tool_basename" = "x$tool_specified"; then
10879          # A command without a complete path is provided, search $PATH.
10880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10881$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10882          # Extract the first word of "$tool_basename", so it can be a program name with args.
10883set dummy $tool_basename; ac_word=$2
10884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10885$as_echo_n "checking for $ac_word... " >&6; }
10886if ${ac_cv_path_SH+:} false; then :
10887  $as_echo_n "(cached) " >&6
10888else
10889  case $SH in
10890  [\\/]* | ?:[\\/]*)
10891  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10892  ;;
10893  *)
10894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10895for as_dir in $PATH
10896do
10897  IFS=$as_save_IFS
10898  test -z "$as_dir" && as_dir=.
10899    for ac_exec_ext in '' $ac_executable_extensions; do
10900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10901    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10903    break 2
10904  fi
10905done
10906  done
10907IFS=$as_save_IFS
10908
10909  ;;
10910esac
10911fi
10912SH=$ac_cv_path_SH
10913if test -n "$SH"; then
10914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10915$as_echo "$SH" >&6; }
10916else
10917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10918$as_echo "no" >&6; }
10919fi
10920
10921
10922          if test "x$SH" = x; then
10923            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10924          fi
10925        else
10926          # Otherwise we believe it is a complete path. Use it as it is.
10927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10928$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10929          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10930$as_echo_n "checking for SH... " >&6; }
10931          if test ! -x "$tool_specified"; then
10932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10933$as_echo "not found" >&6; }
10934            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10935          fi
10936          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10937$as_echo "$tool_specified" >&6; }
10938        fi
10939      fi
10940    fi
10941
10942  fi
10943
10944
10945
10946  if test "x$SH" = x; then
10947    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10948  fi
10949
10950
10951
10952
10953
10954  # Publish this variable in the help.
10955
10956
10957  if [ -z "${SORT+x}" ]; then
10958    # The variable is not set by user, try to locate tool using the code snippet
10959    for ac_prog in sort
10960do
10961  # Extract the first word of "$ac_prog", so it can be a program name with args.
10962set dummy $ac_prog; ac_word=$2
10963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10964$as_echo_n "checking for $ac_word... " >&6; }
10965if ${ac_cv_path_SORT+:} false; then :
10966  $as_echo_n "(cached) " >&6
10967else
10968  case $SORT in
10969  [\\/]* | ?:[\\/]*)
10970  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10971  ;;
10972  *)
10973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10974for as_dir in $PATH
10975do
10976  IFS=$as_save_IFS
10977  test -z "$as_dir" && as_dir=.
10978    for ac_exec_ext in '' $ac_executable_extensions; do
10979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10980    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10982    break 2
10983  fi
10984done
10985  done
10986IFS=$as_save_IFS
10987
10988  ;;
10989esac
10990fi
10991SORT=$ac_cv_path_SORT
10992if test -n "$SORT"; then
10993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10994$as_echo "$SORT" >&6; }
10995else
10996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10997$as_echo "no" >&6; }
10998fi
10999
11000
11001  test -n "$SORT" && break
11002done
11003
11004  else
11005    # The variable is set, but is it from the command line or the environment?
11006
11007    # Try to remove the string !SORT! from our list.
11008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11010      # If it failed, the variable was not from the command line. Ignore it,
11011      # but warn the user (except for BASH, which is always set by the calling BASH).
11012      if test "xSORT" != xBASH; then
11013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11014$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11015      fi
11016      # Try to locate tool using the code snippet
11017      for ac_prog in sort
11018do
11019  # Extract the first word of "$ac_prog", so it can be a program name with args.
11020set dummy $ac_prog; ac_word=$2
11021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11022$as_echo_n "checking for $ac_word... " >&6; }
11023if ${ac_cv_path_SORT+:} false; then :
11024  $as_echo_n "(cached) " >&6
11025else
11026  case $SORT in
11027  [\\/]* | ?:[\\/]*)
11028  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11029  ;;
11030  *)
11031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11032for as_dir in $PATH
11033do
11034  IFS=$as_save_IFS
11035  test -z "$as_dir" && as_dir=.
11036    for ac_exec_ext in '' $ac_executable_extensions; do
11037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11038    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11040    break 2
11041  fi
11042done
11043  done
11044IFS=$as_save_IFS
11045
11046  ;;
11047esac
11048fi
11049SORT=$ac_cv_path_SORT
11050if test -n "$SORT"; then
11051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11052$as_echo "$SORT" >&6; }
11053else
11054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055$as_echo "no" >&6; }
11056fi
11057
11058
11059  test -n "$SORT" && break
11060done
11061
11062    else
11063      # If it succeeded, then it was overridden by the user. We will use it
11064      # for the tool.
11065
11066      # First remove it from the list of overridden variables, so we can test
11067      # for unknown variables in the end.
11068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11069
11070      # Check if we try to supply an empty value
11071      if test "x$SORT" = x; then
11072        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11073$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11075$as_echo_n "checking for SORT... " >&6; }
11076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11077$as_echo "disabled" >&6; }
11078      else
11079        # Check if the provided tool contains a complete path.
11080        tool_specified="$SORT"
11081        tool_basename="${tool_specified##*/}"
11082        if test "x$tool_basename" = "x$tool_specified"; then
11083          # A command without a complete path is provided, search $PATH.
11084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11085$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11086          # Extract the first word of "$tool_basename", so it can be a program name with args.
11087set dummy $tool_basename; ac_word=$2
11088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11089$as_echo_n "checking for $ac_word... " >&6; }
11090if ${ac_cv_path_SORT+:} false; then :
11091  $as_echo_n "(cached) " >&6
11092else
11093  case $SORT in
11094  [\\/]* | ?:[\\/]*)
11095  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11096  ;;
11097  *)
11098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11099for as_dir in $PATH
11100do
11101  IFS=$as_save_IFS
11102  test -z "$as_dir" && as_dir=.
11103    for ac_exec_ext in '' $ac_executable_extensions; do
11104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11105    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11107    break 2
11108  fi
11109done
11110  done
11111IFS=$as_save_IFS
11112
11113  ;;
11114esac
11115fi
11116SORT=$ac_cv_path_SORT
11117if test -n "$SORT"; then
11118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11119$as_echo "$SORT" >&6; }
11120else
11121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11122$as_echo "no" >&6; }
11123fi
11124
11125
11126          if test "x$SORT" = x; then
11127            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11128          fi
11129        else
11130          # Otherwise we believe it is a complete path. Use it as it is.
11131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11132$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11133          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11134$as_echo_n "checking for SORT... " >&6; }
11135          if test ! -x "$tool_specified"; then
11136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11137$as_echo "not found" >&6; }
11138            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11139          fi
11140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11141$as_echo "$tool_specified" >&6; }
11142        fi
11143      fi
11144    fi
11145
11146  fi
11147
11148
11149
11150  if test "x$SORT" = x; then
11151    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11152  fi
11153
11154
11155
11156
11157
11158  # Publish this variable in the help.
11159
11160
11161  if [ -z "${TAIL+x}" ]; then
11162    # The variable is not set by user, try to locate tool using the code snippet
11163    for ac_prog in tail
11164do
11165  # Extract the first word of "$ac_prog", so it can be a program name with args.
11166set dummy $ac_prog; ac_word=$2
11167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11168$as_echo_n "checking for $ac_word... " >&6; }
11169if ${ac_cv_path_TAIL+:} false; then :
11170  $as_echo_n "(cached) " >&6
11171else
11172  case $TAIL in
11173  [\\/]* | ?:[\\/]*)
11174  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11175  ;;
11176  *)
11177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11178for as_dir in $PATH
11179do
11180  IFS=$as_save_IFS
11181  test -z "$as_dir" && as_dir=.
11182    for ac_exec_ext in '' $ac_executable_extensions; do
11183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11184    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11186    break 2
11187  fi
11188done
11189  done
11190IFS=$as_save_IFS
11191
11192  ;;
11193esac
11194fi
11195TAIL=$ac_cv_path_TAIL
11196if test -n "$TAIL"; then
11197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11198$as_echo "$TAIL" >&6; }
11199else
11200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
11202fi
11203
11204
11205  test -n "$TAIL" && break
11206done
11207
11208  else
11209    # The variable is set, but is it from the command line or the environment?
11210
11211    # Try to remove the string !TAIL! from our list.
11212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11214      # If it failed, the variable was not from the command line. Ignore it,
11215      # but warn the user (except for BASH, which is always set by the calling BASH).
11216      if test "xTAIL" != xBASH; then
11217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11218$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11219      fi
11220      # Try to locate tool using the code snippet
11221      for ac_prog in tail
11222do
11223  # Extract the first word of "$ac_prog", so it can be a program name with args.
11224set dummy $ac_prog; ac_word=$2
11225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11226$as_echo_n "checking for $ac_word... " >&6; }
11227if ${ac_cv_path_TAIL+:} false; then :
11228  $as_echo_n "(cached) " >&6
11229else
11230  case $TAIL in
11231  [\\/]* | ?:[\\/]*)
11232  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11233  ;;
11234  *)
11235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11236for as_dir in $PATH
11237do
11238  IFS=$as_save_IFS
11239  test -z "$as_dir" && as_dir=.
11240    for ac_exec_ext in '' $ac_executable_extensions; do
11241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11242    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11244    break 2
11245  fi
11246done
11247  done
11248IFS=$as_save_IFS
11249
11250  ;;
11251esac
11252fi
11253TAIL=$ac_cv_path_TAIL
11254if test -n "$TAIL"; then
11255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11256$as_echo "$TAIL" >&6; }
11257else
11258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11259$as_echo "no" >&6; }
11260fi
11261
11262
11263  test -n "$TAIL" && break
11264done
11265
11266    else
11267      # If it succeeded, then it was overridden by the user. We will use it
11268      # for the tool.
11269
11270      # First remove it from the list of overridden variables, so we can test
11271      # for unknown variables in the end.
11272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11273
11274      # Check if we try to supply an empty value
11275      if test "x$TAIL" = x; then
11276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11277$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11279$as_echo_n "checking for TAIL... " >&6; }
11280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11281$as_echo "disabled" >&6; }
11282      else
11283        # Check if the provided tool contains a complete path.
11284        tool_specified="$TAIL"
11285        tool_basename="${tool_specified##*/}"
11286        if test "x$tool_basename" = "x$tool_specified"; then
11287          # A command without a complete path is provided, search $PATH.
11288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11289$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11290          # Extract the first word of "$tool_basename", so it can be a program name with args.
11291set dummy $tool_basename; ac_word=$2
11292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11293$as_echo_n "checking for $ac_word... " >&6; }
11294if ${ac_cv_path_TAIL+:} false; then :
11295  $as_echo_n "(cached) " >&6
11296else
11297  case $TAIL in
11298  [\\/]* | ?:[\\/]*)
11299  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11300  ;;
11301  *)
11302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11303for as_dir in $PATH
11304do
11305  IFS=$as_save_IFS
11306  test -z "$as_dir" && as_dir=.
11307    for ac_exec_ext in '' $ac_executable_extensions; do
11308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11309    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11311    break 2
11312  fi
11313done
11314  done
11315IFS=$as_save_IFS
11316
11317  ;;
11318esac
11319fi
11320TAIL=$ac_cv_path_TAIL
11321if test -n "$TAIL"; then
11322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11323$as_echo "$TAIL" >&6; }
11324else
11325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
11327fi
11328
11329
11330          if test "x$TAIL" = x; then
11331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11332          fi
11333        else
11334          # Otherwise we believe it is a complete path. Use it as it is.
11335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11336$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11338$as_echo_n "checking for TAIL... " >&6; }
11339          if test ! -x "$tool_specified"; then
11340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11341$as_echo "not found" >&6; }
11342            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11343          fi
11344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11345$as_echo "$tool_specified" >&6; }
11346        fi
11347      fi
11348    fi
11349
11350  fi
11351
11352
11353
11354  if test "x$TAIL" = x; then
11355    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11356  fi
11357
11358
11359
11360
11361
11362  # Publish this variable in the help.
11363
11364
11365  if [ -z "${TAR+x}" ]; then
11366    # The variable is not set by user, try to locate tool using the code snippet
11367    for ac_prog in gtar tar
11368do
11369  # Extract the first word of "$ac_prog", so it can be a program name with args.
11370set dummy $ac_prog; ac_word=$2
11371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11372$as_echo_n "checking for $ac_word... " >&6; }
11373if ${ac_cv_path_TAR+:} false; then :
11374  $as_echo_n "(cached) " >&6
11375else
11376  case $TAR in
11377  [\\/]* | ?:[\\/]*)
11378  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11379  ;;
11380  *)
11381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11382for as_dir in $PATH
11383do
11384  IFS=$as_save_IFS
11385  test -z "$as_dir" && as_dir=.
11386    for ac_exec_ext in '' $ac_executable_extensions; do
11387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11388    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11390    break 2
11391  fi
11392done
11393  done
11394IFS=$as_save_IFS
11395
11396  ;;
11397esac
11398fi
11399TAR=$ac_cv_path_TAR
11400if test -n "$TAR"; then
11401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11402$as_echo "$TAR" >&6; }
11403else
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
11406fi
11407
11408
11409  test -n "$TAR" && break
11410done
11411
11412  else
11413    # The variable is set, but is it from the command line or the environment?
11414
11415    # Try to remove the string !TAR! from our list.
11416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11418      # If it failed, the variable was not from the command line. Ignore it,
11419      # but warn the user (except for BASH, which is always set by the calling BASH).
11420      if test "xTAR" != xBASH; then
11421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11422$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11423      fi
11424      # Try to locate tool using the code snippet
11425      for ac_prog in gtar tar
11426do
11427  # Extract the first word of "$ac_prog", so it can be a program name with args.
11428set dummy $ac_prog; ac_word=$2
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11430$as_echo_n "checking for $ac_word... " >&6; }
11431if ${ac_cv_path_TAR+:} false; then :
11432  $as_echo_n "(cached) " >&6
11433else
11434  case $TAR in
11435  [\\/]* | ?:[\\/]*)
11436  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11437  ;;
11438  *)
11439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11440for as_dir in $PATH
11441do
11442  IFS=$as_save_IFS
11443  test -z "$as_dir" && as_dir=.
11444    for ac_exec_ext in '' $ac_executable_extensions; do
11445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11446    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11448    break 2
11449  fi
11450done
11451  done
11452IFS=$as_save_IFS
11453
11454  ;;
11455esac
11456fi
11457TAR=$ac_cv_path_TAR
11458if test -n "$TAR"; then
11459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11460$as_echo "$TAR" >&6; }
11461else
11462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
11464fi
11465
11466
11467  test -n "$TAR" && break
11468done
11469
11470    else
11471      # If it succeeded, then it was overridden by the user. We will use it
11472      # for the tool.
11473
11474      # First remove it from the list of overridden variables, so we can test
11475      # for unknown variables in the end.
11476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11477
11478      # Check if we try to supply an empty value
11479      if test "x$TAR" = x; then
11480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11481$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11483$as_echo_n "checking for TAR... " >&6; }
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11485$as_echo "disabled" >&6; }
11486      else
11487        # Check if the provided tool contains a complete path.
11488        tool_specified="$TAR"
11489        tool_basename="${tool_specified##*/}"
11490        if test "x$tool_basename" = "x$tool_specified"; then
11491          # A command without a complete path is provided, search $PATH.
11492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11493$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11494          # Extract the first word of "$tool_basename", so it can be a program name with args.
11495set dummy $tool_basename; ac_word=$2
11496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11497$as_echo_n "checking for $ac_word... " >&6; }
11498if ${ac_cv_path_TAR+:} false; then :
11499  $as_echo_n "(cached) " >&6
11500else
11501  case $TAR in
11502  [\\/]* | ?:[\\/]*)
11503  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11504  ;;
11505  *)
11506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11507for as_dir in $PATH
11508do
11509  IFS=$as_save_IFS
11510  test -z "$as_dir" && as_dir=.
11511    for ac_exec_ext in '' $ac_executable_extensions; do
11512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11513    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11515    break 2
11516  fi
11517done
11518  done
11519IFS=$as_save_IFS
11520
11521  ;;
11522esac
11523fi
11524TAR=$ac_cv_path_TAR
11525if test -n "$TAR"; then
11526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11527$as_echo "$TAR" >&6; }
11528else
11529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11530$as_echo "no" >&6; }
11531fi
11532
11533
11534          if test "x$TAR" = x; then
11535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11536          fi
11537        else
11538          # Otherwise we believe it is a complete path. Use it as it is.
11539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11540$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11542$as_echo_n "checking for TAR... " >&6; }
11543          if test ! -x "$tool_specified"; then
11544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11545$as_echo "not found" >&6; }
11546            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11547          fi
11548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11549$as_echo "$tool_specified" >&6; }
11550        fi
11551      fi
11552    fi
11553
11554  fi
11555
11556
11557
11558  if test "x$TAR" = x; then
11559    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11560  fi
11561
11562
11563
11564
11565
11566  # Publish this variable in the help.
11567
11568
11569  if [ -z "${TEE+x}" ]; then
11570    # The variable is not set by user, try to locate tool using the code snippet
11571    for ac_prog in tee
11572do
11573  # Extract the first word of "$ac_prog", so it can be a program name with args.
11574set dummy $ac_prog; ac_word=$2
11575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11576$as_echo_n "checking for $ac_word... " >&6; }
11577if ${ac_cv_path_TEE+:} false; then :
11578  $as_echo_n "(cached) " >&6
11579else
11580  case $TEE in
11581  [\\/]* | ?:[\\/]*)
11582  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11583  ;;
11584  *)
11585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11586for as_dir in $PATH
11587do
11588  IFS=$as_save_IFS
11589  test -z "$as_dir" && as_dir=.
11590    for ac_exec_ext in '' $ac_executable_extensions; do
11591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11592    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11594    break 2
11595  fi
11596done
11597  done
11598IFS=$as_save_IFS
11599
11600  ;;
11601esac
11602fi
11603TEE=$ac_cv_path_TEE
11604if test -n "$TEE"; then
11605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11606$as_echo "$TEE" >&6; }
11607else
11608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609$as_echo "no" >&6; }
11610fi
11611
11612
11613  test -n "$TEE" && break
11614done
11615
11616  else
11617    # The variable is set, but is it from the command line or the environment?
11618
11619    # Try to remove the string !TEE! from our list.
11620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11622      # If it failed, the variable was not from the command line. Ignore it,
11623      # but warn the user (except for BASH, which is always set by the calling BASH).
11624      if test "xTEE" != xBASH; then
11625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11626$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11627      fi
11628      # Try to locate tool using the code snippet
11629      for ac_prog in tee
11630do
11631  # Extract the first word of "$ac_prog", so it can be a program name with args.
11632set dummy $ac_prog; ac_word=$2
11633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11634$as_echo_n "checking for $ac_word... " >&6; }
11635if ${ac_cv_path_TEE+:} false; then :
11636  $as_echo_n "(cached) " >&6
11637else
11638  case $TEE in
11639  [\\/]* | ?:[\\/]*)
11640  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11641  ;;
11642  *)
11643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11644for as_dir in $PATH
11645do
11646  IFS=$as_save_IFS
11647  test -z "$as_dir" && as_dir=.
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11650    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11652    break 2
11653  fi
11654done
11655  done
11656IFS=$as_save_IFS
11657
11658  ;;
11659esac
11660fi
11661TEE=$ac_cv_path_TEE
11662if test -n "$TEE"; then
11663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11664$as_echo "$TEE" >&6; }
11665else
11666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
11668fi
11669
11670
11671  test -n "$TEE" && break
11672done
11673
11674    else
11675      # If it succeeded, then it was overridden by the user. We will use it
11676      # for the tool.
11677
11678      # First remove it from the list of overridden variables, so we can test
11679      # for unknown variables in the end.
11680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11681
11682      # Check if we try to supply an empty value
11683      if test "x$TEE" = x; then
11684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11685$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11687$as_echo_n "checking for TEE... " >&6; }
11688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11689$as_echo "disabled" >&6; }
11690      else
11691        # Check if the provided tool contains a complete path.
11692        tool_specified="$TEE"
11693        tool_basename="${tool_specified##*/}"
11694        if test "x$tool_basename" = "x$tool_specified"; then
11695          # A command without a complete path is provided, search $PATH.
11696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11697$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11698          # Extract the first word of "$tool_basename", so it can be a program name with args.
11699set dummy $tool_basename; ac_word=$2
11700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11701$as_echo_n "checking for $ac_word... " >&6; }
11702if ${ac_cv_path_TEE+:} false; then :
11703  $as_echo_n "(cached) " >&6
11704else
11705  case $TEE in
11706  [\\/]* | ?:[\\/]*)
11707  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11708  ;;
11709  *)
11710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11711for as_dir in $PATH
11712do
11713  IFS=$as_save_IFS
11714  test -z "$as_dir" && as_dir=.
11715    for ac_exec_ext in '' $ac_executable_extensions; do
11716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11717    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11719    break 2
11720  fi
11721done
11722  done
11723IFS=$as_save_IFS
11724
11725  ;;
11726esac
11727fi
11728TEE=$ac_cv_path_TEE
11729if test -n "$TEE"; then
11730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11731$as_echo "$TEE" >&6; }
11732else
11733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
11735fi
11736
11737
11738          if test "x$TEE" = x; then
11739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11740          fi
11741        else
11742          # Otherwise we believe it is a complete path. Use it as it is.
11743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11744$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11746$as_echo_n "checking for TEE... " >&6; }
11747          if test ! -x "$tool_specified"; then
11748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11749$as_echo "not found" >&6; }
11750            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11751          fi
11752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11753$as_echo "$tool_specified" >&6; }
11754        fi
11755      fi
11756    fi
11757
11758  fi
11759
11760
11761
11762  if test "x$TEE" = x; then
11763    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11764  fi
11765
11766
11767
11768
11769
11770  # Publish this variable in the help.
11771
11772
11773  if [ -z "${TOUCH+x}" ]; then
11774    # The variable is not set by user, try to locate tool using the code snippet
11775    for ac_prog in touch
11776do
11777  # Extract the first word of "$ac_prog", so it can be a program name with args.
11778set dummy $ac_prog; ac_word=$2
11779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11780$as_echo_n "checking for $ac_word... " >&6; }
11781if ${ac_cv_path_TOUCH+:} false; then :
11782  $as_echo_n "(cached) " >&6
11783else
11784  case $TOUCH in
11785  [\\/]* | ?:[\\/]*)
11786  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11787  ;;
11788  *)
11789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11790for as_dir in $PATH
11791do
11792  IFS=$as_save_IFS
11793  test -z "$as_dir" && as_dir=.
11794    for ac_exec_ext in '' $ac_executable_extensions; do
11795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11796    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11798    break 2
11799  fi
11800done
11801  done
11802IFS=$as_save_IFS
11803
11804  ;;
11805esac
11806fi
11807TOUCH=$ac_cv_path_TOUCH
11808if test -n "$TOUCH"; then
11809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11810$as_echo "$TOUCH" >&6; }
11811else
11812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11813$as_echo "no" >&6; }
11814fi
11815
11816
11817  test -n "$TOUCH" && break
11818done
11819
11820  else
11821    # The variable is set, but is it from the command line or the environment?
11822
11823    # Try to remove the string !TOUCH! from our list.
11824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11826      # If it failed, the variable was not from the command line. Ignore it,
11827      # but warn the user (except for BASH, which is always set by the calling BASH).
11828      if test "xTOUCH" != xBASH; then
11829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11830$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11831      fi
11832      # Try to locate tool using the code snippet
11833      for ac_prog in touch
11834do
11835  # Extract the first word of "$ac_prog", so it can be a program name with args.
11836set dummy $ac_prog; ac_word=$2
11837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11838$as_echo_n "checking for $ac_word... " >&6; }
11839if ${ac_cv_path_TOUCH+:} false; then :
11840  $as_echo_n "(cached) " >&6
11841else
11842  case $TOUCH in
11843  [\\/]* | ?:[\\/]*)
11844  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11845  ;;
11846  *)
11847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11848for as_dir in $PATH
11849do
11850  IFS=$as_save_IFS
11851  test -z "$as_dir" && as_dir=.
11852    for ac_exec_ext in '' $ac_executable_extensions; do
11853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11854    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11856    break 2
11857  fi
11858done
11859  done
11860IFS=$as_save_IFS
11861
11862  ;;
11863esac
11864fi
11865TOUCH=$ac_cv_path_TOUCH
11866if test -n "$TOUCH"; then
11867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11868$as_echo "$TOUCH" >&6; }
11869else
11870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871$as_echo "no" >&6; }
11872fi
11873
11874
11875  test -n "$TOUCH" && break
11876done
11877
11878    else
11879      # If it succeeded, then it was overridden by the user. We will use it
11880      # for the tool.
11881
11882      # First remove it from the list of overridden variables, so we can test
11883      # for unknown variables in the end.
11884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11885
11886      # Check if we try to supply an empty value
11887      if test "x$TOUCH" = x; then
11888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11889$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11891$as_echo_n "checking for TOUCH... " >&6; }
11892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11893$as_echo "disabled" >&6; }
11894      else
11895        # Check if the provided tool contains a complete path.
11896        tool_specified="$TOUCH"
11897        tool_basename="${tool_specified##*/}"
11898        if test "x$tool_basename" = "x$tool_specified"; then
11899          # A command without a complete path is provided, search $PATH.
11900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11901$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11902          # Extract the first word of "$tool_basename", so it can be a program name with args.
11903set dummy $tool_basename; ac_word=$2
11904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11905$as_echo_n "checking for $ac_word... " >&6; }
11906if ${ac_cv_path_TOUCH+:} false; then :
11907  $as_echo_n "(cached) " >&6
11908else
11909  case $TOUCH in
11910  [\\/]* | ?:[\\/]*)
11911  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11912  ;;
11913  *)
11914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11915for as_dir in $PATH
11916do
11917  IFS=$as_save_IFS
11918  test -z "$as_dir" && as_dir=.
11919    for ac_exec_ext in '' $ac_executable_extensions; do
11920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11921    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11923    break 2
11924  fi
11925done
11926  done
11927IFS=$as_save_IFS
11928
11929  ;;
11930esac
11931fi
11932TOUCH=$ac_cv_path_TOUCH
11933if test -n "$TOUCH"; then
11934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11935$as_echo "$TOUCH" >&6; }
11936else
11937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11938$as_echo "no" >&6; }
11939fi
11940
11941
11942          if test "x$TOUCH" = x; then
11943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11944          fi
11945        else
11946          # Otherwise we believe it is a complete path. Use it as it is.
11947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11948$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11950$as_echo_n "checking for TOUCH... " >&6; }
11951          if test ! -x "$tool_specified"; then
11952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11953$as_echo "not found" >&6; }
11954            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11955          fi
11956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11957$as_echo "$tool_specified" >&6; }
11958        fi
11959      fi
11960    fi
11961
11962  fi
11963
11964
11965
11966  if test "x$TOUCH" = x; then
11967    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11968  fi
11969
11970
11971
11972
11973
11974  # Publish this variable in the help.
11975
11976
11977  if [ -z "${TR+x}" ]; then
11978    # The variable is not set by user, try to locate tool using the code snippet
11979    for ac_prog in tr
11980do
11981  # Extract the first word of "$ac_prog", so it can be a program name with args.
11982set dummy $ac_prog; ac_word=$2
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11984$as_echo_n "checking for $ac_word... " >&6; }
11985if ${ac_cv_path_TR+:} false; then :
11986  $as_echo_n "(cached) " >&6
11987else
11988  case $TR in
11989  [\\/]* | ?:[\\/]*)
11990  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11991  ;;
11992  *)
11993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11994for as_dir in $PATH
11995do
11996  IFS=$as_save_IFS
11997  test -z "$as_dir" && as_dir=.
11998    for ac_exec_ext in '' $ac_executable_extensions; do
11999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12000    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12002    break 2
12003  fi
12004done
12005  done
12006IFS=$as_save_IFS
12007
12008  ;;
12009esac
12010fi
12011TR=$ac_cv_path_TR
12012if test -n "$TR"; then
12013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12014$as_echo "$TR" >&6; }
12015else
12016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12017$as_echo "no" >&6; }
12018fi
12019
12020
12021  test -n "$TR" && break
12022done
12023
12024  else
12025    # The variable is set, but is it from the command line or the environment?
12026
12027    # Try to remove the string !TR! from our list.
12028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12030      # If it failed, the variable was not from the command line. Ignore it,
12031      # but warn the user (except for BASH, which is always set by the calling BASH).
12032      if test "xTR" != xBASH; then
12033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12034$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12035      fi
12036      # Try to locate tool using the code snippet
12037      for ac_prog in tr
12038do
12039  # Extract the first word of "$ac_prog", so it can be a program name with args.
12040set dummy $ac_prog; ac_word=$2
12041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12042$as_echo_n "checking for $ac_word... " >&6; }
12043if ${ac_cv_path_TR+:} false; then :
12044  $as_echo_n "(cached) " >&6
12045else
12046  case $TR in
12047  [\\/]* | ?:[\\/]*)
12048  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12049  ;;
12050  *)
12051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12052for as_dir in $PATH
12053do
12054  IFS=$as_save_IFS
12055  test -z "$as_dir" && as_dir=.
12056    for ac_exec_ext in '' $ac_executable_extensions; do
12057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12058    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12060    break 2
12061  fi
12062done
12063  done
12064IFS=$as_save_IFS
12065
12066  ;;
12067esac
12068fi
12069TR=$ac_cv_path_TR
12070if test -n "$TR"; then
12071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12072$as_echo "$TR" >&6; }
12073else
12074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12075$as_echo "no" >&6; }
12076fi
12077
12078
12079  test -n "$TR" && break
12080done
12081
12082    else
12083      # If it succeeded, then it was overridden by the user. We will use it
12084      # for the tool.
12085
12086      # First remove it from the list of overridden variables, so we can test
12087      # for unknown variables in the end.
12088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12089
12090      # Check if we try to supply an empty value
12091      if test "x$TR" = x; then
12092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12093$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12095$as_echo_n "checking for TR... " >&6; }
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12097$as_echo "disabled" >&6; }
12098      else
12099        # Check if the provided tool contains a complete path.
12100        tool_specified="$TR"
12101        tool_basename="${tool_specified##*/}"
12102        if test "x$tool_basename" = "x$tool_specified"; then
12103          # A command without a complete path is provided, search $PATH.
12104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12105$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12106          # Extract the first word of "$tool_basename", so it can be a program name with args.
12107set dummy $tool_basename; ac_word=$2
12108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12109$as_echo_n "checking for $ac_word... " >&6; }
12110if ${ac_cv_path_TR+:} false; then :
12111  $as_echo_n "(cached) " >&6
12112else
12113  case $TR in
12114  [\\/]* | ?:[\\/]*)
12115  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12116  ;;
12117  *)
12118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12119for as_dir in $PATH
12120do
12121  IFS=$as_save_IFS
12122  test -z "$as_dir" && as_dir=.
12123    for ac_exec_ext in '' $ac_executable_extensions; do
12124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12125    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12127    break 2
12128  fi
12129done
12130  done
12131IFS=$as_save_IFS
12132
12133  ;;
12134esac
12135fi
12136TR=$ac_cv_path_TR
12137if test -n "$TR"; then
12138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12139$as_echo "$TR" >&6; }
12140else
12141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12142$as_echo "no" >&6; }
12143fi
12144
12145
12146          if test "x$TR" = x; then
12147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12148          fi
12149        else
12150          # Otherwise we believe it is a complete path. Use it as it is.
12151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12152$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12154$as_echo_n "checking for TR... " >&6; }
12155          if test ! -x "$tool_specified"; then
12156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12157$as_echo "not found" >&6; }
12158            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12159          fi
12160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12161$as_echo "$tool_specified" >&6; }
12162        fi
12163      fi
12164    fi
12165
12166  fi
12167
12168
12169
12170  if test "x$TR" = x; then
12171    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12172  fi
12173
12174
12175
12176
12177
12178  # Publish this variable in the help.
12179
12180
12181  if [ -z "${UNAME+x}" ]; then
12182    # The variable is not set by user, try to locate tool using the code snippet
12183    for ac_prog in uname
12184do
12185  # Extract the first word of "$ac_prog", so it can be a program name with args.
12186set dummy $ac_prog; ac_word=$2
12187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12188$as_echo_n "checking for $ac_word... " >&6; }
12189if ${ac_cv_path_UNAME+:} false; then :
12190  $as_echo_n "(cached) " >&6
12191else
12192  case $UNAME in
12193  [\\/]* | ?:[\\/]*)
12194  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12195  ;;
12196  *)
12197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12198for as_dir in $PATH
12199do
12200  IFS=$as_save_IFS
12201  test -z "$as_dir" && as_dir=.
12202    for ac_exec_ext in '' $ac_executable_extensions; do
12203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12204    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12206    break 2
12207  fi
12208done
12209  done
12210IFS=$as_save_IFS
12211
12212  ;;
12213esac
12214fi
12215UNAME=$ac_cv_path_UNAME
12216if test -n "$UNAME"; then
12217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12218$as_echo "$UNAME" >&6; }
12219else
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12221$as_echo "no" >&6; }
12222fi
12223
12224
12225  test -n "$UNAME" && break
12226done
12227
12228  else
12229    # The variable is set, but is it from the command line or the environment?
12230
12231    # Try to remove the string !UNAME! from our list.
12232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12234      # If it failed, the variable was not from the command line. Ignore it,
12235      # but warn the user (except for BASH, which is always set by the calling BASH).
12236      if test "xUNAME" != xBASH; then
12237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12238$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12239      fi
12240      # Try to locate tool using the code snippet
12241      for ac_prog in uname
12242do
12243  # Extract the first word of "$ac_prog", so it can be a program name with args.
12244set dummy $ac_prog; ac_word=$2
12245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12246$as_echo_n "checking for $ac_word... " >&6; }
12247if ${ac_cv_path_UNAME+:} false; then :
12248  $as_echo_n "(cached) " >&6
12249else
12250  case $UNAME in
12251  [\\/]* | ?:[\\/]*)
12252  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12253  ;;
12254  *)
12255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12256for as_dir in $PATH
12257do
12258  IFS=$as_save_IFS
12259  test -z "$as_dir" && as_dir=.
12260    for ac_exec_ext in '' $ac_executable_extensions; do
12261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12262    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12264    break 2
12265  fi
12266done
12267  done
12268IFS=$as_save_IFS
12269
12270  ;;
12271esac
12272fi
12273UNAME=$ac_cv_path_UNAME
12274if test -n "$UNAME"; then
12275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12276$as_echo "$UNAME" >&6; }
12277else
12278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12279$as_echo "no" >&6; }
12280fi
12281
12282
12283  test -n "$UNAME" && break
12284done
12285
12286    else
12287      # If it succeeded, then it was overridden by the user. We will use it
12288      # for the tool.
12289
12290      # First remove it from the list of overridden variables, so we can test
12291      # for unknown variables in the end.
12292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12293
12294      # Check if we try to supply an empty value
12295      if test "x$UNAME" = x; then
12296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12297$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12299$as_echo_n "checking for UNAME... " >&6; }
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12301$as_echo "disabled" >&6; }
12302      else
12303        # Check if the provided tool contains a complete path.
12304        tool_specified="$UNAME"
12305        tool_basename="${tool_specified##*/}"
12306        if test "x$tool_basename" = "x$tool_specified"; then
12307          # A command without a complete path is provided, search $PATH.
12308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12309$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12310          # Extract the first word of "$tool_basename", so it can be a program name with args.
12311set dummy $tool_basename; ac_word=$2
12312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12313$as_echo_n "checking for $ac_word... " >&6; }
12314if ${ac_cv_path_UNAME+:} false; then :
12315  $as_echo_n "(cached) " >&6
12316else
12317  case $UNAME in
12318  [\\/]* | ?:[\\/]*)
12319  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12320  ;;
12321  *)
12322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12323for as_dir in $PATH
12324do
12325  IFS=$as_save_IFS
12326  test -z "$as_dir" && as_dir=.
12327    for ac_exec_ext in '' $ac_executable_extensions; do
12328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12329    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12331    break 2
12332  fi
12333done
12334  done
12335IFS=$as_save_IFS
12336
12337  ;;
12338esac
12339fi
12340UNAME=$ac_cv_path_UNAME
12341if test -n "$UNAME"; then
12342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12343$as_echo "$UNAME" >&6; }
12344else
12345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12346$as_echo "no" >&6; }
12347fi
12348
12349
12350          if test "x$UNAME" = x; then
12351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12352          fi
12353        else
12354          # Otherwise we believe it is a complete path. Use it as it is.
12355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12356$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12358$as_echo_n "checking for UNAME... " >&6; }
12359          if test ! -x "$tool_specified"; then
12360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12361$as_echo "not found" >&6; }
12362            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12363          fi
12364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12365$as_echo "$tool_specified" >&6; }
12366        fi
12367      fi
12368    fi
12369
12370  fi
12371
12372
12373
12374  if test "x$UNAME" = x; then
12375    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12376  fi
12377
12378
12379
12380
12381
12382  # Publish this variable in the help.
12383
12384
12385  if [ -z "${UNIQ+x}" ]; then
12386    # The variable is not set by user, try to locate tool using the code snippet
12387    for ac_prog in uniq
12388do
12389  # Extract the first word of "$ac_prog", so it can be a program name with args.
12390set dummy $ac_prog; ac_word=$2
12391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12392$as_echo_n "checking for $ac_word... " >&6; }
12393if ${ac_cv_path_UNIQ+:} false; then :
12394  $as_echo_n "(cached) " >&6
12395else
12396  case $UNIQ in
12397  [\\/]* | ?:[\\/]*)
12398  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12399  ;;
12400  *)
12401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12402for as_dir in $PATH
12403do
12404  IFS=$as_save_IFS
12405  test -z "$as_dir" && as_dir=.
12406    for ac_exec_ext in '' $ac_executable_extensions; do
12407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12408    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12410    break 2
12411  fi
12412done
12413  done
12414IFS=$as_save_IFS
12415
12416  ;;
12417esac
12418fi
12419UNIQ=$ac_cv_path_UNIQ
12420if test -n "$UNIQ"; then
12421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12422$as_echo "$UNIQ" >&6; }
12423else
12424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12425$as_echo "no" >&6; }
12426fi
12427
12428
12429  test -n "$UNIQ" && break
12430done
12431
12432  else
12433    # The variable is set, but is it from the command line or the environment?
12434
12435    # Try to remove the string !UNIQ! from our list.
12436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12438      # If it failed, the variable was not from the command line. Ignore it,
12439      # but warn the user (except for BASH, which is always set by the calling BASH).
12440      if test "xUNIQ" != xBASH; then
12441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12442$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12443      fi
12444      # Try to locate tool using the code snippet
12445      for ac_prog in uniq
12446do
12447  # Extract the first word of "$ac_prog", so it can be a program name with args.
12448set dummy $ac_prog; ac_word=$2
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12450$as_echo_n "checking for $ac_word... " >&6; }
12451if ${ac_cv_path_UNIQ+:} false; then :
12452  $as_echo_n "(cached) " >&6
12453else
12454  case $UNIQ in
12455  [\\/]* | ?:[\\/]*)
12456  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12457  ;;
12458  *)
12459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12460for as_dir in $PATH
12461do
12462  IFS=$as_save_IFS
12463  test -z "$as_dir" && as_dir=.
12464    for ac_exec_ext in '' $ac_executable_extensions; do
12465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12466    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12468    break 2
12469  fi
12470done
12471  done
12472IFS=$as_save_IFS
12473
12474  ;;
12475esac
12476fi
12477UNIQ=$ac_cv_path_UNIQ
12478if test -n "$UNIQ"; then
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12480$as_echo "$UNIQ" >&6; }
12481else
12482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12483$as_echo "no" >&6; }
12484fi
12485
12486
12487  test -n "$UNIQ" && break
12488done
12489
12490    else
12491      # If it succeeded, then it was overridden by the user. We will use it
12492      # for the tool.
12493
12494      # First remove it from the list of overridden variables, so we can test
12495      # for unknown variables in the end.
12496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12497
12498      # Check if we try to supply an empty value
12499      if test "x$UNIQ" = x; then
12500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12501$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12503$as_echo_n "checking for UNIQ... " >&6; }
12504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12505$as_echo "disabled" >&6; }
12506      else
12507        # Check if the provided tool contains a complete path.
12508        tool_specified="$UNIQ"
12509        tool_basename="${tool_specified##*/}"
12510        if test "x$tool_basename" = "x$tool_specified"; then
12511          # A command without a complete path is provided, search $PATH.
12512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12513$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12514          # Extract the first word of "$tool_basename", so it can be a program name with args.
12515set dummy $tool_basename; ac_word=$2
12516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12517$as_echo_n "checking for $ac_word... " >&6; }
12518if ${ac_cv_path_UNIQ+:} false; then :
12519  $as_echo_n "(cached) " >&6
12520else
12521  case $UNIQ in
12522  [\\/]* | ?:[\\/]*)
12523  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12524  ;;
12525  *)
12526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12527for as_dir in $PATH
12528do
12529  IFS=$as_save_IFS
12530  test -z "$as_dir" && as_dir=.
12531    for ac_exec_ext in '' $ac_executable_extensions; do
12532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12533    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12535    break 2
12536  fi
12537done
12538  done
12539IFS=$as_save_IFS
12540
12541  ;;
12542esac
12543fi
12544UNIQ=$ac_cv_path_UNIQ
12545if test -n "$UNIQ"; then
12546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12547$as_echo "$UNIQ" >&6; }
12548else
12549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12550$as_echo "no" >&6; }
12551fi
12552
12553
12554          if test "x$UNIQ" = x; then
12555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12556          fi
12557        else
12558          # Otherwise we believe it is a complete path. Use it as it is.
12559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12560$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12562$as_echo_n "checking for UNIQ... " >&6; }
12563          if test ! -x "$tool_specified"; then
12564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12565$as_echo "not found" >&6; }
12566            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12567          fi
12568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12569$as_echo "$tool_specified" >&6; }
12570        fi
12571      fi
12572    fi
12573
12574  fi
12575
12576
12577
12578  if test "x$UNIQ" = x; then
12579    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12580  fi
12581
12582
12583
12584
12585
12586  # Publish this variable in the help.
12587
12588
12589  if [ -z "${WC+x}" ]; then
12590    # The variable is not set by user, try to locate tool using the code snippet
12591    for ac_prog in wc
12592do
12593  # Extract the first word of "$ac_prog", so it can be a program name with args.
12594set dummy $ac_prog; ac_word=$2
12595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12596$as_echo_n "checking for $ac_word... " >&6; }
12597if ${ac_cv_path_WC+:} false; then :
12598  $as_echo_n "(cached) " >&6
12599else
12600  case $WC in
12601  [\\/]* | ?:[\\/]*)
12602  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12603  ;;
12604  *)
12605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12606for as_dir in $PATH
12607do
12608  IFS=$as_save_IFS
12609  test -z "$as_dir" && as_dir=.
12610    for ac_exec_ext in '' $ac_executable_extensions; do
12611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12612    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12614    break 2
12615  fi
12616done
12617  done
12618IFS=$as_save_IFS
12619
12620  ;;
12621esac
12622fi
12623WC=$ac_cv_path_WC
12624if test -n "$WC"; then
12625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12626$as_echo "$WC" >&6; }
12627else
12628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629$as_echo "no" >&6; }
12630fi
12631
12632
12633  test -n "$WC" && break
12634done
12635
12636  else
12637    # The variable is set, but is it from the command line or the environment?
12638
12639    # Try to remove the string !WC! from our list.
12640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12642      # If it failed, the variable was not from the command line. Ignore it,
12643      # but warn the user (except for BASH, which is always set by the calling BASH).
12644      if test "xWC" != xBASH; then
12645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12646$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12647      fi
12648      # Try to locate tool using the code snippet
12649      for ac_prog in wc
12650do
12651  # Extract the first word of "$ac_prog", so it can be a program name with args.
12652set dummy $ac_prog; ac_word=$2
12653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12654$as_echo_n "checking for $ac_word... " >&6; }
12655if ${ac_cv_path_WC+:} false; then :
12656  $as_echo_n "(cached) " >&6
12657else
12658  case $WC in
12659  [\\/]* | ?:[\\/]*)
12660  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12661  ;;
12662  *)
12663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12664for as_dir in $PATH
12665do
12666  IFS=$as_save_IFS
12667  test -z "$as_dir" && as_dir=.
12668    for ac_exec_ext in '' $ac_executable_extensions; do
12669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12670    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12672    break 2
12673  fi
12674done
12675  done
12676IFS=$as_save_IFS
12677
12678  ;;
12679esac
12680fi
12681WC=$ac_cv_path_WC
12682if test -n "$WC"; then
12683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12684$as_echo "$WC" >&6; }
12685else
12686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12687$as_echo "no" >&6; }
12688fi
12689
12690
12691  test -n "$WC" && break
12692done
12693
12694    else
12695      # If it succeeded, then it was overridden by the user. We will use it
12696      # for the tool.
12697
12698      # First remove it from the list of overridden variables, so we can test
12699      # for unknown variables in the end.
12700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12701
12702      # Check if we try to supply an empty value
12703      if test "x$WC" = x; then
12704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12705$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12707$as_echo_n "checking for WC... " >&6; }
12708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12709$as_echo "disabled" >&6; }
12710      else
12711        # Check if the provided tool contains a complete path.
12712        tool_specified="$WC"
12713        tool_basename="${tool_specified##*/}"
12714        if test "x$tool_basename" = "x$tool_specified"; then
12715          # A command without a complete path is provided, search $PATH.
12716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12717$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12718          # Extract the first word of "$tool_basename", so it can be a program name with args.
12719set dummy $tool_basename; ac_word=$2
12720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12721$as_echo_n "checking for $ac_word... " >&6; }
12722if ${ac_cv_path_WC+:} false; then :
12723  $as_echo_n "(cached) " >&6
12724else
12725  case $WC in
12726  [\\/]* | ?:[\\/]*)
12727  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12728  ;;
12729  *)
12730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12731for as_dir in $PATH
12732do
12733  IFS=$as_save_IFS
12734  test -z "$as_dir" && as_dir=.
12735    for ac_exec_ext in '' $ac_executable_extensions; do
12736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12737    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12739    break 2
12740  fi
12741done
12742  done
12743IFS=$as_save_IFS
12744
12745  ;;
12746esac
12747fi
12748WC=$ac_cv_path_WC
12749if test -n "$WC"; then
12750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12751$as_echo "$WC" >&6; }
12752else
12753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12754$as_echo "no" >&6; }
12755fi
12756
12757
12758          if test "x$WC" = x; then
12759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12760          fi
12761        else
12762          # Otherwise we believe it is a complete path. Use it as it is.
12763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12764$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12766$as_echo_n "checking for WC... " >&6; }
12767          if test ! -x "$tool_specified"; then
12768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12769$as_echo "not found" >&6; }
12770            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12771          fi
12772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12773$as_echo "$tool_specified" >&6; }
12774        fi
12775      fi
12776    fi
12777
12778  fi
12779
12780
12781
12782  if test "x$WC" = x; then
12783    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12784  fi
12785
12786
12787
12788
12789
12790  # Publish this variable in the help.
12791
12792
12793  if [ -z "${WHICH+x}" ]; then
12794    # The variable is not set by user, try to locate tool using the code snippet
12795    for ac_prog in which
12796do
12797  # Extract the first word of "$ac_prog", so it can be a program name with args.
12798set dummy $ac_prog; ac_word=$2
12799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12800$as_echo_n "checking for $ac_word... " >&6; }
12801if ${ac_cv_path_WHICH+:} false; then :
12802  $as_echo_n "(cached) " >&6
12803else
12804  case $WHICH in
12805  [\\/]* | ?:[\\/]*)
12806  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12807  ;;
12808  *)
12809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12810for as_dir in $PATH
12811do
12812  IFS=$as_save_IFS
12813  test -z "$as_dir" && as_dir=.
12814    for ac_exec_ext in '' $ac_executable_extensions; do
12815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12816    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12818    break 2
12819  fi
12820done
12821  done
12822IFS=$as_save_IFS
12823
12824  ;;
12825esac
12826fi
12827WHICH=$ac_cv_path_WHICH
12828if test -n "$WHICH"; then
12829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12830$as_echo "$WHICH" >&6; }
12831else
12832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12833$as_echo "no" >&6; }
12834fi
12835
12836
12837  test -n "$WHICH" && break
12838done
12839
12840  else
12841    # The variable is set, but is it from the command line or the environment?
12842
12843    # Try to remove the string !WHICH! from our list.
12844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12846      # If it failed, the variable was not from the command line. Ignore it,
12847      # but warn the user (except for BASH, which is always set by the calling BASH).
12848      if test "xWHICH" != xBASH; then
12849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12850$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12851      fi
12852      # Try to locate tool using the code snippet
12853      for ac_prog in which
12854do
12855  # Extract the first word of "$ac_prog", so it can be a program name with args.
12856set dummy $ac_prog; ac_word=$2
12857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12858$as_echo_n "checking for $ac_word... " >&6; }
12859if ${ac_cv_path_WHICH+:} false; then :
12860  $as_echo_n "(cached) " >&6
12861else
12862  case $WHICH in
12863  [\\/]* | ?:[\\/]*)
12864  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12865  ;;
12866  *)
12867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12868for as_dir in $PATH
12869do
12870  IFS=$as_save_IFS
12871  test -z "$as_dir" && as_dir=.
12872    for ac_exec_ext in '' $ac_executable_extensions; do
12873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12874    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12876    break 2
12877  fi
12878done
12879  done
12880IFS=$as_save_IFS
12881
12882  ;;
12883esac
12884fi
12885WHICH=$ac_cv_path_WHICH
12886if test -n "$WHICH"; then
12887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12888$as_echo "$WHICH" >&6; }
12889else
12890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12891$as_echo "no" >&6; }
12892fi
12893
12894
12895  test -n "$WHICH" && break
12896done
12897
12898    else
12899      # If it succeeded, then it was overridden by the user. We will use it
12900      # for the tool.
12901
12902      # First remove it from the list of overridden variables, so we can test
12903      # for unknown variables in the end.
12904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12905
12906      # Check if we try to supply an empty value
12907      if test "x$WHICH" = x; then
12908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12909$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12911$as_echo_n "checking for WHICH... " >&6; }
12912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12913$as_echo "disabled" >&6; }
12914      else
12915        # Check if the provided tool contains a complete path.
12916        tool_specified="$WHICH"
12917        tool_basename="${tool_specified##*/}"
12918        if test "x$tool_basename" = "x$tool_specified"; then
12919          # A command without a complete path is provided, search $PATH.
12920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12921$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12922          # Extract the first word of "$tool_basename", so it can be a program name with args.
12923set dummy $tool_basename; ac_word=$2
12924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12925$as_echo_n "checking for $ac_word... " >&6; }
12926if ${ac_cv_path_WHICH+:} false; then :
12927  $as_echo_n "(cached) " >&6
12928else
12929  case $WHICH in
12930  [\\/]* | ?:[\\/]*)
12931  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12932  ;;
12933  *)
12934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12935for as_dir in $PATH
12936do
12937  IFS=$as_save_IFS
12938  test -z "$as_dir" && as_dir=.
12939    for ac_exec_ext in '' $ac_executable_extensions; do
12940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12941    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12943    break 2
12944  fi
12945done
12946  done
12947IFS=$as_save_IFS
12948
12949  ;;
12950esac
12951fi
12952WHICH=$ac_cv_path_WHICH
12953if test -n "$WHICH"; then
12954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12955$as_echo "$WHICH" >&6; }
12956else
12957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12958$as_echo "no" >&6; }
12959fi
12960
12961
12962          if test "x$WHICH" = x; then
12963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12964          fi
12965        else
12966          # Otherwise we believe it is a complete path. Use it as it is.
12967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12968$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12970$as_echo_n "checking for WHICH... " >&6; }
12971          if test ! -x "$tool_specified"; then
12972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12973$as_echo "not found" >&6; }
12974            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12975          fi
12976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12977$as_echo "$tool_specified" >&6; }
12978        fi
12979      fi
12980    fi
12981
12982  fi
12983
12984
12985
12986  if test "x$WHICH" = x; then
12987    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12988  fi
12989
12990
12991
12992
12993
12994  # Publish this variable in the help.
12995
12996
12997  if [ -z "${XARGS+x}" ]; then
12998    # The variable is not set by user, try to locate tool using the code snippet
12999    for ac_prog in xargs
13000do
13001  # Extract the first word of "$ac_prog", so it can be a program name with args.
13002set dummy $ac_prog; ac_word=$2
13003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13004$as_echo_n "checking for $ac_word... " >&6; }
13005if ${ac_cv_path_XARGS+:} false; then :
13006  $as_echo_n "(cached) " >&6
13007else
13008  case $XARGS in
13009  [\\/]* | ?:[\\/]*)
13010  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13011  ;;
13012  *)
13013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13014for as_dir in $PATH
13015do
13016  IFS=$as_save_IFS
13017  test -z "$as_dir" && as_dir=.
13018    for ac_exec_ext in '' $ac_executable_extensions; do
13019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13020    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13022    break 2
13023  fi
13024done
13025  done
13026IFS=$as_save_IFS
13027
13028  ;;
13029esac
13030fi
13031XARGS=$ac_cv_path_XARGS
13032if test -n "$XARGS"; then
13033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13034$as_echo "$XARGS" >&6; }
13035else
13036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13037$as_echo "no" >&6; }
13038fi
13039
13040
13041  test -n "$XARGS" && break
13042done
13043
13044  else
13045    # The variable is set, but is it from the command line or the environment?
13046
13047    # Try to remove the string !XARGS! from our list.
13048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13050      # If it failed, the variable was not from the command line. Ignore it,
13051      # but warn the user (except for BASH, which is always set by the calling BASH).
13052      if test "xXARGS" != xBASH; then
13053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13054$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13055      fi
13056      # Try to locate tool using the code snippet
13057      for ac_prog in xargs
13058do
13059  # Extract the first word of "$ac_prog", so it can be a program name with args.
13060set dummy $ac_prog; ac_word=$2
13061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13062$as_echo_n "checking for $ac_word... " >&6; }
13063if ${ac_cv_path_XARGS+:} false; then :
13064  $as_echo_n "(cached) " >&6
13065else
13066  case $XARGS in
13067  [\\/]* | ?:[\\/]*)
13068  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13069  ;;
13070  *)
13071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13072for as_dir in $PATH
13073do
13074  IFS=$as_save_IFS
13075  test -z "$as_dir" && as_dir=.
13076    for ac_exec_ext in '' $ac_executable_extensions; do
13077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13078    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13080    break 2
13081  fi
13082done
13083  done
13084IFS=$as_save_IFS
13085
13086  ;;
13087esac
13088fi
13089XARGS=$ac_cv_path_XARGS
13090if test -n "$XARGS"; then
13091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13092$as_echo "$XARGS" >&6; }
13093else
13094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13095$as_echo "no" >&6; }
13096fi
13097
13098
13099  test -n "$XARGS" && break
13100done
13101
13102    else
13103      # If it succeeded, then it was overridden by the user. We will use it
13104      # for the tool.
13105
13106      # First remove it from the list of overridden variables, so we can test
13107      # for unknown variables in the end.
13108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13109
13110      # Check if we try to supply an empty value
13111      if test "x$XARGS" = x; then
13112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13113$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13115$as_echo_n "checking for XARGS... " >&6; }
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13117$as_echo "disabled" >&6; }
13118      else
13119        # Check if the provided tool contains a complete path.
13120        tool_specified="$XARGS"
13121        tool_basename="${tool_specified##*/}"
13122        if test "x$tool_basename" = "x$tool_specified"; then
13123          # A command without a complete path is provided, search $PATH.
13124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13125$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13126          # Extract the first word of "$tool_basename", so it can be a program name with args.
13127set dummy $tool_basename; ac_word=$2
13128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13129$as_echo_n "checking for $ac_word... " >&6; }
13130if ${ac_cv_path_XARGS+:} false; then :
13131  $as_echo_n "(cached) " >&6
13132else
13133  case $XARGS in
13134  [\\/]* | ?:[\\/]*)
13135  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13136  ;;
13137  *)
13138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13139for as_dir in $PATH
13140do
13141  IFS=$as_save_IFS
13142  test -z "$as_dir" && as_dir=.
13143    for ac_exec_ext in '' $ac_executable_extensions; do
13144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13145    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13147    break 2
13148  fi
13149done
13150  done
13151IFS=$as_save_IFS
13152
13153  ;;
13154esac
13155fi
13156XARGS=$ac_cv_path_XARGS
13157if test -n "$XARGS"; then
13158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13159$as_echo "$XARGS" >&6; }
13160else
13161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13162$as_echo "no" >&6; }
13163fi
13164
13165
13166          if test "x$XARGS" = x; then
13167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13168          fi
13169        else
13170          # Otherwise we believe it is a complete path. Use it as it is.
13171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13172$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13174$as_echo_n "checking for XARGS... " >&6; }
13175          if test ! -x "$tool_specified"; then
13176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13177$as_echo "not found" >&6; }
13178            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13179          fi
13180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13181$as_echo "$tool_specified" >&6; }
13182        fi
13183      fi
13184    fi
13185
13186  fi
13187
13188
13189
13190  if test "x$XARGS" = x; then
13191    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13192  fi
13193
13194
13195
13196  # Then required tools that require some special treatment.
13197
13198
13199  # Publish this variable in the help.
13200
13201
13202  if [ -z "${AWK+x}" ]; then
13203    # The variable is not set by user, try to locate tool using the code snippet
13204    for ac_prog in gawk mawk nawk awk
13205do
13206  # Extract the first word of "$ac_prog", so it can be a program name with args.
13207set dummy $ac_prog; ac_word=$2
13208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13209$as_echo_n "checking for $ac_word... " >&6; }
13210if ${ac_cv_prog_AWK+:} false; then :
13211  $as_echo_n "(cached) " >&6
13212else
13213  if test -n "$AWK"; then
13214  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13215else
13216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13217for as_dir in $PATH
13218do
13219  IFS=$as_save_IFS
13220  test -z "$as_dir" && as_dir=.
13221    for ac_exec_ext in '' $ac_executable_extensions; do
13222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13223    ac_cv_prog_AWK="$ac_prog"
13224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13225    break 2
13226  fi
13227done
13228  done
13229IFS=$as_save_IFS
13230
13231fi
13232fi
13233AWK=$ac_cv_prog_AWK
13234if test -n "$AWK"; then
13235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13236$as_echo "$AWK" >&6; }
13237else
13238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13239$as_echo "no" >&6; }
13240fi
13241
13242
13243  test -n "$AWK" && break
13244done
13245
13246  else
13247    # The variable is set, but is it from the command line or the environment?
13248
13249    # Try to remove the string !AWK! from our list.
13250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13252      # If it failed, the variable was not from the command line. Ignore it,
13253      # but warn the user (except for BASH, which is always set by the calling BASH).
13254      if test "xAWK" != xBASH; then
13255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13256$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13257      fi
13258      # Try to locate tool using the code snippet
13259      for ac_prog in gawk mawk nawk awk
13260do
13261  # Extract the first word of "$ac_prog", so it can be a program name with args.
13262set dummy $ac_prog; ac_word=$2
13263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13264$as_echo_n "checking for $ac_word... " >&6; }
13265if ${ac_cv_prog_AWK+:} false; then :
13266  $as_echo_n "(cached) " >&6
13267else
13268  if test -n "$AWK"; then
13269  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13270else
13271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13272for as_dir in $PATH
13273do
13274  IFS=$as_save_IFS
13275  test -z "$as_dir" && as_dir=.
13276    for ac_exec_ext in '' $ac_executable_extensions; do
13277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13278    ac_cv_prog_AWK="$ac_prog"
13279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13280    break 2
13281  fi
13282done
13283  done
13284IFS=$as_save_IFS
13285
13286fi
13287fi
13288AWK=$ac_cv_prog_AWK
13289if test -n "$AWK"; then
13290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13291$as_echo "$AWK" >&6; }
13292else
13293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13294$as_echo "no" >&6; }
13295fi
13296
13297
13298  test -n "$AWK" && break
13299done
13300
13301    else
13302      # If it succeeded, then it was overridden by the user. We will use it
13303      # for the tool.
13304
13305      # First remove it from the list of overridden variables, so we can test
13306      # for unknown variables in the end.
13307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13308
13309      # Check if we try to supply an empty value
13310      if test "x$AWK" = x; then
13311        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13312$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13314$as_echo_n "checking for AWK... " >&6; }
13315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13316$as_echo "disabled" >&6; }
13317      else
13318        # Check if the provided tool contains a complete path.
13319        tool_specified="$AWK"
13320        tool_basename="${tool_specified##*/}"
13321        if test "x$tool_basename" = "x$tool_specified"; then
13322          # A command without a complete path is provided, search $PATH.
13323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13324$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13325          # Extract the first word of "$tool_basename", so it can be a program name with args.
13326set dummy $tool_basename; ac_word=$2
13327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13328$as_echo_n "checking for $ac_word... " >&6; }
13329if ${ac_cv_path_AWK+:} false; then :
13330  $as_echo_n "(cached) " >&6
13331else
13332  case $AWK in
13333  [\\/]* | ?:[\\/]*)
13334  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13335  ;;
13336  *)
13337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13338for as_dir in $PATH
13339do
13340  IFS=$as_save_IFS
13341  test -z "$as_dir" && as_dir=.
13342    for ac_exec_ext in '' $ac_executable_extensions; do
13343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13344    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13346    break 2
13347  fi
13348done
13349  done
13350IFS=$as_save_IFS
13351
13352  ;;
13353esac
13354fi
13355AWK=$ac_cv_path_AWK
13356if test -n "$AWK"; then
13357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13358$as_echo "$AWK" >&6; }
13359else
13360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13361$as_echo "no" >&6; }
13362fi
13363
13364
13365          if test "x$AWK" = x; then
13366            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13367          fi
13368        else
13369          # Otherwise we believe it is a complete path. Use it as it is.
13370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13371$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13372          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13373$as_echo_n "checking for AWK... " >&6; }
13374          if test ! -x "$tool_specified"; then
13375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13376$as_echo "not found" >&6; }
13377            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13378          fi
13379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13380$as_echo "$tool_specified" >&6; }
13381        fi
13382      fi
13383    fi
13384
13385  fi
13386
13387
13388  if test "x$AWK" = x; then
13389    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13390  fi
13391
13392
13393
13394
13395  # Publish this variable in the help.
13396
13397
13398  if [ -z "${GREP+x}" ]; then
13399    # The variable is not set by user, try to locate tool using the code snippet
13400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13401$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13402if ${ac_cv_path_GREP+:} false; then :
13403  $as_echo_n "(cached) " >&6
13404else
13405  if test -z "$GREP"; then
13406  ac_path_GREP_found=false
13407  # Loop through the user's path and test for each of PROGNAME-LIST
13408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13409for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13410do
13411  IFS=$as_save_IFS
13412  test -z "$as_dir" && as_dir=.
13413    for ac_prog in grep ggrep; do
13414    for ac_exec_ext in '' $ac_executable_extensions; do
13415      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13416      as_fn_executable_p "$ac_path_GREP" || continue
13417# Check for GNU ac_path_GREP and select it if it is found.
13418  # Check for GNU $ac_path_GREP
13419case `"$ac_path_GREP" --version 2>&1` in
13420*GNU*)
13421  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13422*)
13423  ac_count=0
13424  $as_echo_n 0123456789 >"conftest.in"
13425  while :
13426  do
13427    cat "conftest.in" "conftest.in" >"conftest.tmp"
13428    mv "conftest.tmp" "conftest.in"
13429    cp "conftest.in" "conftest.nl"
13430    $as_echo 'GREP' >> "conftest.nl"
13431    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13432    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13433    as_fn_arith $ac_count + 1 && ac_count=$as_val
13434    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13435      # Best one so far, save it but keep looking for a better one
13436      ac_cv_path_GREP="$ac_path_GREP"
13437      ac_path_GREP_max=$ac_count
13438    fi
13439    # 10*(2^10) chars as input seems more than enough
13440    test $ac_count -gt 10 && break
13441  done
13442  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13443esac
13444
13445      $ac_path_GREP_found && break 3
13446    done
13447  done
13448  done
13449IFS=$as_save_IFS
13450  if test -z "$ac_cv_path_GREP"; then
13451    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13452  fi
13453else
13454  ac_cv_path_GREP=$GREP
13455fi
13456
13457fi
13458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13459$as_echo "$ac_cv_path_GREP" >&6; }
13460 GREP="$ac_cv_path_GREP"
13461
13462
13463  else
13464    # The variable is set, but is it from the command line or the environment?
13465
13466    # Try to remove the string !GREP! from our list.
13467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13469      # If it failed, the variable was not from the command line. Ignore it,
13470      # but warn the user (except for BASH, which is always set by the calling BASH).
13471      if test "xGREP" != xBASH; then
13472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13473$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13474      fi
13475      # Try to locate tool using the code snippet
13476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13477$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13478if ${ac_cv_path_GREP+:} false; then :
13479  $as_echo_n "(cached) " >&6
13480else
13481  if test -z "$GREP"; then
13482  ac_path_GREP_found=false
13483  # Loop through the user's path and test for each of PROGNAME-LIST
13484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13485for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13486do
13487  IFS=$as_save_IFS
13488  test -z "$as_dir" && as_dir=.
13489    for ac_prog in grep ggrep; do
13490    for ac_exec_ext in '' $ac_executable_extensions; do
13491      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13492      as_fn_executable_p "$ac_path_GREP" || continue
13493# Check for GNU ac_path_GREP and select it if it is found.
13494  # Check for GNU $ac_path_GREP
13495case `"$ac_path_GREP" --version 2>&1` in
13496*GNU*)
13497  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13498*)
13499  ac_count=0
13500  $as_echo_n 0123456789 >"conftest.in"
13501  while :
13502  do
13503    cat "conftest.in" "conftest.in" >"conftest.tmp"
13504    mv "conftest.tmp" "conftest.in"
13505    cp "conftest.in" "conftest.nl"
13506    $as_echo 'GREP' >> "conftest.nl"
13507    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13508    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13509    as_fn_arith $ac_count + 1 && ac_count=$as_val
13510    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13511      # Best one so far, save it but keep looking for a better one
13512      ac_cv_path_GREP="$ac_path_GREP"
13513      ac_path_GREP_max=$ac_count
13514    fi
13515    # 10*(2^10) chars as input seems more than enough
13516    test $ac_count -gt 10 && break
13517  done
13518  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13519esac
13520
13521      $ac_path_GREP_found && break 3
13522    done
13523  done
13524  done
13525IFS=$as_save_IFS
13526  if test -z "$ac_cv_path_GREP"; then
13527    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13528  fi
13529else
13530  ac_cv_path_GREP=$GREP
13531fi
13532
13533fi
13534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13535$as_echo "$ac_cv_path_GREP" >&6; }
13536 GREP="$ac_cv_path_GREP"
13537
13538
13539    else
13540      # If it succeeded, then it was overridden by the user. We will use it
13541      # for the tool.
13542
13543      # First remove it from the list of overridden variables, so we can test
13544      # for unknown variables in the end.
13545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13546
13547      # Check if we try to supply an empty value
13548      if test "x$GREP" = x; then
13549        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13550$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13552$as_echo_n "checking for GREP... " >&6; }
13553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13554$as_echo "disabled" >&6; }
13555      else
13556        # Check if the provided tool contains a complete path.
13557        tool_specified="$GREP"
13558        tool_basename="${tool_specified##*/}"
13559        if test "x$tool_basename" = "x$tool_specified"; then
13560          # A command without a complete path is provided, search $PATH.
13561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13562$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13563          # Extract the first word of "$tool_basename", so it can be a program name with args.
13564set dummy $tool_basename; ac_word=$2
13565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13566$as_echo_n "checking for $ac_word... " >&6; }
13567if ${ac_cv_path_GREP+:} false; then :
13568  $as_echo_n "(cached) " >&6
13569else
13570  case $GREP in
13571  [\\/]* | ?:[\\/]*)
13572  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13573  ;;
13574  *)
13575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13576for as_dir in $PATH
13577do
13578  IFS=$as_save_IFS
13579  test -z "$as_dir" && as_dir=.
13580    for ac_exec_ext in '' $ac_executable_extensions; do
13581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13582    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13584    break 2
13585  fi
13586done
13587  done
13588IFS=$as_save_IFS
13589
13590  ;;
13591esac
13592fi
13593GREP=$ac_cv_path_GREP
13594if test -n "$GREP"; then
13595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13596$as_echo "$GREP" >&6; }
13597else
13598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13599$as_echo "no" >&6; }
13600fi
13601
13602
13603          if test "x$GREP" = x; then
13604            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13605          fi
13606        else
13607          # Otherwise we believe it is a complete path. Use it as it is.
13608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13609$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13610          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13611$as_echo_n "checking for GREP... " >&6; }
13612          if test ! -x "$tool_specified"; then
13613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13614$as_echo "not found" >&6; }
13615            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13616          fi
13617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13618$as_echo "$tool_specified" >&6; }
13619        fi
13620      fi
13621    fi
13622
13623  fi
13624
13625
13626  if test "x$GREP" = x; then
13627    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13628  fi
13629
13630
13631
13632
13633  # Publish this variable in the help.
13634
13635
13636  if [ -z "${EGREP+x}" ]; then
13637    # The variable is not set by user, try to locate tool using the code snippet
13638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13639$as_echo_n "checking for egrep... " >&6; }
13640if ${ac_cv_path_EGREP+:} false; then :
13641  $as_echo_n "(cached) " >&6
13642else
13643  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13644   then ac_cv_path_EGREP="$GREP -E"
13645   else
13646     if test -z "$EGREP"; then
13647  ac_path_EGREP_found=false
13648  # Loop through the user's path and test for each of PROGNAME-LIST
13649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13650for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13651do
13652  IFS=$as_save_IFS
13653  test -z "$as_dir" && as_dir=.
13654    for ac_prog in egrep; do
13655    for ac_exec_ext in '' $ac_executable_extensions; do
13656      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13657      as_fn_executable_p "$ac_path_EGREP" || continue
13658# Check for GNU ac_path_EGREP and select it if it is found.
13659  # Check for GNU $ac_path_EGREP
13660case `"$ac_path_EGREP" --version 2>&1` in
13661*GNU*)
13662  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13663*)
13664  ac_count=0
13665  $as_echo_n 0123456789 >"conftest.in"
13666  while :
13667  do
13668    cat "conftest.in" "conftest.in" >"conftest.tmp"
13669    mv "conftest.tmp" "conftest.in"
13670    cp "conftest.in" "conftest.nl"
13671    $as_echo 'EGREP' >> "conftest.nl"
13672    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13673    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13674    as_fn_arith $ac_count + 1 && ac_count=$as_val
13675    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13676      # Best one so far, save it but keep looking for a better one
13677      ac_cv_path_EGREP="$ac_path_EGREP"
13678      ac_path_EGREP_max=$ac_count
13679    fi
13680    # 10*(2^10) chars as input seems more than enough
13681    test $ac_count -gt 10 && break
13682  done
13683  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13684esac
13685
13686      $ac_path_EGREP_found && break 3
13687    done
13688  done
13689  done
13690IFS=$as_save_IFS
13691  if test -z "$ac_cv_path_EGREP"; then
13692    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13693  fi
13694else
13695  ac_cv_path_EGREP=$EGREP
13696fi
13697
13698   fi
13699fi
13700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13701$as_echo "$ac_cv_path_EGREP" >&6; }
13702 EGREP="$ac_cv_path_EGREP"
13703
13704
13705  else
13706    # The variable is set, but is it from the command line or the environment?
13707
13708    # Try to remove the string !EGREP! from our list.
13709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13711      # If it failed, the variable was not from the command line. Ignore it,
13712      # but warn the user (except for BASH, which is always set by the calling BASH).
13713      if test "xEGREP" != xBASH; then
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13715$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13716      fi
13717      # Try to locate tool using the code snippet
13718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13719$as_echo_n "checking for egrep... " >&6; }
13720if ${ac_cv_path_EGREP+:} false; then :
13721  $as_echo_n "(cached) " >&6
13722else
13723  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13724   then ac_cv_path_EGREP="$GREP -E"
13725   else
13726     if test -z "$EGREP"; then
13727  ac_path_EGREP_found=false
13728  # Loop through the user's path and test for each of PROGNAME-LIST
13729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13730for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13731do
13732  IFS=$as_save_IFS
13733  test -z "$as_dir" && as_dir=.
13734    for ac_prog in egrep; do
13735    for ac_exec_ext in '' $ac_executable_extensions; do
13736      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13737      as_fn_executable_p "$ac_path_EGREP" || continue
13738# Check for GNU ac_path_EGREP and select it if it is found.
13739  # Check for GNU $ac_path_EGREP
13740case `"$ac_path_EGREP" --version 2>&1` in
13741*GNU*)
13742  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13743*)
13744  ac_count=0
13745  $as_echo_n 0123456789 >"conftest.in"
13746  while :
13747  do
13748    cat "conftest.in" "conftest.in" >"conftest.tmp"
13749    mv "conftest.tmp" "conftest.in"
13750    cp "conftest.in" "conftest.nl"
13751    $as_echo 'EGREP' >> "conftest.nl"
13752    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13753    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13754    as_fn_arith $ac_count + 1 && ac_count=$as_val
13755    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13756      # Best one so far, save it but keep looking for a better one
13757      ac_cv_path_EGREP="$ac_path_EGREP"
13758      ac_path_EGREP_max=$ac_count
13759    fi
13760    # 10*(2^10) chars as input seems more than enough
13761    test $ac_count -gt 10 && break
13762  done
13763  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13764esac
13765
13766      $ac_path_EGREP_found && break 3
13767    done
13768  done
13769  done
13770IFS=$as_save_IFS
13771  if test -z "$ac_cv_path_EGREP"; then
13772    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13773  fi
13774else
13775  ac_cv_path_EGREP=$EGREP
13776fi
13777
13778   fi
13779fi
13780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13781$as_echo "$ac_cv_path_EGREP" >&6; }
13782 EGREP="$ac_cv_path_EGREP"
13783
13784
13785    else
13786      # If it succeeded, then it was overridden by the user. We will use it
13787      # for the tool.
13788
13789      # First remove it from the list of overridden variables, so we can test
13790      # for unknown variables in the end.
13791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13792
13793      # Check if we try to supply an empty value
13794      if test "x$EGREP" = x; then
13795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13796$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13798$as_echo_n "checking for EGREP... " >&6; }
13799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13800$as_echo "disabled" >&6; }
13801      else
13802        # Check if the provided tool contains a complete path.
13803        tool_specified="$EGREP"
13804        tool_basename="${tool_specified##*/}"
13805        if test "x$tool_basename" = "x$tool_specified"; then
13806          # A command without a complete path is provided, search $PATH.
13807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13808$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13809          # Extract the first word of "$tool_basename", so it can be a program name with args.
13810set dummy $tool_basename; ac_word=$2
13811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13812$as_echo_n "checking for $ac_word... " >&6; }
13813if ${ac_cv_path_EGREP+:} false; then :
13814  $as_echo_n "(cached) " >&6
13815else
13816  case $EGREP in
13817  [\\/]* | ?:[\\/]*)
13818  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13819  ;;
13820  *)
13821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13822for as_dir in $PATH
13823do
13824  IFS=$as_save_IFS
13825  test -z "$as_dir" && as_dir=.
13826    for ac_exec_ext in '' $ac_executable_extensions; do
13827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13828    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13830    break 2
13831  fi
13832done
13833  done
13834IFS=$as_save_IFS
13835
13836  ;;
13837esac
13838fi
13839EGREP=$ac_cv_path_EGREP
13840if test -n "$EGREP"; then
13841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13842$as_echo "$EGREP" >&6; }
13843else
13844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13845$as_echo "no" >&6; }
13846fi
13847
13848
13849          if test "x$EGREP" = x; then
13850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13851          fi
13852        else
13853          # Otherwise we believe it is a complete path. Use it as it is.
13854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13855$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13857$as_echo_n "checking for EGREP... " >&6; }
13858          if test ! -x "$tool_specified"; then
13859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13860$as_echo "not found" >&6; }
13861            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13862          fi
13863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13864$as_echo "$tool_specified" >&6; }
13865        fi
13866      fi
13867    fi
13868
13869  fi
13870
13871
13872  if test "x$EGREP" = x; then
13873    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13874  fi
13875
13876
13877
13878
13879  # Publish this variable in the help.
13880
13881
13882  if [ -z "${FGREP+x}" ]; then
13883    # The variable is not set by user, try to locate tool using the code snippet
13884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13885$as_echo_n "checking for fgrep... " >&6; }
13886if ${ac_cv_path_FGREP+:} false; then :
13887  $as_echo_n "(cached) " >&6
13888else
13889  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13890   then ac_cv_path_FGREP="$GREP -F"
13891   else
13892     if test -z "$FGREP"; then
13893  ac_path_FGREP_found=false
13894  # Loop through the user's path and test for each of PROGNAME-LIST
13895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13896for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13897do
13898  IFS=$as_save_IFS
13899  test -z "$as_dir" && as_dir=.
13900    for ac_prog in fgrep; do
13901    for ac_exec_ext in '' $ac_executable_extensions; do
13902      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13903      as_fn_executable_p "$ac_path_FGREP" || continue
13904# Check for GNU ac_path_FGREP and select it if it is found.
13905  # Check for GNU $ac_path_FGREP
13906case `"$ac_path_FGREP" --version 2>&1` in
13907*GNU*)
13908  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13909*)
13910  ac_count=0
13911  $as_echo_n 0123456789 >"conftest.in"
13912  while :
13913  do
13914    cat "conftest.in" "conftest.in" >"conftest.tmp"
13915    mv "conftest.tmp" "conftest.in"
13916    cp "conftest.in" "conftest.nl"
13917    $as_echo 'FGREP' >> "conftest.nl"
13918    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13919    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13920    as_fn_arith $ac_count + 1 && ac_count=$as_val
13921    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13922      # Best one so far, save it but keep looking for a better one
13923      ac_cv_path_FGREP="$ac_path_FGREP"
13924      ac_path_FGREP_max=$ac_count
13925    fi
13926    # 10*(2^10) chars as input seems more than enough
13927    test $ac_count -gt 10 && break
13928  done
13929  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13930esac
13931
13932      $ac_path_FGREP_found && break 3
13933    done
13934  done
13935  done
13936IFS=$as_save_IFS
13937  if test -z "$ac_cv_path_FGREP"; then
13938    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13939  fi
13940else
13941  ac_cv_path_FGREP=$FGREP
13942fi
13943
13944   fi
13945fi
13946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13947$as_echo "$ac_cv_path_FGREP" >&6; }
13948 FGREP="$ac_cv_path_FGREP"
13949
13950
13951  else
13952    # The variable is set, but is it from the command line or the environment?
13953
13954    # Try to remove the string !FGREP! from our list.
13955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13957      # If it failed, the variable was not from the command line. Ignore it,
13958      # but warn the user (except for BASH, which is always set by the calling BASH).
13959      if test "xFGREP" != xBASH; then
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13961$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13962      fi
13963      # Try to locate tool using the code snippet
13964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13965$as_echo_n "checking for fgrep... " >&6; }
13966if ${ac_cv_path_FGREP+:} false; then :
13967  $as_echo_n "(cached) " >&6
13968else
13969  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13970   then ac_cv_path_FGREP="$GREP -F"
13971   else
13972     if test -z "$FGREP"; then
13973  ac_path_FGREP_found=false
13974  # Loop through the user's path and test for each of PROGNAME-LIST
13975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13976for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13977do
13978  IFS=$as_save_IFS
13979  test -z "$as_dir" && as_dir=.
13980    for ac_prog in fgrep; do
13981    for ac_exec_ext in '' $ac_executable_extensions; do
13982      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13983      as_fn_executable_p "$ac_path_FGREP" || continue
13984# Check for GNU ac_path_FGREP and select it if it is found.
13985  # Check for GNU $ac_path_FGREP
13986case `"$ac_path_FGREP" --version 2>&1` in
13987*GNU*)
13988  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13989*)
13990  ac_count=0
13991  $as_echo_n 0123456789 >"conftest.in"
13992  while :
13993  do
13994    cat "conftest.in" "conftest.in" >"conftest.tmp"
13995    mv "conftest.tmp" "conftest.in"
13996    cp "conftest.in" "conftest.nl"
13997    $as_echo 'FGREP' >> "conftest.nl"
13998    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13999    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14000    as_fn_arith $ac_count + 1 && ac_count=$as_val
14001    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14002      # Best one so far, save it but keep looking for a better one
14003      ac_cv_path_FGREP="$ac_path_FGREP"
14004      ac_path_FGREP_max=$ac_count
14005    fi
14006    # 10*(2^10) chars as input seems more than enough
14007    test $ac_count -gt 10 && break
14008  done
14009  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14010esac
14011
14012      $ac_path_FGREP_found && break 3
14013    done
14014  done
14015  done
14016IFS=$as_save_IFS
14017  if test -z "$ac_cv_path_FGREP"; then
14018    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14019  fi
14020else
14021  ac_cv_path_FGREP=$FGREP
14022fi
14023
14024   fi
14025fi
14026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14027$as_echo "$ac_cv_path_FGREP" >&6; }
14028 FGREP="$ac_cv_path_FGREP"
14029
14030
14031    else
14032      # If it succeeded, then it was overridden by the user. We will use it
14033      # for the tool.
14034
14035      # First remove it from the list of overridden variables, so we can test
14036      # for unknown variables in the end.
14037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14038
14039      # Check if we try to supply an empty value
14040      if test "x$FGREP" = x; then
14041        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14042$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14044$as_echo_n "checking for FGREP... " >&6; }
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14046$as_echo "disabled" >&6; }
14047      else
14048        # Check if the provided tool contains a complete path.
14049        tool_specified="$FGREP"
14050        tool_basename="${tool_specified##*/}"
14051        if test "x$tool_basename" = "x$tool_specified"; then
14052          # A command without a complete path is provided, search $PATH.
14053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14054$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14055          # Extract the first word of "$tool_basename", so it can be a program name with args.
14056set dummy $tool_basename; ac_word=$2
14057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14058$as_echo_n "checking for $ac_word... " >&6; }
14059if ${ac_cv_path_FGREP+:} false; then :
14060  $as_echo_n "(cached) " >&6
14061else
14062  case $FGREP in
14063  [\\/]* | ?:[\\/]*)
14064  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14065  ;;
14066  *)
14067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14068for as_dir in $PATH
14069do
14070  IFS=$as_save_IFS
14071  test -z "$as_dir" && as_dir=.
14072    for ac_exec_ext in '' $ac_executable_extensions; do
14073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14074    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14076    break 2
14077  fi
14078done
14079  done
14080IFS=$as_save_IFS
14081
14082  ;;
14083esac
14084fi
14085FGREP=$ac_cv_path_FGREP
14086if test -n "$FGREP"; then
14087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14088$as_echo "$FGREP" >&6; }
14089else
14090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14091$as_echo "no" >&6; }
14092fi
14093
14094
14095          if test "x$FGREP" = x; then
14096            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14097          fi
14098        else
14099          # Otherwise we believe it is a complete path. Use it as it is.
14100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14101$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14102          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14103$as_echo_n "checking for FGREP... " >&6; }
14104          if test ! -x "$tool_specified"; then
14105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14106$as_echo "not found" >&6; }
14107            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14108          fi
14109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14110$as_echo "$tool_specified" >&6; }
14111        fi
14112      fi
14113    fi
14114
14115  fi
14116
14117
14118  if test "x$FGREP" = x; then
14119    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14120  fi
14121
14122
14123
14124
14125  # Publish this variable in the help.
14126
14127
14128  if [ -z "${SED+x}" ]; then
14129    # The variable is not set by user, try to locate tool using the code snippet
14130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14131$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14132if ${ac_cv_path_SED+:} false; then :
14133  $as_echo_n "(cached) " >&6
14134else
14135            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14136     for ac_i in 1 2 3 4 5 6 7; do
14137       ac_script="$ac_script$as_nl$ac_script"
14138     done
14139     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14140     { ac_script=; unset ac_script;}
14141     if test -z "$SED"; then
14142  ac_path_SED_found=false
14143  # Loop through the user's path and test for each of PROGNAME-LIST
14144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14145for as_dir in $PATH
14146do
14147  IFS=$as_save_IFS
14148  test -z "$as_dir" && as_dir=.
14149    for ac_prog in sed gsed; do
14150    for ac_exec_ext in '' $ac_executable_extensions; do
14151      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14152      as_fn_executable_p "$ac_path_SED" || continue
14153# Check for GNU ac_path_SED and select it if it is found.
14154  # Check for GNU $ac_path_SED
14155case `"$ac_path_SED" --version 2>&1` in
14156*GNU*)
14157  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14158*)
14159  ac_count=0
14160  $as_echo_n 0123456789 >"conftest.in"
14161  while :
14162  do
14163    cat "conftest.in" "conftest.in" >"conftest.tmp"
14164    mv "conftest.tmp" "conftest.in"
14165    cp "conftest.in" "conftest.nl"
14166    $as_echo '' >> "conftest.nl"
14167    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14168    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14169    as_fn_arith $ac_count + 1 && ac_count=$as_val
14170    if test $ac_count -gt ${ac_path_SED_max-0}; then
14171      # Best one so far, save it but keep looking for a better one
14172      ac_cv_path_SED="$ac_path_SED"
14173      ac_path_SED_max=$ac_count
14174    fi
14175    # 10*(2^10) chars as input seems more than enough
14176    test $ac_count -gt 10 && break
14177  done
14178  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14179esac
14180
14181      $ac_path_SED_found && break 3
14182    done
14183  done
14184  done
14185IFS=$as_save_IFS
14186  if test -z "$ac_cv_path_SED"; then
14187    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14188  fi
14189else
14190  ac_cv_path_SED=$SED
14191fi
14192
14193fi
14194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14195$as_echo "$ac_cv_path_SED" >&6; }
14196 SED="$ac_cv_path_SED"
14197  rm -f conftest.sed
14198
14199  else
14200    # The variable is set, but is it from the command line or the environment?
14201
14202    # Try to remove the string !SED! from our list.
14203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14205      # If it failed, the variable was not from the command line. Ignore it,
14206      # but warn the user (except for BASH, which is always set by the calling BASH).
14207      if test "xSED" != xBASH; then
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14209$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14210      fi
14211      # Try to locate tool using the code snippet
14212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14213$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14214if ${ac_cv_path_SED+:} false; then :
14215  $as_echo_n "(cached) " >&6
14216else
14217            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14218     for ac_i in 1 2 3 4 5 6 7; do
14219       ac_script="$ac_script$as_nl$ac_script"
14220     done
14221     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14222     { ac_script=; unset ac_script;}
14223     if test -z "$SED"; then
14224  ac_path_SED_found=false
14225  # Loop through the user's path and test for each of PROGNAME-LIST
14226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14227for as_dir in $PATH
14228do
14229  IFS=$as_save_IFS
14230  test -z "$as_dir" && as_dir=.
14231    for ac_prog in sed gsed; do
14232    for ac_exec_ext in '' $ac_executable_extensions; do
14233      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14234      as_fn_executable_p "$ac_path_SED" || continue
14235# Check for GNU ac_path_SED and select it if it is found.
14236  # Check for GNU $ac_path_SED
14237case `"$ac_path_SED" --version 2>&1` in
14238*GNU*)
14239  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14240*)
14241  ac_count=0
14242  $as_echo_n 0123456789 >"conftest.in"
14243  while :
14244  do
14245    cat "conftest.in" "conftest.in" >"conftest.tmp"
14246    mv "conftest.tmp" "conftest.in"
14247    cp "conftest.in" "conftest.nl"
14248    $as_echo '' >> "conftest.nl"
14249    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14250    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14251    as_fn_arith $ac_count + 1 && ac_count=$as_val
14252    if test $ac_count -gt ${ac_path_SED_max-0}; then
14253      # Best one so far, save it but keep looking for a better one
14254      ac_cv_path_SED="$ac_path_SED"
14255      ac_path_SED_max=$ac_count
14256    fi
14257    # 10*(2^10) chars as input seems more than enough
14258    test $ac_count -gt 10 && break
14259  done
14260  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14261esac
14262
14263      $ac_path_SED_found && break 3
14264    done
14265  done
14266  done
14267IFS=$as_save_IFS
14268  if test -z "$ac_cv_path_SED"; then
14269    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14270  fi
14271else
14272  ac_cv_path_SED=$SED
14273fi
14274
14275fi
14276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14277$as_echo "$ac_cv_path_SED" >&6; }
14278 SED="$ac_cv_path_SED"
14279  rm -f conftest.sed
14280
14281    else
14282      # If it succeeded, then it was overridden by the user. We will use it
14283      # for the tool.
14284
14285      # First remove it from the list of overridden variables, so we can test
14286      # for unknown variables in the end.
14287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14288
14289      # Check if we try to supply an empty value
14290      if test "x$SED" = x; then
14291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14292$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14294$as_echo_n "checking for SED... " >&6; }
14295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14296$as_echo "disabled" >&6; }
14297      else
14298        # Check if the provided tool contains a complete path.
14299        tool_specified="$SED"
14300        tool_basename="${tool_specified##*/}"
14301        if test "x$tool_basename" = "x$tool_specified"; then
14302          # A command without a complete path is provided, search $PATH.
14303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14304$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14305          # Extract the first word of "$tool_basename", so it can be a program name with args.
14306set dummy $tool_basename; ac_word=$2
14307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14308$as_echo_n "checking for $ac_word... " >&6; }
14309if ${ac_cv_path_SED+:} false; then :
14310  $as_echo_n "(cached) " >&6
14311else
14312  case $SED in
14313  [\\/]* | ?:[\\/]*)
14314  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14315  ;;
14316  *)
14317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14318for as_dir in $PATH
14319do
14320  IFS=$as_save_IFS
14321  test -z "$as_dir" && as_dir=.
14322    for ac_exec_ext in '' $ac_executable_extensions; do
14323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14324    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14326    break 2
14327  fi
14328done
14329  done
14330IFS=$as_save_IFS
14331
14332  ;;
14333esac
14334fi
14335SED=$ac_cv_path_SED
14336if test -n "$SED"; then
14337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14338$as_echo "$SED" >&6; }
14339else
14340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14341$as_echo "no" >&6; }
14342fi
14343
14344
14345          if test "x$SED" = x; then
14346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14347          fi
14348        else
14349          # Otherwise we believe it is a complete path. Use it as it is.
14350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14351$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14353$as_echo_n "checking for SED... " >&6; }
14354          if test ! -x "$tool_specified"; then
14355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14356$as_echo "not found" >&6; }
14357            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14358          fi
14359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14360$as_echo "$tool_specified" >&6; }
14361        fi
14362      fi
14363    fi
14364
14365  fi
14366
14367
14368  if test "x$SED" = x; then
14369    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14370  fi
14371
14372
14373
14374  # Always force rm.
14375  RM="$RM -f"
14376
14377  # pwd behaves differently on various platforms and some don't support the -L flag.
14378  # Always use the bash builtin pwd to get uniform behavior.
14379  THEPWDCMD=pwd
14380
14381  # These are not required on all platforms
14382
14383
14384  # Publish this variable in the help.
14385
14386
14387  if [ -z "${CYGPATH+x}" ]; then
14388    # The variable is not set by user, try to locate tool using the code snippet
14389    for ac_prog in cygpath
14390do
14391  # Extract the first word of "$ac_prog", so it can be a program name with args.
14392set dummy $ac_prog; ac_word=$2
14393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14394$as_echo_n "checking for $ac_word... " >&6; }
14395if ${ac_cv_path_CYGPATH+:} false; then :
14396  $as_echo_n "(cached) " >&6
14397else
14398  case $CYGPATH in
14399  [\\/]* | ?:[\\/]*)
14400  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14401  ;;
14402  *)
14403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14404for as_dir in $PATH
14405do
14406  IFS=$as_save_IFS
14407  test -z "$as_dir" && as_dir=.
14408    for ac_exec_ext in '' $ac_executable_extensions; do
14409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14410    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14412    break 2
14413  fi
14414done
14415  done
14416IFS=$as_save_IFS
14417
14418  ;;
14419esac
14420fi
14421CYGPATH=$ac_cv_path_CYGPATH
14422if test -n "$CYGPATH"; then
14423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14424$as_echo "$CYGPATH" >&6; }
14425else
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14427$as_echo "no" >&6; }
14428fi
14429
14430
14431  test -n "$CYGPATH" && break
14432done
14433
14434  else
14435    # The variable is set, but is it from the command line or the environment?
14436
14437    # Try to remove the string !CYGPATH! from our list.
14438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14440      # If it failed, the variable was not from the command line. Ignore it,
14441      # but warn the user (except for BASH, which is always set by the calling BASH).
14442      if test "xCYGPATH" != xBASH; then
14443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14444$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14445      fi
14446      # Try to locate tool using the code snippet
14447      for ac_prog in cygpath
14448do
14449  # Extract the first word of "$ac_prog", so it can be a program name with args.
14450set dummy $ac_prog; ac_word=$2
14451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14452$as_echo_n "checking for $ac_word... " >&6; }
14453if ${ac_cv_path_CYGPATH+:} false; then :
14454  $as_echo_n "(cached) " >&6
14455else
14456  case $CYGPATH in
14457  [\\/]* | ?:[\\/]*)
14458  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14459  ;;
14460  *)
14461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14462for as_dir in $PATH
14463do
14464  IFS=$as_save_IFS
14465  test -z "$as_dir" && as_dir=.
14466    for ac_exec_ext in '' $ac_executable_extensions; do
14467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14468    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14470    break 2
14471  fi
14472done
14473  done
14474IFS=$as_save_IFS
14475
14476  ;;
14477esac
14478fi
14479CYGPATH=$ac_cv_path_CYGPATH
14480if test -n "$CYGPATH"; then
14481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14482$as_echo "$CYGPATH" >&6; }
14483else
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14485$as_echo "no" >&6; }
14486fi
14487
14488
14489  test -n "$CYGPATH" && break
14490done
14491
14492    else
14493      # If it succeeded, then it was overridden by the user. We will use it
14494      # for the tool.
14495
14496      # First remove it from the list of overridden variables, so we can test
14497      # for unknown variables in the end.
14498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14499
14500      # Check if we try to supply an empty value
14501      if test "x$CYGPATH" = x; then
14502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14503$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14505$as_echo_n "checking for CYGPATH... " >&6; }
14506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14507$as_echo "disabled" >&6; }
14508      else
14509        # Check if the provided tool contains a complete path.
14510        tool_specified="$CYGPATH"
14511        tool_basename="${tool_specified##*/}"
14512        if test "x$tool_basename" = "x$tool_specified"; then
14513          # A command without a complete path is provided, search $PATH.
14514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14515$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14516          # Extract the first word of "$tool_basename", so it can be a program name with args.
14517set dummy $tool_basename; ac_word=$2
14518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14519$as_echo_n "checking for $ac_word... " >&6; }
14520if ${ac_cv_path_CYGPATH+:} false; then :
14521  $as_echo_n "(cached) " >&6
14522else
14523  case $CYGPATH in
14524  [\\/]* | ?:[\\/]*)
14525  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14526  ;;
14527  *)
14528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14529for as_dir in $PATH
14530do
14531  IFS=$as_save_IFS
14532  test -z "$as_dir" && as_dir=.
14533    for ac_exec_ext in '' $ac_executable_extensions; do
14534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14535    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14537    break 2
14538  fi
14539done
14540  done
14541IFS=$as_save_IFS
14542
14543  ;;
14544esac
14545fi
14546CYGPATH=$ac_cv_path_CYGPATH
14547if test -n "$CYGPATH"; then
14548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14549$as_echo "$CYGPATH" >&6; }
14550else
14551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14552$as_echo "no" >&6; }
14553fi
14554
14555
14556          if test "x$CYGPATH" = x; then
14557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14558          fi
14559        else
14560          # Otherwise we believe it is a complete path. Use it as it is.
14561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14562$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14564$as_echo_n "checking for CYGPATH... " >&6; }
14565          if test ! -x "$tool_specified"; then
14566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14567$as_echo "not found" >&6; }
14568            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14569          fi
14570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14571$as_echo "$tool_specified" >&6; }
14572        fi
14573      fi
14574    fi
14575
14576  fi
14577
14578
14579
14580
14581  # Publish this variable in the help.
14582
14583
14584  if [ -z "${READLINK+x}" ]; then
14585    # The variable is not set by user, try to locate tool using the code snippet
14586    for ac_prog in greadlink readlink
14587do
14588  # Extract the first word of "$ac_prog", so it can be a program name with args.
14589set dummy $ac_prog; ac_word=$2
14590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14591$as_echo_n "checking for $ac_word... " >&6; }
14592if ${ac_cv_path_READLINK+:} false; then :
14593  $as_echo_n "(cached) " >&6
14594else
14595  case $READLINK in
14596  [\\/]* | ?:[\\/]*)
14597  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14598  ;;
14599  *)
14600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14601for as_dir in $PATH
14602do
14603  IFS=$as_save_IFS
14604  test -z "$as_dir" && as_dir=.
14605    for ac_exec_ext in '' $ac_executable_extensions; do
14606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14607    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14609    break 2
14610  fi
14611done
14612  done
14613IFS=$as_save_IFS
14614
14615  ;;
14616esac
14617fi
14618READLINK=$ac_cv_path_READLINK
14619if test -n "$READLINK"; then
14620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14621$as_echo "$READLINK" >&6; }
14622else
14623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14624$as_echo "no" >&6; }
14625fi
14626
14627
14628  test -n "$READLINK" && break
14629done
14630
14631  else
14632    # The variable is set, but is it from the command line or the environment?
14633
14634    # Try to remove the string !READLINK! from our list.
14635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14637      # If it failed, the variable was not from the command line. Ignore it,
14638      # but warn the user (except for BASH, which is always set by the calling BASH).
14639      if test "xREADLINK" != xBASH; then
14640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14641$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14642      fi
14643      # Try to locate tool using the code snippet
14644      for ac_prog in greadlink readlink
14645do
14646  # Extract the first word of "$ac_prog", so it can be a program name with args.
14647set dummy $ac_prog; ac_word=$2
14648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14649$as_echo_n "checking for $ac_word... " >&6; }
14650if ${ac_cv_path_READLINK+:} false; then :
14651  $as_echo_n "(cached) " >&6
14652else
14653  case $READLINK in
14654  [\\/]* | ?:[\\/]*)
14655  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14656  ;;
14657  *)
14658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14659for as_dir in $PATH
14660do
14661  IFS=$as_save_IFS
14662  test -z "$as_dir" && as_dir=.
14663    for ac_exec_ext in '' $ac_executable_extensions; do
14664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14665    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14667    break 2
14668  fi
14669done
14670  done
14671IFS=$as_save_IFS
14672
14673  ;;
14674esac
14675fi
14676READLINK=$ac_cv_path_READLINK
14677if test -n "$READLINK"; then
14678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14679$as_echo "$READLINK" >&6; }
14680else
14681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14682$as_echo "no" >&6; }
14683fi
14684
14685
14686  test -n "$READLINK" && break
14687done
14688
14689    else
14690      # If it succeeded, then it was overridden by the user. We will use it
14691      # for the tool.
14692
14693      # First remove it from the list of overridden variables, so we can test
14694      # for unknown variables in the end.
14695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14696
14697      # Check if we try to supply an empty value
14698      if test "x$READLINK" = x; then
14699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14700$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14702$as_echo_n "checking for READLINK... " >&6; }
14703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14704$as_echo "disabled" >&6; }
14705      else
14706        # Check if the provided tool contains a complete path.
14707        tool_specified="$READLINK"
14708        tool_basename="${tool_specified##*/}"
14709        if test "x$tool_basename" = "x$tool_specified"; then
14710          # A command without a complete path is provided, search $PATH.
14711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14712$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14713          # Extract the first word of "$tool_basename", so it can be a program name with args.
14714set dummy $tool_basename; ac_word=$2
14715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14716$as_echo_n "checking for $ac_word... " >&6; }
14717if ${ac_cv_path_READLINK+:} false; then :
14718  $as_echo_n "(cached) " >&6
14719else
14720  case $READLINK in
14721  [\\/]* | ?:[\\/]*)
14722  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14723  ;;
14724  *)
14725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14726for as_dir in $PATH
14727do
14728  IFS=$as_save_IFS
14729  test -z "$as_dir" && as_dir=.
14730    for ac_exec_ext in '' $ac_executable_extensions; do
14731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14732    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14734    break 2
14735  fi
14736done
14737  done
14738IFS=$as_save_IFS
14739
14740  ;;
14741esac
14742fi
14743READLINK=$ac_cv_path_READLINK
14744if test -n "$READLINK"; then
14745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14746$as_echo "$READLINK" >&6; }
14747else
14748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14749$as_echo "no" >&6; }
14750fi
14751
14752
14753          if test "x$READLINK" = x; then
14754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14755          fi
14756        else
14757          # Otherwise we believe it is a complete path. Use it as it is.
14758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14759$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14761$as_echo_n "checking for READLINK... " >&6; }
14762          if test ! -x "$tool_specified"; then
14763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14764$as_echo "not found" >&6; }
14765            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14766          fi
14767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14768$as_echo "$tool_specified" >&6; }
14769        fi
14770      fi
14771    fi
14772
14773  fi
14774
14775
14776
14777
14778  # Publish this variable in the help.
14779
14780
14781  if [ -z "${DF+x}" ]; then
14782    # The variable is not set by user, try to locate tool using the code snippet
14783    for ac_prog in df
14784do
14785  # Extract the first word of "$ac_prog", so it can be a program name with args.
14786set dummy $ac_prog; ac_word=$2
14787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14788$as_echo_n "checking for $ac_word... " >&6; }
14789if ${ac_cv_path_DF+:} false; then :
14790  $as_echo_n "(cached) " >&6
14791else
14792  case $DF in
14793  [\\/]* | ?:[\\/]*)
14794  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14795  ;;
14796  *)
14797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14798for as_dir in $PATH
14799do
14800  IFS=$as_save_IFS
14801  test -z "$as_dir" && as_dir=.
14802    for ac_exec_ext in '' $ac_executable_extensions; do
14803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14804    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14806    break 2
14807  fi
14808done
14809  done
14810IFS=$as_save_IFS
14811
14812  ;;
14813esac
14814fi
14815DF=$ac_cv_path_DF
14816if test -n "$DF"; then
14817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14818$as_echo "$DF" >&6; }
14819else
14820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14821$as_echo "no" >&6; }
14822fi
14823
14824
14825  test -n "$DF" && break
14826done
14827
14828  else
14829    # The variable is set, but is it from the command line or the environment?
14830
14831    # Try to remove the string !DF! from our list.
14832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14834      # If it failed, the variable was not from the command line. Ignore it,
14835      # but warn the user (except for BASH, which is always set by the calling BASH).
14836      if test "xDF" != xBASH; then
14837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14838$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14839      fi
14840      # Try to locate tool using the code snippet
14841      for ac_prog in df
14842do
14843  # Extract the first word of "$ac_prog", so it can be a program name with args.
14844set dummy $ac_prog; ac_word=$2
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14846$as_echo_n "checking for $ac_word... " >&6; }
14847if ${ac_cv_path_DF+:} false; then :
14848  $as_echo_n "(cached) " >&6
14849else
14850  case $DF in
14851  [\\/]* | ?:[\\/]*)
14852  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14853  ;;
14854  *)
14855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14856for as_dir in $PATH
14857do
14858  IFS=$as_save_IFS
14859  test -z "$as_dir" && as_dir=.
14860    for ac_exec_ext in '' $ac_executable_extensions; do
14861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14862    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14864    break 2
14865  fi
14866done
14867  done
14868IFS=$as_save_IFS
14869
14870  ;;
14871esac
14872fi
14873DF=$ac_cv_path_DF
14874if test -n "$DF"; then
14875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14876$as_echo "$DF" >&6; }
14877else
14878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14879$as_echo "no" >&6; }
14880fi
14881
14882
14883  test -n "$DF" && break
14884done
14885
14886    else
14887      # If it succeeded, then it was overridden by the user. We will use it
14888      # for the tool.
14889
14890      # First remove it from the list of overridden variables, so we can test
14891      # for unknown variables in the end.
14892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14893
14894      # Check if we try to supply an empty value
14895      if test "x$DF" = x; then
14896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14897$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14899$as_echo_n "checking for DF... " >&6; }
14900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14901$as_echo "disabled" >&6; }
14902      else
14903        # Check if the provided tool contains a complete path.
14904        tool_specified="$DF"
14905        tool_basename="${tool_specified##*/}"
14906        if test "x$tool_basename" = "x$tool_specified"; then
14907          # A command without a complete path is provided, search $PATH.
14908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14909$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14910          # Extract the first word of "$tool_basename", so it can be a program name with args.
14911set dummy $tool_basename; ac_word=$2
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14913$as_echo_n "checking for $ac_word... " >&6; }
14914if ${ac_cv_path_DF+:} false; then :
14915  $as_echo_n "(cached) " >&6
14916else
14917  case $DF in
14918  [\\/]* | ?:[\\/]*)
14919  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14920  ;;
14921  *)
14922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14923for as_dir in $PATH
14924do
14925  IFS=$as_save_IFS
14926  test -z "$as_dir" && as_dir=.
14927    for ac_exec_ext in '' $ac_executable_extensions; do
14928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14929    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14931    break 2
14932  fi
14933done
14934  done
14935IFS=$as_save_IFS
14936
14937  ;;
14938esac
14939fi
14940DF=$ac_cv_path_DF
14941if test -n "$DF"; then
14942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14943$as_echo "$DF" >&6; }
14944else
14945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14946$as_echo "no" >&6; }
14947fi
14948
14949
14950          if test "x$DF" = x; then
14951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14952          fi
14953        else
14954          # Otherwise we believe it is a complete path. Use it as it is.
14955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14956$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14958$as_echo_n "checking for DF... " >&6; }
14959          if test ! -x "$tool_specified"; then
14960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14961$as_echo "not found" >&6; }
14962            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14963          fi
14964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14965$as_echo "$tool_specified" >&6; }
14966        fi
14967      fi
14968    fi
14969
14970  fi
14971
14972
14973
14974
14975  # Publish this variable in the help.
14976
14977
14978  if [ -z "${CPIO+x}" ]; then
14979    # The variable is not set by user, try to locate tool using the code snippet
14980    for ac_prog in cpio bsdcpio
14981do
14982  # Extract the first word of "$ac_prog", so it can be a program name with args.
14983set dummy $ac_prog; ac_word=$2
14984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14985$as_echo_n "checking for $ac_word... " >&6; }
14986if ${ac_cv_path_CPIO+:} false; then :
14987  $as_echo_n "(cached) " >&6
14988else
14989  case $CPIO in
14990  [\\/]* | ?:[\\/]*)
14991  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14992  ;;
14993  *)
14994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14995for as_dir in $PATH
14996do
14997  IFS=$as_save_IFS
14998  test -z "$as_dir" && as_dir=.
14999    for ac_exec_ext in '' $ac_executable_extensions; do
15000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15001    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15003    break 2
15004  fi
15005done
15006  done
15007IFS=$as_save_IFS
15008
15009  ;;
15010esac
15011fi
15012CPIO=$ac_cv_path_CPIO
15013if test -n "$CPIO"; then
15014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15015$as_echo "$CPIO" >&6; }
15016else
15017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15018$as_echo "no" >&6; }
15019fi
15020
15021
15022  test -n "$CPIO" && break
15023done
15024
15025  else
15026    # The variable is set, but is it from the command line or the environment?
15027
15028    # Try to remove the string !CPIO! from our list.
15029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15031      # If it failed, the variable was not from the command line. Ignore it,
15032      # but warn the user (except for BASH, which is always set by the calling BASH).
15033      if test "xCPIO" != xBASH; then
15034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15035$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15036      fi
15037      # Try to locate tool using the code snippet
15038      for ac_prog in cpio bsdcpio
15039do
15040  # Extract the first word of "$ac_prog", so it can be a program name with args.
15041set dummy $ac_prog; ac_word=$2
15042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15043$as_echo_n "checking for $ac_word... " >&6; }
15044if ${ac_cv_path_CPIO+:} false; then :
15045  $as_echo_n "(cached) " >&6
15046else
15047  case $CPIO in
15048  [\\/]* | ?:[\\/]*)
15049  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15050  ;;
15051  *)
15052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15053for as_dir in $PATH
15054do
15055  IFS=$as_save_IFS
15056  test -z "$as_dir" && as_dir=.
15057    for ac_exec_ext in '' $ac_executable_extensions; do
15058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15059    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15061    break 2
15062  fi
15063done
15064  done
15065IFS=$as_save_IFS
15066
15067  ;;
15068esac
15069fi
15070CPIO=$ac_cv_path_CPIO
15071if test -n "$CPIO"; then
15072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15073$as_echo "$CPIO" >&6; }
15074else
15075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15076$as_echo "no" >&6; }
15077fi
15078
15079
15080  test -n "$CPIO" && break
15081done
15082
15083    else
15084      # If it succeeded, then it was overridden by the user. We will use it
15085      # for the tool.
15086
15087      # First remove it from the list of overridden variables, so we can test
15088      # for unknown variables in the end.
15089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15090
15091      # Check if we try to supply an empty value
15092      if test "x$CPIO" = x; then
15093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15094$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15096$as_echo_n "checking for CPIO... " >&6; }
15097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15098$as_echo "disabled" >&6; }
15099      else
15100        # Check if the provided tool contains a complete path.
15101        tool_specified="$CPIO"
15102        tool_basename="${tool_specified##*/}"
15103        if test "x$tool_basename" = "x$tool_specified"; then
15104          # A command without a complete path is provided, search $PATH.
15105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15106$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15107          # Extract the first word of "$tool_basename", so it can be a program name with args.
15108set dummy $tool_basename; ac_word=$2
15109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15110$as_echo_n "checking for $ac_word... " >&6; }
15111if ${ac_cv_path_CPIO+:} false; then :
15112  $as_echo_n "(cached) " >&6
15113else
15114  case $CPIO in
15115  [\\/]* | ?:[\\/]*)
15116  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15117  ;;
15118  *)
15119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15120for as_dir in $PATH
15121do
15122  IFS=$as_save_IFS
15123  test -z "$as_dir" && as_dir=.
15124    for ac_exec_ext in '' $ac_executable_extensions; do
15125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15126    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15128    break 2
15129  fi
15130done
15131  done
15132IFS=$as_save_IFS
15133
15134  ;;
15135esac
15136fi
15137CPIO=$ac_cv_path_CPIO
15138if test -n "$CPIO"; then
15139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15140$as_echo "$CPIO" >&6; }
15141else
15142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15143$as_echo "no" >&6; }
15144fi
15145
15146
15147          if test "x$CPIO" = x; then
15148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15149          fi
15150        else
15151          # Otherwise we believe it is a complete path. Use it as it is.
15152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15153$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15155$as_echo_n "checking for CPIO... " >&6; }
15156          if test ! -x "$tool_specified"; then
15157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15158$as_echo "not found" >&6; }
15159            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15160          fi
15161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15162$as_echo "$tool_specified" >&6; }
15163        fi
15164      fi
15165    fi
15166
15167  fi
15168
15169
15170
15171
15172  # Publish this variable in the help.
15173
15174
15175  if [ -z "${NICE+x}" ]; then
15176    # The variable is not set by user, try to locate tool using the code snippet
15177    for ac_prog in nice
15178do
15179  # Extract the first word of "$ac_prog", so it can be a program name with args.
15180set dummy $ac_prog; ac_word=$2
15181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15182$as_echo_n "checking for $ac_word... " >&6; }
15183if ${ac_cv_path_NICE+:} false; then :
15184  $as_echo_n "(cached) " >&6
15185else
15186  case $NICE in
15187  [\\/]* | ?:[\\/]*)
15188  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15189  ;;
15190  *)
15191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15192for as_dir in $PATH
15193do
15194  IFS=$as_save_IFS
15195  test -z "$as_dir" && as_dir=.
15196    for ac_exec_ext in '' $ac_executable_extensions; do
15197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15198    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15200    break 2
15201  fi
15202done
15203  done
15204IFS=$as_save_IFS
15205
15206  ;;
15207esac
15208fi
15209NICE=$ac_cv_path_NICE
15210if test -n "$NICE"; then
15211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15212$as_echo "$NICE" >&6; }
15213else
15214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15215$as_echo "no" >&6; }
15216fi
15217
15218
15219  test -n "$NICE" && break
15220done
15221
15222  else
15223    # The variable is set, but is it from the command line or the environment?
15224
15225    # Try to remove the string !NICE! from our list.
15226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15228      # If it failed, the variable was not from the command line. Ignore it,
15229      # but warn the user (except for BASH, which is always set by the calling BASH).
15230      if test "xNICE" != xBASH; then
15231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15232$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15233      fi
15234      # Try to locate tool using the code snippet
15235      for ac_prog in nice
15236do
15237  # Extract the first word of "$ac_prog", so it can be a program name with args.
15238set dummy $ac_prog; ac_word=$2
15239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15240$as_echo_n "checking for $ac_word... " >&6; }
15241if ${ac_cv_path_NICE+:} false; then :
15242  $as_echo_n "(cached) " >&6
15243else
15244  case $NICE in
15245  [\\/]* | ?:[\\/]*)
15246  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15247  ;;
15248  *)
15249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15250for as_dir in $PATH
15251do
15252  IFS=$as_save_IFS
15253  test -z "$as_dir" && as_dir=.
15254    for ac_exec_ext in '' $ac_executable_extensions; do
15255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15256    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15258    break 2
15259  fi
15260done
15261  done
15262IFS=$as_save_IFS
15263
15264  ;;
15265esac
15266fi
15267NICE=$ac_cv_path_NICE
15268if test -n "$NICE"; then
15269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15270$as_echo "$NICE" >&6; }
15271else
15272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15273$as_echo "no" >&6; }
15274fi
15275
15276
15277  test -n "$NICE" && break
15278done
15279
15280    else
15281      # If it succeeded, then it was overridden by the user. We will use it
15282      # for the tool.
15283
15284      # First remove it from the list of overridden variables, so we can test
15285      # for unknown variables in the end.
15286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15287
15288      # Check if we try to supply an empty value
15289      if test "x$NICE" = x; then
15290        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15291$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15293$as_echo_n "checking for NICE... " >&6; }
15294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15295$as_echo "disabled" >&6; }
15296      else
15297        # Check if the provided tool contains a complete path.
15298        tool_specified="$NICE"
15299        tool_basename="${tool_specified##*/}"
15300        if test "x$tool_basename" = "x$tool_specified"; then
15301          # A command without a complete path is provided, search $PATH.
15302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15303$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15304          # Extract the first word of "$tool_basename", so it can be a program name with args.
15305set dummy $tool_basename; ac_word=$2
15306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15307$as_echo_n "checking for $ac_word... " >&6; }
15308if ${ac_cv_path_NICE+:} false; then :
15309  $as_echo_n "(cached) " >&6
15310else
15311  case $NICE in
15312  [\\/]* | ?:[\\/]*)
15313  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15314  ;;
15315  *)
15316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15317for as_dir in $PATH
15318do
15319  IFS=$as_save_IFS
15320  test -z "$as_dir" && as_dir=.
15321    for ac_exec_ext in '' $ac_executable_extensions; do
15322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15323    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15325    break 2
15326  fi
15327done
15328  done
15329IFS=$as_save_IFS
15330
15331  ;;
15332esac
15333fi
15334NICE=$ac_cv_path_NICE
15335if test -n "$NICE"; then
15336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15337$as_echo "$NICE" >&6; }
15338else
15339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15340$as_echo "no" >&6; }
15341fi
15342
15343
15344          if test "x$NICE" = x; then
15345            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15346          fi
15347        else
15348          # Otherwise we believe it is a complete path. Use it as it is.
15349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15350$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15351          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15352$as_echo_n "checking for NICE... " >&6; }
15353          if test ! -x "$tool_specified"; then
15354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15355$as_echo "not found" >&6; }
15356            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15357          fi
15358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15359$as_echo "$tool_specified" >&6; }
15360        fi
15361      fi
15362    fi
15363
15364  fi
15365
15366
15367
15368
15369# Now we can determine OpenJDK build and target platforms. This is required to
15370# have early on.
15371# Make sure we can run config.sub.
15372$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15373  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15374
15375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15376$as_echo_n "checking build system type... " >&6; }
15377if ${ac_cv_build+:} false; then :
15378  $as_echo_n "(cached) " >&6
15379else
15380  ac_build_alias=$build_alias
15381test "x$ac_build_alias" = x &&
15382  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15383test "x$ac_build_alias" = x &&
15384  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15385ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15386  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15387
15388fi
15389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15390$as_echo "$ac_cv_build" >&6; }
15391case $ac_cv_build in
15392*-*-*) ;;
15393*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15394esac
15395build=$ac_cv_build
15396ac_save_IFS=$IFS; IFS='-'
15397set x $ac_cv_build
15398shift
15399build_cpu=$1
15400build_vendor=$2
15401shift; shift
15402# Remember, the first character of IFS is used to create $*,
15403# except with old shells:
15404build_os=$*
15405IFS=$ac_save_IFS
15406case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15407
15408
15409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15410$as_echo_n "checking host system type... " >&6; }
15411if ${ac_cv_host+:} false; then :
15412  $as_echo_n "(cached) " >&6
15413else
15414  if test "x$host_alias" = x; then
15415  ac_cv_host=$ac_cv_build
15416else
15417  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15418    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15419fi
15420
15421fi
15422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15423$as_echo "$ac_cv_host" >&6; }
15424case $ac_cv_host in
15425*-*-*) ;;
15426*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15427esac
15428host=$ac_cv_host
15429ac_save_IFS=$IFS; IFS='-'
15430set x $ac_cv_host
15431shift
15432host_cpu=$1
15433host_vendor=$2
15434shift; shift
15435# Remember, the first character of IFS is used to create $*,
15436# except with old shells:
15437host_os=$*
15438IFS=$ac_save_IFS
15439case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15440
15441
15442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15443$as_echo_n "checking target system type... " >&6; }
15444if ${ac_cv_target+:} false; then :
15445  $as_echo_n "(cached) " >&6
15446else
15447  if test "x$target_alias" = x; then
15448  ac_cv_target=$ac_cv_host
15449else
15450  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15451    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15452fi
15453
15454fi
15455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15456$as_echo "$ac_cv_target" >&6; }
15457case $ac_cv_target in
15458*-*-*) ;;
15459*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15460esac
15461target=$ac_cv_target
15462ac_save_IFS=$IFS; IFS='-'
15463set x $ac_cv_target
15464shift
15465target_cpu=$1
15466target_vendor=$2
15467shift; shift
15468# Remember, the first character of IFS is used to create $*,
15469# except with old shells:
15470target_os=$*
15471IFS=$ac_save_IFS
15472case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15473
15474
15475# The aliases save the names the user supplied, while $host etc.
15476# will get canonicalized.
15477test -n "$target_alias" &&
15478  test "$program_prefix$program_suffix$program_transform_name" = \
15479    NONENONEs,x,x, &&
15480  program_prefix=${target_alias}-
15481
15482  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15483  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15484  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15485  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15486  # to use the configure naming style.
15487
15488
15489
15490
15491
15492  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15493  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15494  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15495  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15496  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15497  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15498
15499
15500
15501  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15502
15503  case "$build_os" in
15504    *linux*)
15505      VAR_OS=linux
15506      VAR_OS_TYPE=unix
15507      ;;
15508    *solaris*)
15509      VAR_OS=solaris
15510      VAR_OS_TYPE=unix
15511      ;;
15512    *darwin*)
15513      VAR_OS=macosx
15514      VAR_OS_TYPE=unix
15515      ;;
15516    *bsd*)
15517      VAR_OS=bsd
15518      VAR_OS_TYPE=unix
15519      ;;
15520    *cygwin*)
15521      VAR_OS=windows
15522      VAR_OS_ENV=windows.cygwin
15523      ;;
15524    *mingw*)
15525      VAR_OS=windows
15526      VAR_OS_ENV=windows.msys
15527      ;;
15528    *aix*)
15529      VAR_OS=aix
15530      VAR_OS_TYPE=unix
15531      ;;
15532    *)
15533      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15534      ;;
15535  esac
15536
15537
15538  # First argument is the cpu name from the trip/quad
15539  case "$build_cpu" in
15540    x86_64)
15541      VAR_CPU=x86_64
15542      VAR_CPU_ARCH=x86
15543      VAR_CPU_BITS=64
15544      VAR_CPU_ENDIAN=little
15545      ;;
15546    i?86)
15547      VAR_CPU=x86
15548      VAR_CPU_ARCH=x86
15549      VAR_CPU_BITS=32
15550      VAR_CPU_ENDIAN=little
15551      ;;
15552    arm*)
15553      VAR_CPU=arm
15554      VAR_CPU_ARCH=arm
15555      VAR_CPU_BITS=32
15556      VAR_CPU_ENDIAN=little
15557      ;;
15558    aarch64)
15559      VAR_CPU=aarch64
15560      VAR_CPU_ARCH=aarch64
15561      VAR_CPU_BITS=64
15562      VAR_CPU_ENDIAN=little
15563      ;;
15564    powerpc)
15565      VAR_CPU=ppc
15566      VAR_CPU_ARCH=ppc
15567      VAR_CPU_BITS=32
15568      VAR_CPU_ENDIAN=big
15569      ;;
15570    powerpc64)
15571      VAR_CPU=ppc64
15572      VAR_CPU_ARCH=ppc
15573      VAR_CPU_BITS=64
15574      VAR_CPU_ENDIAN=big
15575      ;;
15576    powerpc64le)
15577      VAR_CPU=ppc64le
15578      VAR_CPU_ARCH=ppc
15579      VAR_CPU_BITS=64
15580      VAR_CPU_ENDIAN=little
15581      ;;
15582    s390)
15583      VAR_CPU=s390
15584      VAR_CPU_ARCH=s390
15585      VAR_CPU_BITS=32
15586      VAR_CPU_ENDIAN=big
15587      ;;
15588    s390x)
15589      VAR_CPU=s390x
15590      VAR_CPU_ARCH=s390
15591      VAR_CPU_BITS=64
15592      VAR_CPU_ENDIAN=big
15593      ;;
15594    sparc)
15595      VAR_CPU=sparc
15596      VAR_CPU_ARCH=sparc
15597      VAR_CPU_BITS=32
15598      VAR_CPU_ENDIAN=big
15599      ;;
15600    sparcv9|sparc64)
15601      VAR_CPU=sparcv9
15602      VAR_CPU_ARCH=sparc
15603      VAR_CPU_BITS=64
15604      VAR_CPU_ENDIAN=big
15605      ;;
15606    *)
15607      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15608      ;;
15609  esac
15610
15611  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15612  OPENJDK_BUILD_OS="$VAR_OS"
15613  if test "x$VAR_OS_TYPE" != x; then
15614    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15615  else
15616    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15617  fi
15618  if test "x$VAR_OS_ENV" != x; then
15619    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15620  else
15621    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15622  fi
15623  OPENJDK_BUILD_CPU="$VAR_CPU"
15624  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15625  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15626  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15627
15628
15629
15630
15631
15632
15633
15634
15635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15636$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15638$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15639
15640  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15641
15642  case "$host_os" in
15643    *linux*)
15644      VAR_OS=linux
15645      VAR_OS_TYPE=unix
15646      ;;
15647    *solaris*)
15648      VAR_OS=solaris
15649      VAR_OS_TYPE=unix
15650      ;;
15651    *darwin*)
15652      VAR_OS=macosx
15653      VAR_OS_TYPE=unix
15654      ;;
15655    *bsd*)
15656      VAR_OS=bsd
15657      VAR_OS_TYPE=unix
15658      ;;
15659    *cygwin*)
15660      VAR_OS=windows
15661      VAR_OS_ENV=windows.cygwin
15662      ;;
15663    *mingw*)
15664      VAR_OS=windows
15665      VAR_OS_ENV=windows.msys
15666      ;;
15667    *aix*)
15668      VAR_OS=aix
15669      VAR_OS_TYPE=unix
15670      ;;
15671    *)
15672      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15673      ;;
15674  esac
15675
15676
15677  # First argument is the cpu name from the trip/quad
15678  case "$host_cpu" in
15679    x86_64)
15680      VAR_CPU=x86_64
15681      VAR_CPU_ARCH=x86
15682      VAR_CPU_BITS=64
15683      VAR_CPU_ENDIAN=little
15684      ;;
15685    i?86)
15686      VAR_CPU=x86
15687      VAR_CPU_ARCH=x86
15688      VAR_CPU_BITS=32
15689      VAR_CPU_ENDIAN=little
15690      ;;
15691    arm*)
15692      VAR_CPU=arm
15693      VAR_CPU_ARCH=arm
15694      VAR_CPU_BITS=32
15695      VAR_CPU_ENDIAN=little
15696      ;;
15697    aarch64)
15698      VAR_CPU=aarch64
15699      VAR_CPU_ARCH=aarch64
15700      VAR_CPU_BITS=64
15701      VAR_CPU_ENDIAN=little
15702      ;;
15703    powerpc)
15704      VAR_CPU=ppc
15705      VAR_CPU_ARCH=ppc
15706      VAR_CPU_BITS=32
15707      VAR_CPU_ENDIAN=big
15708      ;;
15709    powerpc64)
15710      VAR_CPU=ppc64
15711      VAR_CPU_ARCH=ppc
15712      VAR_CPU_BITS=64
15713      VAR_CPU_ENDIAN=big
15714      ;;
15715    powerpc64le)
15716      VAR_CPU=ppc64le
15717      VAR_CPU_ARCH=ppc
15718      VAR_CPU_BITS=64
15719      VAR_CPU_ENDIAN=little
15720      ;;
15721    s390)
15722      VAR_CPU=s390
15723      VAR_CPU_ARCH=s390
15724      VAR_CPU_BITS=32
15725      VAR_CPU_ENDIAN=big
15726      ;;
15727    s390x)
15728      VAR_CPU=s390x
15729      VAR_CPU_ARCH=s390
15730      VAR_CPU_BITS=64
15731      VAR_CPU_ENDIAN=big
15732      ;;
15733    sparc)
15734      VAR_CPU=sparc
15735      VAR_CPU_ARCH=sparc
15736      VAR_CPU_BITS=32
15737      VAR_CPU_ENDIAN=big
15738      ;;
15739    sparcv9|sparc64)
15740      VAR_CPU=sparcv9
15741      VAR_CPU_ARCH=sparc
15742      VAR_CPU_BITS=64
15743      VAR_CPU_ENDIAN=big
15744      ;;
15745    *)
15746      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15747      ;;
15748  esac
15749
15750  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15751  OPENJDK_TARGET_OS="$VAR_OS"
15752  if test "x$VAR_OS_TYPE" != x; then
15753    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15754  else
15755    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15756  fi
15757  if test "x$VAR_OS_ENV" != x; then
15758    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15759  else
15760    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15761  fi
15762  OPENJDK_TARGET_CPU="$VAR_CPU"
15763  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15764  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15765  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15766
15767
15768
15769
15770
15771
15772
15773
15774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15775$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15777$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15778
15779
15780
15781# Check whether --with-target-bits was given.
15782if test "${with_target_bits+set}" = set; then :
15783  withval=$with_target_bits;
15784fi
15785
15786
15787  # We have three types of compiles:
15788  # native  == normal compilation, target system == build system
15789  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15790  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15791  #
15792  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15793    # We're doing a proper cross-compilation
15794    COMPILE_TYPE="cross"
15795  else
15796    COMPILE_TYPE="native"
15797  fi
15798
15799  if test "x$with_target_bits" != x; then
15800    if test "x$COMPILE_TYPE" = "xcross"; then
15801      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15802    fi
15803
15804    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15805      # A reduced build is requested
15806      COMPILE_TYPE="reduced"
15807      OPENJDK_TARGET_CPU_BITS=32
15808      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15809        OPENJDK_TARGET_CPU=x86
15810      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15811        OPENJDK_TARGET_CPU=sparc
15812      else
15813        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15814      fi
15815    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15816      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
15817    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15818      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15819$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15820    else
15821      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15822    fi
15823  fi
15824
15825
15826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15827$as_echo_n "checking compilation type... " >&6; }
15828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15829$as_echo "$COMPILE_TYPE" >&6; }
15830
15831
15832  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15833    REQUIRED_OS_NAME=SunOS
15834    REQUIRED_OS_VERSION=5.10
15835  fi
15836  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15837    REQUIRED_OS_NAME=Linux
15838    REQUIRED_OS_VERSION=2.6
15839  fi
15840  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15841    REQUIRED_OS_NAME=Windows
15842    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15843      REQUIRED_OS_VERSION=5.2
15844    else
15845      REQUIRED_OS_VERSION=5.1
15846    fi
15847  fi
15848  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15849    REQUIRED_OS_NAME=Darwin
15850    REQUIRED_OS_VERSION=11.2
15851  fi
15852  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15853    REQUIRED_OS_NAME=AIX
15854    REQUIRED_OS_VERSION=7.1
15855  fi
15856
15857
15858
15859
15860
15861
15862  # Also store the legacy naming of the cpu.
15863  # Ie i586 and amd64 instead of x86 and x86_64
15864  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15865  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15866    OPENJDK_TARGET_CPU_LEGACY="i586"
15867  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15868    # On all platforms except MacOSX replace x86_64 with amd64.
15869    OPENJDK_TARGET_CPU_LEGACY="amd64"
15870  fi
15871
15872
15873  # And the second legacy naming of the cpu.
15874  # Ie i386 and amd64 instead of x86 and x86_64.
15875  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15876  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15877    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15878  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15879    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15880  fi
15881
15882
15883  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15884  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15885  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15886  OPENJDK_TARGET_CPU_ISADIR=""
15887  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15888    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15889      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15890    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15891      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15892    fi
15893  fi
15894
15895
15896  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15897  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15898  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15899    # On linux only, we replace x86 with i386.
15900    OPENJDK_TARGET_CPU_OSARCH="i386"
15901  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15902    # On all platforms except macosx, we replace x86_64 with amd64.
15903    OPENJDK_TARGET_CPU_OSARCH="amd64"
15904  fi
15905
15906
15907  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15908  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15909    OPENJDK_TARGET_CPU_JLI="i386"
15910  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15911    # On all platforms except macosx, we replace x86_64 with amd64.
15912    OPENJDK_TARGET_CPU_JLI="amd64"
15913  fi
15914
15915  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15916      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15917  else
15918      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15919  fi
15920
15921
15922  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15923  # Macosx is osx and x86_64 is x64
15924  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15925    OPENJDK_TARGET_OS_BUNDLE="osx"
15926  else
15927    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15928  fi
15929  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15930    OPENJDK_TARGET_CPU_BUNDLE="x64"
15931  else
15932    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15933  fi
15934  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15935
15936
15937
15938
15939  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15940    A_LP64="LP64:="
15941    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15942    # unpack200.exe
15943    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15944      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15945    fi
15946  fi
15947  LP64=$A_LP64
15948
15949
15950  if test "x$COMPILE_TYPE" = "xcross"; then
15951    # FIXME: ... or should this include reduced builds..?
15952    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15953  else
15954    DEFINE_CROSS_COMPILE_ARCH=""
15955  fi
15956
15957
15958  # Convert openjdk platform names to hotspot names
15959
15960  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15961  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15962    HOTSPOT_TARGET_OS=bsd
15963  fi
15964
15965
15966  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15967  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15968    HOTSPOT_TARGET_OS_TYPE=posix
15969  fi
15970
15971
15972  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15973  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15974    HOTSPOT_TARGET_CPU=x86_32
15975  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15976    HOTSPOT_TARGET_CPU=sparc
15977  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15978    HOTSPOT_TARGET_CPU=ppc_64
15979  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15980    HOTSPOT_TARGET_CPU=ppc_64
15981  fi
15982
15983
15984  # This is identical with OPENJDK_*, but define anyway for consistency.
15985  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15986
15987
15988  # Setup HOTSPOT_TARGET_CPU_DEFINE
15989  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15990    HOTSPOT_TARGET_CPU_DEFINE=IA32
15991  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15992    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15993  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15994    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15995  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15996    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15997  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15998    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15999  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16000    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16001
16002  # The cpu defines below are for zero, we don't support them directly.
16003  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16004    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16005  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16006    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16007  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16008    HOTSPOT_TARGET_CPU_DEFINE=S390
16009  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16010    HOTSPOT_TARGET_CPU_DEFINE=S390
16011  elif test "x$OPENJDK_TARGET_CPU" != x; then
16012    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16013  fi
16014
16015
16016
16017
16018  # Also store the legacy naming of the cpu.
16019  # Ie i586 and amd64 instead of x86 and x86_64
16020  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16021  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16022    OPENJDK_BUILD_CPU_LEGACY="i586"
16023  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16024    # On all platforms except MacOSX replace x86_64 with amd64.
16025    OPENJDK_BUILD_CPU_LEGACY="amd64"
16026  fi
16027
16028
16029  # And the second legacy naming of the cpu.
16030  # Ie i386 and amd64 instead of x86 and x86_64.
16031  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16032  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16033    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16034  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16035    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16036  fi
16037
16038
16039  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16040  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16041  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16042  OPENJDK_BUILD_CPU_ISADIR=""
16043  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16044    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16045      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16046    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16047      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16048    fi
16049  fi
16050
16051
16052  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16053  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16054  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16055    # On linux only, we replace x86 with i386.
16056    OPENJDK_BUILD_CPU_OSARCH="i386"
16057  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16058    # On all platforms except macosx, we replace x86_64 with amd64.
16059    OPENJDK_BUILD_CPU_OSARCH="amd64"
16060  fi
16061
16062
16063  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16064  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16065    OPENJDK_BUILD_CPU_JLI="i386"
16066  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16067    # On all platforms except macosx, we replace x86_64 with amd64.
16068    OPENJDK_BUILD_CPU_JLI="amd64"
16069  fi
16070
16071  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16072      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16073  else
16074      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16075  fi
16076
16077
16078  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16079  # Macosx is osx and x86_64 is x64
16080  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16081    OPENJDK_BUILD_OS_BUNDLE="osx"
16082  else
16083    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16084  fi
16085  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16086    OPENJDK_BUILD_CPU_BUNDLE="x64"
16087  else
16088    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16089  fi
16090  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16091
16092
16093
16094
16095  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16096    A_LP64="LP64:="
16097    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16098    # unpack200.exe
16099    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16100      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16101    fi
16102  fi
16103  LP64=$A_LP64
16104
16105
16106  if test "x$COMPILE_TYPE" = "xcross"; then
16107    # FIXME: ... or should this include reduced builds..?
16108    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16109  else
16110    DEFINE_CROSS_COMPILE_ARCH=""
16111  fi
16112
16113
16114  # Convert openjdk platform names to hotspot names
16115
16116  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16117  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16118    HOTSPOT_BUILD_OS=bsd
16119  fi
16120
16121
16122  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16123  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16124    HOTSPOT_BUILD_OS_TYPE=posix
16125  fi
16126
16127
16128  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16129  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16130    HOTSPOT_BUILD_CPU=x86_32
16131  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16132    HOTSPOT_BUILD_CPU=sparc
16133  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16134    HOTSPOT_BUILD_CPU=ppc_64
16135  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16136    HOTSPOT_BUILD_CPU=ppc_64
16137  fi
16138
16139
16140  # This is identical with OPENJDK_*, but define anyway for consistency.
16141  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16142
16143
16144  # Setup HOTSPOT_BUILD_CPU_DEFINE
16145  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16146    HOTSPOT_BUILD_CPU_DEFINE=IA32
16147  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16148    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16149  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16150    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16151  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16152    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16153  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16154    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16155  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16156    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16157
16158  # The cpu defines below are for zero, we don't support them directly.
16159  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16160    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16161  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16162    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16163  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16164    HOTSPOT_BUILD_CPU_DEFINE=S390
16165  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16166    HOTSPOT_BUILD_CPU_DEFINE=S390
16167  elif test "x$OPENJDK_BUILD_CPU" != x; then
16168    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16169  fi
16170
16171
16172
16173
16174  # ZERO_ARCHDEF is used to enable architecture-specific code.
16175  # This is used in legacy hotspot build.
16176  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16177
16178
16179
16180
16181
16182# Continue setting up basic stuff. Most remaining code require fundamental tools.
16183
16184  # Save the current directory this script was started from
16185  CURDIR="$PWD"
16186
16187  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16188  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16189  # was not available at that time.
16190  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16191  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16192    ORIGINAL_PATH="$REWRITTEN_PATH"
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16194$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16195  fi
16196
16197  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16198    PATH_SEP=";"
16199
16200  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16201  if test $SRC_ROOT_LENGTH -gt 100; then
16202    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16203  fi
16204
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16207$as_echo_n "checking cygwin release... " >&6; }
16208    CYGWIN_VERSION=`$UNAME -r`
16209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16210$as_echo "$CYGWIN_VERSION" >&6; }
16211    WINDOWS_ENV_VENDOR='cygwin'
16212    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16213
16214    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16215    if test "x$CYGWIN_VERSION_OLD" != x; then
16216      { $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
16217$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;}
16218      as_fn_error $? "Cannot continue" "$LINENO" 5
16219    fi
16220    if test "x$CYGPATH" = x; then
16221      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16222    fi
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16224$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16225    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16226    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16227    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16228    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16230$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16231    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16232    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16233    if test "x$test_cygdrive_prefix" = x; then
16234      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16235    fi
16236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16238$as_echo_n "checking msys release... " >&6; }
16239    MSYS_VERSION=`$UNAME -r`
16240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16241$as_echo "$MSYS_VERSION" >&6; }
16242
16243    WINDOWS_ENV_VENDOR='msys'
16244    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16245
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16247$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16248    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16249    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16250
16251  windows_path="$MSYS_ROOT_PATH"
16252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253    unix_path=`$CYGPATH -u "$windows_path"`
16254    MSYS_ROOT_PATH="$unix_path"
16255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16257    MSYS_ROOT_PATH="$unix_path"
16258  fi
16259
16260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16261$as_echo "$MSYS_ROOT_PATH" >&6; }
16262    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16263  else
16264    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16265  fi
16266
16267  # Test if windows or unix (cygwin/msys) find is first in path.
16268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16269$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16270  FIND_BINARY_OUTPUT=`find --version 2>&1`
16271  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16273$as_echo "unix style" >&6; }
16274  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16276$as_echo "Windows" >&6; }
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16278$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16279    { $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
16280$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16281    as_fn_error $? "Cannot continue" "$LINENO" 5
16282  else
16283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16284$as_echo "unknown" >&6; }
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16286$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16287  fi
16288
16289  else
16290    PATH_SEP=":"
16291  fi
16292
16293
16294  # We get the top-level directory from the supporting wrappers.
16295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16296$as_echo_n "checking for top-level directory... " >&6; }
16297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16298$as_echo "$TOPDIR" >&6; }
16299
16300
16301  # Save the original version of TOPDIR for string comparisons
16302  ORIGINAL_TOPDIR="$TOPDIR"
16303
16304
16305  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16306
16307  # Only process if variable expands to non-empty
16308
16309  if test "x$CURDIR" != x; then
16310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311
16312  # Input might be given as Windows format, start by converting to
16313  # unix format.
16314  path="$CURDIR"
16315  new_path=`$CYGPATH -u "$path"`
16316
16317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16320  # "foo.exe" is OK but "foo" is an error.
16321  #
16322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16323  # It is also a way to make sure we got the proper file name for the real test later on.
16324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16325  if test "x$test_shortpath" = x; then
16326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16327$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16328    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16329  fi
16330
16331  # Call helper function which possibly converts this using DOS-style short mode.
16332  # If so, the updated path is stored in $new_path.
16333
16334  input_path="$new_path"
16335  # Check if we need to convert this using DOS-style short mode. If the path
16336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16337  # take no chances and rewrite it.
16338  # Note: m4 eats our [], so we need to use [ and ] instead.
16339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16340  if test "x$has_forbidden_chars" != x; then
16341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16345      # Going to short mode and back again did indeed matter. Since short mode is
16346      # case insensitive, let's make it lowercase to improve readability.
16347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16348      # Now convert it back to Unix-style (cygpath)
16349      input_path=`$CYGPATH -u "$shortmode_path"`
16350      new_path="$input_path"
16351    fi
16352  fi
16353
16354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16355  if test "x$test_cygdrive_prefix" = x; then
16356    # As a simple fix, exclude /usr/bin since it's not a real path.
16357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16359      # a path prefixed by /cygdrive for fixpath to work.
16360      new_path="$CYGWIN_ROOT_PATH$input_path"
16361    fi
16362  fi
16363
16364
16365  if test "x$path" != "x$new_path"; then
16366    CURDIR="$new_path"
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16368$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16369  fi
16370
16371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372
16373  path="$CURDIR"
16374  has_colon=`$ECHO $path | $GREP ^.:`
16375  new_path="$path"
16376  if test "x$has_colon" = x; then
16377    # Not in mixed or Windows style, start by that.
16378    new_path=`cmd //c echo $path`
16379  fi
16380
16381
16382  input_path="$new_path"
16383  # Check if we need to convert this using DOS-style short mode. If the path
16384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16385  # take no chances and rewrite it.
16386  # Note: m4 eats our [], so we need to use [ and ] instead.
16387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16388  if test "x$has_forbidden_chars" != x; then
16389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16391  fi
16392
16393
16394  windows_path="$new_path"
16395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396    unix_path=`$CYGPATH -u "$windows_path"`
16397    new_path="$unix_path"
16398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16400    new_path="$unix_path"
16401  fi
16402
16403  if test "x$path" != "x$new_path"; then
16404    CURDIR="$new_path"
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16406$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16407  fi
16408
16409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16411
16412    else
16413      # We're on a unix platform. Hooray! :)
16414      path="$CURDIR"
16415      has_space=`$ECHO "$path" | $GREP " "`
16416      if test "x$has_space" != x; then
16417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16418$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16419        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16420      fi
16421
16422      # Use eval to expand a potential ~
16423      eval path="$path"
16424      if test ! -f "$path" && test ! -d "$path"; then
16425        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16426      fi
16427
16428      if test -d "$path"; then
16429        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16430      else
16431        dir="`$DIRNAME "$path"`"
16432        base="`$BASENAME "$path"`"
16433        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16434      fi
16435    fi
16436  fi
16437
16438
16439  # Only process if variable expands to non-empty
16440
16441  if test "x$TOPDIR" != x; then
16442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16443
16444  # Input might be given as Windows format, start by converting to
16445  # unix format.
16446  path="$TOPDIR"
16447  new_path=`$CYGPATH -u "$path"`
16448
16449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16452  # "foo.exe" is OK but "foo" is an error.
16453  #
16454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16455  # It is also a way to make sure we got the proper file name for the real test later on.
16456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16457  if test "x$test_shortpath" = x; then
16458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16459$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16460    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16461  fi
16462
16463  # Call helper function which possibly converts this using DOS-style short mode.
16464  # If so, the updated path is stored in $new_path.
16465
16466  input_path="$new_path"
16467  # Check if we need to convert this using DOS-style short mode. If the path
16468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16469  # take no chances and rewrite it.
16470  # Note: m4 eats our [], so we need to use [ and ] instead.
16471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16472  if test "x$has_forbidden_chars" != x; then
16473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16477      # Going to short mode and back again did indeed matter. Since short mode is
16478      # case insensitive, let's make it lowercase to improve readability.
16479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16480      # Now convert it back to Unix-style (cygpath)
16481      input_path=`$CYGPATH -u "$shortmode_path"`
16482      new_path="$input_path"
16483    fi
16484  fi
16485
16486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16487  if test "x$test_cygdrive_prefix" = x; then
16488    # As a simple fix, exclude /usr/bin since it's not a real path.
16489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16491      # a path prefixed by /cygdrive for fixpath to work.
16492      new_path="$CYGWIN_ROOT_PATH$input_path"
16493    fi
16494  fi
16495
16496
16497  if test "x$path" != "x$new_path"; then
16498    TOPDIR="$new_path"
16499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16500$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16501  fi
16502
16503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16504
16505  path="$TOPDIR"
16506  has_colon=`$ECHO $path | $GREP ^.:`
16507  new_path="$path"
16508  if test "x$has_colon" = x; then
16509    # Not in mixed or Windows style, start by that.
16510    new_path=`cmd //c echo $path`
16511  fi
16512
16513
16514  input_path="$new_path"
16515  # Check if we need to convert this using DOS-style short mode. If the path
16516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16517  # take no chances and rewrite it.
16518  # Note: m4 eats our [], so we need to use [ and ] instead.
16519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16520  if test "x$has_forbidden_chars" != x; then
16521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16523  fi
16524
16525
16526  windows_path="$new_path"
16527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16528    unix_path=`$CYGPATH -u "$windows_path"`
16529    new_path="$unix_path"
16530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16532    new_path="$unix_path"
16533  fi
16534
16535  if test "x$path" != "x$new_path"; then
16536    TOPDIR="$new_path"
16537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16538$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16539  fi
16540
16541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16543
16544    else
16545      # We're on a unix platform. Hooray! :)
16546      path="$TOPDIR"
16547      has_space=`$ECHO "$path" | $GREP " "`
16548      if test "x$has_space" != x; then
16549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16550$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16552      fi
16553
16554      # Use eval to expand a potential ~
16555      eval path="$path"
16556      if test ! -f "$path" && test ! -d "$path"; then
16557        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16558      fi
16559
16560      if test -d "$path"; then
16561        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16562      else
16563        dir="`$DIRNAME "$path"`"
16564        base="`$BASENAME "$path"`"
16565        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16566      fi
16567    fi
16568  fi
16569
16570  # SRC_ROOT is a traditional alias for TOPDIR.
16571  SRC_ROOT=$TOPDIR
16572
16573  # Calculate a canonical version of TOPDIR for string comparisons
16574  CANONICAL_TOPDIR=$TOPDIR
16575
16576  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16577    # Follow a chain of symbolic links. Use readlink
16578    # where it exists, else fall back to horribly
16579    # complicated shell code.
16580    if test "x$READLINK_TESTED" != yes; then
16581      # On MacOSX there is a readlink tool with a different
16582      # purpose than the GNU readlink tool. Check the found readlink.
16583      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16584      if test "x$ISGNU" = x; then
16585        # A readlink that we do not know how to use.
16586        # Are there other non-GNU readlinks out there?
16587        READLINK_TESTED=yes
16588        READLINK=
16589      fi
16590    fi
16591
16592    if test "x$READLINK" != x; then
16593      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16594    else
16595      # Save the current directory for restoring afterwards
16596      STARTDIR=$PWD
16597      COUNTER=0
16598      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16599      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16600      cd $sym_link_dir
16601      # Use -P flag to resolve symlinks in directories.
16602      cd `$THEPWDCMD -P`
16603      sym_link_dir=`$THEPWDCMD -P`
16604      # Resolve file symlinks
16605      while test $COUNTER -lt 20; do
16606        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16607        if test "x$ISLINK" == x; then
16608          # This is not a symbolic link! We are done!
16609          break
16610        fi
16611        # Again resolve directory symlinks since the target of the just found
16612        # link could be in a different directory
16613        cd `$DIRNAME $ISLINK`
16614        sym_link_dir=`$THEPWDCMD -P`
16615        sym_link_file=`$BASENAME $ISLINK`
16616        let COUNTER=COUNTER+1
16617      done
16618      cd $STARTDIR
16619      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16620    fi
16621  fi
16622
16623
16624
16625  # Locate the directory of this script.
16626  AUTOCONF_DIR=$TOPDIR/common/autoconf
16627
16628  # Setup username (for use in adhoc version strings etc)
16629  # Outer [ ] to quote m4.
16630   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16631
16632
16633
16634# Check if it's a pure open build or if custom sources are to be used.
16635
16636  # Check whether --enable-openjdk-only was given.
16637if test "${enable_openjdk_only+set}" = set; then :
16638  enableval=$enable_openjdk_only;
16639else
16640  enable_openjdk_only="no"
16641fi
16642
16643
16644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16645$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16647$as_echo "$enable_openjdk_only" >&6; }
16648  if test "x$enable_openjdk_only" = "xyes"; then
16649    SUPPRESS_CUSTOM_EXTENSIONS="true"
16650  elif test "x$enable_openjdk_only" = "xno"; then
16651    SUPPRESS_CUSTOM_EXTENSIONS="false"
16652  else
16653    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16654  fi
16655
16656  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16657  # the IncludeCustomExtension macro.
16658
16659
16660# Check whether --with-custom-make-dir was given.
16661if test "${with_custom_make_dir+set}" = set; then :
16662  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
16663$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16664fi
16665
16666
16667
16668
16669# These are needed to be able to create a configuration name (and thus the output directory)
16670
16671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16672$as_echo_n "checking which variant of the JDK to build... " >&6; }
16673
16674# Check whether --with-jdk-variant was given.
16675if test "${with_jdk_variant+set}" = set; then :
16676  withval=$with_jdk_variant;
16677fi
16678
16679
16680  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16681    JDK_VARIANT="normal"
16682  else
16683    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16684  fi
16685
16686
16687
16688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16689$as_echo "$JDK_VARIANT" >&6; }
16690
16691
16692  DEBUG_LEVEL="release"
16693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16694$as_echo_n "checking which debug level to use... " >&6; }
16695  # Check whether --enable-debug was given.
16696if test "${enable_debug+set}" = set; then :
16697  enableval=$enable_debug;
16698        ENABLE_DEBUG="${enableval}"
16699        DEBUG_LEVEL="fastdebug"
16700
16701else
16702  ENABLE_DEBUG="no"
16703fi
16704
16705
16706
16707# Check whether --with-debug-level was given.
16708if test "${with_debug_level+set}" = set; then :
16709  withval=$with_debug_level;
16710        DEBUG_LEVEL="${withval}"
16711        if test "x$ENABLE_DEBUG" = xyes; then
16712          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16713        fi
16714
16715fi
16716
16717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16718$as_echo "$DEBUG_LEVEL" >&6; }
16719
16720  if test "x$DEBUG_LEVEL" != xrelease && \
16721      test "x$DEBUG_LEVEL" != xoptimized && \
16722      test "x$DEBUG_LEVEL" != xfastdebug && \
16723      test "x$DEBUG_LEVEL" != xslowdebug; then
16724    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16725  fi
16726
16727  # Translate DEBUG_LEVEL to debug level used by Hotspot
16728  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16729  if test "x$DEBUG_LEVEL" = xrelease; then
16730    HOTSPOT_DEBUG_LEVEL="product"
16731  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16732    HOTSPOT_DEBUG_LEVEL="debug"
16733  fi
16734
16735  if test "x$DEBUG_LEVEL" = xoptimized; then
16736    # The debug level 'optimized' is a little special because it is currently only
16737    # applicable to the HotSpot build where it means to build a completely
16738    # optimized version of the VM without any debugging code (like for the
16739    # 'release' debug level which is called 'product' in the HotSpot build) but
16740    # with the exception that it can contain additional code which is otherwise
16741    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16742    # test new and/or experimental features which are not intended for customer
16743    # shipment. Because these new features need to be tested and benchmarked in
16744    # real world scenarios, we want to build the containing JDK at the 'release'
16745    # debug level.
16746    DEBUG_LEVEL="release"
16747  fi
16748
16749
16750
16751
16752
16753
16754# Check whether --with-jvm-variants was given.
16755if test "${with_jvm_variants+set}" = set; then :
16756  withval=$with_jvm_variants;
16757fi
16758
16759
16760
16761
16762# Check whether --with-cpu-port was given.
16763if test "${with_cpu_port+set}" = set; then :
16764  withval=$with_cpu_port;
16765fi
16766
16767
16768  if test "x$with_cpu_port" != x; then
16769    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16770      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16771    fi
16772    if test "x$with_cpu_port" != xarm64 && \
16773        test "x$with_cpu_port" != xaarch64; then
16774      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16775    fi
16776    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16777  fi
16778
16779
16780  if test "x$with_jvm_variants" = x; then
16781    with_jvm_variants="server"
16782  fi
16783  JVM_VARIANTS_OPT="$with_jvm_variants"
16784
16785  # Has the user listed more than one variant?
16786  # Additional [] needed to keep m4 from mangling shell constructs.
16787  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16788    BUILDING_MULTIPLE_JVM_VARIANTS=true
16789  else
16790    BUILDING_MULTIPLE_JVM_VARIANTS=false
16791  fi
16792  # Replace the commas with AND for use in the build directory name.
16793  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16794
16795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16796$as_echo_n "checking which variants of the JVM to build... " >&6; }
16797  # JVM_VARIANTS is a space-separated list.
16798  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16799  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16801$as_echo "$JVM_VARIANTS" >&6; }
16802
16803  # Check that the selected variants are valid
16804
16805  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16806  # Notice that the original variant failes on SLES 10 and 11
16807  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16808  STACK=${JVM_VARIANTS// /$'\n'}
16809  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16810  if test "x$INVALID_VARIANTS" != x; then
16811    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16812$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16813    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16814  fi
16815
16816  # All "special" variants share the same output directory ("server")
16817  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16818  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16819  STACK=${JVM_VARIANTS// /$'\n'}
16820  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16821  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16822    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16823  fi
16824
16825  # The "main" variant is the one used by other libs to link against during the
16826  # build.
16827  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16828    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16829    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16830      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16831        JVM_VARIANT_MAIN="$variant"
16832        break
16833      fi
16834    done
16835  else
16836    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16837  fi
16838
16839
16840
16841
16842
16843  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16844    # zero behaves as a platform and rewrites these values. This is really weird. :(
16845    # We are guaranteed that we do not build any other variants when building zero.
16846    HOTSPOT_TARGET_CPU=zero
16847    HOTSPOT_TARGET_CPU_ARCH=zero
16848  fi
16849
16850
16851# With basic setup done, call the custom early hook.
16852
16853
16854# Check if we have devkits, extra paths or sysroot set.
16855
16856
16857# Check whether --with-devkit was given.
16858if test "${with_devkit+set}" = set; then :
16859  withval=$with_devkit;
16860
16861  # Only process if variable expands to non-empty
16862
16863  if test "x$with_devkit" != x; then
16864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16865
16866  # Input might be given as Windows format, start by converting to
16867  # unix format.
16868  path="$with_devkit"
16869  new_path=`$CYGPATH -u "$path"`
16870
16871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16874  # "foo.exe" is OK but "foo" is an error.
16875  #
16876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16877  # It is also a way to make sure we got the proper file name for the real test later on.
16878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16879  if test "x$test_shortpath" = x; then
16880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16881$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16882    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16883  fi
16884
16885  # Call helper function which possibly converts this using DOS-style short mode.
16886  # If so, the updated path is stored in $new_path.
16887
16888  input_path="$new_path"
16889  # Check if we need to convert this using DOS-style short mode. If the path
16890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16891  # take no chances and rewrite it.
16892  # Note: m4 eats our [], so we need to use [ and ] instead.
16893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16894  if test "x$has_forbidden_chars" != x; then
16895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16899      # Going to short mode and back again did indeed matter. Since short mode is
16900      # case insensitive, let's make it lowercase to improve readability.
16901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16902      # Now convert it back to Unix-style (cygpath)
16903      input_path=`$CYGPATH -u "$shortmode_path"`
16904      new_path="$input_path"
16905    fi
16906  fi
16907
16908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16909  if test "x$test_cygdrive_prefix" = x; then
16910    # As a simple fix, exclude /usr/bin since it's not a real path.
16911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16913      # a path prefixed by /cygdrive for fixpath to work.
16914      new_path="$CYGWIN_ROOT_PATH$input_path"
16915    fi
16916  fi
16917
16918
16919  if test "x$path" != "x$new_path"; then
16920    with_devkit="$new_path"
16921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16922$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16923  fi
16924
16925    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16926
16927  path="$with_devkit"
16928  has_colon=`$ECHO $path | $GREP ^.:`
16929  new_path="$path"
16930  if test "x$has_colon" = x; then
16931    # Not in mixed or Windows style, start by that.
16932    new_path=`cmd //c echo $path`
16933  fi
16934
16935
16936  input_path="$new_path"
16937  # Check if we need to convert this using DOS-style short mode. If the path
16938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16939  # take no chances and rewrite it.
16940  # Note: m4 eats our [], so we need to use [ and ] instead.
16941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16942  if test "x$has_forbidden_chars" != x; then
16943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16945  fi
16946
16947
16948  windows_path="$new_path"
16949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16950    unix_path=`$CYGPATH -u "$windows_path"`
16951    new_path="$unix_path"
16952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16954    new_path="$unix_path"
16955  fi
16956
16957  if test "x$path" != "x$new_path"; then
16958    with_devkit="$new_path"
16959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16960$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16961  fi
16962
16963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16965
16966    else
16967      # We're on a unix platform. Hooray! :)
16968      path="$with_devkit"
16969      has_space=`$ECHO "$path" | $GREP " "`
16970      if test "x$has_space" != x; then
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16972$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16973        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16974      fi
16975
16976      # Use eval to expand a potential ~
16977      eval path="$path"
16978      if test ! -f "$path" && test ! -d "$path"; then
16979        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16980      fi
16981
16982      if test -d "$path"; then
16983        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16984      else
16985        dir="`$DIRNAME "$path"`"
16986        base="`$BASENAME "$path"`"
16987        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16988      fi
16989    fi
16990  fi
16991
16992        DEVKIT_ROOT="$with_devkit"
16993        # Check for a meta data info file in the root of the devkit
16994        if test -f "$DEVKIT_ROOT/devkit.info"; then
16995          . $DEVKIT_ROOT/devkit.info
16996          # This potentially sets the following:
16997          # A descriptive name of the devkit
16998
16999  if test "x$DEVKIT_NAME" = x; then
17000    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17001  fi
17002
17003          # Corresponds to --with-extra-path
17004
17005  if test "x$DEVKIT_EXTRA_PATH" = x; then
17006    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17007  fi
17008
17009          # Corresponds to --with-toolchain-path
17010
17011  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17012    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17013  fi
17014
17015          # Corresponds to --with-sysroot
17016
17017  if test "x$DEVKIT_SYSROOT" = x; then
17018    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17019  fi
17020
17021
17022          # Identifies the Visual Studio version in the devkit
17023
17024  if test "x$DEVKIT_VS_VERSION" = x; then
17025    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17026  fi
17027
17028          # The Visual Studio include environment variable
17029
17030  if test "x$DEVKIT_VS_INCLUDE" = x; then
17031    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17032  fi
17033
17034          # The Visual Studio lib environment variable
17035
17036  if test "x$DEVKIT_VS_LIB" = x; then
17037    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17038  fi
17039
17040          # Corresponds to --with-msvcr-dll
17041
17042  if test "x$DEVKIT_MSVCR_DLL" = x; then
17043    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17044  fi
17045
17046          # Corresponds to --with-msvcp-dll
17047
17048  if test "x$DEVKIT_MSVCP_DLL" = x; then
17049    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17050  fi
17051
17052        fi
17053
17054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17055$as_echo_n "checking for devkit... " >&6; }
17056        if test "x$DEVKIT_NAME" != x; then
17057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17058$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17059        else
17060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17061$as_echo "$DEVKIT_ROOT" >&6; }
17062        fi
17063
17064
17065  if test "x$DEVKIT_EXTRA_PATH" != x; then
17066    if test "x$EXTRA_PATH" = x; then
17067      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17068    else
17069      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17070    fi
17071  fi
17072
17073
17074        # Fallback default of just /bin if DEVKIT_PATH is not defined
17075        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17076          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17077        fi
17078
17079  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17080    if test "x$TOOLCHAIN_PATH" = x; then
17081      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17082    else
17083      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17084    fi
17085  fi
17086
17087
17088        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17089        # places for backwards compatiblity.
17090        if test "x$DEVKIT_SYSROOT" != x; then
17091          SYSROOT="$DEVKIT_SYSROOT"
17092        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17093          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17094        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17095          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17096        fi
17097
17098
17099fi
17100
17101
17102  # You can force the sysroot if the sysroot encoded into the compiler tools
17103  # is not correct.
17104
17105# Check whether --with-sys-root was given.
17106if test "${with_sys_root+set}" = set; then :
17107  withval=$with_sys_root; SYSROOT=$with_sys_root
17108
17109fi
17110
17111
17112
17113# Check whether --with-sysroot was given.
17114if test "${with_sysroot+set}" = set; then :
17115  withval=$with_sysroot; SYSROOT=$with_sysroot
17116
17117fi
17118
17119
17120
17121# Check whether --with-tools-dir was given.
17122if test "${with_tools_dir+set}" = set; then :
17123  withval=$with_tools_dir;
17124  if test "x$with_tools_dir" != x; then
17125    if test "x$TOOLCHAIN_PATH" = x; then
17126      TOOLCHAIN_PATH="$with_tools_dir"
17127    else
17128      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17129    fi
17130  fi
17131
17132
17133fi
17134
17135
17136
17137# Check whether --with-toolchain-path was given.
17138if test "${with_toolchain_path+set}" = set; then :
17139  withval=$with_toolchain_path;
17140  if test "x$with_toolchain_path" != x; then
17141    if test "x$TOOLCHAIN_PATH" = x; then
17142      TOOLCHAIN_PATH="$with_toolchain_path"
17143    else
17144      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17145    fi
17146  fi
17147
17148
17149fi
17150
17151
17152
17153# Check whether --with-extra-path was given.
17154if test "${with_extra_path+set}" = set; then :
17155  withval=$with_extra_path;
17156  if test "x$with_extra_path" != x; then
17157    if test "x$EXTRA_PATH" = x; then
17158      EXTRA_PATH="$with_extra_path"
17159    else
17160      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17161    fi
17162  fi
17163
17164
17165fi
17166
17167
17168  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17169    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17170    # If not, detect if Xcode is installed by running xcodebuild -version
17171    # if no Xcode installed, xcodebuild exits with 1
17172    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17173    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17174      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17175      # fall back on the stub binary in /usr/bin/xcodebuild
17176      # Extract the first word of "xcodebuild", so it can be a program name with args.
17177set dummy xcodebuild; ac_word=$2
17178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17179$as_echo_n "checking for $ac_word... " >&6; }
17180if ${ac_cv_path_XCODEBUILD+:} false; then :
17181  $as_echo_n "(cached) " >&6
17182else
17183  case $XCODEBUILD in
17184  [\\/]* | ?:[\\/]*)
17185  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17186  ;;
17187  *)
17188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17189for as_dir in $TOOLCHAIN_PATH
17190do
17191  IFS=$as_save_IFS
17192  test -z "$as_dir" && as_dir=.
17193    for ac_exec_ext in '' $ac_executable_extensions; do
17194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17195    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17197    break 2
17198  fi
17199done
17200  done
17201IFS=$as_save_IFS
17202
17203  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17204  ;;
17205esac
17206fi
17207XCODEBUILD=$ac_cv_path_XCODEBUILD
17208if test -n "$XCODEBUILD"; then
17209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17210$as_echo "$XCODEBUILD" >&6; }
17211else
17212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17213$as_echo "no" >&6; }
17214fi
17215
17216
17217    else
17218      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17219      # when only the command line tools are installed there are no SDKs, so headers
17220      # are copied into the system frameworks
17221      XCODEBUILD=
17222
17223    fi
17224
17225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17226$as_echo_n "checking for sdk name... " >&6; }
17227
17228# Check whether --with-sdk-name was given.
17229if test "${with_sdk_name+set}" = set; then :
17230  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17231
17232fi
17233
17234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17235$as_echo "$SDKNAME" >&6; }
17236
17237    # if toolchain path is specified then don't rely on system headers, they may not compile
17238    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17239    test -z "$TOOLCHAIN_PATH" && \
17240      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17241
17242    if test -z "$SYSROOT"; then
17243      if test -n "$XCODEBUILD"; then
17244        # if we don't have system headers, use default SDK name (last resort)
17245        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17246          SDKNAME=${SDKNAME:-macosx}
17247        fi
17248
17249        if test -n "$SDKNAME"; then
17250          # Call xcodebuild to determine SYSROOT
17251          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17252        fi
17253      else
17254        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17255          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
17256        fi
17257      fi
17258    else
17259      # warn user if --with-sdk-name was also set
17260      if test -n "$with_sdk_name"; then
17261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17262$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17263      fi
17264    fi
17265
17266    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17267      # If no system framework headers, then SYSROOT must be set, or we won't build
17268      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
17269    fi
17270
17271    # Perform a basic sanity test
17272    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17273      if test -z "$SYSROOT"; then
17274        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
17275      else
17276        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17277      fi
17278    fi
17279
17280    # set SDKROOT too, Xcode tools will pick it up
17281    SDKROOT=$SYSROOT
17282
17283  fi
17284
17285  # Prepend the extra path to the global path
17286
17287  if test "x$EXTRA_PATH" != x; then
17288    if test "x$PATH" = x; then
17289      PATH="$EXTRA_PATH"
17290    else
17291      PATH="$EXTRA_PATH:$PATH"
17292    fi
17293  fi
17294
17295
17296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17297$as_echo_n "checking for sysroot... " >&6; }
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17299$as_echo "$SYSROOT" >&6; }
17300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17301$as_echo_n "checking for toolchain path... " >&6; }
17302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17303$as_echo "$TOOLCHAIN_PATH" >&6; }
17304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17305$as_echo_n "checking for extra path... " >&6; }
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17307$as_echo "$EXTRA_PATH" >&6; }
17308
17309
17310# To properly create a configuration name, we need to have the OpenJDK target
17311# and options (variants and debug level) parsed.
17312
17313
17314
17315# Check whether --with-conf-name was given.
17316if test "${with_conf_name+set}" = set; then :
17317  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17318fi
17319
17320
17321  # Test from where we are running configure, in or outside of src root.
17322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17323$as_echo_n "checking where to store configuration... " >&6; }
17324  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17325      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17326      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17327    # We are running configure from the src root.
17328    # Create a default ./build/target-variant-debuglevel output root.
17329    if test "x${CONF_NAME}" = x; then
17330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17331$as_echo "in default location" >&6; }
17332      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17333    else
17334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17335$as_echo "in build directory with custom name" >&6; }
17336    fi
17337    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17338    $MKDIR -p "$OUTPUT_ROOT"
17339    if test ! -d "$OUTPUT_ROOT"; then
17340      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17341    fi
17342  else
17343    # We are running configure from outside of the src dir.
17344    # Then use the current directory as output dir!
17345    # If configuration is situated in normal build directory, just use the build
17346    # directory name as configuration name, otherwise use the complete path.
17347    if test "x${CONF_NAME}" = x; then
17348      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17349    fi
17350    OUTPUT_ROOT="$CURDIR"
17351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17352$as_echo "in current directory" >&6; }
17353
17354    # WARNING: This might be a bad thing to do. You need to be sure you want to
17355    # have a configuration in this directory. Do some sanity checks!
17356
17357    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17358      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17359      # other files
17360      files_present=`$LS $OUTPUT_ROOT`
17361      # Configure has already touched config.log and confdefs.h in the current dir when this check
17362      # is performed.
17363      filtered_files=`$ECHO "$files_present" \
17364          | $SED -e 's/config.log//g' \
17365              -e 's/configure.log//g' \
17366              -e 's/confdefs.h//g' \
17367              -e 's/ //g' \
17368          | $TR -d '\n'`
17369      if test "x$filtered_files" != x; then
17370        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17371$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17373$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17375$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17376        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17377$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17378        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17379$as_echo "$as_me: seriously mess up just about everything." >&6;}
17380        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17381$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17382        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17383$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17384        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17385      fi
17386    fi
17387  fi
17388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17389$as_echo_n "checking what configuration name to use... " >&6; }
17390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17391$as_echo "$CONF_NAME" >&6; }
17392
17393
17394  # Only process if variable expands to non-empty
17395
17396  if test "x$OUTPUT_ROOT" != x; then
17397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17398
17399  # Input might be given as Windows format, start by converting to
17400  # unix format.
17401  path="$OUTPUT_ROOT"
17402  new_path=`$CYGPATH -u "$path"`
17403
17404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17407  # "foo.exe" is OK but "foo" is an error.
17408  #
17409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17410  # It is also a way to make sure we got the proper file name for the real test later on.
17411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17412  if test "x$test_shortpath" = x; then
17413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17414$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17415    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17416  fi
17417
17418  # Call helper function which possibly converts this using DOS-style short mode.
17419  # If so, the updated path is stored in $new_path.
17420
17421  input_path="$new_path"
17422  # Check if we need to convert this using DOS-style short mode. If the path
17423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17424  # take no chances and rewrite it.
17425  # Note: m4 eats our [], so we need to use [ and ] instead.
17426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17427  if test "x$has_forbidden_chars" != x; then
17428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17432      # Going to short mode and back again did indeed matter. Since short mode is
17433      # case insensitive, let's make it lowercase to improve readability.
17434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17435      # Now convert it back to Unix-style (cygpath)
17436      input_path=`$CYGPATH -u "$shortmode_path"`
17437      new_path="$input_path"
17438    fi
17439  fi
17440
17441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17442  if test "x$test_cygdrive_prefix" = x; then
17443    # As a simple fix, exclude /usr/bin since it's not a real path.
17444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17446      # a path prefixed by /cygdrive for fixpath to work.
17447      new_path="$CYGWIN_ROOT_PATH$input_path"
17448    fi
17449  fi
17450
17451
17452  if test "x$path" != "x$new_path"; then
17453    OUTPUT_ROOT="$new_path"
17454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17455$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17456  fi
17457
17458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17459
17460  path="$OUTPUT_ROOT"
17461  has_colon=`$ECHO $path | $GREP ^.:`
17462  new_path="$path"
17463  if test "x$has_colon" = x; then
17464    # Not in mixed or Windows style, start by that.
17465    new_path=`cmd //c echo $path`
17466  fi
17467
17468
17469  input_path="$new_path"
17470  # Check if we need to convert this using DOS-style short mode. If the path
17471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17472  # take no chances and rewrite it.
17473  # Note: m4 eats our [], so we need to use [ and ] instead.
17474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17475  if test "x$has_forbidden_chars" != x; then
17476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17478  fi
17479
17480
17481  windows_path="$new_path"
17482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17483    unix_path=`$CYGPATH -u "$windows_path"`
17484    new_path="$unix_path"
17485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17487    new_path="$unix_path"
17488  fi
17489
17490  if test "x$path" != "x$new_path"; then
17491    OUTPUT_ROOT="$new_path"
17492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17493$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17494  fi
17495
17496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17498
17499    else
17500      # We're on a unix platform. Hooray! :)
17501      path="$OUTPUT_ROOT"
17502      has_space=`$ECHO "$path" | $GREP " "`
17503      if test "x$has_space" != x; then
17504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17505$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17507      fi
17508
17509      # Use eval to expand a potential ~
17510      eval path="$path"
17511      if test ! -f "$path" && test ! -d "$path"; then
17512        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17513      fi
17514
17515      if test -d "$path"; then
17516        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17517      else
17518        dir="`$DIRNAME "$path"`"
17519        base="`$BASENAME "$path"`"
17520        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17521      fi
17522    fi
17523  fi
17524
17525
17526  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17527  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17528
17529  SPEC=$OUTPUT_ROOT/spec.gmk
17530
17531  CONF_NAME=$CONF_NAME
17532
17533  OUTPUT_ROOT=$OUTPUT_ROOT
17534
17535
17536
17537  # The spec.gmk file contains all variables for the make system.
17538  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17539
17540  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17541  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17542
17543  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17544  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17545
17546  # The compare.sh is used to compare the build output to other builds.
17547  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17548
17549  # The generated Makefile knows where the spec.gmk is and where the source is.
17550  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17551  # which will look for generated configurations
17552  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17553
17554
17555
17556# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17557
17558  for ac_prog in apt-get yum brew port pkgutil pkgadd
17559do
17560  # Extract the first word of "$ac_prog", so it can be a program name with args.
17561set dummy $ac_prog; ac_word=$2
17562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17563$as_echo_n "checking for $ac_word... " >&6; }
17564if ${ac_cv_prog_PKGHANDLER+:} false; then :
17565  $as_echo_n "(cached) " >&6
17566else
17567  if test -n "$PKGHANDLER"; then
17568  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17569else
17570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17571for as_dir in $PATH
17572do
17573  IFS=$as_save_IFS
17574  test -z "$as_dir" && as_dir=.
17575    for ac_exec_ext in '' $ac_executable_extensions; do
17576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17577    ac_cv_prog_PKGHANDLER="$ac_prog"
17578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17579    break 2
17580  fi
17581done
17582  done
17583IFS=$as_save_IFS
17584
17585fi
17586fi
17587PKGHANDLER=$ac_cv_prog_PKGHANDLER
17588if test -n "$PKGHANDLER"; then
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17590$as_echo "$PKGHANDLER" >&6; }
17591else
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17593$as_echo "no" >&6; }
17594fi
17595
17596
17597  test -n "$PKGHANDLER" && break
17598done
17599
17600
17601
17602# Setup tools that requires more complex handling, or that is not needed by the configure script.
17603
17604
17605
17606  # Publish this variable in the help.
17607
17608
17609  if [ -z "${MAKE+x}" ]; then
17610    # The variable is not set by user, try to locate tool using the code snippet
17611
17612    # Try our hardest to locate a correct version of GNU make
17613    for ac_prog in gmake
17614do
17615  # Extract the first word of "$ac_prog", so it can be a program name with args.
17616set dummy $ac_prog; ac_word=$2
17617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17618$as_echo_n "checking for $ac_word... " >&6; }
17619if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17620  $as_echo_n "(cached) " >&6
17621else
17622  case $CHECK_GMAKE in
17623  [\\/]* | ?:[\\/]*)
17624  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17625  ;;
17626  *)
17627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17628for as_dir in $PATH
17629do
17630  IFS=$as_save_IFS
17631  test -z "$as_dir" && as_dir=.
17632    for ac_exec_ext in '' $ac_executable_extensions; do
17633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17634    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17636    break 2
17637  fi
17638done
17639  done
17640IFS=$as_save_IFS
17641
17642  ;;
17643esac
17644fi
17645CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17646if test -n "$CHECK_GMAKE"; then
17647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17648$as_echo "$CHECK_GMAKE" >&6; }
17649else
17650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17651$as_echo "no" >&6; }
17652fi
17653
17654
17655  test -n "$CHECK_GMAKE" && break
17656done
17657
17658
17659  MAKE_CANDIDATE=""$CHECK_GMAKE""
17660  DESCRIPTION="gmake in PATH"
17661
17662  # On Cygwin, we require a newer version of make than on other platforms
17663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17664    MAKE_VERSION_EXPR="-e 4\."
17665    MAKE_REQUIRED_VERSION="4.0"
17666   else
17667    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17668    MAKE_REQUIRED_VERSION="3.81"
17669  fi
17670
17671  if test "x$MAKE_CANDIDATE" != x; then
17672    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17673$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17674    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17675    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17676    if test "x$IS_GNU_MAKE" = x; then
17677      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17678$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17679    else
17680      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17681      if test "x$IS_MODERN_MAKE" = x; then
17682        { $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
17683$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;}
17684      else
17685        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17686          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17687            MAKE_EXPECTED_ENV='cygwin'
17688          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17689            MAKE_EXPECTED_ENV='msys'
17690          else
17691            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17692          fi
17693          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17694          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17695        else
17696          # Not relevant for non-Windows
17697          IS_MAKE_CORRECT_ENV=true
17698        fi
17699        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17700          { $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
17701$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;}
17702        else
17703          FOUND_MAKE=$MAKE_CANDIDATE
17704
17705  # Only process if variable expands to non-empty
17706
17707  if test "x$FOUND_MAKE" != x; then
17708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17709
17710  # First separate the path from the arguments. This will split at the first
17711  # space.
17712  complete="$FOUND_MAKE"
17713  path="${complete%% *}"
17714  tmp="$complete EOL"
17715  arguments="${tmp#* }"
17716
17717  # Input might be given as Windows format, start by converting to
17718  # unix format.
17719  new_path=`$CYGPATH -u "$path"`
17720
17721  # Now try to locate executable using which
17722  new_path=`$WHICH "$new_path" 2> /dev/null`
17723  # bat and cmd files are not always considered executable in cygwin causing which
17724  # to not find them
17725  if test "x$new_path" = x \
17726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17728    new_path=`$CYGPATH -u "$path"`
17729  fi
17730  if test "x$new_path" = x; then
17731    # Oops. Which didn't find the executable.
17732    # The splitting of arguments from the executable at a space might have been incorrect,
17733    # since paths with space are more likely in Windows. Give it another try with the whole
17734    # argument.
17735    path="$complete"
17736    arguments="EOL"
17737    new_path=`$CYGPATH -u "$path"`
17738    new_path=`$WHICH "$new_path" 2> /dev/null`
17739    # bat and cmd files are not always considered executable in cygwin causing which
17740    # to not find them
17741    if test "x$new_path" = x \
17742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17744      new_path=`$CYGPATH -u "$path"`
17745    fi
17746    if test "x$new_path" = x; then
17747      # It's still not found. Now this is an unrecoverable error.
17748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17750      has_space=`$ECHO "$complete" | $GREP " "`
17751      if test "x$has_space" != x; then
17752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17754      fi
17755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17756    fi
17757  fi
17758
17759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17762  # "foo.exe" is OK but "foo" is an error.
17763  #
17764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17765  # It is also a way to make sure we got the proper file name for the real test later on.
17766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17767  if test "x$test_shortpath" = x; then
17768    # Short path failed, file does not exist as specified.
17769    # Try adding .exe or .cmd
17770    if test -f "${new_path}.exe"; then
17771      input_to_shortpath="${new_path}.exe"
17772    elif test -f "${new_path}.cmd"; then
17773      input_to_shortpath="${new_path}.cmd"
17774    else
17775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17776$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17779      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17780    fi
17781  else
17782    input_to_shortpath="$new_path"
17783  fi
17784
17785  # Call helper function which possibly converts this using DOS-style short mode.
17786  # If so, the updated path is stored in $new_path.
17787  new_path="$input_to_shortpath"
17788
17789  input_path="$input_to_shortpath"
17790  # Check if we need to convert this using DOS-style short mode. If the path
17791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17792  # take no chances and rewrite it.
17793  # Note: m4 eats our [], so we need to use [ and ] instead.
17794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17795  if test "x$has_forbidden_chars" != x; then
17796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17800      # Going to short mode and back again did indeed matter. Since short mode is
17801      # case insensitive, let's make it lowercase to improve readability.
17802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17803      # Now convert it back to Unix-style (cygpath)
17804      input_path=`$CYGPATH -u "$shortmode_path"`
17805      new_path="$input_path"
17806    fi
17807  fi
17808
17809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17810  if test "x$test_cygdrive_prefix" = x; then
17811    # As a simple fix, exclude /usr/bin since it's not a real path.
17812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17814      # a path prefixed by /cygdrive for fixpath to work.
17815      new_path="$CYGWIN_ROOT_PATH$input_path"
17816    fi
17817  fi
17818
17819  # remove trailing .exe if any
17820  new_path="${new_path/%.exe/}"
17821
17822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17823
17824  # First separate the path from the arguments. This will split at the first
17825  # space.
17826  complete="$FOUND_MAKE"
17827  path="${complete%% *}"
17828  tmp="$complete EOL"
17829  arguments="${tmp#* }"
17830
17831  # Input might be given as Windows format, start by converting to
17832  # unix format.
17833  new_path="$path"
17834
17835  windows_path="$new_path"
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837    unix_path=`$CYGPATH -u "$windows_path"`
17838    new_path="$unix_path"
17839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17841    new_path="$unix_path"
17842  fi
17843
17844
17845  # Now try to locate executable using which
17846  new_path=`$WHICH "$new_path" 2> /dev/null`
17847
17848  if test "x$new_path" = x; then
17849    # Oops. Which didn't find the executable.
17850    # The splitting of arguments from the executable at a space might have been incorrect,
17851    # since paths with space are more likely in Windows. Give it another try with the whole
17852    # argument.
17853    path="$complete"
17854    arguments="EOL"
17855    new_path="$path"
17856
17857  windows_path="$new_path"
17858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17859    unix_path=`$CYGPATH -u "$windows_path"`
17860    new_path="$unix_path"
17861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17863    new_path="$unix_path"
17864  fi
17865
17866
17867    new_path=`$WHICH "$new_path" 2> /dev/null`
17868    # bat and cmd files are not always considered executable in MSYS causing which
17869    # to not find them
17870    if test "x$new_path" = x \
17871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17873      new_path="$path"
17874
17875  windows_path="$new_path"
17876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17877    unix_path=`$CYGPATH -u "$windows_path"`
17878    new_path="$unix_path"
17879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17881    new_path="$unix_path"
17882  fi
17883
17884    fi
17885
17886    if test "x$new_path" = x; then
17887      # It's still not found. Now this is an unrecoverable error.
17888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17890      has_space=`$ECHO "$complete" | $GREP " "`
17891      if test "x$has_space" != x; then
17892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17894      fi
17895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17896    fi
17897  fi
17898
17899  # Now new_path has a complete unix path to the binary
17900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17901    # Keep paths in /bin as-is, but remove trailing .exe if any
17902    new_path="${new_path/%.exe/}"
17903    # Do not save /bin paths to all_fixpath_prefixes!
17904  else
17905    # Not in mixed or Windows style, start by that.
17906    new_path=`cmd //c echo $new_path`
17907
17908  input_path="$new_path"
17909  # Check if we need to convert this using DOS-style short mode. If the path
17910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17911  # take no chances and rewrite it.
17912  # Note: m4 eats our [], so we need to use [ and ] instead.
17913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17914  if test "x$has_forbidden_chars" != x; then
17915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17917  fi
17918
17919    # Output is in $new_path
17920
17921  windows_path="$new_path"
17922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17923    unix_path=`$CYGPATH -u "$windows_path"`
17924    new_path="$unix_path"
17925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17927    new_path="$unix_path"
17928  fi
17929
17930    # remove trailing .exe if any
17931    new_path="${new_path/%.exe/}"
17932
17933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17935  fi
17936
17937    else
17938      # We're on a unix platform. Hooray! :)
17939      # First separate the path from the arguments. This will split at the first
17940      # space.
17941      complete="$FOUND_MAKE"
17942      path="${complete%% *}"
17943      tmp="$complete EOL"
17944      arguments="${tmp#* }"
17945
17946      # Cannot rely on the command "which" here since it doesn't always work.
17947      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17948      if test -z "$is_absolute_path"; then
17949        # Path to executable is not absolute. Find it.
17950        IFS_save="$IFS"
17951        IFS=:
17952        for p in $PATH; do
17953          if test -f "$p/$path" && test -x "$p/$path"; then
17954            new_path="$p/$path"
17955            break
17956          fi
17957        done
17958        IFS="$IFS_save"
17959      else
17960        # This is an absolute path, we can use it without further modifications.
17961        new_path="$path"
17962      fi
17963
17964      if test "x$new_path" = x; then
17965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17967        has_space=`$ECHO "$complete" | $GREP " "`
17968        if test "x$has_space" != x; then
17969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17971        fi
17972        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17973      fi
17974    fi
17975
17976    # Now join together the path and the arguments once again
17977    if test "x$arguments" != xEOL; then
17978      new_complete="$new_path ${arguments% *}"
17979    else
17980      new_complete="$new_path"
17981    fi
17982
17983    if test "x$complete" != "x$new_complete"; then
17984      FOUND_MAKE="$new_complete"
17985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17986$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17987    fi
17988  fi
17989
17990        fi
17991      fi
17992    fi
17993  fi
17994
17995
17996    if test "x$FOUND_MAKE" = x; then
17997      for ac_prog in make
17998do
17999  # Extract the first word of "$ac_prog", so it can be a program name with args.
18000set dummy $ac_prog; ac_word=$2
18001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18002$as_echo_n "checking for $ac_word... " >&6; }
18003if ${ac_cv_path_CHECK_MAKE+:} false; then :
18004  $as_echo_n "(cached) " >&6
18005else
18006  case $CHECK_MAKE in
18007  [\\/]* | ?:[\\/]*)
18008  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18009  ;;
18010  *)
18011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18012for as_dir in $PATH
18013do
18014  IFS=$as_save_IFS
18015  test -z "$as_dir" && as_dir=.
18016    for ac_exec_ext in '' $ac_executable_extensions; do
18017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18018    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18020    break 2
18021  fi
18022done
18023  done
18024IFS=$as_save_IFS
18025
18026  ;;
18027esac
18028fi
18029CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18030if test -n "$CHECK_MAKE"; then
18031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18032$as_echo "$CHECK_MAKE" >&6; }
18033else
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18035$as_echo "no" >&6; }
18036fi
18037
18038
18039  test -n "$CHECK_MAKE" && break
18040done
18041
18042
18043  MAKE_CANDIDATE=""$CHECK_MAKE""
18044  DESCRIPTION="make in PATH"
18045
18046  # On Cygwin, we require a newer version of make than on other platforms
18047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18048    MAKE_VERSION_EXPR="-e 4\."
18049    MAKE_REQUIRED_VERSION="4.0"
18050   else
18051    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18052    MAKE_REQUIRED_VERSION="3.81"
18053  fi
18054
18055  if test "x$MAKE_CANDIDATE" != x; then
18056    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18057$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18058    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18059    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18060    if test "x$IS_GNU_MAKE" = x; then
18061      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18062$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18063    else
18064      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18065      if test "x$IS_MODERN_MAKE" = x; then
18066        { $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
18067$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;}
18068      else
18069        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18070          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18071            MAKE_EXPECTED_ENV='cygwin'
18072          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18073            MAKE_EXPECTED_ENV='msys'
18074          else
18075            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18076          fi
18077          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18078          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18079        else
18080          # Not relevant for non-Windows
18081          IS_MAKE_CORRECT_ENV=true
18082        fi
18083        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18084          { $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
18085$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;}
18086        else
18087          FOUND_MAKE=$MAKE_CANDIDATE
18088
18089  # Only process if variable expands to non-empty
18090
18091  if test "x$FOUND_MAKE" != x; then
18092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18093
18094  # First separate the path from the arguments. This will split at the first
18095  # space.
18096  complete="$FOUND_MAKE"
18097  path="${complete%% *}"
18098  tmp="$complete EOL"
18099  arguments="${tmp#* }"
18100
18101  # Input might be given as Windows format, start by converting to
18102  # unix format.
18103  new_path=`$CYGPATH -u "$path"`
18104
18105  # Now try to locate executable using which
18106  new_path=`$WHICH "$new_path" 2> /dev/null`
18107  # bat and cmd files are not always considered executable in cygwin causing which
18108  # to not find them
18109  if test "x$new_path" = x \
18110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18112    new_path=`$CYGPATH -u "$path"`
18113  fi
18114  if test "x$new_path" = x; then
18115    # Oops. Which didn't find the executable.
18116    # The splitting of arguments from the executable at a space might have been incorrect,
18117    # since paths with space are more likely in Windows. Give it another try with the whole
18118    # argument.
18119    path="$complete"
18120    arguments="EOL"
18121    new_path=`$CYGPATH -u "$path"`
18122    new_path=`$WHICH "$new_path" 2> /dev/null`
18123    # bat and cmd files are not always considered executable in cygwin causing which
18124    # to not find them
18125    if test "x$new_path" = x \
18126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18128      new_path=`$CYGPATH -u "$path"`
18129    fi
18130    if test "x$new_path" = x; then
18131      # It's still not found. Now this is an unrecoverable error.
18132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18134      has_space=`$ECHO "$complete" | $GREP " "`
18135      if test "x$has_space" != x; then
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18138      fi
18139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18140    fi
18141  fi
18142
18143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18146  # "foo.exe" is OK but "foo" is an error.
18147  #
18148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18149  # It is also a way to make sure we got the proper file name for the real test later on.
18150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18151  if test "x$test_shortpath" = x; then
18152    # Short path failed, file does not exist as specified.
18153    # Try adding .exe or .cmd
18154    if test -f "${new_path}.exe"; then
18155      input_to_shortpath="${new_path}.exe"
18156    elif test -f "${new_path}.cmd"; then
18157      input_to_shortpath="${new_path}.cmd"
18158    else
18159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18164    fi
18165  else
18166    input_to_shortpath="$new_path"
18167  fi
18168
18169  # Call helper function which possibly converts this using DOS-style short mode.
18170  # If so, the updated path is stored in $new_path.
18171  new_path="$input_to_shortpath"
18172
18173  input_path="$input_to_shortpath"
18174  # Check if we need to convert this using DOS-style short mode. If the path
18175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18176  # take no chances and rewrite it.
18177  # Note: m4 eats our [], so we need to use [ and ] instead.
18178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18179  if test "x$has_forbidden_chars" != x; then
18180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18184      # Going to short mode and back again did indeed matter. Since short mode is
18185      # case insensitive, let's make it lowercase to improve readability.
18186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18187      # Now convert it back to Unix-style (cygpath)
18188      input_path=`$CYGPATH -u "$shortmode_path"`
18189      new_path="$input_path"
18190    fi
18191  fi
18192
18193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18194  if test "x$test_cygdrive_prefix" = x; then
18195    # As a simple fix, exclude /usr/bin since it's not a real path.
18196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18198      # a path prefixed by /cygdrive for fixpath to work.
18199      new_path="$CYGWIN_ROOT_PATH$input_path"
18200    fi
18201  fi
18202
18203  # remove trailing .exe if any
18204  new_path="${new_path/%.exe/}"
18205
18206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18207
18208  # First separate the path from the arguments. This will split at the first
18209  # space.
18210  complete="$FOUND_MAKE"
18211  path="${complete%% *}"
18212  tmp="$complete EOL"
18213  arguments="${tmp#* }"
18214
18215  # Input might be given as Windows format, start by converting to
18216  # unix format.
18217  new_path="$path"
18218
18219  windows_path="$new_path"
18220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18221    unix_path=`$CYGPATH -u "$windows_path"`
18222    new_path="$unix_path"
18223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18225    new_path="$unix_path"
18226  fi
18227
18228
18229  # Now try to locate executable using which
18230  new_path=`$WHICH "$new_path" 2> /dev/null`
18231
18232  if test "x$new_path" = x; then
18233    # Oops. Which didn't find the executable.
18234    # The splitting of arguments from the executable at a space might have been incorrect,
18235    # since paths with space are more likely in Windows. Give it another try with the whole
18236    # argument.
18237    path="$complete"
18238    arguments="EOL"
18239    new_path="$path"
18240
18241  windows_path="$new_path"
18242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18243    unix_path=`$CYGPATH -u "$windows_path"`
18244    new_path="$unix_path"
18245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18247    new_path="$unix_path"
18248  fi
18249
18250
18251    new_path=`$WHICH "$new_path" 2> /dev/null`
18252    # bat and cmd files are not always considered executable in MSYS causing which
18253    # to not find them
18254    if test "x$new_path" = x \
18255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18257      new_path="$path"
18258
18259  windows_path="$new_path"
18260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18261    unix_path=`$CYGPATH -u "$windows_path"`
18262    new_path="$unix_path"
18263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18265    new_path="$unix_path"
18266  fi
18267
18268    fi
18269
18270    if test "x$new_path" = x; then
18271      # It's still not found. Now this is an unrecoverable error.
18272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18274      has_space=`$ECHO "$complete" | $GREP " "`
18275      if test "x$has_space" != x; then
18276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18278      fi
18279      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18280    fi
18281  fi
18282
18283  # Now new_path has a complete unix path to the binary
18284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18285    # Keep paths in /bin as-is, but remove trailing .exe if any
18286    new_path="${new_path/%.exe/}"
18287    # Do not save /bin paths to all_fixpath_prefixes!
18288  else
18289    # Not in mixed or Windows style, start by that.
18290    new_path=`cmd //c echo $new_path`
18291
18292  input_path="$new_path"
18293  # Check if we need to convert this using DOS-style short mode. If the path
18294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18295  # take no chances and rewrite it.
18296  # Note: m4 eats our [], so we need to use [ and ] instead.
18297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18298  if test "x$has_forbidden_chars" != x; then
18299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18301  fi
18302
18303    # Output is in $new_path
18304
18305  windows_path="$new_path"
18306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18307    unix_path=`$CYGPATH -u "$windows_path"`
18308    new_path="$unix_path"
18309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18311    new_path="$unix_path"
18312  fi
18313
18314    # remove trailing .exe if any
18315    new_path="${new_path/%.exe/}"
18316
18317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18319  fi
18320
18321    else
18322      # We're on a unix platform. Hooray! :)
18323      # First separate the path from the arguments. This will split at the first
18324      # space.
18325      complete="$FOUND_MAKE"
18326      path="${complete%% *}"
18327      tmp="$complete EOL"
18328      arguments="${tmp#* }"
18329
18330      # Cannot rely on the command "which" here since it doesn't always work.
18331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18332      if test -z "$is_absolute_path"; then
18333        # Path to executable is not absolute. Find it.
18334        IFS_save="$IFS"
18335        IFS=:
18336        for p in $PATH; do
18337          if test -f "$p/$path" && test -x "$p/$path"; then
18338            new_path="$p/$path"
18339            break
18340          fi
18341        done
18342        IFS="$IFS_save"
18343      else
18344        # This is an absolute path, we can use it without further modifications.
18345        new_path="$path"
18346      fi
18347
18348      if test "x$new_path" = x; then
18349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18350$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18351        has_space=`$ECHO "$complete" | $GREP " "`
18352        if test "x$has_space" != x; then
18353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18355        fi
18356        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18357      fi
18358    fi
18359
18360    # Now join together the path and the arguments once again
18361    if test "x$arguments" != xEOL; then
18362      new_complete="$new_path ${arguments% *}"
18363    else
18364      new_complete="$new_path"
18365    fi
18366
18367    if test "x$complete" != "x$new_complete"; then
18368      FOUND_MAKE="$new_complete"
18369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18370$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18371    fi
18372  fi
18373
18374        fi
18375      fi
18376    fi
18377  fi
18378
18379    fi
18380
18381    if test "x$FOUND_MAKE" = x; then
18382      if test "x$TOOLCHAIN_PATH" != x; then
18383        # We have a toolchain path, check that as well before giving up.
18384        OLD_PATH=$PATH
18385        PATH=$TOOLCHAIN_PATH:$PATH
18386        for ac_prog in gmake
18387do
18388  # Extract the first word of "$ac_prog", so it can be a program name with args.
18389set dummy $ac_prog; ac_word=$2
18390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18391$as_echo_n "checking for $ac_word... " >&6; }
18392if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18393  $as_echo_n "(cached) " >&6
18394else
18395  case $CHECK_TOOLSDIR_GMAKE in
18396  [\\/]* | ?:[\\/]*)
18397  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18398  ;;
18399  *)
18400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18401for as_dir in $PATH
18402do
18403  IFS=$as_save_IFS
18404  test -z "$as_dir" && as_dir=.
18405    for ac_exec_ext in '' $ac_executable_extensions; do
18406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18407    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18409    break 2
18410  fi
18411done
18412  done
18413IFS=$as_save_IFS
18414
18415  ;;
18416esac
18417fi
18418CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18419if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18421$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18422else
18423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18424$as_echo "no" >&6; }
18425fi
18426
18427
18428  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18429done
18430
18431
18432  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18433  DESCRIPTION="gmake in tools-dir"
18434
18435  # On Cygwin, we require a newer version of make than on other platforms
18436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18437    MAKE_VERSION_EXPR="-e 4\."
18438    MAKE_REQUIRED_VERSION="4.0"
18439   else
18440    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18441    MAKE_REQUIRED_VERSION="3.81"
18442  fi
18443
18444  if test "x$MAKE_CANDIDATE" != x; then
18445    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18446$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18447    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18448    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18449    if test "x$IS_GNU_MAKE" = x; then
18450      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18451$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18452    else
18453      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18454      if test "x$IS_MODERN_MAKE" = x; then
18455        { $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
18456$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;}
18457      else
18458        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18459          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18460            MAKE_EXPECTED_ENV='cygwin'
18461          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18462            MAKE_EXPECTED_ENV='msys'
18463          else
18464            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18465          fi
18466          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18467          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18468        else
18469          # Not relevant for non-Windows
18470          IS_MAKE_CORRECT_ENV=true
18471        fi
18472        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18473          { $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
18474$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;}
18475        else
18476          FOUND_MAKE=$MAKE_CANDIDATE
18477
18478  # Only process if variable expands to non-empty
18479
18480  if test "x$FOUND_MAKE" != x; then
18481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18482
18483  # First separate the path from the arguments. This will split at the first
18484  # space.
18485  complete="$FOUND_MAKE"
18486  path="${complete%% *}"
18487  tmp="$complete EOL"
18488  arguments="${tmp#* }"
18489
18490  # Input might be given as Windows format, start by converting to
18491  # unix format.
18492  new_path=`$CYGPATH -u "$path"`
18493
18494  # Now try to locate executable using which
18495  new_path=`$WHICH "$new_path" 2> /dev/null`
18496  # bat and cmd files are not always considered executable in cygwin causing which
18497  # to not find them
18498  if test "x$new_path" = x \
18499      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18500      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18501    new_path=`$CYGPATH -u "$path"`
18502  fi
18503  if test "x$new_path" = x; then
18504    # Oops. Which didn't find the executable.
18505    # The splitting of arguments from the executable at a space might have been incorrect,
18506    # since paths with space are more likely in Windows. Give it another try with the whole
18507    # argument.
18508    path="$complete"
18509    arguments="EOL"
18510    new_path=`$CYGPATH -u "$path"`
18511    new_path=`$WHICH "$new_path" 2> /dev/null`
18512    # bat and cmd files are not always considered executable in cygwin causing which
18513    # to not find them
18514    if test "x$new_path" = x \
18515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18517      new_path=`$CYGPATH -u "$path"`
18518    fi
18519    if test "x$new_path" = x; then
18520      # It's still not found. Now this is an unrecoverable error.
18521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18522$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18523      has_space=`$ECHO "$complete" | $GREP " "`
18524      if test "x$has_space" != x; then
18525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18527      fi
18528      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18529    fi
18530  fi
18531
18532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18535  # "foo.exe" is OK but "foo" is an error.
18536  #
18537  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18538  # It is also a way to make sure we got the proper file name for the real test later on.
18539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18540  if test "x$test_shortpath" = x; then
18541    # Short path failed, file does not exist as specified.
18542    # Try adding .exe or .cmd
18543    if test -f "${new_path}.exe"; then
18544      input_to_shortpath="${new_path}.exe"
18545    elif test -f "${new_path}.cmd"; then
18546      input_to_shortpath="${new_path}.cmd"
18547    else
18548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18549$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18550      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18551$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18552      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18553    fi
18554  else
18555    input_to_shortpath="$new_path"
18556  fi
18557
18558  # Call helper function which possibly converts this using DOS-style short mode.
18559  # If so, the updated path is stored in $new_path.
18560  new_path="$input_to_shortpath"
18561
18562  input_path="$input_to_shortpath"
18563  # Check if we need to convert this using DOS-style short mode. If the path
18564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18565  # take no chances and rewrite it.
18566  # Note: m4 eats our [], so we need to use [ and ] instead.
18567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18568  if test "x$has_forbidden_chars" != x; then
18569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18573      # Going to short mode and back again did indeed matter. Since short mode is
18574      # case insensitive, let's make it lowercase to improve readability.
18575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18576      # Now convert it back to Unix-style (cygpath)
18577      input_path=`$CYGPATH -u "$shortmode_path"`
18578      new_path="$input_path"
18579    fi
18580  fi
18581
18582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18583  if test "x$test_cygdrive_prefix" = x; then
18584    # As a simple fix, exclude /usr/bin since it's not a real path.
18585    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18587      # a path prefixed by /cygdrive for fixpath to work.
18588      new_path="$CYGWIN_ROOT_PATH$input_path"
18589    fi
18590  fi
18591
18592  # remove trailing .exe if any
18593  new_path="${new_path/%.exe/}"
18594
18595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18596
18597  # First separate the path from the arguments. This will split at the first
18598  # space.
18599  complete="$FOUND_MAKE"
18600  path="${complete%% *}"
18601  tmp="$complete EOL"
18602  arguments="${tmp#* }"
18603
18604  # Input might be given as Windows format, start by converting to
18605  # unix format.
18606  new_path="$path"
18607
18608  windows_path="$new_path"
18609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18610    unix_path=`$CYGPATH -u "$windows_path"`
18611    new_path="$unix_path"
18612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18614    new_path="$unix_path"
18615  fi
18616
18617
18618  # Now try to locate executable using which
18619  new_path=`$WHICH "$new_path" 2> /dev/null`
18620
18621  if test "x$new_path" = x; then
18622    # Oops. Which didn't find the executable.
18623    # The splitting of arguments from the executable at a space might have been incorrect,
18624    # since paths with space are more likely in Windows. Give it another try with the whole
18625    # argument.
18626    path="$complete"
18627    arguments="EOL"
18628    new_path="$path"
18629
18630  windows_path="$new_path"
18631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18632    unix_path=`$CYGPATH -u "$windows_path"`
18633    new_path="$unix_path"
18634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18636    new_path="$unix_path"
18637  fi
18638
18639
18640    new_path=`$WHICH "$new_path" 2> /dev/null`
18641    # bat and cmd files are not always considered executable in MSYS causing which
18642    # to not find them
18643    if test "x$new_path" = x \
18644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18646      new_path="$path"
18647
18648  windows_path="$new_path"
18649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18650    unix_path=`$CYGPATH -u "$windows_path"`
18651    new_path="$unix_path"
18652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18654    new_path="$unix_path"
18655  fi
18656
18657    fi
18658
18659    if test "x$new_path" = x; then
18660      # It's still not found. Now this is an unrecoverable error.
18661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18662$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18663      has_space=`$ECHO "$complete" | $GREP " "`
18664      if test "x$has_space" != x; then
18665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18667      fi
18668      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18669    fi
18670  fi
18671
18672  # Now new_path has a complete unix path to the binary
18673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18674    # Keep paths in /bin as-is, but remove trailing .exe if any
18675    new_path="${new_path/%.exe/}"
18676    # Do not save /bin paths to all_fixpath_prefixes!
18677  else
18678    # Not in mixed or Windows style, start by that.
18679    new_path=`cmd //c echo $new_path`
18680
18681  input_path="$new_path"
18682  # Check if we need to convert this using DOS-style short mode. If the path
18683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18684  # take no chances and rewrite it.
18685  # Note: m4 eats our [], so we need to use [ and ] instead.
18686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18687  if test "x$has_forbidden_chars" != x; then
18688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18690  fi
18691
18692    # Output is in $new_path
18693
18694  windows_path="$new_path"
18695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18696    unix_path=`$CYGPATH -u "$windows_path"`
18697    new_path="$unix_path"
18698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18700    new_path="$unix_path"
18701  fi
18702
18703    # remove trailing .exe if any
18704    new_path="${new_path/%.exe/}"
18705
18706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18708  fi
18709
18710    else
18711      # We're on a unix platform. Hooray! :)
18712      # First separate the path from the arguments. This will split at the first
18713      # space.
18714      complete="$FOUND_MAKE"
18715      path="${complete%% *}"
18716      tmp="$complete EOL"
18717      arguments="${tmp#* }"
18718
18719      # Cannot rely on the command "which" here since it doesn't always work.
18720      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18721      if test -z "$is_absolute_path"; then
18722        # Path to executable is not absolute. Find it.
18723        IFS_save="$IFS"
18724        IFS=:
18725        for p in $PATH; do
18726          if test -f "$p/$path" && test -x "$p/$path"; then
18727            new_path="$p/$path"
18728            break
18729          fi
18730        done
18731        IFS="$IFS_save"
18732      else
18733        # This is an absolute path, we can use it without further modifications.
18734        new_path="$path"
18735      fi
18736
18737      if test "x$new_path" = x; then
18738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18739$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18740        has_space=`$ECHO "$complete" | $GREP " "`
18741        if test "x$has_space" != x; then
18742          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18743$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18744        fi
18745        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18746      fi
18747    fi
18748
18749    # Now join together the path and the arguments once again
18750    if test "x$arguments" != xEOL; then
18751      new_complete="$new_path ${arguments% *}"
18752    else
18753      new_complete="$new_path"
18754    fi
18755
18756    if test "x$complete" != "x$new_complete"; then
18757      FOUND_MAKE="$new_complete"
18758      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18759$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18760    fi
18761  fi
18762
18763        fi
18764      fi
18765    fi
18766  fi
18767
18768        if test "x$FOUND_MAKE" = x; then
18769          for ac_prog in make
18770do
18771  # Extract the first word of "$ac_prog", so it can be a program name with args.
18772set dummy $ac_prog; ac_word=$2
18773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18774$as_echo_n "checking for $ac_word... " >&6; }
18775if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18776  $as_echo_n "(cached) " >&6
18777else
18778  case $CHECK_TOOLSDIR_MAKE in
18779  [\\/]* | ?:[\\/]*)
18780  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18781  ;;
18782  *)
18783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18784for as_dir in $PATH
18785do
18786  IFS=$as_save_IFS
18787  test -z "$as_dir" && as_dir=.
18788    for ac_exec_ext in '' $ac_executable_extensions; do
18789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18790    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18792    break 2
18793  fi
18794done
18795  done
18796IFS=$as_save_IFS
18797
18798  ;;
18799esac
18800fi
18801CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18802if test -n "$CHECK_TOOLSDIR_MAKE"; then
18803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18804$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18805else
18806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18807$as_echo "no" >&6; }
18808fi
18809
18810
18811  test -n "$CHECK_TOOLSDIR_MAKE" && break
18812done
18813
18814
18815  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18816  DESCRIPTION="make in tools-dir"
18817
18818  # On Cygwin, we require a newer version of make than on other platforms
18819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18820    MAKE_VERSION_EXPR="-e 4\."
18821    MAKE_REQUIRED_VERSION="4.0"
18822   else
18823    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18824    MAKE_REQUIRED_VERSION="3.81"
18825  fi
18826
18827  if test "x$MAKE_CANDIDATE" != x; then
18828    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18829$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18830    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18831    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18832    if test "x$IS_GNU_MAKE" = x; then
18833      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18834$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18835    else
18836      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18837      if test "x$IS_MODERN_MAKE" = x; then
18838        { $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
18839$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;}
18840      else
18841        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18842          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18843            MAKE_EXPECTED_ENV='cygwin'
18844          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18845            MAKE_EXPECTED_ENV='msys'
18846          else
18847            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18848          fi
18849          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18850          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18851        else
18852          # Not relevant for non-Windows
18853          IS_MAKE_CORRECT_ENV=true
18854        fi
18855        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18856          { $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
18857$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;}
18858        else
18859          FOUND_MAKE=$MAKE_CANDIDATE
18860
18861  # Only process if variable expands to non-empty
18862
18863  if test "x$FOUND_MAKE" != x; then
18864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18865
18866  # First separate the path from the arguments. This will split at the first
18867  # space.
18868  complete="$FOUND_MAKE"
18869  path="${complete%% *}"
18870  tmp="$complete EOL"
18871  arguments="${tmp#* }"
18872
18873  # Input might be given as Windows format, start by converting to
18874  # unix format.
18875  new_path=`$CYGPATH -u "$path"`
18876
18877  # Now try to locate executable using which
18878  new_path=`$WHICH "$new_path" 2> /dev/null`
18879  # bat and cmd files are not always considered executable in cygwin causing which
18880  # to not find them
18881  if test "x$new_path" = x \
18882      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18883      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18884    new_path=`$CYGPATH -u "$path"`
18885  fi
18886  if test "x$new_path" = x; then
18887    # Oops. Which didn't find the executable.
18888    # The splitting of arguments from the executable at a space might have been incorrect,
18889    # since paths with space are more likely in Windows. Give it another try with the whole
18890    # argument.
18891    path="$complete"
18892    arguments="EOL"
18893    new_path=`$CYGPATH -u "$path"`
18894    new_path=`$WHICH "$new_path" 2> /dev/null`
18895    # bat and cmd files are not always considered executable in cygwin causing which
18896    # to not find them
18897    if test "x$new_path" = x \
18898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18900      new_path=`$CYGPATH -u "$path"`
18901    fi
18902    if test "x$new_path" = x; then
18903      # It's still not found. Now this is an unrecoverable error.
18904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18906      has_space=`$ECHO "$complete" | $GREP " "`
18907      if test "x$has_space" != x; then
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18910      fi
18911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18912    fi
18913  fi
18914
18915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18918  # "foo.exe" is OK but "foo" is an error.
18919  #
18920  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18921  # It is also a way to make sure we got the proper file name for the real test later on.
18922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18923  if test "x$test_shortpath" = x; then
18924    # Short path failed, file does not exist as specified.
18925    # Try adding .exe or .cmd
18926    if test -f "${new_path}.exe"; then
18927      input_to_shortpath="${new_path}.exe"
18928    elif test -f "${new_path}.cmd"; then
18929      input_to_shortpath="${new_path}.cmd"
18930    else
18931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18932$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18935      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18936    fi
18937  else
18938    input_to_shortpath="$new_path"
18939  fi
18940
18941  # Call helper function which possibly converts this using DOS-style short mode.
18942  # If so, the updated path is stored in $new_path.
18943  new_path="$input_to_shortpath"
18944
18945  input_path="$input_to_shortpath"
18946  # Check if we need to convert this using DOS-style short mode. If the path
18947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18948  # take no chances and rewrite it.
18949  # Note: m4 eats our [], so we need to use [ and ] instead.
18950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18951  if test "x$has_forbidden_chars" != x; then
18952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18956      # Going to short mode and back again did indeed matter. Since short mode is
18957      # case insensitive, let's make it lowercase to improve readability.
18958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18959      # Now convert it back to Unix-style (cygpath)
18960      input_path=`$CYGPATH -u "$shortmode_path"`
18961      new_path="$input_path"
18962    fi
18963  fi
18964
18965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18966  if test "x$test_cygdrive_prefix" = x; then
18967    # As a simple fix, exclude /usr/bin since it's not a real path.
18968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18970      # a path prefixed by /cygdrive for fixpath to work.
18971      new_path="$CYGWIN_ROOT_PATH$input_path"
18972    fi
18973  fi
18974
18975  # remove trailing .exe if any
18976  new_path="${new_path/%.exe/}"
18977
18978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18979
18980  # First separate the path from the arguments. This will split at the first
18981  # space.
18982  complete="$FOUND_MAKE"
18983  path="${complete%% *}"
18984  tmp="$complete EOL"
18985  arguments="${tmp#* }"
18986
18987  # Input might be given as Windows format, start by converting to
18988  # unix format.
18989  new_path="$path"
18990
18991  windows_path="$new_path"
18992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18993    unix_path=`$CYGPATH -u "$windows_path"`
18994    new_path="$unix_path"
18995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18997    new_path="$unix_path"
18998  fi
18999
19000
19001  # Now try to locate executable using which
19002  new_path=`$WHICH "$new_path" 2> /dev/null`
19003
19004  if test "x$new_path" = x; then
19005    # Oops. Which didn't find the executable.
19006    # The splitting of arguments from the executable at a space might have been incorrect,
19007    # since paths with space are more likely in Windows. Give it another try with the whole
19008    # argument.
19009    path="$complete"
19010    arguments="EOL"
19011    new_path="$path"
19012
19013  windows_path="$new_path"
19014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19015    unix_path=`$CYGPATH -u "$windows_path"`
19016    new_path="$unix_path"
19017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19019    new_path="$unix_path"
19020  fi
19021
19022
19023    new_path=`$WHICH "$new_path" 2> /dev/null`
19024    # bat and cmd files are not always considered executable in MSYS causing which
19025    # to not find them
19026    if test "x$new_path" = x \
19027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19029      new_path="$path"
19030
19031  windows_path="$new_path"
19032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19033    unix_path=`$CYGPATH -u "$windows_path"`
19034    new_path="$unix_path"
19035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19037    new_path="$unix_path"
19038  fi
19039
19040    fi
19041
19042    if test "x$new_path" = x; then
19043      # It's still not found. Now this is an unrecoverable error.
19044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19045$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19046      has_space=`$ECHO "$complete" | $GREP " "`
19047      if test "x$has_space" != x; then
19048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19050      fi
19051      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19052    fi
19053  fi
19054
19055  # Now new_path has a complete unix path to the binary
19056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19057    # Keep paths in /bin as-is, but remove trailing .exe if any
19058    new_path="${new_path/%.exe/}"
19059    # Do not save /bin paths to all_fixpath_prefixes!
19060  else
19061    # Not in mixed or Windows style, start by that.
19062    new_path=`cmd //c echo $new_path`
19063
19064  input_path="$new_path"
19065  # Check if we need to convert this using DOS-style short mode. If the path
19066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19067  # take no chances and rewrite it.
19068  # Note: m4 eats our [], so we need to use [ and ] instead.
19069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19070  if test "x$has_forbidden_chars" != x; then
19071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19073  fi
19074
19075    # Output is in $new_path
19076
19077  windows_path="$new_path"
19078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19079    unix_path=`$CYGPATH -u "$windows_path"`
19080    new_path="$unix_path"
19081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19083    new_path="$unix_path"
19084  fi
19085
19086    # remove trailing .exe if any
19087    new_path="${new_path/%.exe/}"
19088
19089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19091  fi
19092
19093    else
19094      # We're on a unix platform. Hooray! :)
19095      # First separate the path from the arguments. This will split at the first
19096      # space.
19097      complete="$FOUND_MAKE"
19098      path="${complete%% *}"
19099      tmp="$complete EOL"
19100      arguments="${tmp#* }"
19101
19102      # Cannot rely on the command "which" here since it doesn't always work.
19103      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19104      if test -z "$is_absolute_path"; then
19105        # Path to executable is not absolute. Find it.
19106        IFS_save="$IFS"
19107        IFS=:
19108        for p in $PATH; do
19109          if test -f "$p/$path" && test -x "$p/$path"; then
19110            new_path="$p/$path"
19111            break
19112          fi
19113        done
19114        IFS="$IFS_save"
19115      else
19116        # This is an absolute path, we can use it without further modifications.
19117        new_path="$path"
19118      fi
19119
19120      if test "x$new_path" = x; then
19121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19122$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19123        has_space=`$ECHO "$complete" | $GREP " "`
19124        if test "x$has_space" != x; then
19125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19127        fi
19128        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19129      fi
19130    fi
19131
19132    # Now join together the path and the arguments once again
19133    if test "x$arguments" != xEOL; then
19134      new_complete="$new_path ${arguments% *}"
19135    else
19136      new_complete="$new_path"
19137    fi
19138
19139    if test "x$complete" != "x$new_complete"; then
19140      FOUND_MAKE="$new_complete"
19141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19142$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19143    fi
19144  fi
19145
19146        fi
19147      fi
19148    fi
19149  fi
19150
19151        fi
19152        PATH=$OLD_PATH
19153      fi
19154    fi
19155
19156    if test "x$FOUND_MAKE" = x; then
19157      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
19158    fi
19159
19160  else
19161    # The variable is set, but is it from the command line or the environment?
19162
19163    # Try to remove the string !MAKE! from our list.
19164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19166      # If it failed, the variable was not from the command line. Ignore it,
19167      # but warn the user (except for BASH, which is always set by the calling BASH).
19168      if test "xMAKE" != xBASH; then
19169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19170$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19171      fi
19172      # Try to locate tool using the code snippet
19173
19174    # Try our hardest to locate a correct version of GNU make
19175    for ac_prog in gmake
19176do
19177  # Extract the first word of "$ac_prog", so it can be a program name with args.
19178set dummy $ac_prog; ac_word=$2
19179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19180$as_echo_n "checking for $ac_word... " >&6; }
19181if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19182  $as_echo_n "(cached) " >&6
19183else
19184  case $CHECK_GMAKE in
19185  [\\/]* | ?:[\\/]*)
19186  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19187  ;;
19188  *)
19189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19190for as_dir in $PATH
19191do
19192  IFS=$as_save_IFS
19193  test -z "$as_dir" && as_dir=.
19194    for ac_exec_ext in '' $ac_executable_extensions; do
19195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19196    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19198    break 2
19199  fi
19200done
19201  done
19202IFS=$as_save_IFS
19203
19204  ;;
19205esac
19206fi
19207CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19208if test -n "$CHECK_GMAKE"; then
19209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19210$as_echo "$CHECK_GMAKE" >&6; }
19211else
19212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19213$as_echo "no" >&6; }
19214fi
19215
19216
19217  test -n "$CHECK_GMAKE" && break
19218done
19219
19220
19221  MAKE_CANDIDATE=""$CHECK_GMAKE""
19222  DESCRIPTION="gmake in PATH"
19223
19224  # On Cygwin, we require a newer version of make than on other platforms
19225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19226    MAKE_VERSION_EXPR="-e 4\."
19227    MAKE_REQUIRED_VERSION="4.0"
19228   else
19229    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19230    MAKE_REQUIRED_VERSION="3.81"
19231  fi
19232
19233  if test "x$MAKE_CANDIDATE" != x; then
19234    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19235$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19236    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19237    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19238    if test "x$IS_GNU_MAKE" = x; then
19239      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19240$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19241    else
19242      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19243      if test "x$IS_MODERN_MAKE" = x; then
19244        { $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
19245$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;}
19246      else
19247        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19248          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19249            MAKE_EXPECTED_ENV='cygwin'
19250          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251            MAKE_EXPECTED_ENV='msys'
19252          else
19253            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19254          fi
19255          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19256          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19257        else
19258          # Not relevant for non-Windows
19259          IS_MAKE_CORRECT_ENV=true
19260        fi
19261        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19262          { $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
19263$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;}
19264        else
19265          FOUND_MAKE=$MAKE_CANDIDATE
19266
19267  # Only process if variable expands to non-empty
19268
19269  if test "x$FOUND_MAKE" != x; then
19270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19271
19272  # First separate the path from the arguments. This will split at the first
19273  # space.
19274  complete="$FOUND_MAKE"
19275  path="${complete%% *}"
19276  tmp="$complete EOL"
19277  arguments="${tmp#* }"
19278
19279  # Input might be given as Windows format, start by converting to
19280  # unix format.
19281  new_path=`$CYGPATH -u "$path"`
19282
19283  # Now try to locate executable using which
19284  new_path=`$WHICH "$new_path" 2> /dev/null`
19285  # bat and cmd files are not always considered executable in cygwin causing which
19286  # to not find them
19287  if test "x$new_path" = x \
19288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19290    new_path=`$CYGPATH -u "$path"`
19291  fi
19292  if test "x$new_path" = x; then
19293    # Oops. Which didn't find the executable.
19294    # The splitting of arguments from the executable at a space might have been incorrect,
19295    # since paths with space are more likely in Windows. Give it another try with the whole
19296    # argument.
19297    path="$complete"
19298    arguments="EOL"
19299    new_path=`$CYGPATH -u "$path"`
19300    new_path=`$WHICH "$new_path" 2> /dev/null`
19301    # bat and cmd files are not always considered executable in cygwin causing which
19302    # to not find them
19303    if test "x$new_path" = x \
19304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19306      new_path=`$CYGPATH -u "$path"`
19307    fi
19308    if test "x$new_path" = x; then
19309      # It's still not found. Now this is an unrecoverable error.
19310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19311$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19312      has_space=`$ECHO "$complete" | $GREP " "`
19313      if test "x$has_space" != x; then
19314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19316      fi
19317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19318    fi
19319  fi
19320
19321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19324  # "foo.exe" is OK but "foo" is an error.
19325  #
19326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19327  # It is also a way to make sure we got the proper file name for the real test later on.
19328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19329  if test "x$test_shortpath" = x; then
19330    # Short path failed, file does not exist as specified.
19331    # Try adding .exe or .cmd
19332    if test -f "${new_path}.exe"; then
19333      input_to_shortpath="${new_path}.exe"
19334    elif test -f "${new_path}.cmd"; then
19335      input_to_shortpath="${new_path}.cmd"
19336    else
19337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19338$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19341      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19342    fi
19343  else
19344    input_to_shortpath="$new_path"
19345  fi
19346
19347  # Call helper function which possibly converts this using DOS-style short mode.
19348  # If so, the updated path is stored in $new_path.
19349  new_path="$input_to_shortpath"
19350
19351  input_path="$input_to_shortpath"
19352  # Check if we need to convert this using DOS-style short mode. If the path
19353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19354  # take no chances and rewrite it.
19355  # Note: m4 eats our [], so we need to use [ and ] instead.
19356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19357  if test "x$has_forbidden_chars" != x; then
19358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19362      # Going to short mode and back again did indeed matter. Since short mode is
19363      # case insensitive, let's make it lowercase to improve readability.
19364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19365      # Now convert it back to Unix-style (cygpath)
19366      input_path=`$CYGPATH -u "$shortmode_path"`
19367      new_path="$input_path"
19368    fi
19369  fi
19370
19371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19372  if test "x$test_cygdrive_prefix" = x; then
19373    # As a simple fix, exclude /usr/bin since it's not a real path.
19374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19376      # a path prefixed by /cygdrive for fixpath to work.
19377      new_path="$CYGWIN_ROOT_PATH$input_path"
19378    fi
19379  fi
19380
19381  # remove trailing .exe if any
19382  new_path="${new_path/%.exe/}"
19383
19384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19385
19386  # First separate the path from the arguments. This will split at the first
19387  # space.
19388  complete="$FOUND_MAKE"
19389  path="${complete%% *}"
19390  tmp="$complete EOL"
19391  arguments="${tmp#* }"
19392
19393  # Input might be given as Windows format, start by converting to
19394  # unix format.
19395  new_path="$path"
19396
19397  windows_path="$new_path"
19398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399    unix_path=`$CYGPATH -u "$windows_path"`
19400    new_path="$unix_path"
19401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19403    new_path="$unix_path"
19404  fi
19405
19406
19407  # Now try to locate executable using which
19408  new_path=`$WHICH "$new_path" 2> /dev/null`
19409
19410  if test "x$new_path" = x; then
19411    # Oops. Which didn't find the executable.
19412    # The splitting of arguments from the executable at a space might have been incorrect,
19413    # since paths with space are more likely in Windows. Give it another try with the whole
19414    # argument.
19415    path="$complete"
19416    arguments="EOL"
19417    new_path="$path"
19418
19419  windows_path="$new_path"
19420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19421    unix_path=`$CYGPATH -u "$windows_path"`
19422    new_path="$unix_path"
19423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19425    new_path="$unix_path"
19426  fi
19427
19428
19429    new_path=`$WHICH "$new_path" 2> /dev/null`
19430    # bat and cmd files are not always considered executable in MSYS causing which
19431    # to not find them
19432    if test "x$new_path" = x \
19433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19435      new_path="$path"
19436
19437  windows_path="$new_path"
19438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19439    unix_path=`$CYGPATH -u "$windows_path"`
19440    new_path="$unix_path"
19441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19443    new_path="$unix_path"
19444  fi
19445
19446    fi
19447
19448    if test "x$new_path" = x; then
19449      # It's still not found. Now this is an unrecoverable error.
19450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19451$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19452      has_space=`$ECHO "$complete" | $GREP " "`
19453      if test "x$has_space" != x; then
19454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19456      fi
19457      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19458    fi
19459  fi
19460
19461  # Now new_path has a complete unix path to the binary
19462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19463    # Keep paths in /bin as-is, but remove trailing .exe if any
19464    new_path="${new_path/%.exe/}"
19465    # Do not save /bin paths to all_fixpath_prefixes!
19466  else
19467    # Not in mixed or Windows style, start by that.
19468    new_path=`cmd //c echo $new_path`
19469
19470  input_path="$new_path"
19471  # Check if we need to convert this using DOS-style short mode. If the path
19472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19473  # take no chances and rewrite it.
19474  # Note: m4 eats our [], so we need to use [ and ] instead.
19475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19476  if test "x$has_forbidden_chars" != x; then
19477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19479  fi
19480
19481    # Output is in $new_path
19482
19483  windows_path="$new_path"
19484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19485    unix_path=`$CYGPATH -u "$windows_path"`
19486    new_path="$unix_path"
19487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19489    new_path="$unix_path"
19490  fi
19491
19492    # remove trailing .exe if any
19493    new_path="${new_path/%.exe/}"
19494
19495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19497  fi
19498
19499    else
19500      # We're on a unix platform. Hooray! :)
19501      # First separate the path from the arguments. This will split at the first
19502      # space.
19503      complete="$FOUND_MAKE"
19504      path="${complete%% *}"
19505      tmp="$complete EOL"
19506      arguments="${tmp#* }"
19507
19508      # Cannot rely on the command "which" here since it doesn't always work.
19509      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19510      if test -z "$is_absolute_path"; then
19511        # Path to executable is not absolute. Find it.
19512        IFS_save="$IFS"
19513        IFS=:
19514        for p in $PATH; do
19515          if test -f "$p/$path" && test -x "$p/$path"; then
19516            new_path="$p/$path"
19517            break
19518          fi
19519        done
19520        IFS="$IFS_save"
19521      else
19522        # This is an absolute path, we can use it without further modifications.
19523        new_path="$path"
19524      fi
19525
19526      if test "x$new_path" = x; then
19527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19529        has_space=`$ECHO "$complete" | $GREP " "`
19530        if test "x$has_space" != x; then
19531          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19532$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19533        fi
19534        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19535      fi
19536    fi
19537
19538    # Now join together the path and the arguments once again
19539    if test "x$arguments" != xEOL; then
19540      new_complete="$new_path ${arguments% *}"
19541    else
19542      new_complete="$new_path"
19543    fi
19544
19545    if test "x$complete" != "x$new_complete"; then
19546      FOUND_MAKE="$new_complete"
19547      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19548$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19549    fi
19550  fi
19551
19552        fi
19553      fi
19554    fi
19555  fi
19556
19557
19558    if test "x$FOUND_MAKE" = x; then
19559      for ac_prog in make
19560do
19561  # Extract the first word of "$ac_prog", so it can be a program name with args.
19562set dummy $ac_prog; ac_word=$2
19563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19564$as_echo_n "checking for $ac_word... " >&6; }
19565if ${ac_cv_path_CHECK_MAKE+:} false; then :
19566  $as_echo_n "(cached) " >&6
19567else
19568  case $CHECK_MAKE in
19569  [\\/]* | ?:[\\/]*)
19570  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19571  ;;
19572  *)
19573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19574for as_dir in $PATH
19575do
19576  IFS=$as_save_IFS
19577  test -z "$as_dir" && as_dir=.
19578    for ac_exec_ext in '' $ac_executable_extensions; do
19579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19580    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19582    break 2
19583  fi
19584done
19585  done
19586IFS=$as_save_IFS
19587
19588  ;;
19589esac
19590fi
19591CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19592if test -n "$CHECK_MAKE"; then
19593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19594$as_echo "$CHECK_MAKE" >&6; }
19595else
19596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19597$as_echo "no" >&6; }
19598fi
19599
19600
19601  test -n "$CHECK_MAKE" && break
19602done
19603
19604
19605  MAKE_CANDIDATE=""$CHECK_MAKE""
19606  DESCRIPTION="make in PATH"
19607
19608  # On Cygwin, we require a newer version of make than on other platforms
19609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19610    MAKE_VERSION_EXPR="-e 4\."
19611    MAKE_REQUIRED_VERSION="4.0"
19612   else
19613    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19614    MAKE_REQUIRED_VERSION="3.81"
19615  fi
19616
19617  if test "x$MAKE_CANDIDATE" != x; then
19618    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19619$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19620    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19621    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19622    if test "x$IS_GNU_MAKE" = x; then
19623      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19624$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19625    else
19626      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19627      if test "x$IS_MODERN_MAKE" = x; then
19628        { $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
19629$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;}
19630      else
19631        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19632          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19633            MAKE_EXPECTED_ENV='cygwin'
19634          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19635            MAKE_EXPECTED_ENV='msys'
19636          else
19637            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19638          fi
19639          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19640          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19641        else
19642          # Not relevant for non-Windows
19643          IS_MAKE_CORRECT_ENV=true
19644        fi
19645        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19646          { $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
19647$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;}
19648        else
19649          FOUND_MAKE=$MAKE_CANDIDATE
19650
19651  # Only process if variable expands to non-empty
19652
19653  if test "x$FOUND_MAKE" != x; then
19654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19655
19656  # First separate the path from the arguments. This will split at the first
19657  # space.
19658  complete="$FOUND_MAKE"
19659  path="${complete%% *}"
19660  tmp="$complete EOL"
19661  arguments="${tmp#* }"
19662
19663  # Input might be given as Windows format, start by converting to
19664  # unix format.
19665  new_path=`$CYGPATH -u "$path"`
19666
19667  # Now try to locate executable using which
19668  new_path=`$WHICH "$new_path" 2> /dev/null`
19669  # bat and cmd files are not always considered executable in cygwin causing which
19670  # to not find them
19671  if test "x$new_path" = x \
19672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19674    new_path=`$CYGPATH -u "$path"`
19675  fi
19676  if test "x$new_path" = x; then
19677    # Oops. Which didn't find the executable.
19678    # The splitting of arguments from the executable at a space might have been incorrect,
19679    # since paths with space are more likely in Windows. Give it another try with the whole
19680    # argument.
19681    path="$complete"
19682    arguments="EOL"
19683    new_path=`$CYGPATH -u "$path"`
19684    new_path=`$WHICH "$new_path" 2> /dev/null`
19685    # bat and cmd files are not always considered executable in cygwin causing which
19686    # to not find them
19687    if test "x$new_path" = x \
19688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19690      new_path=`$CYGPATH -u "$path"`
19691    fi
19692    if test "x$new_path" = x; then
19693      # It's still not found. Now this is an unrecoverable error.
19694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19696      has_space=`$ECHO "$complete" | $GREP " "`
19697      if test "x$has_space" != x; then
19698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19700      fi
19701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19702    fi
19703  fi
19704
19705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19708  # "foo.exe" is OK but "foo" is an error.
19709  #
19710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19711  # It is also a way to make sure we got the proper file name for the real test later on.
19712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19713  if test "x$test_shortpath" = x; then
19714    # Short path failed, file does not exist as specified.
19715    # Try adding .exe or .cmd
19716    if test -f "${new_path}.exe"; then
19717      input_to_shortpath="${new_path}.exe"
19718    elif test -f "${new_path}.cmd"; then
19719      input_to_shortpath="${new_path}.cmd"
19720    else
19721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19726    fi
19727  else
19728    input_to_shortpath="$new_path"
19729  fi
19730
19731  # Call helper function which possibly converts this using DOS-style short mode.
19732  # If so, the updated path is stored in $new_path.
19733  new_path="$input_to_shortpath"
19734
19735  input_path="$input_to_shortpath"
19736  # Check if we need to convert this using DOS-style short mode. If the path
19737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19738  # take no chances and rewrite it.
19739  # Note: m4 eats our [], so we need to use [ and ] instead.
19740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19741  if test "x$has_forbidden_chars" != x; then
19742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19746      # Going to short mode and back again did indeed matter. Since short mode is
19747      # case insensitive, let's make it lowercase to improve readability.
19748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19749      # Now convert it back to Unix-style (cygpath)
19750      input_path=`$CYGPATH -u "$shortmode_path"`
19751      new_path="$input_path"
19752    fi
19753  fi
19754
19755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19756  if test "x$test_cygdrive_prefix" = x; then
19757    # As a simple fix, exclude /usr/bin since it's not a real path.
19758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19760      # a path prefixed by /cygdrive for fixpath to work.
19761      new_path="$CYGWIN_ROOT_PATH$input_path"
19762    fi
19763  fi
19764
19765  # remove trailing .exe if any
19766  new_path="${new_path/%.exe/}"
19767
19768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19769
19770  # First separate the path from the arguments. This will split at the first
19771  # space.
19772  complete="$FOUND_MAKE"
19773  path="${complete%% *}"
19774  tmp="$complete EOL"
19775  arguments="${tmp#* }"
19776
19777  # Input might be given as Windows format, start by converting to
19778  # unix format.
19779  new_path="$path"
19780
19781  windows_path="$new_path"
19782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19783    unix_path=`$CYGPATH -u "$windows_path"`
19784    new_path="$unix_path"
19785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19787    new_path="$unix_path"
19788  fi
19789
19790
19791  # Now try to locate executable using which
19792  new_path=`$WHICH "$new_path" 2> /dev/null`
19793
19794  if test "x$new_path" = x; then
19795    # Oops. Which didn't find the executable.
19796    # The splitting of arguments from the executable at a space might have been incorrect,
19797    # since paths with space are more likely in Windows. Give it another try with the whole
19798    # argument.
19799    path="$complete"
19800    arguments="EOL"
19801    new_path="$path"
19802
19803  windows_path="$new_path"
19804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19805    unix_path=`$CYGPATH -u "$windows_path"`
19806    new_path="$unix_path"
19807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19809    new_path="$unix_path"
19810  fi
19811
19812
19813    new_path=`$WHICH "$new_path" 2> /dev/null`
19814    # bat and cmd files are not always considered executable in MSYS causing which
19815    # to not find them
19816    if test "x$new_path" = x \
19817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19819      new_path="$path"
19820
19821  windows_path="$new_path"
19822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19823    unix_path=`$CYGPATH -u "$windows_path"`
19824    new_path="$unix_path"
19825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19827    new_path="$unix_path"
19828  fi
19829
19830    fi
19831
19832    if test "x$new_path" = x; then
19833      # It's still not found. Now this is an unrecoverable error.
19834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19835$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19836      has_space=`$ECHO "$complete" | $GREP " "`
19837      if test "x$has_space" != x; then
19838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19840      fi
19841      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19842    fi
19843  fi
19844
19845  # Now new_path has a complete unix path to the binary
19846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19847    # Keep paths in /bin as-is, but remove trailing .exe if any
19848    new_path="${new_path/%.exe/}"
19849    # Do not save /bin paths to all_fixpath_prefixes!
19850  else
19851    # Not in mixed or Windows style, start by that.
19852    new_path=`cmd //c echo $new_path`
19853
19854  input_path="$new_path"
19855  # Check if we need to convert this using DOS-style short mode. If the path
19856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19857  # take no chances and rewrite it.
19858  # Note: m4 eats our [], so we need to use [ and ] instead.
19859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19860  if test "x$has_forbidden_chars" != x; then
19861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19863  fi
19864
19865    # Output is in $new_path
19866
19867  windows_path="$new_path"
19868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19869    unix_path=`$CYGPATH -u "$windows_path"`
19870    new_path="$unix_path"
19871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19873    new_path="$unix_path"
19874  fi
19875
19876    # remove trailing .exe if any
19877    new_path="${new_path/%.exe/}"
19878
19879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19881  fi
19882
19883    else
19884      # We're on a unix platform. Hooray! :)
19885      # First separate the path from the arguments. This will split at the first
19886      # space.
19887      complete="$FOUND_MAKE"
19888      path="${complete%% *}"
19889      tmp="$complete EOL"
19890      arguments="${tmp#* }"
19891
19892      # Cannot rely on the command "which" here since it doesn't always work.
19893      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19894      if test -z "$is_absolute_path"; then
19895        # Path to executable is not absolute. Find it.
19896        IFS_save="$IFS"
19897        IFS=:
19898        for p in $PATH; do
19899          if test -f "$p/$path" && test -x "$p/$path"; then
19900            new_path="$p/$path"
19901            break
19902          fi
19903        done
19904        IFS="$IFS_save"
19905      else
19906        # This is an absolute path, we can use it without further modifications.
19907        new_path="$path"
19908      fi
19909
19910      if test "x$new_path" = x; then
19911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19912$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19913        has_space=`$ECHO "$complete" | $GREP " "`
19914        if test "x$has_space" != x; then
19915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19917        fi
19918        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19919      fi
19920    fi
19921
19922    # Now join together the path and the arguments once again
19923    if test "x$arguments" != xEOL; then
19924      new_complete="$new_path ${arguments% *}"
19925    else
19926      new_complete="$new_path"
19927    fi
19928
19929    if test "x$complete" != "x$new_complete"; then
19930      FOUND_MAKE="$new_complete"
19931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19932$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19933    fi
19934  fi
19935
19936        fi
19937      fi
19938    fi
19939  fi
19940
19941    fi
19942
19943    if test "x$FOUND_MAKE" = x; then
19944      if test "x$TOOLCHAIN_PATH" != x; then
19945        # We have a toolchain path, check that as well before giving up.
19946        OLD_PATH=$PATH
19947        PATH=$TOOLCHAIN_PATH:$PATH
19948        for ac_prog in gmake
19949do
19950  # Extract the first word of "$ac_prog", so it can be a program name with args.
19951set dummy $ac_prog; ac_word=$2
19952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19953$as_echo_n "checking for $ac_word... " >&6; }
19954if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19955  $as_echo_n "(cached) " >&6
19956else
19957  case $CHECK_TOOLSDIR_GMAKE in
19958  [\\/]* | ?:[\\/]*)
19959  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19960  ;;
19961  *)
19962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19963for as_dir in $PATH
19964do
19965  IFS=$as_save_IFS
19966  test -z "$as_dir" && as_dir=.
19967    for ac_exec_ext in '' $ac_executable_extensions; do
19968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19969    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19971    break 2
19972  fi
19973done
19974  done
19975IFS=$as_save_IFS
19976
19977  ;;
19978esac
19979fi
19980CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19981if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19983$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19984else
19985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19986$as_echo "no" >&6; }
19987fi
19988
19989
19990  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19991done
19992
19993
19994  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19995  DESCRIPTION="gmake in tools-dir"
19996
19997  # On Cygwin, we require a newer version of make than on other platforms
19998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19999    MAKE_VERSION_EXPR="-e 4\."
20000    MAKE_REQUIRED_VERSION="4.0"
20001   else
20002    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20003    MAKE_REQUIRED_VERSION="3.81"
20004  fi
20005
20006  if test "x$MAKE_CANDIDATE" != x; then
20007    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20008$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20009    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20010    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20011    if test "x$IS_GNU_MAKE" = x; then
20012      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20013$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20014    else
20015      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20016      if test "x$IS_MODERN_MAKE" = x; then
20017        { $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
20018$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;}
20019      else
20020        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20021          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20022            MAKE_EXPECTED_ENV='cygwin'
20023          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20024            MAKE_EXPECTED_ENV='msys'
20025          else
20026            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20027          fi
20028          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20029          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20030        else
20031          # Not relevant for non-Windows
20032          IS_MAKE_CORRECT_ENV=true
20033        fi
20034        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20035          { $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
20036$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;}
20037        else
20038          FOUND_MAKE=$MAKE_CANDIDATE
20039
20040  # Only process if variable expands to non-empty
20041
20042  if test "x$FOUND_MAKE" != x; then
20043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20044
20045  # First separate the path from the arguments. This will split at the first
20046  # space.
20047  complete="$FOUND_MAKE"
20048  path="${complete%% *}"
20049  tmp="$complete EOL"
20050  arguments="${tmp#* }"
20051
20052  # Input might be given as Windows format, start by converting to
20053  # unix format.
20054  new_path=`$CYGPATH -u "$path"`
20055
20056  # Now try to locate executable using which
20057  new_path=`$WHICH "$new_path" 2> /dev/null`
20058  # bat and cmd files are not always considered executable in cygwin causing which
20059  # to not find them
20060  if test "x$new_path" = x \
20061      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20062      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20063    new_path=`$CYGPATH -u "$path"`
20064  fi
20065  if test "x$new_path" = x; then
20066    # Oops. Which didn't find the executable.
20067    # The splitting of arguments from the executable at a space might have been incorrect,
20068    # since paths with space are more likely in Windows. Give it another try with the whole
20069    # argument.
20070    path="$complete"
20071    arguments="EOL"
20072    new_path=`$CYGPATH -u "$path"`
20073    new_path=`$WHICH "$new_path" 2> /dev/null`
20074    # bat and cmd files are not always considered executable in cygwin causing which
20075    # to not find them
20076    if test "x$new_path" = x \
20077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20079      new_path=`$CYGPATH -u "$path"`
20080    fi
20081    if test "x$new_path" = x; then
20082      # It's still not found. Now this is an unrecoverable error.
20083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20085      has_space=`$ECHO "$complete" | $GREP " "`
20086      if test "x$has_space" != x; then
20087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20089      fi
20090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20091    fi
20092  fi
20093
20094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20097  # "foo.exe" is OK but "foo" is an error.
20098  #
20099  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20100  # It is also a way to make sure we got the proper file name for the real test later on.
20101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20102  if test "x$test_shortpath" = x; then
20103    # Short path failed, file does not exist as specified.
20104    # Try adding .exe or .cmd
20105    if test -f "${new_path}.exe"; then
20106      input_to_shortpath="${new_path}.exe"
20107    elif test -f "${new_path}.cmd"; then
20108      input_to_shortpath="${new_path}.cmd"
20109    else
20110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20111$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20112      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20113$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20114      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20115    fi
20116  else
20117    input_to_shortpath="$new_path"
20118  fi
20119
20120  # Call helper function which possibly converts this using DOS-style short mode.
20121  # If so, the updated path is stored in $new_path.
20122  new_path="$input_to_shortpath"
20123
20124  input_path="$input_to_shortpath"
20125  # Check if we need to convert this using DOS-style short mode. If the path
20126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20127  # take no chances and rewrite it.
20128  # Note: m4 eats our [], so we need to use [ and ] instead.
20129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20130  if test "x$has_forbidden_chars" != x; then
20131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20135      # Going to short mode and back again did indeed matter. Since short mode is
20136      # case insensitive, let's make it lowercase to improve readability.
20137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20138      # Now convert it back to Unix-style (cygpath)
20139      input_path=`$CYGPATH -u "$shortmode_path"`
20140      new_path="$input_path"
20141    fi
20142  fi
20143
20144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20145  if test "x$test_cygdrive_prefix" = x; then
20146    # As a simple fix, exclude /usr/bin since it's not a real path.
20147    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20149      # a path prefixed by /cygdrive for fixpath to work.
20150      new_path="$CYGWIN_ROOT_PATH$input_path"
20151    fi
20152  fi
20153
20154  # remove trailing .exe if any
20155  new_path="${new_path/%.exe/}"
20156
20157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20158
20159  # First separate the path from the arguments. This will split at the first
20160  # space.
20161  complete="$FOUND_MAKE"
20162  path="${complete%% *}"
20163  tmp="$complete EOL"
20164  arguments="${tmp#* }"
20165
20166  # Input might be given as Windows format, start by converting to
20167  # unix format.
20168  new_path="$path"
20169
20170  windows_path="$new_path"
20171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20172    unix_path=`$CYGPATH -u "$windows_path"`
20173    new_path="$unix_path"
20174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20176    new_path="$unix_path"
20177  fi
20178
20179
20180  # Now try to locate executable using which
20181  new_path=`$WHICH "$new_path" 2> /dev/null`
20182
20183  if test "x$new_path" = x; then
20184    # Oops. Which didn't find the executable.
20185    # The splitting of arguments from the executable at a space might have been incorrect,
20186    # since paths with space are more likely in Windows. Give it another try with the whole
20187    # argument.
20188    path="$complete"
20189    arguments="EOL"
20190    new_path="$path"
20191
20192  windows_path="$new_path"
20193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20194    unix_path=`$CYGPATH -u "$windows_path"`
20195    new_path="$unix_path"
20196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20198    new_path="$unix_path"
20199  fi
20200
20201
20202    new_path=`$WHICH "$new_path" 2> /dev/null`
20203    # bat and cmd files are not always considered executable in MSYS causing which
20204    # to not find them
20205    if test "x$new_path" = x \
20206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20208      new_path="$path"
20209
20210  windows_path="$new_path"
20211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20212    unix_path=`$CYGPATH -u "$windows_path"`
20213    new_path="$unix_path"
20214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20216    new_path="$unix_path"
20217  fi
20218
20219    fi
20220
20221    if test "x$new_path" = x; then
20222      # It's still not found. Now this is an unrecoverable error.
20223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20224$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20225      has_space=`$ECHO "$complete" | $GREP " "`
20226      if test "x$has_space" != x; then
20227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20229      fi
20230      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20231    fi
20232  fi
20233
20234  # Now new_path has a complete unix path to the binary
20235  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20236    # Keep paths in /bin as-is, but remove trailing .exe if any
20237    new_path="${new_path/%.exe/}"
20238    # Do not save /bin paths to all_fixpath_prefixes!
20239  else
20240    # Not in mixed or Windows style, start by that.
20241    new_path=`cmd //c echo $new_path`
20242
20243  input_path="$new_path"
20244  # Check if we need to convert this using DOS-style short mode. If the path
20245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20246  # take no chances and rewrite it.
20247  # Note: m4 eats our [], so we need to use [ and ] instead.
20248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20249  if test "x$has_forbidden_chars" != x; then
20250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20252  fi
20253
20254    # Output is in $new_path
20255
20256  windows_path="$new_path"
20257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20258    unix_path=`$CYGPATH -u "$windows_path"`
20259    new_path="$unix_path"
20260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20262    new_path="$unix_path"
20263  fi
20264
20265    # remove trailing .exe if any
20266    new_path="${new_path/%.exe/}"
20267
20268    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20269    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20270  fi
20271
20272    else
20273      # We're on a unix platform. Hooray! :)
20274      # First separate the path from the arguments. This will split at the first
20275      # space.
20276      complete="$FOUND_MAKE"
20277      path="${complete%% *}"
20278      tmp="$complete EOL"
20279      arguments="${tmp#* }"
20280
20281      # Cannot rely on the command "which" here since it doesn't always work.
20282      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20283      if test -z "$is_absolute_path"; then
20284        # Path to executable is not absolute. Find it.
20285        IFS_save="$IFS"
20286        IFS=:
20287        for p in $PATH; do
20288          if test -f "$p/$path" && test -x "$p/$path"; then
20289            new_path="$p/$path"
20290            break
20291          fi
20292        done
20293        IFS="$IFS_save"
20294      else
20295        # This is an absolute path, we can use it without further modifications.
20296        new_path="$path"
20297      fi
20298
20299      if test "x$new_path" = x; then
20300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20301$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20302        has_space=`$ECHO "$complete" | $GREP " "`
20303        if test "x$has_space" != x; then
20304          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20305$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20306        fi
20307        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20308      fi
20309    fi
20310
20311    # Now join together the path and the arguments once again
20312    if test "x$arguments" != xEOL; then
20313      new_complete="$new_path ${arguments% *}"
20314    else
20315      new_complete="$new_path"
20316    fi
20317
20318    if test "x$complete" != "x$new_complete"; then
20319      FOUND_MAKE="$new_complete"
20320      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20321$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20322    fi
20323  fi
20324
20325        fi
20326      fi
20327    fi
20328  fi
20329
20330        if test "x$FOUND_MAKE" = x; then
20331          for ac_prog in make
20332do
20333  # Extract the first word of "$ac_prog", so it can be a program name with args.
20334set dummy $ac_prog; ac_word=$2
20335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20336$as_echo_n "checking for $ac_word... " >&6; }
20337if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20338  $as_echo_n "(cached) " >&6
20339else
20340  case $CHECK_TOOLSDIR_MAKE in
20341  [\\/]* | ?:[\\/]*)
20342  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20343  ;;
20344  *)
20345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20346for as_dir in $PATH
20347do
20348  IFS=$as_save_IFS
20349  test -z "$as_dir" && as_dir=.
20350    for ac_exec_ext in '' $ac_executable_extensions; do
20351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20352    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20354    break 2
20355  fi
20356done
20357  done
20358IFS=$as_save_IFS
20359
20360  ;;
20361esac
20362fi
20363CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20364if test -n "$CHECK_TOOLSDIR_MAKE"; then
20365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20366$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20367else
20368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20369$as_echo "no" >&6; }
20370fi
20371
20372
20373  test -n "$CHECK_TOOLSDIR_MAKE" && break
20374done
20375
20376
20377  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20378  DESCRIPTION="make in tools-dir"
20379
20380  # On Cygwin, we require a newer version of make than on other platforms
20381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20382    MAKE_VERSION_EXPR="-e 4\."
20383    MAKE_REQUIRED_VERSION="4.0"
20384   else
20385    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20386    MAKE_REQUIRED_VERSION="3.81"
20387  fi
20388
20389  if test "x$MAKE_CANDIDATE" != x; then
20390    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20391$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20392    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20393    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20394    if test "x$IS_GNU_MAKE" = x; then
20395      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20396$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20397    else
20398      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20399      if test "x$IS_MODERN_MAKE" = x; then
20400        { $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
20401$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;}
20402      else
20403        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20404          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20405            MAKE_EXPECTED_ENV='cygwin'
20406          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20407            MAKE_EXPECTED_ENV='msys'
20408          else
20409            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20410          fi
20411          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20412          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20413        else
20414          # Not relevant for non-Windows
20415          IS_MAKE_CORRECT_ENV=true
20416        fi
20417        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20418          { $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
20419$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;}
20420        else
20421          FOUND_MAKE=$MAKE_CANDIDATE
20422
20423  # Only process if variable expands to non-empty
20424
20425  if test "x$FOUND_MAKE" != x; then
20426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20427
20428  # First separate the path from the arguments. This will split at the first
20429  # space.
20430  complete="$FOUND_MAKE"
20431  path="${complete%% *}"
20432  tmp="$complete EOL"
20433  arguments="${tmp#* }"
20434
20435  # Input might be given as Windows format, start by converting to
20436  # unix format.
20437  new_path=`$CYGPATH -u "$path"`
20438
20439  # Now try to locate executable using which
20440  new_path=`$WHICH "$new_path" 2> /dev/null`
20441  # bat and cmd files are not always considered executable in cygwin causing which
20442  # to not find them
20443  if test "x$new_path" = x \
20444      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20445      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20446    new_path=`$CYGPATH -u "$path"`
20447  fi
20448  if test "x$new_path" = x; then
20449    # Oops. Which didn't find the executable.
20450    # The splitting of arguments from the executable at a space might have been incorrect,
20451    # since paths with space are more likely in Windows. Give it another try with the whole
20452    # argument.
20453    path="$complete"
20454    arguments="EOL"
20455    new_path=`$CYGPATH -u "$path"`
20456    new_path=`$WHICH "$new_path" 2> /dev/null`
20457    # bat and cmd files are not always considered executable in cygwin causing which
20458    # to not find them
20459    if test "x$new_path" = x \
20460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20462      new_path=`$CYGPATH -u "$path"`
20463    fi
20464    if test "x$new_path" = x; then
20465      # It's still not found. Now this is an unrecoverable error.
20466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20468      has_space=`$ECHO "$complete" | $GREP " "`
20469      if test "x$has_space" != x; then
20470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20472      fi
20473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20474    fi
20475  fi
20476
20477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20480  # "foo.exe" is OK but "foo" is an error.
20481  #
20482  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20483  # It is also a way to make sure we got the proper file name for the real test later on.
20484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20485  if test "x$test_shortpath" = x; then
20486    # Short path failed, file does not exist as specified.
20487    # Try adding .exe or .cmd
20488    if test -f "${new_path}.exe"; then
20489      input_to_shortpath="${new_path}.exe"
20490    elif test -f "${new_path}.cmd"; then
20491      input_to_shortpath="${new_path}.cmd"
20492    else
20493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20494$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20495      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20496$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20498    fi
20499  else
20500    input_to_shortpath="$new_path"
20501  fi
20502
20503  # Call helper function which possibly converts this using DOS-style short mode.
20504  # If so, the updated path is stored in $new_path.
20505  new_path="$input_to_shortpath"
20506
20507  input_path="$input_to_shortpath"
20508  # Check if we need to convert this using DOS-style short mode. If the path
20509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20510  # take no chances and rewrite it.
20511  # Note: m4 eats our [], so we need to use [ and ] instead.
20512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20513  if test "x$has_forbidden_chars" != x; then
20514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20518      # Going to short mode and back again did indeed matter. Since short mode is
20519      # case insensitive, let's make it lowercase to improve readability.
20520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20521      # Now convert it back to Unix-style (cygpath)
20522      input_path=`$CYGPATH -u "$shortmode_path"`
20523      new_path="$input_path"
20524    fi
20525  fi
20526
20527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20528  if test "x$test_cygdrive_prefix" = x; then
20529    # As a simple fix, exclude /usr/bin since it's not a real path.
20530    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20532      # a path prefixed by /cygdrive for fixpath to work.
20533      new_path="$CYGWIN_ROOT_PATH$input_path"
20534    fi
20535  fi
20536
20537  # remove trailing .exe if any
20538  new_path="${new_path/%.exe/}"
20539
20540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20541
20542  # First separate the path from the arguments. This will split at the first
20543  # space.
20544  complete="$FOUND_MAKE"
20545  path="${complete%% *}"
20546  tmp="$complete EOL"
20547  arguments="${tmp#* }"
20548
20549  # Input might be given as Windows format, start by converting to
20550  # unix format.
20551  new_path="$path"
20552
20553  windows_path="$new_path"
20554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20555    unix_path=`$CYGPATH -u "$windows_path"`
20556    new_path="$unix_path"
20557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20559    new_path="$unix_path"
20560  fi
20561
20562
20563  # Now try to locate executable using which
20564  new_path=`$WHICH "$new_path" 2> /dev/null`
20565
20566  if test "x$new_path" = x; then
20567    # Oops. Which didn't find the executable.
20568    # The splitting of arguments from the executable at a space might have been incorrect,
20569    # since paths with space are more likely in Windows. Give it another try with the whole
20570    # argument.
20571    path="$complete"
20572    arguments="EOL"
20573    new_path="$path"
20574
20575  windows_path="$new_path"
20576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20577    unix_path=`$CYGPATH -u "$windows_path"`
20578    new_path="$unix_path"
20579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20581    new_path="$unix_path"
20582  fi
20583
20584
20585    new_path=`$WHICH "$new_path" 2> /dev/null`
20586    # bat and cmd files are not always considered executable in MSYS causing which
20587    # to not find them
20588    if test "x$new_path" = x \
20589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20591      new_path="$path"
20592
20593  windows_path="$new_path"
20594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20595    unix_path=`$CYGPATH -u "$windows_path"`
20596    new_path="$unix_path"
20597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20599    new_path="$unix_path"
20600  fi
20601
20602    fi
20603
20604    if test "x$new_path" = x; then
20605      # It's still not found. Now this is an unrecoverable error.
20606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20607$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20608      has_space=`$ECHO "$complete" | $GREP " "`
20609      if test "x$has_space" != x; then
20610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20612      fi
20613      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20614    fi
20615  fi
20616
20617  # Now new_path has a complete unix path to the binary
20618  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20619    # Keep paths in /bin as-is, but remove trailing .exe if any
20620    new_path="${new_path/%.exe/}"
20621    # Do not save /bin paths to all_fixpath_prefixes!
20622  else
20623    # Not in mixed or Windows style, start by that.
20624    new_path=`cmd //c echo $new_path`
20625
20626  input_path="$new_path"
20627  # Check if we need to convert this using DOS-style short mode. If the path
20628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20629  # take no chances and rewrite it.
20630  # Note: m4 eats our [], so we need to use [ and ] instead.
20631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20632  if test "x$has_forbidden_chars" != x; then
20633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20635  fi
20636
20637    # Output is in $new_path
20638
20639  windows_path="$new_path"
20640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20641    unix_path=`$CYGPATH -u "$windows_path"`
20642    new_path="$unix_path"
20643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20645    new_path="$unix_path"
20646  fi
20647
20648    # remove trailing .exe if any
20649    new_path="${new_path/%.exe/}"
20650
20651    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20652    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20653  fi
20654
20655    else
20656      # We're on a unix platform. Hooray! :)
20657      # First separate the path from the arguments. This will split at the first
20658      # space.
20659      complete="$FOUND_MAKE"
20660      path="${complete%% *}"
20661      tmp="$complete EOL"
20662      arguments="${tmp#* }"
20663
20664      # Cannot rely on the command "which" here since it doesn't always work.
20665      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20666      if test -z "$is_absolute_path"; then
20667        # Path to executable is not absolute. Find it.
20668        IFS_save="$IFS"
20669        IFS=:
20670        for p in $PATH; do
20671          if test -f "$p/$path" && test -x "$p/$path"; then
20672            new_path="$p/$path"
20673            break
20674          fi
20675        done
20676        IFS="$IFS_save"
20677      else
20678        # This is an absolute path, we can use it without further modifications.
20679        new_path="$path"
20680      fi
20681
20682      if test "x$new_path" = x; then
20683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20685        has_space=`$ECHO "$complete" | $GREP " "`
20686        if test "x$has_space" != x; then
20687          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20688$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20689        fi
20690        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20691      fi
20692    fi
20693
20694    # Now join together the path and the arguments once again
20695    if test "x$arguments" != xEOL; then
20696      new_complete="$new_path ${arguments% *}"
20697    else
20698      new_complete="$new_path"
20699    fi
20700
20701    if test "x$complete" != "x$new_complete"; then
20702      FOUND_MAKE="$new_complete"
20703      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20704$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20705    fi
20706  fi
20707
20708        fi
20709      fi
20710    fi
20711  fi
20712
20713        fi
20714        PATH=$OLD_PATH
20715      fi
20716    fi
20717
20718    if test "x$FOUND_MAKE" = x; then
20719      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
20720    fi
20721
20722    else
20723      # If it succeeded, then it was overridden by the user. We will use it
20724      # for the tool.
20725
20726      # First remove it from the list of overridden variables, so we can test
20727      # for unknown variables in the end.
20728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20729
20730      # Check if we try to supply an empty value
20731      if test "x$MAKE" = x; then
20732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20733$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20735$as_echo_n "checking for MAKE... " >&6; }
20736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20737$as_echo "disabled" >&6; }
20738      else
20739        # Check if the provided tool contains a complete path.
20740        tool_specified="$MAKE"
20741        tool_basename="${tool_specified##*/}"
20742        if test "x$tool_basename" = "x$tool_specified"; then
20743          # A command without a complete path is provided, search $PATH.
20744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20745$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20746          # Extract the first word of "$tool_basename", so it can be a program name with args.
20747set dummy $tool_basename; ac_word=$2
20748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20749$as_echo_n "checking for $ac_word... " >&6; }
20750if ${ac_cv_path_MAKE+:} false; then :
20751  $as_echo_n "(cached) " >&6
20752else
20753  case $MAKE in
20754  [\\/]* | ?:[\\/]*)
20755  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20756  ;;
20757  *)
20758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20759for as_dir in $PATH
20760do
20761  IFS=$as_save_IFS
20762  test -z "$as_dir" && as_dir=.
20763    for ac_exec_ext in '' $ac_executable_extensions; do
20764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20765    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20767    break 2
20768  fi
20769done
20770  done
20771IFS=$as_save_IFS
20772
20773  ;;
20774esac
20775fi
20776MAKE=$ac_cv_path_MAKE
20777if test -n "$MAKE"; then
20778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20779$as_echo "$MAKE" >&6; }
20780else
20781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20782$as_echo "no" >&6; }
20783fi
20784
20785
20786          if test "x$MAKE" = x; then
20787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20788          fi
20789        else
20790          # Otherwise we believe it is a complete path. Use it as it is.
20791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20792$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20794$as_echo_n "checking for MAKE... " >&6; }
20795          if test ! -x "$tool_specified"; then
20796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20797$as_echo "not found" >&6; }
20798            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20799          fi
20800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20801$as_echo "$tool_specified" >&6; }
20802        fi
20803      fi
20804    fi
20805
20806    # If MAKE was set by user, verify the version
20807
20808  MAKE_CANDIDATE=""$MAKE""
20809  DESCRIPTION="user supplied MAKE=$MAKE"
20810
20811  # On Cygwin, we require a newer version of make than on other platforms
20812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20813    MAKE_VERSION_EXPR="-e 4\."
20814    MAKE_REQUIRED_VERSION="4.0"
20815   else
20816    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20817    MAKE_REQUIRED_VERSION="3.81"
20818  fi
20819
20820  if test "x$MAKE_CANDIDATE" != x; then
20821    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20822$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20823    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20824    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20825    if test "x$IS_GNU_MAKE" = x; then
20826      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20827$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20828    else
20829      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20830      if test "x$IS_MODERN_MAKE" = x; then
20831        { $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
20832$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;}
20833      else
20834        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20835          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20836            MAKE_EXPECTED_ENV='cygwin'
20837          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838            MAKE_EXPECTED_ENV='msys'
20839          else
20840            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20841          fi
20842          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20843          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20844        else
20845          # Not relevant for non-Windows
20846          IS_MAKE_CORRECT_ENV=true
20847        fi
20848        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20849          { $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
20850$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;}
20851        else
20852          FOUND_MAKE=$MAKE_CANDIDATE
20853
20854  # Only process if variable expands to non-empty
20855
20856  if test "x$FOUND_MAKE" != x; then
20857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20858
20859  # First separate the path from the arguments. This will split at the first
20860  # space.
20861  complete="$FOUND_MAKE"
20862  path="${complete%% *}"
20863  tmp="$complete EOL"
20864  arguments="${tmp#* }"
20865
20866  # Input might be given as Windows format, start by converting to
20867  # unix format.
20868  new_path=`$CYGPATH -u "$path"`
20869
20870  # Now try to locate executable using which
20871  new_path=`$WHICH "$new_path" 2> /dev/null`
20872  # bat and cmd files are not always considered executable in cygwin causing which
20873  # to not find them
20874  if test "x$new_path" = x \
20875      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20876      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20877    new_path=`$CYGPATH -u "$path"`
20878  fi
20879  if test "x$new_path" = x; then
20880    # Oops. Which didn't find the executable.
20881    # The splitting of arguments from the executable at a space might have been incorrect,
20882    # since paths with space are more likely in Windows. Give it another try with the whole
20883    # argument.
20884    path="$complete"
20885    arguments="EOL"
20886    new_path=`$CYGPATH -u "$path"`
20887    new_path=`$WHICH "$new_path" 2> /dev/null`
20888    # bat and cmd files are not always considered executable in cygwin causing which
20889    # to not find them
20890    if test "x$new_path" = x \
20891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20893      new_path=`$CYGPATH -u "$path"`
20894    fi
20895    if test "x$new_path" = x; then
20896      # It's still not found. Now this is an unrecoverable error.
20897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20899      has_space=`$ECHO "$complete" | $GREP " "`
20900      if test "x$has_space" != x; then
20901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20903      fi
20904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20905    fi
20906  fi
20907
20908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20911  # "foo.exe" is OK but "foo" is an error.
20912  #
20913  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20914  # It is also a way to make sure we got the proper file name for the real test later on.
20915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20916  if test "x$test_shortpath" = x; then
20917    # Short path failed, file does not exist as specified.
20918    # Try adding .exe or .cmd
20919    if test -f "${new_path}.exe"; then
20920      input_to_shortpath="${new_path}.exe"
20921    elif test -f "${new_path}.cmd"; then
20922      input_to_shortpath="${new_path}.cmd"
20923    else
20924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20925$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20926      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20927$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20929    fi
20930  else
20931    input_to_shortpath="$new_path"
20932  fi
20933
20934  # Call helper function which possibly converts this using DOS-style short mode.
20935  # If so, the updated path is stored in $new_path.
20936  new_path="$input_to_shortpath"
20937
20938  input_path="$input_to_shortpath"
20939  # Check if we need to convert this using DOS-style short mode. If the path
20940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20941  # take no chances and rewrite it.
20942  # Note: m4 eats our [], so we need to use [ and ] instead.
20943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20944  if test "x$has_forbidden_chars" != x; then
20945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20949      # Going to short mode and back again did indeed matter. Since short mode is
20950      # case insensitive, let's make it lowercase to improve readability.
20951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20952      # Now convert it back to Unix-style (cygpath)
20953      input_path=`$CYGPATH -u "$shortmode_path"`
20954      new_path="$input_path"
20955    fi
20956  fi
20957
20958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20959  if test "x$test_cygdrive_prefix" = x; then
20960    # As a simple fix, exclude /usr/bin since it's not a real path.
20961    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20963      # a path prefixed by /cygdrive for fixpath to work.
20964      new_path="$CYGWIN_ROOT_PATH$input_path"
20965    fi
20966  fi
20967
20968  # remove trailing .exe if any
20969  new_path="${new_path/%.exe/}"
20970
20971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20972
20973  # First separate the path from the arguments. This will split at the first
20974  # space.
20975  complete="$FOUND_MAKE"
20976  path="${complete%% *}"
20977  tmp="$complete EOL"
20978  arguments="${tmp#* }"
20979
20980  # Input might be given as Windows format, start by converting to
20981  # unix format.
20982  new_path="$path"
20983
20984  windows_path="$new_path"
20985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20986    unix_path=`$CYGPATH -u "$windows_path"`
20987    new_path="$unix_path"
20988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20990    new_path="$unix_path"
20991  fi
20992
20993
20994  # Now try to locate executable using which
20995  new_path=`$WHICH "$new_path" 2> /dev/null`
20996
20997  if test "x$new_path" = x; then
20998    # Oops. Which didn't find the executable.
20999    # The splitting of arguments from the executable at a space might have been incorrect,
21000    # since paths with space are more likely in Windows. Give it another try with the whole
21001    # argument.
21002    path="$complete"
21003    arguments="EOL"
21004    new_path="$path"
21005
21006  windows_path="$new_path"
21007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21008    unix_path=`$CYGPATH -u "$windows_path"`
21009    new_path="$unix_path"
21010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21012    new_path="$unix_path"
21013  fi
21014
21015
21016    new_path=`$WHICH "$new_path" 2> /dev/null`
21017    # bat and cmd files are not always considered executable in MSYS causing which
21018    # to not find them
21019    if test "x$new_path" = x \
21020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21022      new_path="$path"
21023
21024  windows_path="$new_path"
21025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21026    unix_path=`$CYGPATH -u "$windows_path"`
21027    new_path="$unix_path"
21028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21030    new_path="$unix_path"
21031  fi
21032
21033    fi
21034
21035    if test "x$new_path" = x; then
21036      # It's still not found. Now this is an unrecoverable error.
21037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21039      has_space=`$ECHO "$complete" | $GREP " "`
21040      if test "x$has_space" != x; then
21041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21043      fi
21044      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21045    fi
21046  fi
21047
21048  # Now new_path has a complete unix path to the binary
21049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21050    # Keep paths in /bin as-is, but remove trailing .exe if any
21051    new_path="${new_path/%.exe/}"
21052    # Do not save /bin paths to all_fixpath_prefixes!
21053  else
21054    # Not in mixed or Windows style, start by that.
21055    new_path=`cmd //c echo $new_path`
21056
21057  input_path="$new_path"
21058  # Check if we need to convert this using DOS-style short mode. If the path
21059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21060  # take no chances and rewrite it.
21061  # Note: m4 eats our [], so we need to use [ and ] instead.
21062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21063  if test "x$has_forbidden_chars" != x; then
21064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21066  fi
21067
21068    # Output is in $new_path
21069
21070  windows_path="$new_path"
21071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21072    unix_path=`$CYGPATH -u "$windows_path"`
21073    new_path="$unix_path"
21074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21076    new_path="$unix_path"
21077  fi
21078
21079    # remove trailing .exe if any
21080    new_path="${new_path/%.exe/}"
21081
21082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21084  fi
21085
21086    else
21087      # We're on a unix platform. Hooray! :)
21088      # First separate the path from the arguments. This will split at the first
21089      # space.
21090      complete="$FOUND_MAKE"
21091      path="${complete%% *}"
21092      tmp="$complete EOL"
21093      arguments="${tmp#* }"
21094
21095      # Cannot rely on the command "which" here since it doesn't always work.
21096      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21097      if test -z "$is_absolute_path"; then
21098        # Path to executable is not absolute. Find it.
21099        IFS_save="$IFS"
21100        IFS=:
21101        for p in $PATH; do
21102          if test -f "$p/$path" && test -x "$p/$path"; then
21103            new_path="$p/$path"
21104            break
21105          fi
21106        done
21107        IFS="$IFS_save"
21108      else
21109        # This is an absolute path, we can use it without further modifications.
21110        new_path="$path"
21111      fi
21112
21113      if test "x$new_path" = x; then
21114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21115$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21116        has_space=`$ECHO "$complete" | $GREP " "`
21117        if test "x$has_space" != x; then
21118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21120        fi
21121        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21122      fi
21123    fi
21124
21125    # Now join together the path and the arguments once again
21126    if test "x$arguments" != xEOL; then
21127      new_complete="$new_path ${arguments% *}"
21128    else
21129      new_complete="$new_path"
21130    fi
21131
21132    if test "x$complete" != "x$new_complete"; then
21133      FOUND_MAKE="$new_complete"
21134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21135$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21136    fi
21137  fi
21138
21139        fi
21140      fi
21141    fi
21142  fi
21143
21144    if test "x$FOUND_MAKE" = x; then
21145      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21146    fi
21147
21148  fi
21149
21150
21151  MAKE=$FOUND_MAKE
21152
21153  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21154$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21155
21156
21157  # Check if make supports the output sync option and if so, setup using it.
21158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21159$as_echo_n "checking if make --output-sync is supported... " >&6; }
21160  if $MAKE --version -O > /dev/null 2>&1; then
21161    OUTPUT_SYNC_SUPPORTED=true
21162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21163$as_echo "yes" >&6; }
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21165$as_echo_n "checking for output-sync value... " >&6; }
21166
21167# Check whether --with-output-sync was given.
21168if test "${with_output_sync+set}" = set; then :
21169  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21170fi
21171
21172    if test "x$OUTPUT_SYNC" = "x"; then
21173      OUTPUT_SYNC=none
21174    fi
21175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21176$as_echo "$OUTPUT_SYNC" >&6; }
21177    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21178      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21179    fi
21180  else
21181    OUTPUT_SYNC_SUPPORTED=false
21182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21183$as_echo "no" >&6; }
21184  fi
21185
21186
21187
21188
21189
21190
21191  # Test if find supports -delete
21192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21193$as_echo_n "checking if find supports -delete... " >&6; }
21194  FIND_DELETE="-delete"
21195
21196  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21197
21198  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21199
21200  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21201  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21202    # No, it does not.
21203    $RM $DELETEDIR/TestIfFindSupportsDelete
21204    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21205      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21206      FIND_DELETE="-print | $XARGS $RM"
21207    else
21208      FIND_DELETE="-exec $RM \{\} \+"
21209    fi
21210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21211$as_echo "no" >&6; }
21212  else
21213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21214$as_echo "yes" >&6; }
21215  fi
21216  $RMDIR $DELETEDIR
21217
21218
21219
21220  # Test which kind of tar was found
21221  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21222    TAR_TYPE="gnu"
21223  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21224    TAR_TYPE="bsd"
21225  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21226    TAR_TYPE="bsd"
21227  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21228    TAR_TYPE="solaris"
21229  fi
21230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21231$as_echo_n "checking what type of tar was found... " >&6; }
21232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21233$as_echo "$TAR_TYPE" >&6; }
21234
21235  TAR_CREATE_FILE_PARAM=""
21236
21237  if test "x$TAR_TYPE" = "xgnu"; then
21238    TAR_INCLUDE_PARAM="T"
21239    TAR_SUPPORTS_TRANSFORM="true"
21240    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21241      # When using gnu tar for Solaris targets, need to use compatibility mode
21242      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21243    fi
21244  else
21245    TAR_INCLUDE_PARAM="I"
21246    TAR_SUPPORTS_TRANSFORM="false"
21247  fi
21248
21249
21250
21251
21252
21253
21254  # These tools might not be installed by default,
21255  # need hint on how to install them.
21256
21257
21258
21259  # Publish this variable in the help.
21260
21261
21262  if [ -z "${UNZIP+x}" ]; then
21263    # The variable is not set by user, try to locate tool using the code snippet
21264    for ac_prog in unzip
21265do
21266  # Extract the first word of "$ac_prog", so it can be a program name with args.
21267set dummy $ac_prog; ac_word=$2
21268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21269$as_echo_n "checking for $ac_word... " >&6; }
21270if ${ac_cv_path_UNZIP+:} false; then :
21271  $as_echo_n "(cached) " >&6
21272else
21273  case $UNZIP in
21274  [\\/]* | ?:[\\/]*)
21275  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21276  ;;
21277  *)
21278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279for as_dir in $PATH
21280do
21281  IFS=$as_save_IFS
21282  test -z "$as_dir" && as_dir=.
21283    for ac_exec_ext in '' $ac_executable_extensions; do
21284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21285    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287    break 2
21288  fi
21289done
21290  done
21291IFS=$as_save_IFS
21292
21293  ;;
21294esac
21295fi
21296UNZIP=$ac_cv_path_UNZIP
21297if test -n "$UNZIP"; then
21298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21299$as_echo "$UNZIP" >&6; }
21300else
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21302$as_echo "no" >&6; }
21303fi
21304
21305
21306  test -n "$UNZIP" && break
21307done
21308
21309  else
21310    # The variable is set, but is it from the command line or the environment?
21311
21312    # Try to remove the string !UNZIP! from our list.
21313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21315      # If it failed, the variable was not from the command line. Ignore it,
21316      # but warn the user (except for BASH, which is always set by the calling BASH).
21317      if test "xUNZIP" != xBASH; then
21318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21319$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21320      fi
21321      # Try to locate tool using the code snippet
21322      for ac_prog in unzip
21323do
21324  # Extract the first word of "$ac_prog", so it can be a program name with args.
21325set dummy $ac_prog; ac_word=$2
21326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21327$as_echo_n "checking for $ac_word... " >&6; }
21328if ${ac_cv_path_UNZIP+:} false; then :
21329  $as_echo_n "(cached) " >&6
21330else
21331  case $UNZIP in
21332  [\\/]* | ?:[\\/]*)
21333  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21334  ;;
21335  *)
21336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21337for as_dir in $PATH
21338do
21339  IFS=$as_save_IFS
21340  test -z "$as_dir" && as_dir=.
21341    for ac_exec_ext in '' $ac_executable_extensions; do
21342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21343    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21345    break 2
21346  fi
21347done
21348  done
21349IFS=$as_save_IFS
21350
21351  ;;
21352esac
21353fi
21354UNZIP=$ac_cv_path_UNZIP
21355if test -n "$UNZIP"; then
21356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21357$as_echo "$UNZIP" >&6; }
21358else
21359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21360$as_echo "no" >&6; }
21361fi
21362
21363
21364  test -n "$UNZIP" && break
21365done
21366
21367    else
21368      # If it succeeded, then it was overridden by the user. We will use it
21369      # for the tool.
21370
21371      # First remove it from the list of overridden variables, so we can test
21372      # for unknown variables in the end.
21373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21374
21375      # Check if we try to supply an empty value
21376      if test "x$UNZIP" = x; then
21377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21378$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21380$as_echo_n "checking for UNZIP... " >&6; }
21381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21382$as_echo "disabled" >&6; }
21383      else
21384        # Check if the provided tool contains a complete path.
21385        tool_specified="$UNZIP"
21386        tool_basename="${tool_specified##*/}"
21387        if test "x$tool_basename" = "x$tool_specified"; then
21388          # A command without a complete path is provided, search $PATH.
21389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21390$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21391          # Extract the first word of "$tool_basename", so it can be a program name with args.
21392set dummy $tool_basename; ac_word=$2
21393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21394$as_echo_n "checking for $ac_word... " >&6; }
21395if ${ac_cv_path_UNZIP+:} false; then :
21396  $as_echo_n "(cached) " >&6
21397else
21398  case $UNZIP in
21399  [\\/]* | ?:[\\/]*)
21400  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21401  ;;
21402  *)
21403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21404for as_dir in $PATH
21405do
21406  IFS=$as_save_IFS
21407  test -z "$as_dir" && as_dir=.
21408    for ac_exec_ext in '' $ac_executable_extensions; do
21409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21410    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21412    break 2
21413  fi
21414done
21415  done
21416IFS=$as_save_IFS
21417
21418  ;;
21419esac
21420fi
21421UNZIP=$ac_cv_path_UNZIP
21422if test -n "$UNZIP"; then
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21424$as_echo "$UNZIP" >&6; }
21425else
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21427$as_echo "no" >&6; }
21428fi
21429
21430
21431          if test "x$UNZIP" = x; then
21432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21433          fi
21434        else
21435          # Otherwise we believe it is a complete path. Use it as it is.
21436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21437$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21439$as_echo_n "checking for UNZIP... " >&6; }
21440          if test ! -x "$tool_specified"; then
21441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21442$as_echo "not found" >&6; }
21443            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21444          fi
21445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21446$as_echo "$tool_specified" >&6; }
21447        fi
21448      fi
21449    fi
21450
21451  fi
21452
21453
21454
21455  if test "x$UNZIP" = x; then
21456    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21457  fi
21458
21459
21460  # Since zip uses "ZIP" as a environment variable for passing options, we need
21461  # to name our variable differently, hence ZIPEXE.
21462
21463
21464
21465  # Publish this variable in the help.
21466
21467
21468  if [ -z "${ZIPEXE+x}" ]; then
21469    # The variable is not set by user, try to locate tool using the code snippet
21470    for ac_prog in zip
21471do
21472  # Extract the first word of "$ac_prog", so it can be a program name with args.
21473set dummy $ac_prog; ac_word=$2
21474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21475$as_echo_n "checking for $ac_word... " >&6; }
21476if ${ac_cv_path_ZIPEXE+:} false; then :
21477  $as_echo_n "(cached) " >&6
21478else
21479  case $ZIPEXE in
21480  [\\/]* | ?:[\\/]*)
21481  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21482  ;;
21483  *)
21484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21485for as_dir in $PATH
21486do
21487  IFS=$as_save_IFS
21488  test -z "$as_dir" && as_dir=.
21489    for ac_exec_ext in '' $ac_executable_extensions; do
21490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21491    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21493    break 2
21494  fi
21495done
21496  done
21497IFS=$as_save_IFS
21498
21499  ;;
21500esac
21501fi
21502ZIPEXE=$ac_cv_path_ZIPEXE
21503if test -n "$ZIPEXE"; then
21504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21505$as_echo "$ZIPEXE" >&6; }
21506else
21507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21508$as_echo "no" >&6; }
21509fi
21510
21511
21512  test -n "$ZIPEXE" && break
21513done
21514
21515  else
21516    # The variable is set, but is it from the command line or the environment?
21517
21518    # Try to remove the string !ZIPEXE! from our list.
21519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21521      # If it failed, the variable was not from the command line. Ignore it,
21522      # but warn the user (except for BASH, which is always set by the calling BASH).
21523      if test "xZIPEXE" != xBASH; then
21524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21525$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21526      fi
21527      # Try to locate tool using the code snippet
21528      for ac_prog in zip
21529do
21530  # Extract the first word of "$ac_prog", so it can be a program name with args.
21531set dummy $ac_prog; ac_word=$2
21532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21533$as_echo_n "checking for $ac_word... " >&6; }
21534if ${ac_cv_path_ZIPEXE+:} false; then :
21535  $as_echo_n "(cached) " >&6
21536else
21537  case $ZIPEXE in
21538  [\\/]* | ?:[\\/]*)
21539  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21540  ;;
21541  *)
21542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21543for as_dir in $PATH
21544do
21545  IFS=$as_save_IFS
21546  test -z "$as_dir" && as_dir=.
21547    for ac_exec_ext in '' $ac_executable_extensions; do
21548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21549    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21551    break 2
21552  fi
21553done
21554  done
21555IFS=$as_save_IFS
21556
21557  ;;
21558esac
21559fi
21560ZIPEXE=$ac_cv_path_ZIPEXE
21561if test -n "$ZIPEXE"; then
21562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21563$as_echo "$ZIPEXE" >&6; }
21564else
21565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21566$as_echo "no" >&6; }
21567fi
21568
21569
21570  test -n "$ZIPEXE" && break
21571done
21572
21573    else
21574      # If it succeeded, then it was overridden by the user. We will use it
21575      # for the tool.
21576
21577      # First remove it from the list of overridden variables, so we can test
21578      # for unknown variables in the end.
21579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21580
21581      # Check if we try to supply an empty value
21582      if test "x$ZIPEXE" = x; then
21583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21584$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21586$as_echo_n "checking for ZIPEXE... " >&6; }
21587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21588$as_echo "disabled" >&6; }
21589      else
21590        # Check if the provided tool contains a complete path.
21591        tool_specified="$ZIPEXE"
21592        tool_basename="${tool_specified##*/}"
21593        if test "x$tool_basename" = "x$tool_specified"; then
21594          # A command without a complete path is provided, search $PATH.
21595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21596$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21597          # Extract the first word of "$tool_basename", so it can be a program name with args.
21598set dummy $tool_basename; ac_word=$2
21599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21600$as_echo_n "checking for $ac_word... " >&6; }
21601if ${ac_cv_path_ZIPEXE+:} false; then :
21602  $as_echo_n "(cached) " >&6
21603else
21604  case $ZIPEXE in
21605  [\\/]* | ?:[\\/]*)
21606  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21607  ;;
21608  *)
21609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21610for as_dir in $PATH
21611do
21612  IFS=$as_save_IFS
21613  test -z "$as_dir" && as_dir=.
21614    for ac_exec_ext in '' $ac_executable_extensions; do
21615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21616    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21618    break 2
21619  fi
21620done
21621  done
21622IFS=$as_save_IFS
21623
21624  ;;
21625esac
21626fi
21627ZIPEXE=$ac_cv_path_ZIPEXE
21628if test -n "$ZIPEXE"; then
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21630$as_echo "$ZIPEXE" >&6; }
21631else
21632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21633$as_echo "no" >&6; }
21634fi
21635
21636
21637          if test "x$ZIPEXE" = x; then
21638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21639          fi
21640        else
21641          # Otherwise we believe it is a complete path. Use it as it is.
21642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21643$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21645$as_echo_n "checking for ZIPEXE... " >&6; }
21646          if test ! -x "$tool_specified"; then
21647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21648$as_echo "not found" >&6; }
21649            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21650          fi
21651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21652$as_echo "$tool_specified" >&6; }
21653        fi
21654      fi
21655    fi
21656
21657  fi
21658
21659
21660
21661  if test "x$ZIPEXE" = x; then
21662    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21663  fi
21664
21665
21666
21667  # Non-required basic tools
21668
21669
21670
21671  # Publish this variable in the help.
21672
21673
21674  if [ -z "${LDD+x}" ]; then
21675    # The variable is not set by user, try to locate tool using the code snippet
21676    for ac_prog in ldd
21677do
21678  # Extract the first word of "$ac_prog", so it can be a program name with args.
21679set dummy $ac_prog; ac_word=$2
21680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21681$as_echo_n "checking for $ac_word... " >&6; }
21682if ${ac_cv_path_LDD+:} false; then :
21683  $as_echo_n "(cached) " >&6
21684else
21685  case $LDD in
21686  [\\/]* | ?:[\\/]*)
21687  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21688  ;;
21689  *)
21690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21691for as_dir in $PATH
21692do
21693  IFS=$as_save_IFS
21694  test -z "$as_dir" && as_dir=.
21695    for ac_exec_ext in '' $ac_executable_extensions; do
21696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21697    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21699    break 2
21700  fi
21701done
21702  done
21703IFS=$as_save_IFS
21704
21705  ;;
21706esac
21707fi
21708LDD=$ac_cv_path_LDD
21709if test -n "$LDD"; then
21710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21711$as_echo "$LDD" >&6; }
21712else
21713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21714$as_echo "no" >&6; }
21715fi
21716
21717
21718  test -n "$LDD" && break
21719done
21720
21721  else
21722    # The variable is set, but is it from the command line or the environment?
21723
21724    # Try to remove the string !LDD! from our list.
21725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21727      # If it failed, the variable was not from the command line. Ignore it,
21728      # but warn the user (except for BASH, which is always set by the calling BASH).
21729      if test "xLDD" != xBASH; then
21730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21731$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21732      fi
21733      # Try to locate tool using the code snippet
21734      for ac_prog in ldd
21735do
21736  # Extract the first word of "$ac_prog", so it can be a program name with args.
21737set dummy $ac_prog; ac_word=$2
21738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21739$as_echo_n "checking for $ac_word... " >&6; }
21740if ${ac_cv_path_LDD+:} false; then :
21741  $as_echo_n "(cached) " >&6
21742else
21743  case $LDD in
21744  [\\/]* | ?:[\\/]*)
21745  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21746  ;;
21747  *)
21748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21749for as_dir in $PATH
21750do
21751  IFS=$as_save_IFS
21752  test -z "$as_dir" && as_dir=.
21753    for ac_exec_ext in '' $ac_executable_extensions; do
21754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21755    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21757    break 2
21758  fi
21759done
21760  done
21761IFS=$as_save_IFS
21762
21763  ;;
21764esac
21765fi
21766LDD=$ac_cv_path_LDD
21767if test -n "$LDD"; then
21768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21769$as_echo "$LDD" >&6; }
21770else
21771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21772$as_echo "no" >&6; }
21773fi
21774
21775
21776  test -n "$LDD" && break
21777done
21778
21779    else
21780      # If it succeeded, then it was overridden by the user. We will use it
21781      # for the tool.
21782
21783      # First remove it from the list of overridden variables, so we can test
21784      # for unknown variables in the end.
21785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21786
21787      # Check if we try to supply an empty value
21788      if test "x$LDD" = x; then
21789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21790$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21792$as_echo_n "checking for LDD... " >&6; }
21793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21794$as_echo "disabled" >&6; }
21795      else
21796        # Check if the provided tool contains a complete path.
21797        tool_specified="$LDD"
21798        tool_basename="${tool_specified##*/}"
21799        if test "x$tool_basename" = "x$tool_specified"; then
21800          # A command without a complete path is provided, search $PATH.
21801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21802$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21803          # Extract the first word of "$tool_basename", so it can be a program name with args.
21804set dummy $tool_basename; ac_word=$2
21805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21806$as_echo_n "checking for $ac_word... " >&6; }
21807if ${ac_cv_path_LDD+:} false; then :
21808  $as_echo_n "(cached) " >&6
21809else
21810  case $LDD in
21811  [\\/]* | ?:[\\/]*)
21812  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21813  ;;
21814  *)
21815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21816for as_dir in $PATH
21817do
21818  IFS=$as_save_IFS
21819  test -z "$as_dir" && as_dir=.
21820    for ac_exec_ext in '' $ac_executable_extensions; do
21821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21822    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21824    break 2
21825  fi
21826done
21827  done
21828IFS=$as_save_IFS
21829
21830  ;;
21831esac
21832fi
21833LDD=$ac_cv_path_LDD
21834if test -n "$LDD"; then
21835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21836$as_echo "$LDD" >&6; }
21837else
21838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21839$as_echo "no" >&6; }
21840fi
21841
21842
21843          if test "x$LDD" = x; then
21844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21845          fi
21846        else
21847          # Otherwise we believe it is a complete path. Use it as it is.
21848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21849$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21851$as_echo_n "checking for LDD... " >&6; }
21852          if test ! -x "$tool_specified"; then
21853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21854$as_echo "not found" >&6; }
21855            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21856          fi
21857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21858$as_echo "$tool_specified" >&6; }
21859        fi
21860      fi
21861    fi
21862
21863  fi
21864
21865
21866  if test "x$LDD" = "x"; then
21867    # List shared lib dependencies is used for
21868    # debug output and checking for forbidden dependencies.
21869    # We can build without it.
21870    LDD="true"
21871  fi
21872
21873
21874  # Publish this variable in the help.
21875
21876
21877  if [ -z "${OTOOL+x}" ]; then
21878    # The variable is not set by user, try to locate tool using the code snippet
21879    for ac_prog in otool
21880do
21881  # Extract the first word of "$ac_prog", so it can be a program name with args.
21882set dummy $ac_prog; ac_word=$2
21883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21884$as_echo_n "checking for $ac_word... " >&6; }
21885if ${ac_cv_path_OTOOL+:} false; then :
21886  $as_echo_n "(cached) " >&6
21887else
21888  case $OTOOL in
21889  [\\/]* | ?:[\\/]*)
21890  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21891  ;;
21892  *)
21893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21894for as_dir in $PATH
21895do
21896  IFS=$as_save_IFS
21897  test -z "$as_dir" && as_dir=.
21898    for ac_exec_ext in '' $ac_executable_extensions; do
21899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21900    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21902    break 2
21903  fi
21904done
21905  done
21906IFS=$as_save_IFS
21907
21908  ;;
21909esac
21910fi
21911OTOOL=$ac_cv_path_OTOOL
21912if test -n "$OTOOL"; then
21913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21914$as_echo "$OTOOL" >&6; }
21915else
21916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21917$as_echo "no" >&6; }
21918fi
21919
21920
21921  test -n "$OTOOL" && break
21922done
21923
21924  else
21925    # The variable is set, but is it from the command line or the environment?
21926
21927    # Try to remove the string !OTOOL! from our list.
21928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21930      # If it failed, the variable was not from the command line. Ignore it,
21931      # but warn the user (except for BASH, which is always set by the calling BASH).
21932      if test "xOTOOL" != xBASH; then
21933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21934$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21935      fi
21936      # Try to locate tool using the code snippet
21937      for ac_prog in otool
21938do
21939  # Extract the first word of "$ac_prog", so it can be a program name with args.
21940set dummy $ac_prog; ac_word=$2
21941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21942$as_echo_n "checking for $ac_word... " >&6; }
21943if ${ac_cv_path_OTOOL+:} false; then :
21944  $as_echo_n "(cached) " >&6
21945else
21946  case $OTOOL in
21947  [\\/]* | ?:[\\/]*)
21948  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21949  ;;
21950  *)
21951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21952for as_dir in $PATH
21953do
21954  IFS=$as_save_IFS
21955  test -z "$as_dir" && as_dir=.
21956    for ac_exec_ext in '' $ac_executable_extensions; do
21957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21958    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21960    break 2
21961  fi
21962done
21963  done
21964IFS=$as_save_IFS
21965
21966  ;;
21967esac
21968fi
21969OTOOL=$ac_cv_path_OTOOL
21970if test -n "$OTOOL"; then
21971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21972$as_echo "$OTOOL" >&6; }
21973else
21974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21975$as_echo "no" >&6; }
21976fi
21977
21978
21979  test -n "$OTOOL" && break
21980done
21981
21982    else
21983      # If it succeeded, then it was overridden by the user. We will use it
21984      # for the tool.
21985
21986      # First remove it from the list of overridden variables, so we can test
21987      # for unknown variables in the end.
21988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21989
21990      # Check if we try to supply an empty value
21991      if test "x$OTOOL" = x; then
21992        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21993$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21995$as_echo_n "checking for OTOOL... " >&6; }
21996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21997$as_echo "disabled" >&6; }
21998      else
21999        # Check if the provided tool contains a complete path.
22000        tool_specified="$OTOOL"
22001        tool_basename="${tool_specified##*/}"
22002        if test "x$tool_basename" = "x$tool_specified"; then
22003          # A command without a complete path is provided, search $PATH.
22004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22005$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22006          # Extract the first word of "$tool_basename", so it can be a program name with args.
22007set dummy $tool_basename; ac_word=$2
22008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22009$as_echo_n "checking for $ac_word... " >&6; }
22010if ${ac_cv_path_OTOOL+:} false; then :
22011  $as_echo_n "(cached) " >&6
22012else
22013  case $OTOOL in
22014  [\\/]* | ?:[\\/]*)
22015  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22016  ;;
22017  *)
22018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22019for as_dir in $PATH
22020do
22021  IFS=$as_save_IFS
22022  test -z "$as_dir" && as_dir=.
22023    for ac_exec_ext in '' $ac_executable_extensions; do
22024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22025    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22027    break 2
22028  fi
22029done
22030  done
22031IFS=$as_save_IFS
22032
22033  ;;
22034esac
22035fi
22036OTOOL=$ac_cv_path_OTOOL
22037if test -n "$OTOOL"; then
22038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22039$as_echo "$OTOOL" >&6; }
22040else
22041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22042$as_echo "no" >&6; }
22043fi
22044
22045
22046          if test "x$OTOOL" = x; then
22047            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22048          fi
22049        else
22050          # Otherwise we believe it is a complete path. Use it as it is.
22051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22052$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22053          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22054$as_echo_n "checking for OTOOL... " >&6; }
22055          if test ! -x "$tool_specified"; then
22056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22057$as_echo "not found" >&6; }
22058            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22059          fi
22060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22061$as_echo "$tool_specified" >&6; }
22062        fi
22063      fi
22064    fi
22065
22066  fi
22067
22068
22069  if test "x$OTOOL" = "x"; then
22070    OTOOL="true"
22071  fi
22072
22073
22074  # Publish this variable in the help.
22075
22076
22077  if [ -z "${READELF+x}" ]; then
22078    # The variable is not set by user, try to locate tool using the code snippet
22079    for ac_prog in greadelf readelf
22080do
22081  # Extract the first word of "$ac_prog", so it can be a program name with args.
22082set dummy $ac_prog; ac_word=$2
22083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22084$as_echo_n "checking for $ac_word... " >&6; }
22085if ${ac_cv_path_READELF+:} false; then :
22086  $as_echo_n "(cached) " >&6
22087else
22088  case $READELF in
22089  [\\/]* | ?:[\\/]*)
22090  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22091  ;;
22092  *)
22093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22094for as_dir in $PATH
22095do
22096  IFS=$as_save_IFS
22097  test -z "$as_dir" && as_dir=.
22098    for ac_exec_ext in '' $ac_executable_extensions; do
22099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22100    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22102    break 2
22103  fi
22104done
22105  done
22106IFS=$as_save_IFS
22107
22108  ;;
22109esac
22110fi
22111READELF=$ac_cv_path_READELF
22112if test -n "$READELF"; then
22113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22114$as_echo "$READELF" >&6; }
22115else
22116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22117$as_echo "no" >&6; }
22118fi
22119
22120
22121  test -n "$READELF" && break
22122done
22123
22124  else
22125    # The variable is set, but is it from the command line or the environment?
22126
22127    # Try to remove the string !READELF! from our list.
22128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22130      # If it failed, the variable was not from the command line. Ignore it,
22131      # but warn the user (except for BASH, which is always set by the calling BASH).
22132      if test "xREADELF" != xBASH; then
22133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22134$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22135      fi
22136      # Try to locate tool using the code snippet
22137      for ac_prog in greadelf readelf
22138do
22139  # Extract the first word of "$ac_prog", so it can be a program name with args.
22140set dummy $ac_prog; ac_word=$2
22141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22142$as_echo_n "checking for $ac_word... " >&6; }
22143if ${ac_cv_path_READELF+:} false; then :
22144  $as_echo_n "(cached) " >&6
22145else
22146  case $READELF in
22147  [\\/]* | ?:[\\/]*)
22148  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22149  ;;
22150  *)
22151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22152for as_dir in $PATH
22153do
22154  IFS=$as_save_IFS
22155  test -z "$as_dir" && as_dir=.
22156    for ac_exec_ext in '' $ac_executable_extensions; do
22157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22158    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22160    break 2
22161  fi
22162done
22163  done
22164IFS=$as_save_IFS
22165
22166  ;;
22167esac
22168fi
22169READELF=$ac_cv_path_READELF
22170if test -n "$READELF"; then
22171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22172$as_echo "$READELF" >&6; }
22173else
22174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22175$as_echo "no" >&6; }
22176fi
22177
22178
22179  test -n "$READELF" && break
22180done
22181
22182    else
22183      # If it succeeded, then it was overridden by the user. We will use it
22184      # for the tool.
22185
22186      # First remove it from the list of overridden variables, so we can test
22187      # for unknown variables in the end.
22188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22189
22190      # Check if we try to supply an empty value
22191      if test "x$READELF" = x; then
22192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22193$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22195$as_echo_n "checking for READELF... " >&6; }
22196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22197$as_echo "disabled" >&6; }
22198      else
22199        # Check if the provided tool contains a complete path.
22200        tool_specified="$READELF"
22201        tool_basename="${tool_specified##*/}"
22202        if test "x$tool_basename" = "x$tool_specified"; then
22203          # A command without a complete path is provided, search $PATH.
22204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22205$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22206          # Extract the first word of "$tool_basename", so it can be a program name with args.
22207set dummy $tool_basename; ac_word=$2
22208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22209$as_echo_n "checking for $ac_word... " >&6; }
22210if ${ac_cv_path_READELF+:} false; then :
22211  $as_echo_n "(cached) " >&6
22212else
22213  case $READELF in
22214  [\\/]* | ?:[\\/]*)
22215  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22216  ;;
22217  *)
22218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22219for as_dir in $PATH
22220do
22221  IFS=$as_save_IFS
22222  test -z "$as_dir" && as_dir=.
22223    for ac_exec_ext in '' $ac_executable_extensions; do
22224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22225    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22227    break 2
22228  fi
22229done
22230  done
22231IFS=$as_save_IFS
22232
22233  ;;
22234esac
22235fi
22236READELF=$ac_cv_path_READELF
22237if test -n "$READELF"; then
22238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22239$as_echo "$READELF" >&6; }
22240else
22241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22242$as_echo "no" >&6; }
22243fi
22244
22245
22246          if test "x$READELF" = x; then
22247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22248          fi
22249        else
22250          # Otherwise we believe it is a complete path. Use it as it is.
22251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22252$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22254$as_echo_n "checking for READELF... " >&6; }
22255          if test ! -x "$tool_specified"; then
22256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22257$as_echo "not found" >&6; }
22258            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22259          fi
22260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22261$as_echo "$tool_specified" >&6; }
22262        fi
22263      fi
22264    fi
22265
22266  fi
22267
22268
22269
22270
22271  # Publish this variable in the help.
22272
22273
22274  if [ -z "${HG+x}" ]; then
22275    # The variable is not set by user, try to locate tool using the code snippet
22276    for ac_prog in hg
22277do
22278  # Extract the first word of "$ac_prog", so it can be a program name with args.
22279set dummy $ac_prog; ac_word=$2
22280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22281$as_echo_n "checking for $ac_word... " >&6; }
22282if ${ac_cv_path_HG+:} false; then :
22283  $as_echo_n "(cached) " >&6
22284else
22285  case $HG in
22286  [\\/]* | ?:[\\/]*)
22287  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22288  ;;
22289  *)
22290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22291for as_dir in $PATH
22292do
22293  IFS=$as_save_IFS
22294  test -z "$as_dir" && as_dir=.
22295    for ac_exec_ext in '' $ac_executable_extensions; do
22296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22297    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22299    break 2
22300  fi
22301done
22302  done
22303IFS=$as_save_IFS
22304
22305  ;;
22306esac
22307fi
22308HG=$ac_cv_path_HG
22309if test -n "$HG"; then
22310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22311$as_echo "$HG" >&6; }
22312else
22313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22314$as_echo "no" >&6; }
22315fi
22316
22317
22318  test -n "$HG" && break
22319done
22320
22321  else
22322    # The variable is set, but is it from the command line or the environment?
22323
22324    # Try to remove the string !HG! from our list.
22325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22327      # If it failed, the variable was not from the command line. Ignore it,
22328      # but warn the user (except for BASH, which is always set by the calling BASH).
22329      if test "xHG" != xBASH; then
22330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22331$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22332      fi
22333      # Try to locate tool using the code snippet
22334      for ac_prog in hg
22335do
22336  # Extract the first word of "$ac_prog", so it can be a program name with args.
22337set dummy $ac_prog; ac_word=$2
22338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22339$as_echo_n "checking for $ac_word... " >&6; }
22340if ${ac_cv_path_HG+:} false; then :
22341  $as_echo_n "(cached) " >&6
22342else
22343  case $HG in
22344  [\\/]* | ?:[\\/]*)
22345  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22346  ;;
22347  *)
22348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22349for as_dir in $PATH
22350do
22351  IFS=$as_save_IFS
22352  test -z "$as_dir" && as_dir=.
22353    for ac_exec_ext in '' $ac_executable_extensions; do
22354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22355    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22357    break 2
22358  fi
22359done
22360  done
22361IFS=$as_save_IFS
22362
22363  ;;
22364esac
22365fi
22366HG=$ac_cv_path_HG
22367if test -n "$HG"; then
22368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22369$as_echo "$HG" >&6; }
22370else
22371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22372$as_echo "no" >&6; }
22373fi
22374
22375
22376  test -n "$HG" && break
22377done
22378
22379    else
22380      # If it succeeded, then it was overridden by the user. We will use it
22381      # for the tool.
22382
22383      # First remove it from the list of overridden variables, so we can test
22384      # for unknown variables in the end.
22385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22386
22387      # Check if we try to supply an empty value
22388      if test "x$HG" = x; then
22389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22390$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22392$as_echo_n "checking for HG... " >&6; }
22393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22394$as_echo "disabled" >&6; }
22395      else
22396        # Check if the provided tool contains a complete path.
22397        tool_specified="$HG"
22398        tool_basename="${tool_specified##*/}"
22399        if test "x$tool_basename" = "x$tool_specified"; then
22400          # A command without a complete path is provided, search $PATH.
22401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22402$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22403          # Extract the first word of "$tool_basename", so it can be a program name with args.
22404set dummy $tool_basename; ac_word=$2
22405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22406$as_echo_n "checking for $ac_word... " >&6; }
22407if ${ac_cv_path_HG+:} false; then :
22408  $as_echo_n "(cached) " >&6
22409else
22410  case $HG in
22411  [\\/]* | ?:[\\/]*)
22412  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22413  ;;
22414  *)
22415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22416for as_dir in $PATH
22417do
22418  IFS=$as_save_IFS
22419  test -z "$as_dir" && as_dir=.
22420    for ac_exec_ext in '' $ac_executable_extensions; do
22421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22422    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22424    break 2
22425  fi
22426done
22427  done
22428IFS=$as_save_IFS
22429
22430  ;;
22431esac
22432fi
22433HG=$ac_cv_path_HG
22434if test -n "$HG"; then
22435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22436$as_echo "$HG" >&6; }
22437else
22438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22439$as_echo "no" >&6; }
22440fi
22441
22442
22443          if test "x$HG" = x; then
22444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22445          fi
22446        else
22447          # Otherwise we believe it is a complete path. Use it as it is.
22448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22449$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22451$as_echo_n "checking for HG... " >&6; }
22452          if test ! -x "$tool_specified"; then
22453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22454$as_echo "not found" >&6; }
22455            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22456          fi
22457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22458$as_echo "$tool_specified" >&6; }
22459        fi
22460      fi
22461    fi
22462
22463  fi
22464
22465
22466
22467
22468  # Publish this variable in the help.
22469
22470
22471  if [ -z "${STAT+x}" ]; then
22472    # The variable is not set by user, try to locate tool using the code snippet
22473    for ac_prog in stat
22474do
22475  # Extract the first word of "$ac_prog", so it can be a program name with args.
22476set dummy $ac_prog; ac_word=$2
22477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22478$as_echo_n "checking for $ac_word... " >&6; }
22479if ${ac_cv_path_STAT+:} false; then :
22480  $as_echo_n "(cached) " >&6
22481else
22482  case $STAT in
22483  [\\/]* | ?:[\\/]*)
22484  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22485  ;;
22486  *)
22487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22488for as_dir in $PATH
22489do
22490  IFS=$as_save_IFS
22491  test -z "$as_dir" && as_dir=.
22492    for ac_exec_ext in '' $ac_executable_extensions; do
22493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22494    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22496    break 2
22497  fi
22498done
22499  done
22500IFS=$as_save_IFS
22501
22502  ;;
22503esac
22504fi
22505STAT=$ac_cv_path_STAT
22506if test -n "$STAT"; then
22507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22508$as_echo "$STAT" >&6; }
22509else
22510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22511$as_echo "no" >&6; }
22512fi
22513
22514
22515  test -n "$STAT" && break
22516done
22517
22518  else
22519    # The variable is set, but is it from the command line or the environment?
22520
22521    # Try to remove the string !STAT! from our list.
22522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22524      # If it failed, the variable was not from the command line. Ignore it,
22525      # but warn the user (except for BASH, which is always set by the calling BASH).
22526      if test "xSTAT" != xBASH; then
22527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22528$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22529      fi
22530      # Try to locate tool using the code snippet
22531      for ac_prog in stat
22532do
22533  # Extract the first word of "$ac_prog", so it can be a program name with args.
22534set dummy $ac_prog; ac_word=$2
22535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22536$as_echo_n "checking for $ac_word... " >&6; }
22537if ${ac_cv_path_STAT+:} false; then :
22538  $as_echo_n "(cached) " >&6
22539else
22540  case $STAT in
22541  [\\/]* | ?:[\\/]*)
22542  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22543  ;;
22544  *)
22545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22546for as_dir in $PATH
22547do
22548  IFS=$as_save_IFS
22549  test -z "$as_dir" && as_dir=.
22550    for ac_exec_ext in '' $ac_executable_extensions; do
22551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22552    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22554    break 2
22555  fi
22556done
22557  done
22558IFS=$as_save_IFS
22559
22560  ;;
22561esac
22562fi
22563STAT=$ac_cv_path_STAT
22564if test -n "$STAT"; then
22565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22566$as_echo "$STAT" >&6; }
22567else
22568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22569$as_echo "no" >&6; }
22570fi
22571
22572
22573  test -n "$STAT" && break
22574done
22575
22576    else
22577      # If it succeeded, then it was overridden by the user. We will use it
22578      # for the tool.
22579
22580      # First remove it from the list of overridden variables, so we can test
22581      # for unknown variables in the end.
22582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22583
22584      # Check if we try to supply an empty value
22585      if test "x$STAT" = x; then
22586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22587$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22589$as_echo_n "checking for STAT... " >&6; }
22590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22591$as_echo "disabled" >&6; }
22592      else
22593        # Check if the provided tool contains a complete path.
22594        tool_specified="$STAT"
22595        tool_basename="${tool_specified##*/}"
22596        if test "x$tool_basename" = "x$tool_specified"; then
22597          # A command without a complete path is provided, search $PATH.
22598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22599$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22600          # Extract the first word of "$tool_basename", so it can be a program name with args.
22601set dummy $tool_basename; ac_word=$2
22602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22603$as_echo_n "checking for $ac_word... " >&6; }
22604if ${ac_cv_path_STAT+:} false; then :
22605  $as_echo_n "(cached) " >&6
22606else
22607  case $STAT in
22608  [\\/]* | ?:[\\/]*)
22609  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22610  ;;
22611  *)
22612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22613for as_dir in $PATH
22614do
22615  IFS=$as_save_IFS
22616  test -z "$as_dir" && as_dir=.
22617    for ac_exec_ext in '' $ac_executable_extensions; do
22618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22619    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22621    break 2
22622  fi
22623done
22624  done
22625IFS=$as_save_IFS
22626
22627  ;;
22628esac
22629fi
22630STAT=$ac_cv_path_STAT
22631if test -n "$STAT"; then
22632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22633$as_echo "$STAT" >&6; }
22634else
22635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22636$as_echo "no" >&6; }
22637fi
22638
22639
22640          if test "x$STAT" = x; then
22641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22642          fi
22643        else
22644          # Otherwise we believe it is a complete path. Use it as it is.
22645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22646$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22648$as_echo_n "checking for STAT... " >&6; }
22649          if test ! -x "$tool_specified"; then
22650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22651$as_echo "not found" >&6; }
22652            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22653          fi
22654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22655$as_echo "$tool_specified" >&6; }
22656        fi
22657      fi
22658    fi
22659
22660  fi
22661
22662
22663
22664
22665  # Publish this variable in the help.
22666
22667
22668  if [ -z "${TIME+x}" ]; then
22669    # The variable is not set by user, try to locate tool using the code snippet
22670    for ac_prog in time
22671do
22672  # Extract the first word of "$ac_prog", so it can be a program name with args.
22673set dummy $ac_prog; ac_word=$2
22674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22675$as_echo_n "checking for $ac_word... " >&6; }
22676if ${ac_cv_path_TIME+:} false; then :
22677  $as_echo_n "(cached) " >&6
22678else
22679  case $TIME in
22680  [\\/]* | ?:[\\/]*)
22681  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22682  ;;
22683  *)
22684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22685for as_dir in $PATH
22686do
22687  IFS=$as_save_IFS
22688  test -z "$as_dir" && as_dir=.
22689    for ac_exec_ext in '' $ac_executable_extensions; do
22690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22691    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22693    break 2
22694  fi
22695done
22696  done
22697IFS=$as_save_IFS
22698
22699  ;;
22700esac
22701fi
22702TIME=$ac_cv_path_TIME
22703if test -n "$TIME"; then
22704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22705$as_echo "$TIME" >&6; }
22706else
22707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22708$as_echo "no" >&6; }
22709fi
22710
22711
22712  test -n "$TIME" && break
22713done
22714
22715  else
22716    # The variable is set, but is it from the command line or the environment?
22717
22718    # Try to remove the string !TIME! from our list.
22719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22721      # If it failed, the variable was not from the command line. Ignore it,
22722      # but warn the user (except for BASH, which is always set by the calling BASH).
22723      if test "xTIME" != xBASH; then
22724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22725$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22726      fi
22727      # Try to locate tool using the code snippet
22728      for ac_prog in time
22729do
22730  # Extract the first word of "$ac_prog", so it can be a program name with args.
22731set dummy $ac_prog; ac_word=$2
22732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22733$as_echo_n "checking for $ac_word... " >&6; }
22734if ${ac_cv_path_TIME+:} false; then :
22735  $as_echo_n "(cached) " >&6
22736else
22737  case $TIME in
22738  [\\/]* | ?:[\\/]*)
22739  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22740  ;;
22741  *)
22742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22743for as_dir in $PATH
22744do
22745  IFS=$as_save_IFS
22746  test -z "$as_dir" && as_dir=.
22747    for ac_exec_ext in '' $ac_executable_extensions; do
22748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22749    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22751    break 2
22752  fi
22753done
22754  done
22755IFS=$as_save_IFS
22756
22757  ;;
22758esac
22759fi
22760TIME=$ac_cv_path_TIME
22761if test -n "$TIME"; then
22762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22763$as_echo "$TIME" >&6; }
22764else
22765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22766$as_echo "no" >&6; }
22767fi
22768
22769
22770  test -n "$TIME" && break
22771done
22772
22773    else
22774      # If it succeeded, then it was overridden by the user. We will use it
22775      # for the tool.
22776
22777      # First remove it from the list of overridden variables, so we can test
22778      # for unknown variables in the end.
22779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22780
22781      # Check if we try to supply an empty value
22782      if test "x$TIME" = x; then
22783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22784$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22786$as_echo_n "checking for TIME... " >&6; }
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22788$as_echo "disabled" >&6; }
22789      else
22790        # Check if the provided tool contains a complete path.
22791        tool_specified="$TIME"
22792        tool_basename="${tool_specified##*/}"
22793        if test "x$tool_basename" = "x$tool_specified"; then
22794          # A command without a complete path is provided, search $PATH.
22795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22796$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22797          # Extract the first word of "$tool_basename", so it can be a program name with args.
22798set dummy $tool_basename; ac_word=$2
22799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22800$as_echo_n "checking for $ac_word... " >&6; }
22801if ${ac_cv_path_TIME+:} false; then :
22802  $as_echo_n "(cached) " >&6
22803else
22804  case $TIME in
22805  [\\/]* | ?:[\\/]*)
22806  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22807  ;;
22808  *)
22809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22810for as_dir in $PATH
22811do
22812  IFS=$as_save_IFS
22813  test -z "$as_dir" && as_dir=.
22814    for ac_exec_ext in '' $ac_executable_extensions; do
22815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22816    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22818    break 2
22819  fi
22820done
22821  done
22822IFS=$as_save_IFS
22823
22824  ;;
22825esac
22826fi
22827TIME=$ac_cv_path_TIME
22828if test -n "$TIME"; then
22829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22830$as_echo "$TIME" >&6; }
22831else
22832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22833$as_echo "no" >&6; }
22834fi
22835
22836
22837          if test "x$TIME" = x; then
22838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22839          fi
22840        else
22841          # Otherwise we believe it is a complete path. Use it as it is.
22842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22843$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22845$as_echo_n "checking for TIME... " >&6; }
22846          if test ! -x "$tool_specified"; then
22847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22848$as_echo "not found" >&6; }
22849            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22850          fi
22851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22852$as_echo "$tool_specified" >&6; }
22853        fi
22854      fi
22855    fi
22856
22857  fi
22858
22859
22860  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22861  # be in the user path.
22862
22863
22864  # Publish this variable in the help.
22865
22866
22867  if [ -z "${DTRACE+x}" ]; then
22868    # The variable is not set by user, try to locate tool using the code snippet
22869    for ac_prog in dtrace
22870do
22871  # Extract the first word of "$ac_prog", so it can be a program name with args.
22872set dummy $ac_prog; ac_word=$2
22873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22874$as_echo_n "checking for $ac_word... " >&6; }
22875if ${ac_cv_path_DTRACE+:} false; then :
22876  $as_echo_n "(cached) " >&6
22877else
22878  case $DTRACE in
22879  [\\/]* | ?:[\\/]*)
22880  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22881  ;;
22882  *)
22883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22884as_dummy="$PATH:/usr/sbin"
22885for as_dir in $as_dummy
22886do
22887  IFS=$as_save_IFS
22888  test -z "$as_dir" && as_dir=.
22889    for ac_exec_ext in '' $ac_executable_extensions; do
22890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22891    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22893    break 2
22894  fi
22895done
22896  done
22897IFS=$as_save_IFS
22898
22899  ;;
22900esac
22901fi
22902DTRACE=$ac_cv_path_DTRACE
22903if test -n "$DTRACE"; then
22904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22905$as_echo "$DTRACE" >&6; }
22906else
22907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22908$as_echo "no" >&6; }
22909fi
22910
22911
22912  test -n "$DTRACE" && break
22913done
22914
22915  else
22916    # The variable is set, but is it from the command line or the environment?
22917
22918    # Try to remove the string !DTRACE! from our list.
22919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22921      # If it failed, the variable was not from the command line. Ignore it,
22922      # but warn the user (except for BASH, which is always set by the calling BASH).
22923      if test "xDTRACE" != xBASH; then
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22925$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22926      fi
22927      # Try to locate tool using the code snippet
22928      for ac_prog in dtrace
22929do
22930  # Extract the first word of "$ac_prog", so it can be a program name with args.
22931set dummy $ac_prog; ac_word=$2
22932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22933$as_echo_n "checking for $ac_word... " >&6; }
22934if ${ac_cv_path_DTRACE+:} false; then :
22935  $as_echo_n "(cached) " >&6
22936else
22937  case $DTRACE in
22938  [\\/]* | ?:[\\/]*)
22939  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22940  ;;
22941  *)
22942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22943as_dummy="$PATH:/usr/sbin"
22944for as_dir in $as_dummy
22945do
22946  IFS=$as_save_IFS
22947  test -z "$as_dir" && as_dir=.
22948    for ac_exec_ext in '' $ac_executable_extensions; do
22949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22950    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22952    break 2
22953  fi
22954done
22955  done
22956IFS=$as_save_IFS
22957
22958  ;;
22959esac
22960fi
22961DTRACE=$ac_cv_path_DTRACE
22962if test -n "$DTRACE"; then
22963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22964$as_echo "$DTRACE" >&6; }
22965else
22966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22967$as_echo "no" >&6; }
22968fi
22969
22970
22971  test -n "$DTRACE" && break
22972done
22973
22974    else
22975      # If it succeeded, then it was overridden by the user. We will use it
22976      # for the tool.
22977
22978      # First remove it from the list of overridden variables, so we can test
22979      # for unknown variables in the end.
22980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22981
22982      # Check if we try to supply an empty value
22983      if test "x$DTRACE" = x; then
22984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22985$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22987$as_echo_n "checking for DTRACE... " >&6; }
22988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22989$as_echo "disabled" >&6; }
22990      else
22991        # Check if the provided tool contains a complete path.
22992        tool_specified="$DTRACE"
22993        tool_basename="${tool_specified##*/}"
22994        if test "x$tool_basename" = "x$tool_specified"; then
22995          # A command without a complete path is provided, search $PATH.
22996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22997$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22998          # Extract the first word of "$tool_basename", so it can be a program name with args.
22999set dummy $tool_basename; ac_word=$2
23000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23001$as_echo_n "checking for $ac_word... " >&6; }
23002if ${ac_cv_path_DTRACE+:} false; then :
23003  $as_echo_n "(cached) " >&6
23004else
23005  case $DTRACE in
23006  [\\/]* | ?:[\\/]*)
23007  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23008  ;;
23009  *)
23010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23011for as_dir in $PATH
23012do
23013  IFS=$as_save_IFS
23014  test -z "$as_dir" && as_dir=.
23015    for ac_exec_ext in '' $ac_executable_extensions; do
23016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23017    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23019    break 2
23020  fi
23021done
23022  done
23023IFS=$as_save_IFS
23024
23025  ;;
23026esac
23027fi
23028DTRACE=$ac_cv_path_DTRACE
23029if test -n "$DTRACE"; then
23030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23031$as_echo "$DTRACE" >&6; }
23032else
23033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23034$as_echo "no" >&6; }
23035fi
23036
23037
23038          if test "x$DTRACE" = x; then
23039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23040          fi
23041        else
23042          # Otherwise we believe it is a complete path. Use it as it is.
23043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23044$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23046$as_echo_n "checking for DTRACE... " >&6; }
23047          if test ! -x "$tool_specified"; then
23048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23049$as_echo "not found" >&6; }
23050            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23051          fi
23052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23053$as_echo "$tool_specified" >&6; }
23054        fi
23055      fi
23056    fi
23057
23058  fi
23059
23060
23061
23062
23063  # Publish this variable in the help.
23064
23065
23066  if [ -z "${PATCH+x}" ]; then
23067    # The variable is not set by user, try to locate tool using the code snippet
23068    for ac_prog in gpatch patch
23069do
23070  # Extract the first word of "$ac_prog", so it can be a program name with args.
23071set dummy $ac_prog; ac_word=$2
23072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23073$as_echo_n "checking for $ac_word... " >&6; }
23074if ${ac_cv_path_PATCH+:} false; then :
23075  $as_echo_n "(cached) " >&6
23076else
23077  case $PATCH in
23078  [\\/]* | ?:[\\/]*)
23079  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23080  ;;
23081  *)
23082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23083for as_dir in $PATH
23084do
23085  IFS=$as_save_IFS
23086  test -z "$as_dir" && as_dir=.
23087    for ac_exec_ext in '' $ac_executable_extensions; do
23088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23089    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23091    break 2
23092  fi
23093done
23094  done
23095IFS=$as_save_IFS
23096
23097  ;;
23098esac
23099fi
23100PATCH=$ac_cv_path_PATCH
23101if test -n "$PATCH"; then
23102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23103$as_echo "$PATCH" >&6; }
23104else
23105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23106$as_echo "no" >&6; }
23107fi
23108
23109
23110  test -n "$PATCH" && break
23111done
23112
23113  else
23114    # The variable is set, but is it from the command line or the environment?
23115
23116    # Try to remove the string !PATCH! from our list.
23117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23119      # If it failed, the variable was not from the command line. Ignore it,
23120      # but warn the user (except for BASH, which is always set by the calling BASH).
23121      if test "xPATCH" != xBASH; then
23122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23123$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23124      fi
23125      # Try to locate tool using the code snippet
23126      for ac_prog in gpatch patch
23127do
23128  # Extract the first word of "$ac_prog", so it can be a program name with args.
23129set dummy $ac_prog; ac_word=$2
23130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23131$as_echo_n "checking for $ac_word... " >&6; }
23132if ${ac_cv_path_PATCH+:} false; then :
23133  $as_echo_n "(cached) " >&6
23134else
23135  case $PATCH in
23136  [\\/]* | ?:[\\/]*)
23137  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23138  ;;
23139  *)
23140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23141for as_dir in $PATH
23142do
23143  IFS=$as_save_IFS
23144  test -z "$as_dir" && as_dir=.
23145    for ac_exec_ext in '' $ac_executable_extensions; do
23146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23147    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23149    break 2
23150  fi
23151done
23152  done
23153IFS=$as_save_IFS
23154
23155  ;;
23156esac
23157fi
23158PATCH=$ac_cv_path_PATCH
23159if test -n "$PATCH"; then
23160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23161$as_echo "$PATCH" >&6; }
23162else
23163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23164$as_echo "no" >&6; }
23165fi
23166
23167
23168  test -n "$PATCH" && break
23169done
23170
23171    else
23172      # If it succeeded, then it was overridden by the user. We will use it
23173      # for the tool.
23174
23175      # First remove it from the list of overridden variables, so we can test
23176      # for unknown variables in the end.
23177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23178
23179      # Check if we try to supply an empty value
23180      if test "x$PATCH" = x; then
23181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23182$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23184$as_echo_n "checking for PATCH... " >&6; }
23185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23186$as_echo "disabled" >&6; }
23187      else
23188        # Check if the provided tool contains a complete path.
23189        tool_specified="$PATCH"
23190        tool_basename="${tool_specified##*/}"
23191        if test "x$tool_basename" = "x$tool_specified"; then
23192          # A command without a complete path is provided, search $PATH.
23193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23194$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23195          # Extract the first word of "$tool_basename", so it can be a program name with args.
23196set dummy $tool_basename; ac_word=$2
23197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23198$as_echo_n "checking for $ac_word... " >&6; }
23199if ${ac_cv_path_PATCH+:} false; then :
23200  $as_echo_n "(cached) " >&6
23201else
23202  case $PATCH in
23203  [\\/]* | ?:[\\/]*)
23204  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23205  ;;
23206  *)
23207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23208for as_dir in $PATH
23209do
23210  IFS=$as_save_IFS
23211  test -z "$as_dir" && as_dir=.
23212    for ac_exec_ext in '' $ac_executable_extensions; do
23213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23214    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23216    break 2
23217  fi
23218done
23219  done
23220IFS=$as_save_IFS
23221
23222  ;;
23223esac
23224fi
23225PATCH=$ac_cv_path_PATCH
23226if test -n "$PATCH"; then
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23228$as_echo "$PATCH" >&6; }
23229else
23230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23231$as_echo "no" >&6; }
23232fi
23233
23234
23235          if test "x$PATCH" = x; then
23236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23237          fi
23238        else
23239          # Otherwise we believe it is a complete path. Use it as it is.
23240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23241$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23243$as_echo_n "checking for PATCH... " >&6; }
23244          if test ! -x "$tool_specified"; then
23245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23246$as_echo "not found" >&6; }
23247            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23248          fi
23249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23250$as_echo "$tool_specified" >&6; }
23251        fi
23252      fi
23253    fi
23254
23255  fi
23256
23257
23258  # Check if it's GNU time
23259  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23260  if test "x$IS_GNU_TIME" != x; then
23261    IS_GNU_TIME=yes
23262  else
23263    IS_GNU_TIME=no
23264  fi
23265
23266
23267  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23268
23269
23270
23271  # Publish this variable in the help.
23272
23273
23274  if [ -z "${DSYMUTIL+x}" ]; then
23275    # The variable is not set by user, try to locate tool using the code snippet
23276    for ac_prog in dsymutil
23277do
23278  # Extract the first word of "$ac_prog", so it can be a program name with args.
23279set dummy $ac_prog; ac_word=$2
23280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23281$as_echo_n "checking for $ac_word... " >&6; }
23282if ${ac_cv_path_DSYMUTIL+:} false; then :
23283  $as_echo_n "(cached) " >&6
23284else
23285  case $DSYMUTIL in
23286  [\\/]* | ?:[\\/]*)
23287  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23288  ;;
23289  *)
23290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23291for as_dir in $PATH
23292do
23293  IFS=$as_save_IFS
23294  test -z "$as_dir" && as_dir=.
23295    for ac_exec_ext in '' $ac_executable_extensions; do
23296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23297    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23299    break 2
23300  fi
23301done
23302  done
23303IFS=$as_save_IFS
23304
23305  ;;
23306esac
23307fi
23308DSYMUTIL=$ac_cv_path_DSYMUTIL
23309if test -n "$DSYMUTIL"; then
23310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23311$as_echo "$DSYMUTIL" >&6; }
23312else
23313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23314$as_echo "no" >&6; }
23315fi
23316
23317
23318  test -n "$DSYMUTIL" && break
23319done
23320
23321  else
23322    # The variable is set, but is it from the command line or the environment?
23323
23324    # Try to remove the string !DSYMUTIL! from our list.
23325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23327      # If it failed, the variable was not from the command line. Ignore it,
23328      # but warn the user (except for BASH, which is always set by the calling BASH).
23329      if test "xDSYMUTIL" != xBASH; then
23330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23331$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23332      fi
23333      # Try to locate tool using the code snippet
23334      for ac_prog in dsymutil
23335do
23336  # Extract the first word of "$ac_prog", so it can be a program name with args.
23337set dummy $ac_prog; ac_word=$2
23338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23339$as_echo_n "checking for $ac_word... " >&6; }
23340if ${ac_cv_path_DSYMUTIL+:} false; then :
23341  $as_echo_n "(cached) " >&6
23342else
23343  case $DSYMUTIL in
23344  [\\/]* | ?:[\\/]*)
23345  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23346  ;;
23347  *)
23348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23349for as_dir in $PATH
23350do
23351  IFS=$as_save_IFS
23352  test -z "$as_dir" && as_dir=.
23353    for ac_exec_ext in '' $ac_executable_extensions; do
23354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23355    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23357    break 2
23358  fi
23359done
23360  done
23361IFS=$as_save_IFS
23362
23363  ;;
23364esac
23365fi
23366DSYMUTIL=$ac_cv_path_DSYMUTIL
23367if test -n "$DSYMUTIL"; then
23368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23369$as_echo "$DSYMUTIL" >&6; }
23370else
23371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23372$as_echo "no" >&6; }
23373fi
23374
23375
23376  test -n "$DSYMUTIL" && break
23377done
23378
23379    else
23380      # If it succeeded, then it was overridden by the user. We will use it
23381      # for the tool.
23382
23383      # First remove it from the list of overridden variables, so we can test
23384      # for unknown variables in the end.
23385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23386
23387      # Check if we try to supply an empty value
23388      if test "x$DSYMUTIL" = x; then
23389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23390$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23392$as_echo_n "checking for DSYMUTIL... " >&6; }
23393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23394$as_echo "disabled" >&6; }
23395      else
23396        # Check if the provided tool contains a complete path.
23397        tool_specified="$DSYMUTIL"
23398        tool_basename="${tool_specified##*/}"
23399        if test "x$tool_basename" = "x$tool_specified"; then
23400          # A command without a complete path is provided, search $PATH.
23401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23402$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23403          # Extract the first word of "$tool_basename", so it can be a program name with args.
23404set dummy $tool_basename; ac_word=$2
23405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23406$as_echo_n "checking for $ac_word... " >&6; }
23407if ${ac_cv_path_DSYMUTIL+:} false; then :
23408  $as_echo_n "(cached) " >&6
23409else
23410  case $DSYMUTIL in
23411  [\\/]* | ?:[\\/]*)
23412  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23413  ;;
23414  *)
23415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23416for as_dir in $PATH
23417do
23418  IFS=$as_save_IFS
23419  test -z "$as_dir" && as_dir=.
23420    for ac_exec_ext in '' $ac_executable_extensions; do
23421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23422    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23424    break 2
23425  fi
23426done
23427  done
23428IFS=$as_save_IFS
23429
23430  ;;
23431esac
23432fi
23433DSYMUTIL=$ac_cv_path_DSYMUTIL
23434if test -n "$DSYMUTIL"; then
23435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23436$as_echo "$DSYMUTIL" >&6; }
23437else
23438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23439$as_echo "no" >&6; }
23440fi
23441
23442
23443          if test "x$DSYMUTIL" = x; then
23444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23445          fi
23446        else
23447          # Otherwise we believe it is a complete path. Use it as it is.
23448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23449$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23451$as_echo_n "checking for DSYMUTIL... " >&6; }
23452          if test ! -x "$tool_specified"; then
23453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23454$as_echo "not found" >&6; }
23455            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23456          fi
23457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23458$as_echo "$tool_specified" >&6; }
23459        fi
23460      fi
23461    fi
23462
23463  fi
23464
23465
23466
23467  if test "x$DSYMUTIL" = x; then
23468    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23469  fi
23470
23471
23472
23473
23474
23475  # Publish this variable in the help.
23476
23477
23478  if [ -z "${XATTR+x}" ]; then
23479    # The variable is not set by user, try to locate tool using the code snippet
23480    for ac_prog in xattr
23481do
23482  # Extract the first word of "$ac_prog", so it can be a program name with args.
23483set dummy $ac_prog; ac_word=$2
23484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23485$as_echo_n "checking for $ac_word... " >&6; }
23486if ${ac_cv_path_XATTR+:} false; then :
23487  $as_echo_n "(cached) " >&6
23488else
23489  case $XATTR in
23490  [\\/]* | ?:[\\/]*)
23491  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23492  ;;
23493  *)
23494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23495for as_dir in $PATH
23496do
23497  IFS=$as_save_IFS
23498  test -z "$as_dir" && as_dir=.
23499    for ac_exec_ext in '' $ac_executable_extensions; do
23500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23501    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23503    break 2
23504  fi
23505done
23506  done
23507IFS=$as_save_IFS
23508
23509  ;;
23510esac
23511fi
23512XATTR=$ac_cv_path_XATTR
23513if test -n "$XATTR"; then
23514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23515$as_echo "$XATTR" >&6; }
23516else
23517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23518$as_echo "no" >&6; }
23519fi
23520
23521
23522  test -n "$XATTR" && break
23523done
23524
23525  else
23526    # The variable is set, but is it from the command line or the environment?
23527
23528    # Try to remove the string !XATTR! from our list.
23529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23531      # If it failed, the variable was not from the command line. Ignore it,
23532      # but warn the user (except for BASH, which is always set by the calling BASH).
23533      if test "xXATTR" != xBASH; then
23534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23535$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23536      fi
23537      # Try to locate tool using the code snippet
23538      for ac_prog in xattr
23539do
23540  # Extract the first word of "$ac_prog", so it can be a program name with args.
23541set dummy $ac_prog; ac_word=$2
23542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23543$as_echo_n "checking for $ac_word... " >&6; }
23544if ${ac_cv_path_XATTR+:} false; then :
23545  $as_echo_n "(cached) " >&6
23546else
23547  case $XATTR in
23548  [\\/]* | ?:[\\/]*)
23549  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23550  ;;
23551  *)
23552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23553for as_dir in $PATH
23554do
23555  IFS=$as_save_IFS
23556  test -z "$as_dir" && as_dir=.
23557    for ac_exec_ext in '' $ac_executable_extensions; do
23558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23559    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23561    break 2
23562  fi
23563done
23564  done
23565IFS=$as_save_IFS
23566
23567  ;;
23568esac
23569fi
23570XATTR=$ac_cv_path_XATTR
23571if test -n "$XATTR"; then
23572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23573$as_echo "$XATTR" >&6; }
23574else
23575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23576$as_echo "no" >&6; }
23577fi
23578
23579
23580  test -n "$XATTR" && break
23581done
23582
23583    else
23584      # If it succeeded, then it was overridden by the user. We will use it
23585      # for the tool.
23586
23587      # First remove it from the list of overridden variables, so we can test
23588      # for unknown variables in the end.
23589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23590
23591      # Check if we try to supply an empty value
23592      if test "x$XATTR" = x; then
23593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23594$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23596$as_echo_n "checking for XATTR... " >&6; }
23597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23598$as_echo "disabled" >&6; }
23599      else
23600        # Check if the provided tool contains a complete path.
23601        tool_specified="$XATTR"
23602        tool_basename="${tool_specified##*/}"
23603        if test "x$tool_basename" = "x$tool_specified"; then
23604          # A command without a complete path is provided, search $PATH.
23605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23606$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23607          # Extract the first word of "$tool_basename", so it can be a program name with args.
23608set dummy $tool_basename; ac_word=$2
23609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23610$as_echo_n "checking for $ac_word... " >&6; }
23611if ${ac_cv_path_XATTR+:} false; then :
23612  $as_echo_n "(cached) " >&6
23613else
23614  case $XATTR in
23615  [\\/]* | ?:[\\/]*)
23616  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23617  ;;
23618  *)
23619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23620for as_dir in $PATH
23621do
23622  IFS=$as_save_IFS
23623  test -z "$as_dir" && as_dir=.
23624    for ac_exec_ext in '' $ac_executable_extensions; do
23625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23626    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23628    break 2
23629  fi
23630done
23631  done
23632IFS=$as_save_IFS
23633
23634  ;;
23635esac
23636fi
23637XATTR=$ac_cv_path_XATTR
23638if test -n "$XATTR"; then
23639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23640$as_echo "$XATTR" >&6; }
23641else
23642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23643$as_echo "no" >&6; }
23644fi
23645
23646
23647          if test "x$XATTR" = x; then
23648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23649          fi
23650        else
23651          # Otherwise we believe it is a complete path. Use it as it is.
23652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23653$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23655$as_echo_n "checking for XATTR... " >&6; }
23656          if test ! -x "$tool_specified"; then
23657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23658$as_echo "not found" >&6; }
23659            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23660          fi
23661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23662$as_echo "$tool_specified" >&6; }
23663        fi
23664      fi
23665    fi
23666
23667  fi
23668
23669
23670
23671  if test "x$XATTR" = x; then
23672    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23673  fi
23674
23675
23676
23677
23678  # Publish this variable in the help.
23679
23680
23681  if [ -z "${CODESIGN+x}" ]; then
23682    # The variable is not set by user, try to locate tool using the code snippet
23683    for ac_prog in codesign
23684do
23685  # Extract the first word of "$ac_prog", so it can be a program name with args.
23686set dummy $ac_prog; ac_word=$2
23687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23688$as_echo_n "checking for $ac_word... " >&6; }
23689if ${ac_cv_path_CODESIGN+:} false; then :
23690  $as_echo_n "(cached) " >&6
23691else
23692  case $CODESIGN in
23693  [\\/]* | ?:[\\/]*)
23694  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23695  ;;
23696  *)
23697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23698for as_dir in $PATH
23699do
23700  IFS=$as_save_IFS
23701  test -z "$as_dir" && as_dir=.
23702    for ac_exec_ext in '' $ac_executable_extensions; do
23703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23704    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23706    break 2
23707  fi
23708done
23709  done
23710IFS=$as_save_IFS
23711
23712  ;;
23713esac
23714fi
23715CODESIGN=$ac_cv_path_CODESIGN
23716if test -n "$CODESIGN"; then
23717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23718$as_echo "$CODESIGN" >&6; }
23719else
23720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23721$as_echo "no" >&6; }
23722fi
23723
23724
23725  test -n "$CODESIGN" && break
23726done
23727
23728  else
23729    # The variable is set, but is it from the command line or the environment?
23730
23731    # Try to remove the string !CODESIGN! from our list.
23732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23734      # If it failed, the variable was not from the command line. Ignore it,
23735      # but warn the user (except for BASH, which is always set by the calling BASH).
23736      if test "xCODESIGN" != xBASH; then
23737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23738$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23739      fi
23740      # Try to locate tool using the code snippet
23741      for ac_prog in codesign
23742do
23743  # Extract the first word of "$ac_prog", so it can be a program name with args.
23744set dummy $ac_prog; ac_word=$2
23745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23746$as_echo_n "checking for $ac_word... " >&6; }
23747if ${ac_cv_path_CODESIGN+:} false; then :
23748  $as_echo_n "(cached) " >&6
23749else
23750  case $CODESIGN in
23751  [\\/]* | ?:[\\/]*)
23752  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23753  ;;
23754  *)
23755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23756for as_dir in $PATH
23757do
23758  IFS=$as_save_IFS
23759  test -z "$as_dir" && as_dir=.
23760    for ac_exec_ext in '' $ac_executable_extensions; do
23761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23762    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23764    break 2
23765  fi
23766done
23767  done
23768IFS=$as_save_IFS
23769
23770  ;;
23771esac
23772fi
23773CODESIGN=$ac_cv_path_CODESIGN
23774if test -n "$CODESIGN"; then
23775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23776$as_echo "$CODESIGN" >&6; }
23777else
23778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23779$as_echo "no" >&6; }
23780fi
23781
23782
23783  test -n "$CODESIGN" && break
23784done
23785
23786    else
23787      # If it succeeded, then it was overridden by the user. We will use it
23788      # for the tool.
23789
23790      # First remove it from the list of overridden variables, so we can test
23791      # for unknown variables in the end.
23792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23793
23794      # Check if we try to supply an empty value
23795      if test "x$CODESIGN" = x; then
23796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23797$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23799$as_echo_n "checking for CODESIGN... " >&6; }
23800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23801$as_echo "disabled" >&6; }
23802      else
23803        # Check if the provided tool contains a complete path.
23804        tool_specified="$CODESIGN"
23805        tool_basename="${tool_specified##*/}"
23806        if test "x$tool_basename" = "x$tool_specified"; then
23807          # A command without a complete path is provided, search $PATH.
23808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23809$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23810          # Extract the first word of "$tool_basename", so it can be a program name with args.
23811set dummy $tool_basename; ac_word=$2
23812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23813$as_echo_n "checking for $ac_word... " >&6; }
23814if ${ac_cv_path_CODESIGN+:} false; then :
23815  $as_echo_n "(cached) " >&6
23816else
23817  case $CODESIGN in
23818  [\\/]* | ?:[\\/]*)
23819  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23820  ;;
23821  *)
23822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23823for as_dir in $PATH
23824do
23825  IFS=$as_save_IFS
23826  test -z "$as_dir" && as_dir=.
23827    for ac_exec_ext in '' $ac_executable_extensions; do
23828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23829    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23831    break 2
23832  fi
23833done
23834  done
23835IFS=$as_save_IFS
23836
23837  ;;
23838esac
23839fi
23840CODESIGN=$ac_cv_path_CODESIGN
23841if test -n "$CODESIGN"; then
23842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23843$as_echo "$CODESIGN" >&6; }
23844else
23845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23846$as_echo "no" >&6; }
23847fi
23848
23849
23850          if test "x$CODESIGN" = x; then
23851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23852          fi
23853        else
23854          # Otherwise we believe it is a complete path. Use it as it is.
23855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23856$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23858$as_echo_n "checking for CODESIGN... " >&6; }
23859          if test ! -x "$tool_specified"; then
23860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23861$as_echo "not found" >&6; }
23862            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23863          fi
23864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23865$as_echo "$tool_specified" >&6; }
23866        fi
23867      fi
23868    fi
23869
23870  fi
23871
23872
23873    if test "x$CODESIGN" != "x"; then
23874      # Verify that the openjdk_codesign certificate is present
23875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23876$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23877      $RM codesign-testfile
23878      $TOUCH codesign-testfile
23879      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23880      $RM codesign-testfile
23881      if test "x$CODESIGN" = x; then
23882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23883$as_echo "no" >&6; }
23884      else
23885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23886$as_echo "yes" >&6; }
23887      fi
23888    fi
23889
23890
23891
23892  # Publish this variable in the help.
23893
23894
23895  if [ -z "${SETFILE+x}" ]; then
23896    # The variable is not set by user, try to locate tool using the code snippet
23897    for ac_prog in SetFile
23898do
23899  # Extract the first word of "$ac_prog", so it can be a program name with args.
23900set dummy $ac_prog; ac_word=$2
23901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23902$as_echo_n "checking for $ac_word... " >&6; }
23903if ${ac_cv_path_SETFILE+:} false; then :
23904  $as_echo_n "(cached) " >&6
23905else
23906  case $SETFILE in
23907  [\\/]* | ?:[\\/]*)
23908  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23909  ;;
23910  *)
23911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23912for as_dir in $PATH
23913do
23914  IFS=$as_save_IFS
23915  test -z "$as_dir" && as_dir=.
23916    for ac_exec_ext in '' $ac_executable_extensions; do
23917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23918    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23920    break 2
23921  fi
23922done
23923  done
23924IFS=$as_save_IFS
23925
23926  ;;
23927esac
23928fi
23929SETFILE=$ac_cv_path_SETFILE
23930if test -n "$SETFILE"; then
23931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23932$as_echo "$SETFILE" >&6; }
23933else
23934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23935$as_echo "no" >&6; }
23936fi
23937
23938
23939  test -n "$SETFILE" && break
23940done
23941
23942  else
23943    # The variable is set, but is it from the command line or the environment?
23944
23945    # Try to remove the string !SETFILE! from our list.
23946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23948      # If it failed, the variable was not from the command line. Ignore it,
23949      # but warn the user (except for BASH, which is always set by the calling BASH).
23950      if test "xSETFILE" != xBASH; then
23951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23952$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23953      fi
23954      # Try to locate tool using the code snippet
23955      for ac_prog in SetFile
23956do
23957  # Extract the first word of "$ac_prog", so it can be a program name with args.
23958set dummy $ac_prog; ac_word=$2
23959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23960$as_echo_n "checking for $ac_word... " >&6; }
23961if ${ac_cv_path_SETFILE+:} false; then :
23962  $as_echo_n "(cached) " >&6
23963else
23964  case $SETFILE in
23965  [\\/]* | ?:[\\/]*)
23966  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23967  ;;
23968  *)
23969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23970for as_dir in $PATH
23971do
23972  IFS=$as_save_IFS
23973  test -z "$as_dir" && as_dir=.
23974    for ac_exec_ext in '' $ac_executable_extensions; do
23975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23976    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23978    break 2
23979  fi
23980done
23981  done
23982IFS=$as_save_IFS
23983
23984  ;;
23985esac
23986fi
23987SETFILE=$ac_cv_path_SETFILE
23988if test -n "$SETFILE"; then
23989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23990$as_echo "$SETFILE" >&6; }
23991else
23992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23993$as_echo "no" >&6; }
23994fi
23995
23996
23997  test -n "$SETFILE" && break
23998done
23999
24000    else
24001      # If it succeeded, then it was overridden by the user. We will use it
24002      # for the tool.
24003
24004      # First remove it from the list of overridden variables, so we can test
24005      # for unknown variables in the end.
24006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24007
24008      # Check if we try to supply an empty value
24009      if test "x$SETFILE" = x; then
24010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24011$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24013$as_echo_n "checking for SETFILE... " >&6; }
24014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24015$as_echo "disabled" >&6; }
24016      else
24017        # Check if the provided tool contains a complete path.
24018        tool_specified="$SETFILE"
24019        tool_basename="${tool_specified##*/}"
24020        if test "x$tool_basename" = "x$tool_specified"; then
24021          # A command without a complete path is provided, search $PATH.
24022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24023$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24024          # Extract the first word of "$tool_basename", so it can be a program name with args.
24025set dummy $tool_basename; ac_word=$2
24026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24027$as_echo_n "checking for $ac_word... " >&6; }
24028if ${ac_cv_path_SETFILE+:} false; then :
24029  $as_echo_n "(cached) " >&6
24030else
24031  case $SETFILE in
24032  [\\/]* | ?:[\\/]*)
24033  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24034  ;;
24035  *)
24036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24037for as_dir in $PATH
24038do
24039  IFS=$as_save_IFS
24040  test -z "$as_dir" && as_dir=.
24041    for ac_exec_ext in '' $ac_executable_extensions; do
24042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24043    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24045    break 2
24046  fi
24047done
24048  done
24049IFS=$as_save_IFS
24050
24051  ;;
24052esac
24053fi
24054SETFILE=$ac_cv_path_SETFILE
24055if test -n "$SETFILE"; then
24056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24057$as_echo "$SETFILE" >&6; }
24058else
24059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24060$as_echo "no" >&6; }
24061fi
24062
24063
24064          if test "x$SETFILE" = x; then
24065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24066          fi
24067        else
24068          # Otherwise we believe it is a complete path. Use it as it is.
24069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24070$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24072$as_echo_n "checking for SETFILE... " >&6; }
24073          if test ! -x "$tool_specified"; then
24074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24075$as_echo "not found" >&6; }
24076            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24077          fi
24078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24079$as_echo "$tool_specified" >&6; }
24080        fi
24081      fi
24082    fi
24083
24084  fi
24085
24086
24087
24088  if test "x$SETFILE" = x; then
24089    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24090  fi
24091
24092
24093  fi
24094
24095
24096  # Test if bash supports pipefail.
24097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24098$as_echo_n "checking if bash supports pipefail... " >&6; }
24099  if ${BASH} -c 'set -o pipefail'; then
24100    BASH_ARGS="$BASH_ARGS -o pipefail"
24101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24102$as_echo "yes" >&6; }
24103  else
24104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24105$as_echo "no" >&6; }
24106  fi
24107
24108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24109$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24110  if ${BASH} -e -c 'true'; then
24111    BASH_ARGS="$BASH_ARGS -e"
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24113$as_echo "yes" >&6; }
24114  else
24115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24116$as_echo "no" >&6; }
24117  fi
24118
24119
24120
24121
24122# Check if pkg-config is available.
24123
24124
24125if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24126	if test -n "$ac_tool_prefix"; then
24127  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24128set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24130$as_echo_n "checking for $ac_word... " >&6; }
24131if ${ac_cv_path_PKG_CONFIG+:} false; then :
24132  $as_echo_n "(cached) " >&6
24133else
24134  case $PKG_CONFIG in
24135  [\\/]* | ?:[\\/]*)
24136  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24137  ;;
24138  *)
24139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24140for as_dir in $PATH
24141do
24142  IFS=$as_save_IFS
24143  test -z "$as_dir" && as_dir=.
24144    for ac_exec_ext in '' $ac_executable_extensions; do
24145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24146    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24148    break 2
24149  fi
24150done
24151  done
24152IFS=$as_save_IFS
24153
24154  ;;
24155esac
24156fi
24157PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24158if test -n "$PKG_CONFIG"; then
24159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24160$as_echo "$PKG_CONFIG" >&6; }
24161else
24162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24163$as_echo "no" >&6; }
24164fi
24165
24166
24167fi
24168if test -z "$ac_cv_path_PKG_CONFIG"; then
24169  ac_pt_PKG_CONFIG=$PKG_CONFIG
24170  # Extract the first word of "pkg-config", so it can be a program name with args.
24171set dummy pkg-config; ac_word=$2
24172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24173$as_echo_n "checking for $ac_word... " >&6; }
24174if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24175  $as_echo_n "(cached) " >&6
24176else
24177  case $ac_pt_PKG_CONFIG in
24178  [\\/]* | ?:[\\/]*)
24179  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24180  ;;
24181  *)
24182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24183for as_dir in $PATH
24184do
24185  IFS=$as_save_IFS
24186  test -z "$as_dir" && as_dir=.
24187    for ac_exec_ext in '' $ac_executable_extensions; do
24188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24189    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24191    break 2
24192  fi
24193done
24194  done
24195IFS=$as_save_IFS
24196
24197  ;;
24198esac
24199fi
24200ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24201if test -n "$ac_pt_PKG_CONFIG"; then
24202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24203$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24204else
24205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24206$as_echo "no" >&6; }
24207fi
24208
24209  if test "x$ac_pt_PKG_CONFIG" = x; then
24210    PKG_CONFIG=""
24211  else
24212    case $cross_compiling:$ac_tool_warned in
24213yes:)
24214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24216ac_tool_warned=yes ;;
24217esac
24218    PKG_CONFIG=$ac_pt_PKG_CONFIG
24219  fi
24220else
24221  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24222fi
24223
24224fi
24225if test -n "$PKG_CONFIG"; then
24226	_pkg_min_version=0.9.0
24227	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24228$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24229	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24230		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24231$as_echo "yes" >&6; }
24232	else
24233		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24234$as_echo "no" >&6; }
24235		PKG_CONFIG=""
24236	fi
24237
24238fi
24239
24240# After basic tools have been setup, we can check build os specific details.
24241
24242  ###############################################################################
24243
24244  # Note that this is the build platform OS version!
24245
24246  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24247  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24248  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24249  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24250
24251
24252
24253
24254
24255# Misc basic settings
24256
24257
24258# Check whether --with-default-make-target was given.
24259if test "${with_default_make_target+set}" = set; then :
24260  withval=$with_default_make_target;
24261fi
24262
24263  if test "x$with_default_make_target" = "x" \
24264      || test "x$with_default_make_target" = "xyes"; then
24265    DEFAULT_MAKE_TARGET="exploded-image"
24266  elif test "x$with_default_make_target" = "xno"; then
24267    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24268  else
24269    DEFAULT_MAKE_TARGET="$with_default_make_target"
24270  fi
24271
24272
24273
24274
24275###############################################################################
24276#
24277# Determine OpenJDK variants, options and version numbers.
24278#
24279###############################################################################
24280
24281# We need build & target for this.
24282
24283  # Should we build a JDK without a graphical UI?
24284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24285$as_echo_n "checking headless only... " >&6; }
24286  # Check whether --enable-headless-only was given.
24287if test "${enable_headless_only+set}" = set; then :
24288  enableval=$enable_headless_only;
24289fi
24290
24291
24292  if test "x$enable_headless_only" = "xyes"; then
24293    ENABLE_HEADLESS_ONLY="true"
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24295$as_echo "yes" >&6; }
24296  elif test "x$enable_headless_only" = "xno"; then
24297    ENABLE_HEADLESS_ONLY="false"
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24299$as_echo "no" >&6; }
24300  elif test "x$enable_headless_only" = "x"; then
24301    ENABLE_HEADLESS_ONLY="false"
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24303$as_echo "no" >&6; }
24304  else
24305    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24306  fi
24307
24308
24309
24310  # Choose cacerts source file
24311
24312# Check whether --with-cacerts-file was given.
24313if test "${with_cacerts_file+set}" = set; then :
24314  withval=$with_cacerts_file;
24315fi
24316
24317  if test "x$with_cacerts_file" != x; then
24318    CACERTS_FILE=$with_cacerts_file
24319  fi
24320
24321
24322  # Enable or disable unlimited crypto
24323  # Check whether --enable-unlimited-crypto was given.
24324if test "${enable_unlimited_crypto+set}" = set; then :
24325  enableval=$enable_unlimited_crypto;
24326else
24327  enable_unlimited_crypto=yes
24328fi
24329
24330  if test "x$enable_unlimited_crypto" = "xyes"; then
24331    UNLIMITED_CRYPTO=true
24332  else
24333    UNLIMITED_CRYPTO=false
24334  fi
24335
24336
24337  # Should we build the serviceability agent (SA)?
24338  INCLUDE_SA=true
24339  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24340    INCLUDE_SA=false
24341  fi
24342  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24343    INCLUDE_SA=false
24344  fi
24345
24346
24347  # Compress jars
24348  COMPRESS_JARS=false
24349
24350
24351
24352  # Setup default copyright year. Mostly overridden when building close to a new year.
24353
24354# Check whether --with-copyright-year was given.
24355if test "${with_copyright_year+set}" = set; then :
24356  withval=$with_copyright_year;
24357fi
24358
24359  if test "x$with_copyright_year" = xyes; then
24360    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24361  elif test "x$with_copyright_year" != x; then
24362    COPYRIGHT_YEAR="$with_copyright_year"
24363  else
24364    COPYRIGHT_YEAR=`$DATE +'%Y'`
24365  fi
24366
24367
24368
24369  # Check whether --enable-keep-packaged-modules was given.
24370if test "${enable_keep_packaged_modules+set}" = set; then :
24371  enableval=$enable_keep_packaged_modules;
24372fi
24373
24374
24375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24376$as_echo_n "checking if packaged modules are kept... " >&6; }
24377  if test "x$enable_keep_packaged_modules" = "xyes"; then
24378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24379$as_echo "yes" >&6; }
24380    JLINK_KEEP_PACKAGED_MODULES=true
24381  elif test "x$enable_keep_packaged_modules" = "xno"; then
24382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24383$as_echo "no" >&6; }
24384    JLINK_KEEP_PACKAGED_MODULES=false
24385  elif test "x$enable_keep_packaged_modules" = "x"; then
24386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24387$as_echo "yes (default)" >&6; }
24388    JLINK_KEEP_PACKAGED_MODULES=true
24389  else
24390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24391$as_echo "error" >&6; }
24392    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24393  fi
24394
24395
24396
24397
24398  # Warn user that old version arguments are deprecated.
24399
24400
24401# Check whether --with-milestone was given.
24402if test "${with_milestone+set}" = set; then :
24403  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24404$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24405fi
24406
24407
24408
24409
24410# Check whether --with-update-version was given.
24411if test "${with_update_version+set}" = set; then :
24412  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24413$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24414fi
24415
24416
24417
24418
24419# Check whether --with-user-release-suffix was given.
24420if test "${with_user_release_suffix+set}" = set; then :
24421  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
24422$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24423fi
24424
24425
24426
24427
24428# Check whether --with-build-number was given.
24429if test "${with_build_number+set}" = set; then :
24430  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24431$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24432fi
24433
24434
24435
24436  # Source the version numbers file
24437  . $AUTOCONF_DIR/version-numbers
24438
24439  # Some non-version number information is set in that file
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449  # Override version from arguments
24450
24451  # If --with-version-string is set, process it first. It is possible to
24452  # override parts with more specific flags, since these are processed later.
24453
24454# Check whether --with-version-string was given.
24455if test "${with_version_string+set}" = set; then :
24456  withval=$with_version_string;
24457fi
24458
24459  if test "x$with_version_string" = xyes; then
24460    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24461  elif test "x$with_version_string" != x; then
24462    # Additional [] needed to keep m4 from mangling shell constructs.
24463    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24464      VERSION_MAJOR=${BASH_REMATCH[1]}
24465      VERSION_MINOR=${BASH_REMATCH[3]}
24466      VERSION_SECURITY=${BASH_REMATCH[5]}
24467      VERSION_PATCH=${BASH_REMATCH[7]}
24468      VERSION_PRE=${BASH_REMATCH[9]}
24469      version_plus_separator=${BASH_REMATCH[11]}
24470      VERSION_BUILD=${BASH_REMATCH[12]}
24471      VERSION_OPT=${BASH_REMATCH[14]}
24472      # Unspecified numerical fields are interpreted as 0.
24473      if test "x$VERSION_MINOR" = x; then
24474        VERSION_MINOR=0
24475      fi
24476      if test "x$VERSION_SECURITY" = x; then
24477        VERSION_SECURITY=0
24478      fi
24479      if test "x$VERSION_PATCH" = x; then
24480        VERSION_PATCH=0
24481      fi
24482      if test "x$version_plus_separator" != x \
24483          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24484        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24485      fi
24486      # Stop the version part process from setting default values.
24487      # We still allow them to explicitly override though.
24488      NO_DEFAULT_VERSION_PARTS=true
24489    else
24490      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24491    fi
24492  fi
24493
24494
24495# Check whether --with-version-pre was given.
24496if test "${with_version_pre+set}" = set; then :
24497  withval=$with_version_pre; with_version_pre_present=true
24498else
24499  with_version_pre_present=false
24500fi
24501
24502
24503  if test "x$with_version_pre_present" = xtrue; then
24504    if test "x$with_version_pre" = xyes; then
24505      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24506    elif test "x$with_version_pre" = xno; then
24507      # Interpret --without-* as empty string instead of the literal "no"
24508      VERSION_PRE=
24509    else
24510      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24511       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24512      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24514$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24515      fi
24516    fi
24517  else
24518    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24519      # Default is to use "internal" as pre
24520      VERSION_PRE="internal"
24521    fi
24522  fi
24523
24524
24525# Check whether --with-version-opt was given.
24526if test "${with_version_opt+set}" = set; then :
24527  withval=$with_version_opt; with_version_opt_present=true
24528else
24529  with_version_opt_present=false
24530fi
24531
24532
24533  if test "x$with_version_opt_present" = xtrue; then
24534    if test "x$with_version_opt" = xyes; then
24535      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24536    elif test "x$with_version_opt" = xno; then
24537      # Interpret --without-* as empty string instead of the literal "no"
24538      VERSION_OPT=
24539    else
24540      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24541       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24542      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24544$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24545      fi
24546    fi
24547  else
24548    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24549      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24550      # Outer [ ] to quote m4.
24551       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24552      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24553    fi
24554  fi
24555
24556
24557# Check whether --with-version-build was given.
24558if test "${with_version_build+set}" = set; then :
24559  withval=$with_version_build; with_version_build_present=true
24560else
24561  with_version_build_present=false
24562fi
24563
24564
24565  if test "x$with_version_build_present" = xtrue; then
24566    if test "x$with_version_build" = xyes; then
24567      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24568    elif test "x$with_version_build" = xno; then
24569      # Interpret --without-* as empty string instead of the literal "no"
24570      VERSION_BUILD=
24571    elif test "x$with_version_build" = x; then
24572      VERSION_BUILD=
24573    else
24574
24575  # Additional [] needed to keep m4 from mangling shell constructs.
24576  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24577    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24578  fi
24579  # Extract the version number without leading zeros.
24580  cleaned_value=${BASH_REMATCH[1]}
24581  if test "x$cleaned_value" = x; then
24582    # Special case for zero
24583    cleaned_value=${BASH_REMATCH[2]}
24584  fi
24585
24586  if test $cleaned_value -gt 255; then
24587    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24588  fi
24589  if test "x$cleaned_value" != "x$with_version_build"; then
24590    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24591$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24592  fi
24593  VERSION_BUILD=$cleaned_value
24594
24595    fi
24596  else
24597    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24598      # Default is to not have a build number.
24599      VERSION_BUILD=""
24600      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24601      VERSION_BUILD=0
24602    fi
24603  fi
24604
24605
24606# Check whether --with-version-major was given.
24607if test "${with_version_major+set}" = set; then :
24608  withval=$with_version_major; with_version_major_present=true
24609else
24610  with_version_major_present=false
24611fi
24612
24613
24614  if test "x$with_version_major_present" = xtrue; then
24615    if test "x$with_version_major" = xyes; then
24616      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24617    else
24618
24619  # Additional [] needed to keep m4 from mangling shell constructs.
24620  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24621    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24622  fi
24623  # Extract the version number without leading zeros.
24624  cleaned_value=${BASH_REMATCH[1]}
24625  if test "x$cleaned_value" = x; then
24626    # Special case for zero
24627    cleaned_value=${BASH_REMATCH[2]}
24628  fi
24629
24630  if test $cleaned_value -gt 255; then
24631    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24632  fi
24633  if test "x$cleaned_value" != "x$with_version_major"; then
24634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24635$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24636  fi
24637  VERSION_MAJOR=$cleaned_value
24638
24639    fi
24640  else
24641    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24642      # Default is to get value from version-numbers
24643      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24644    fi
24645  fi
24646
24647
24648# Check whether --with-version-minor was given.
24649if test "${with_version_minor+set}" = set; then :
24650  withval=$with_version_minor; with_version_minor_present=true
24651else
24652  with_version_minor_present=false
24653fi
24654
24655
24656  if test "x$with_version_minor_present" = xtrue; then
24657    if test "x$with_version_minor" = xyes; then
24658      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24659    elif test "x$with_version_minor" = xno; then
24660      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24661      VERSION_MINOR=0
24662    elif test "x$with_version_minor" = x; then
24663      VERSION_MINOR=0
24664    else
24665
24666  # Additional [] needed to keep m4 from mangling shell constructs.
24667  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24668    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24669  fi
24670  # Extract the version number without leading zeros.
24671  cleaned_value=${BASH_REMATCH[1]}
24672  if test "x$cleaned_value" = x; then
24673    # Special case for zero
24674    cleaned_value=${BASH_REMATCH[2]}
24675  fi
24676
24677  if test $cleaned_value -gt 255; then
24678    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24679  fi
24680  if test "x$cleaned_value" != "x$with_version_minor"; then
24681    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24682$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24683  fi
24684  VERSION_MINOR=$cleaned_value
24685
24686    fi
24687  else
24688    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24689      # Default is 0, if unspecified
24690      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24691    fi
24692  fi
24693
24694
24695# Check whether --with-version-security was given.
24696if test "${with_version_security+set}" = set; then :
24697  withval=$with_version_security; with_version_security_present=true
24698else
24699  with_version_security_present=false
24700fi
24701
24702
24703  if test "x$with_version_security_present" = xtrue; then
24704    if test "x$with_version_security" = xyes; then
24705      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24706    elif test "x$with_version_security" = xno; then
24707      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24708      VERSION_SECURITY=0
24709    elif test "x$with_version_security" = x; then
24710      VERSION_SECURITY=0
24711    else
24712
24713  # Additional [] needed to keep m4 from mangling shell constructs.
24714  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24715    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24716  fi
24717  # Extract the version number without leading zeros.
24718  cleaned_value=${BASH_REMATCH[1]}
24719  if test "x$cleaned_value" = x; then
24720    # Special case for zero
24721    cleaned_value=${BASH_REMATCH[2]}
24722  fi
24723
24724  if test $cleaned_value -gt 255; then
24725    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24726  fi
24727  if test "x$cleaned_value" != "x$with_version_security"; then
24728    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24729$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24730  fi
24731  VERSION_SECURITY=$cleaned_value
24732
24733    fi
24734  else
24735    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24736      # Default is 0, if unspecified
24737      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24738    fi
24739  fi
24740
24741
24742# Check whether --with-version-patch was given.
24743if test "${with_version_patch+set}" = set; then :
24744  withval=$with_version_patch; with_version_patch_present=true
24745else
24746  with_version_patch_present=false
24747fi
24748
24749
24750  if test "x$with_version_patch_present" = xtrue; then
24751    if test "x$with_version_patch" = xyes; then
24752      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24753    elif test "x$with_version_patch" = xno; then
24754      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24755      VERSION_PATCH=0
24756    elif test "x$with_version_patch" = x; then
24757      VERSION_PATCH=0
24758    else
24759
24760  # Additional [] needed to keep m4 from mangling shell constructs.
24761  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24762    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24763  fi
24764  # Extract the version number without leading zeros.
24765  cleaned_value=${BASH_REMATCH[1]}
24766  if test "x$cleaned_value" = x; then
24767    # Special case for zero
24768    cleaned_value=${BASH_REMATCH[2]}
24769  fi
24770
24771  if test $cleaned_value -gt 255; then
24772    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24773  fi
24774  if test "x$cleaned_value" != "x$with_version_patch"; then
24775    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24776$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24777  fi
24778  VERSION_PATCH=$cleaned_value
24779
24780    fi
24781  else
24782    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24783      # Default is 0, if unspecified
24784      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24785    fi
24786  fi
24787
24788  # Calculate derived version properties
24789
24790  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24791  if test "x$VERSION_PRE" = x; then
24792    VERSION_IS_GA=true
24793  else
24794    VERSION_IS_GA=false
24795  fi
24796
24797  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24798  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24799
24800  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24801  # Strip trailing zeroes from stripped_version_number
24802  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24803  VERSION_NUMBER=$stripped_version_number
24804
24805  # The complete version string, with additional build information
24806  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24807    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24808  else
24809    # If either build or opt is set, we need a + separator
24810    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24811  fi
24812
24813  # The short version string, just VERSION_NUMBER and PRE, if present.
24814  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24815
24816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24817$as_echo_n "checking for version string... " >&6; }
24818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24819$as_echo "$VERSION_STRING" >&6; }
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835###############################################################################
24836#
24837# Setup BootJDK, used to bootstrap the build.
24838#
24839###############################################################################
24840
24841
24842  BOOT_JDK_FOUND=no
24843
24844# Check whether --with-boot-jdk was given.
24845if test "${with_boot_jdk+set}" = set; then :
24846  withval=$with_boot_jdk;
24847fi
24848
24849
24850  # We look for the Boot JDK through various means, going from more certain to
24851  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24852  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24853  # must check if this is indeed valid; otherwise we'll continue looking.
24854
24855  # Test: Is bootjdk explicitly set by command line arguments?
24856
24857  if test "x$BOOT_JDK_FOUND" = xno; then
24858    # Now execute the test
24859
24860  if test "x$with_boot_jdk" != x; then
24861    BOOT_JDK=$with_boot_jdk
24862    BOOT_JDK_FOUND=maybe
24863    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24864$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24865  fi
24866
24867
24868    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24869    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24870      # Do we have a bin/java?
24871      if test ! -x "$BOOT_JDK/bin/java"; then
24872        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24874        BOOT_JDK_FOUND=no
24875      else
24876        # Do we have a bin/javac?
24877        if test ! -x "$BOOT_JDK/bin/javac"; then
24878          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24880          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24881$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24882          BOOT_JDK_FOUND=no
24883        else
24884          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24885          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24886
24887          # Extra M4 quote needed to protect [] in grep expression.
24888          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24889          if test "x$FOUND_CORRECT_VERSION" = x; then
24890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24892            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24893$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24894            BOOT_JDK_FOUND=no
24895          else
24896            # We're done! :-)
24897            BOOT_JDK_FOUND=yes
24898
24899  # Only process if variable expands to non-empty
24900
24901  if test "x$BOOT_JDK" != x; then
24902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24903
24904  # Input might be given as Windows format, start by converting to
24905  # unix format.
24906  path="$BOOT_JDK"
24907  new_path=`$CYGPATH -u "$path"`
24908
24909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24912  # "foo.exe" is OK but "foo" is an error.
24913  #
24914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24915  # It is also a way to make sure we got the proper file name for the real test later on.
24916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24917  if test "x$test_shortpath" = x; then
24918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24920    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24921  fi
24922
24923  # Call helper function which possibly converts this using DOS-style short mode.
24924  # If so, the updated path is stored in $new_path.
24925
24926  input_path="$new_path"
24927  # Check if we need to convert this using DOS-style short mode. If the path
24928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24929  # take no chances and rewrite it.
24930  # Note: m4 eats our [], so we need to use [ and ] instead.
24931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24932  if test "x$has_forbidden_chars" != x; then
24933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24937      # Going to short mode and back again did indeed matter. Since short mode is
24938      # case insensitive, let's make it lowercase to improve readability.
24939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24940      # Now convert it back to Unix-style (cygpath)
24941      input_path=`$CYGPATH -u "$shortmode_path"`
24942      new_path="$input_path"
24943    fi
24944  fi
24945
24946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24947  if test "x$test_cygdrive_prefix" = x; then
24948    # As a simple fix, exclude /usr/bin since it's not a real path.
24949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24951      # a path prefixed by /cygdrive for fixpath to work.
24952      new_path="$CYGWIN_ROOT_PATH$input_path"
24953    fi
24954  fi
24955
24956
24957  if test "x$path" != "x$new_path"; then
24958    BOOT_JDK="$new_path"
24959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24960$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24961  fi
24962
24963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24964
24965  path="$BOOT_JDK"
24966  has_colon=`$ECHO $path | $GREP ^.:`
24967  new_path="$path"
24968  if test "x$has_colon" = x; then
24969    # Not in mixed or Windows style, start by that.
24970    new_path=`cmd //c echo $path`
24971  fi
24972
24973
24974  input_path="$new_path"
24975  # Check if we need to convert this using DOS-style short mode. If the path
24976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24977  # take no chances and rewrite it.
24978  # Note: m4 eats our [], so we need to use [ and ] instead.
24979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24980  if test "x$has_forbidden_chars" != x; then
24981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24983  fi
24984
24985
24986  windows_path="$new_path"
24987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24988    unix_path=`$CYGPATH -u "$windows_path"`
24989    new_path="$unix_path"
24990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24992    new_path="$unix_path"
24993  fi
24994
24995  if test "x$path" != "x$new_path"; then
24996    BOOT_JDK="$new_path"
24997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24999  fi
25000
25001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25003
25004    else
25005      # We're on a unix platform. Hooray! :)
25006      path="$BOOT_JDK"
25007      has_space=`$ECHO "$path" | $GREP " "`
25008      if test "x$has_space" != x; then
25009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25011        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25012      fi
25013
25014      # Use eval to expand a potential ~
25015      eval path="$path"
25016      if test ! -f "$path" && test ! -d "$path"; then
25017        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25018      fi
25019
25020      if test -d "$path"; then
25021        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25022      else
25023        dir="`$DIRNAME "$path"`"
25024        base="`$BASENAME "$path"`"
25025        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25026      fi
25027    fi
25028  fi
25029
25030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25031$as_echo_n "checking for Boot JDK... " >&6; }
25032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25033$as_echo "$BOOT_JDK" >&6; }
25034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25035$as_echo_n "checking Boot JDK version... " >&6; }
25036            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25038$as_echo "$BOOT_JDK_VERSION" >&6; }
25039          fi # end check jdk version
25040        fi # end check javac
25041      fi # end check java
25042    fi # end check boot jdk found
25043  fi
25044
25045  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25046    # Having specified an argument which is incorrect will produce an instant failure;
25047    # we should not go on looking
25048    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25049  fi
25050
25051  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25052
25053  if test "x$BOOT_JDK_FOUND" = xno; then
25054    # Now execute the test
25055
25056  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25057    # First check at user selected default
25058
25059  if test "x$BOOT_JDK_FOUND" = xno; then
25060    # Now execute the test
25061
25062  if test -x /usr/libexec/java_home; then
25063    BOOT_JDK=`/usr/libexec/java_home `
25064    BOOT_JDK_FOUND=maybe
25065    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25066$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25067  fi
25068
25069
25070    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25071    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25072      # Do we have a bin/java?
25073      if test ! -x "$BOOT_JDK/bin/java"; then
25074        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25076        BOOT_JDK_FOUND=no
25077      else
25078        # Do we have a bin/javac?
25079        if test ! -x "$BOOT_JDK/bin/javac"; then
25080          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25082          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25083$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25084          BOOT_JDK_FOUND=no
25085        else
25086          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25087          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25088
25089          # Extra M4 quote needed to protect [] in grep expression.
25090          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25091          if test "x$FOUND_CORRECT_VERSION" = x; then
25092            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25094            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25095$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25096            BOOT_JDK_FOUND=no
25097          else
25098            # We're done! :-)
25099            BOOT_JDK_FOUND=yes
25100
25101  # Only process if variable expands to non-empty
25102
25103  if test "x$BOOT_JDK" != x; then
25104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105
25106  # Input might be given as Windows format, start by converting to
25107  # unix format.
25108  path="$BOOT_JDK"
25109  new_path=`$CYGPATH -u "$path"`
25110
25111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25114  # "foo.exe" is OK but "foo" is an error.
25115  #
25116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25117  # It is also a way to make sure we got the proper file name for the real test later on.
25118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25119  if test "x$test_shortpath" = x; then
25120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25122    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25123  fi
25124
25125  # Call helper function which possibly converts this using DOS-style short mode.
25126  # If so, the updated path is stored in $new_path.
25127
25128  input_path="$new_path"
25129  # Check if we need to convert this using DOS-style short mode. If the path
25130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25131  # take no chances and rewrite it.
25132  # Note: m4 eats our [], so we need to use [ and ] instead.
25133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25134  if test "x$has_forbidden_chars" != x; then
25135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25139      # Going to short mode and back again did indeed matter. Since short mode is
25140      # case insensitive, let's make it lowercase to improve readability.
25141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25142      # Now convert it back to Unix-style (cygpath)
25143      input_path=`$CYGPATH -u "$shortmode_path"`
25144      new_path="$input_path"
25145    fi
25146  fi
25147
25148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25149  if test "x$test_cygdrive_prefix" = x; then
25150    # As a simple fix, exclude /usr/bin since it's not a real path.
25151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25153      # a path prefixed by /cygdrive for fixpath to work.
25154      new_path="$CYGWIN_ROOT_PATH$input_path"
25155    fi
25156  fi
25157
25158
25159  if test "x$path" != "x$new_path"; then
25160    BOOT_JDK="$new_path"
25161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25163  fi
25164
25165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25166
25167  path="$BOOT_JDK"
25168  has_colon=`$ECHO $path | $GREP ^.:`
25169  new_path="$path"
25170  if test "x$has_colon" = x; then
25171    # Not in mixed or Windows style, start by that.
25172    new_path=`cmd //c echo $path`
25173  fi
25174
25175
25176  input_path="$new_path"
25177  # Check if we need to convert this using DOS-style short mode. If the path
25178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25179  # take no chances and rewrite it.
25180  # Note: m4 eats our [], so we need to use [ and ] instead.
25181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25182  if test "x$has_forbidden_chars" != x; then
25183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25185  fi
25186
25187
25188  windows_path="$new_path"
25189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25190    unix_path=`$CYGPATH -u "$windows_path"`
25191    new_path="$unix_path"
25192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25194    new_path="$unix_path"
25195  fi
25196
25197  if test "x$path" != "x$new_path"; then
25198    BOOT_JDK="$new_path"
25199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25201  fi
25202
25203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25205
25206    else
25207      # We're on a unix platform. Hooray! :)
25208      path="$BOOT_JDK"
25209      has_space=`$ECHO "$path" | $GREP " "`
25210      if test "x$has_space" != x; then
25211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25214      fi
25215
25216      # Use eval to expand a potential ~
25217      eval path="$path"
25218      if test ! -f "$path" && test ! -d "$path"; then
25219        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25220      fi
25221
25222      if test -d "$path"; then
25223        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25224      else
25225        dir="`$DIRNAME "$path"`"
25226        base="`$BASENAME "$path"`"
25227        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25228      fi
25229    fi
25230  fi
25231
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25233$as_echo_n "checking for Boot JDK... " >&6; }
25234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25235$as_echo "$BOOT_JDK" >&6; }
25236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25237$as_echo_n "checking Boot JDK version... " >&6; }
25238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25240$as_echo "$BOOT_JDK_VERSION" >&6; }
25241          fi # end check jdk version
25242        fi # end check javac
25243      fi # end check java
25244    fi # end check boot jdk found
25245  fi
25246
25247    # If that did not work out (e.g. too old), try explicit versions instead
25248
25249  if test "x$BOOT_JDK_FOUND" = xno; then
25250    # Now execute the test
25251
25252  if test -x /usr/libexec/java_home; then
25253    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25254    BOOT_JDK_FOUND=maybe
25255    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25256$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25257  fi
25258
25259
25260    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25261    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25262      # Do we have a bin/java?
25263      if test ! -x "$BOOT_JDK/bin/java"; then
25264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25266        BOOT_JDK_FOUND=no
25267      else
25268        # Do we have a bin/javac?
25269        if test ! -x "$BOOT_JDK/bin/javac"; then
25270          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25272          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25273$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25274          BOOT_JDK_FOUND=no
25275        else
25276          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25277          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25278
25279          # Extra M4 quote needed to protect [] in grep expression.
25280          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25281          if test "x$FOUND_CORRECT_VERSION" = x; then
25282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25284            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25285$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25286            BOOT_JDK_FOUND=no
25287          else
25288            # We're done! :-)
25289            BOOT_JDK_FOUND=yes
25290
25291  # Only process if variable expands to non-empty
25292
25293  if test "x$BOOT_JDK" != x; then
25294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25295
25296  # Input might be given as Windows format, start by converting to
25297  # unix format.
25298  path="$BOOT_JDK"
25299  new_path=`$CYGPATH -u "$path"`
25300
25301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25304  # "foo.exe" is OK but "foo" is an error.
25305  #
25306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25307  # It is also a way to make sure we got the proper file name for the real test later on.
25308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25309  if test "x$test_shortpath" = x; then
25310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25312    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25313  fi
25314
25315  # Call helper function which possibly converts this using DOS-style short mode.
25316  # If so, the updated path is stored in $new_path.
25317
25318  input_path="$new_path"
25319  # Check if we need to convert this using DOS-style short mode. If the path
25320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25321  # take no chances and rewrite it.
25322  # Note: m4 eats our [], so we need to use [ and ] instead.
25323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25324  if test "x$has_forbidden_chars" != x; then
25325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25329      # Going to short mode and back again did indeed matter. Since short mode is
25330      # case insensitive, let's make it lowercase to improve readability.
25331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25332      # Now convert it back to Unix-style (cygpath)
25333      input_path=`$CYGPATH -u "$shortmode_path"`
25334      new_path="$input_path"
25335    fi
25336  fi
25337
25338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25339  if test "x$test_cygdrive_prefix" = x; then
25340    # As a simple fix, exclude /usr/bin since it's not a real path.
25341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25343      # a path prefixed by /cygdrive for fixpath to work.
25344      new_path="$CYGWIN_ROOT_PATH$input_path"
25345    fi
25346  fi
25347
25348
25349  if test "x$path" != "x$new_path"; then
25350    BOOT_JDK="$new_path"
25351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25353  fi
25354
25355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25356
25357  path="$BOOT_JDK"
25358  has_colon=`$ECHO $path | $GREP ^.:`
25359  new_path="$path"
25360  if test "x$has_colon" = x; then
25361    # Not in mixed or Windows style, start by that.
25362    new_path=`cmd //c echo $path`
25363  fi
25364
25365
25366  input_path="$new_path"
25367  # Check if we need to convert this using DOS-style short mode. If the path
25368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25369  # take no chances and rewrite it.
25370  # Note: m4 eats our [], so we need to use [ and ] instead.
25371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25372  if test "x$has_forbidden_chars" != x; then
25373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25375  fi
25376
25377
25378  windows_path="$new_path"
25379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25380    unix_path=`$CYGPATH -u "$windows_path"`
25381    new_path="$unix_path"
25382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25384    new_path="$unix_path"
25385  fi
25386
25387  if test "x$path" != "x$new_path"; then
25388    BOOT_JDK="$new_path"
25389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25391  fi
25392
25393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25395
25396    else
25397      # We're on a unix platform. Hooray! :)
25398      path="$BOOT_JDK"
25399      has_space=`$ECHO "$path" | $GREP " "`
25400      if test "x$has_space" != x; then
25401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25404      fi
25405
25406      # Use eval to expand a potential ~
25407      eval path="$path"
25408      if test ! -f "$path" && test ! -d "$path"; then
25409        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25410      fi
25411
25412      if test -d "$path"; then
25413        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25414      else
25415        dir="`$DIRNAME "$path"`"
25416        base="`$BASENAME "$path"`"
25417        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25418      fi
25419    fi
25420  fi
25421
25422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25423$as_echo_n "checking for Boot JDK... " >&6; }
25424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25425$as_echo "$BOOT_JDK" >&6; }
25426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25427$as_echo_n "checking Boot JDK version... " >&6; }
25428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25430$as_echo "$BOOT_JDK_VERSION" >&6; }
25431          fi # end check jdk version
25432        fi # end check javac
25433      fi # end check java
25434    fi # end check boot jdk found
25435  fi
25436
25437
25438  if test "x$BOOT_JDK_FOUND" = xno; then
25439    # Now execute the test
25440
25441  if test -x /usr/libexec/java_home; then
25442    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25443    BOOT_JDK_FOUND=maybe
25444    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25445$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25446  fi
25447
25448
25449    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25450    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25451      # Do we have a bin/java?
25452      if test ! -x "$BOOT_JDK/bin/java"; then
25453        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25455        BOOT_JDK_FOUND=no
25456      else
25457        # Do we have a bin/javac?
25458        if test ! -x "$BOOT_JDK/bin/javac"; then
25459          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25461          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25462$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25463          BOOT_JDK_FOUND=no
25464        else
25465          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25466          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25467
25468          # Extra M4 quote needed to protect [] in grep expression.
25469          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25470          if test "x$FOUND_CORRECT_VERSION" = x; then
25471            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25473            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25474$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25475            BOOT_JDK_FOUND=no
25476          else
25477            # We're done! :-)
25478            BOOT_JDK_FOUND=yes
25479
25480  # Only process if variable expands to non-empty
25481
25482  if test "x$BOOT_JDK" != x; then
25483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25484
25485  # Input might be given as Windows format, start by converting to
25486  # unix format.
25487  path="$BOOT_JDK"
25488  new_path=`$CYGPATH -u "$path"`
25489
25490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25493  # "foo.exe" is OK but "foo" is an error.
25494  #
25495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25496  # It is also a way to make sure we got the proper file name for the real test later on.
25497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25498  if test "x$test_shortpath" = x; then
25499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25501    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25502  fi
25503
25504  # Call helper function which possibly converts this using DOS-style short mode.
25505  # If so, the updated path is stored in $new_path.
25506
25507  input_path="$new_path"
25508  # Check if we need to convert this using DOS-style short mode. If the path
25509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25510  # take no chances and rewrite it.
25511  # Note: m4 eats our [], so we need to use [ and ] instead.
25512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25513  if test "x$has_forbidden_chars" != x; then
25514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25518      # Going to short mode and back again did indeed matter. Since short mode is
25519      # case insensitive, let's make it lowercase to improve readability.
25520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25521      # Now convert it back to Unix-style (cygpath)
25522      input_path=`$CYGPATH -u "$shortmode_path"`
25523      new_path="$input_path"
25524    fi
25525  fi
25526
25527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25528  if test "x$test_cygdrive_prefix" = x; then
25529    # As a simple fix, exclude /usr/bin since it's not a real path.
25530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25532      # a path prefixed by /cygdrive for fixpath to work.
25533      new_path="$CYGWIN_ROOT_PATH$input_path"
25534    fi
25535  fi
25536
25537
25538  if test "x$path" != "x$new_path"; then
25539    BOOT_JDK="$new_path"
25540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25542  fi
25543
25544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25545
25546  path="$BOOT_JDK"
25547  has_colon=`$ECHO $path | $GREP ^.:`
25548  new_path="$path"
25549  if test "x$has_colon" = x; then
25550    # Not in mixed or Windows style, start by that.
25551    new_path=`cmd //c echo $path`
25552  fi
25553
25554
25555  input_path="$new_path"
25556  # Check if we need to convert this using DOS-style short mode. If the path
25557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25558  # take no chances and rewrite it.
25559  # Note: m4 eats our [], so we need to use [ and ] instead.
25560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25561  if test "x$has_forbidden_chars" != x; then
25562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25564  fi
25565
25566
25567  windows_path="$new_path"
25568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25569    unix_path=`$CYGPATH -u "$windows_path"`
25570    new_path="$unix_path"
25571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25573    new_path="$unix_path"
25574  fi
25575
25576  if test "x$path" != "x$new_path"; then
25577    BOOT_JDK="$new_path"
25578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25580  fi
25581
25582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25584
25585    else
25586      # We're on a unix platform. Hooray! :)
25587      path="$BOOT_JDK"
25588      has_space=`$ECHO "$path" | $GREP " "`
25589      if test "x$has_space" != x; then
25590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25593      fi
25594
25595      # Use eval to expand a potential ~
25596      eval path="$path"
25597      if test ! -f "$path" && test ! -d "$path"; then
25598        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25599      fi
25600
25601      if test -d "$path"; then
25602        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25603      else
25604        dir="`$DIRNAME "$path"`"
25605        base="`$BASENAME "$path"`"
25606        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25607      fi
25608    fi
25609  fi
25610
25611            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25612$as_echo_n "checking for Boot JDK... " >&6; }
25613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25614$as_echo "$BOOT_JDK" >&6; }
25615            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25616$as_echo_n "checking Boot JDK version... " >&6; }
25617            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25619$as_echo "$BOOT_JDK_VERSION" >&6; }
25620          fi # end check jdk version
25621        fi # end check javac
25622      fi # end check java
25623    fi # end check boot jdk found
25624  fi
25625
25626
25627  if test "x$BOOT_JDK_FOUND" = xno; then
25628    # Now execute the test
25629
25630  if test -x /usr/libexec/java_home; then
25631    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25632    BOOT_JDK_FOUND=maybe
25633    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25634$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25635  fi
25636
25637
25638    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25639    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25640      # Do we have a bin/java?
25641      if test ! -x "$BOOT_JDK/bin/java"; then
25642        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25644        BOOT_JDK_FOUND=no
25645      else
25646        # Do we have a bin/javac?
25647        if test ! -x "$BOOT_JDK/bin/javac"; then
25648          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25650          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25651$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25652          BOOT_JDK_FOUND=no
25653        else
25654          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25655          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25656
25657          # Extra M4 quote needed to protect [] in grep expression.
25658          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25659          if test "x$FOUND_CORRECT_VERSION" = x; then
25660            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25662            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25663$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25664            BOOT_JDK_FOUND=no
25665          else
25666            # We're done! :-)
25667            BOOT_JDK_FOUND=yes
25668
25669  # Only process if variable expands to non-empty
25670
25671  if test "x$BOOT_JDK" != x; then
25672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673
25674  # Input might be given as Windows format, start by converting to
25675  # unix format.
25676  path="$BOOT_JDK"
25677  new_path=`$CYGPATH -u "$path"`
25678
25679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25682  # "foo.exe" is OK but "foo" is an error.
25683  #
25684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25685  # It is also a way to make sure we got the proper file name for the real test later on.
25686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25687  if test "x$test_shortpath" = x; then
25688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25690    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25691  fi
25692
25693  # Call helper function which possibly converts this using DOS-style short mode.
25694  # If so, the updated path is stored in $new_path.
25695
25696  input_path="$new_path"
25697  # Check if we need to convert this using DOS-style short mode. If the path
25698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25699  # take no chances and rewrite it.
25700  # Note: m4 eats our [], so we need to use [ and ] instead.
25701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25702  if test "x$has_forbidden_chars" != x; then
25703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25707      # Going to short mode and back again did indeed matter. Since short mode is
25708      # case insensitive, let's make it lowercase to improve readability.
25709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25710      # Now convert it back to Unix-style (cygpath)
25711      input_path=`$CYGPATH -u "$shortmode_path"`
25712      new_path="$input_path"
25713    fi
25714  fi
25715
25716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25717  if test "x$test_cygdrive_prefix" = x; then
25718    # As a simple fix, exclude /usr/bin since it's not a real path.
25719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25721      # a path prefixed by /cygdrive for fixpath to work.
25722      new_path="$CYGWIN_ROOT_PATH$input_path"
25723    fi
25724  fi
25725
25726
25727  if test "x$path" != "x$new_path"; then
25728    BOOT_JDK="$new_path"
25729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25731  fi
25732
25733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25734
25735  path="$BOOT_JDK"
25736  has_colon=`$ECHO $path | $GREP ^.:`
25737  new_path="$path"
25738  if test "x$has_colon" = x; then
25739    # Not in mixed or Windows style, start by that.
25740    new_path=`cmd //c echo $path`
25741  fi
25742
25743
25744  input_path="$new_path"
25745  # Check if we need to convert this using DOS-style short mode. If the path
25746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25747  # take no chances and rewrite it.
25748  # Note: m4 eats our [], so we need to use [ and ] instead.
25749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25750  if test "x$has_forbidden_chars" != x; then
25751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25753  fi
25754
25755
25756  windows_path="$new_path"
25757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25758    unix_path=`$CYGPATH -u "$windows_path"`
25759    new_path="$unix_path"
25760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25762    new_path="$unix_path"
25763  fi
25764
25765  if test "x$path" != "x$new_path"; then
25766    BOOT_JDK="$new_path"
25767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25769  fi
25770
25771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25773
25774    else
25775      # We're on a unix platform. Hooray! :)
25776      path="$BOOT_JDK"
25777      has_space=`$ECHO "$path" | $GREP " "`
25778      if test "x$has_space" != x; then
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25782      fi
25783
25784      # Use eval to expand a potential ~
25785      eval path="$path"
25786      if test ! -f "$path" && test ! -d "$path"; then
25787        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25788      fi
25789
25790      if test -d "$path"; then
25791        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25792      else
25793        dir="`$DIRNAME "$path"`"
25794        base="`$BASENAME "$path"`"
25795        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25796      fi
25797    fi
25798  fi
25799
25800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25801$as_echo_n "checking for Boot JDK... " >&6; }
25802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25803$as_echo "$BOOT_JDK" >&6; }
25804            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25805$as_echo_n "checking Boot JDK version... " >&6; }
25806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25808$as_echo "$BOOT_JDK_VERSION" >&6; }
25809          fi # end check jdk version
25810        fi # end check javac
25811      fi # end check java
25812    fi # end check boot jdk found
25813  fi
25814
25815  fi
25816
25817
25818    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25819    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25820      # Do we have a bin/java?
25821      if test ! -x "$BOOT_JDK/bin/java"; then
25822        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25824        BOOT_JDK_FOUND=no
25825      else
25826        # Do we have a bin/javac?
25827        if test ! -x "$BOOT_JDK/bin/javac"; then
25828          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25830          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25831$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25832          BOOT_JDK_FOUND=no
25833        else
25834          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25835          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25836
25837          # Extra M4 quote needed to protect [] in grep expression.
25838          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25839          if test "x$FOUND_CORRECT_VERSION" = x; then
25840            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25842            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25843$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25844            BOOT_JDK_FOUND=no
25845          else
25846            # We're done! :-)
25847            BOOT_JDK_FOUND=yes
25848
25849  # Only process if variable expands to non-empty
25850
25851  if test "x$BOOT_JDK" != x; then
25852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25853
25854  # Input might be given as Windows format, start by converting to
25855  # unix format.
25856  path="$BOOT_JDK"
25857  new_path=`$CYGPATH -u "$path"`
25858
25859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25862  # "foo.exe" is OK but "foo" is an error.
25863  #
25864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25865  # It is also a way to make sure we got the proper file name for the real test later on.
25866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25867  if test "x$test_shortpath" = x; then
25868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25870    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25871  fi
25872
25873  # Call helper function which possibly converts this using DOS-style short mode.
25874  # If so, the updated path is stored in $new_path.
25875
25876  input_path="$new_path"
25877  # Check if we need to convert this using DOS-style short mode. If the path
25878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25879  # take no chances and rewrite it.
25880  # Note: m4 eats our [], so we need to use [ and ] instead.
25881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25882  if test "x$has_forbidden_chars" != x; then
25883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25887      # Going to short mode and back again did indeed matter. Since short mode is
25888      # case insensitive, let's make it lowercase to improve readability.
25889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25890      # Now convert it back to Unix-style (cygpath)
25891      input_path=`$CYGPATH -u "$shortmode_path"`
25892      new_path="$input_path"
25893    fi
25894  fi
25895
25896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25897  if test "x$test_cygdrive_prefix" = x; then
25898    # As a simple fix, exclude /usr/bin since it's not a real path.
25899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25901      # a path prefixed by /cygdrive for fixpath to work.
25902      new_path="$CYGWIN_ROOT_PATH$input_path"
25903    fi
25904  fi
25905
25906
25907  if test "x$path" != "x$new_path"; then
25908    BOOT_JDK="$new_path"
25909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25911  fi
25912
25913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25914
25915  path="$BOOT_JDK"
25916  has_colon=`$ECHO $path | $GREP ^.:`
25917  new_path="$path"
25918  if test "x$has_colon" = x; then
25919    # Not in mixed or Windows style, start by that.
25920    new_path=`cmd //c echo $path`
25921  fi
25922
25923
25924  input_path="$new_path"
25925  # Check if we need to convert this using DOS-style short mode. If the path
25926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25927  # take no chances and rewrite it.
25928  # Note: m4 eats our [], so we need to use [ and ] instead.
25929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25930  if test "x$has_forbidden_chars" != x; then
25931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25933  fi
25934
25935
25936  windows_path="$new_path"
25937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25938    unix_path=`$CYGPATH -u "$windows_path"`
25939    new_path="$unix_path"
25940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25942    new_path="$unix_path"
25943  fi
25944
25945  if test "x$path" != "x$new_path"; then
25946    BOOT_JDK="$new_path"
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25949  fi
25950
25951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25953
25954    else
25955      # We're on a unix platform. Hooray! :)
25956      path="$BOOT_JDK"
25957      has_space=`$ECHO "$path" | $GREP " "`
25958      if test "x$has_space" != x; then
25959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25962      fi
25963
25964      # Use eval to expand a potential ~
25965      eval path="$path"
25966      if test ! -f "$path" && test ! -d "$path"; then
25967        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25968      fi
25969
25970      if test -d "$path"; then
25971        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25972      else
25973        dir="`$DIRNAME "$path"`"
25974        base="`$BASENAME "$path"`"
25975        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25976      fi
25977    fi
25978  fi
25979
25980            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25981$as_echo_n "checking for Boot JDK... " >&6; }
25982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25983$as_echo "$BOOT_JDK" >&6; }
25984            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25985$as_echo_n "checking Boot JDK version... " >&6; }
25986            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25988$as_echo "$BOOT_JDK_VERSION" >&6; }
25989          fi # end check jdk version
25990        fi # end check javac
25991      fi # end check java
25992    fi # end check boot jdk found
25993  fi
25994
25995
25996  # Test: Is $JAVA_HOME set?
25997
25998  if test "x$BOOT_JDK_FOUND" = xno; then
25999    # Now execute the test
26000
26001  if test "x$JAVA_HOME" != x; then
26002    JAVA_HOME_PROCESSED="$JAVA_HOME"
26003
26004  # Only process if variable expands to non-empty
26005
26006  if test "x$JAVA_HOME_PROCESSED" != x; then
26007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26008
26009  # Input might be given as Windows format, start by converting to
26010  # unix format.
26011  path="$JAVA_HOME_PROCESSED"
26012  new_path=`$CYGPATH -u "$path"`
26013
26014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26017  # "foo.exe" is OK but "foo" is an error.
26018  #
26019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26020  # It is also a way to make sure we got the proper file name for the real test later on.
26021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26022  if test "x$test_shortpath" = x; then
26023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26024$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26025    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26026  fi
26027
26028  # Call helper function which possibly converts this using DOS-style short mode.
26029  # If so, the updated path is stored in $new_path.
26030
26031  input_path="$new_path"
26032  # Check if we need to convert this using DOS-style short mode. If the path
26033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26034  # take no chances and rewrite it.
26035  # Note: m4 eats our [], so we need to use [ and ] instead.
26036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26037  if test "x$has_forbidden_chars" != x; then
26038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26042      # Going to short mode and back again did indeed matter. Since short mode is
26043      # case insensitive, let's make it lowercase to improve readability.
26044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26045      # Now convert it back to Unix-style (cygpath)
26046      input_path=`$CYGPATH -u "$shortmode_path"`
26047      new_path="$input_path"
26048    fi
26049  fi
26050
26051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26052  if test "x$test_cygdrive_prefix" = x; then
26053    # As a simple fix, exclude /usr/bin since it's not a real path.
26054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26056      # a path prefixed by /cygdrive for fixpath to work.
26057      new_path="$CYGWIN_ROOT_PATH$input_path"
26058    fi
26059  fi
26060
26061
26062  if test "x$path" != "x$new_path"; then
26063    JAVA_HOME_PROCESSED="$new_path"
26064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26065$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26066  fi
26067
26068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26069
26070  path="$JAVA_HOME_PROCESSED"
26071  has_colon=`$ECHO $path | $GREP ^.:`
26072  new_path="$path"
26073  if test "x$has_colon" = x; then
26074    # Not in mixed or Windows style, start by that.
26075    new_path=`cmd //c echo $path`
26076  fi
26077
26078
26079  input_path="$new_path"
26080  # Check if we need to convert this using DOS-style short mode. If the path
26081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26082  # take no chances and rewrite it.
26083  # Note: m4 eats our [], so we need to use [ and ] instead.
26084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26085  if test "x$has_forbidden_chars" != x; then
26086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26088  fi
26089
26090
26091  windows_path="$new_path"
26092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26093    unix_path=`$CYGPATH -u "$windows_path"`
26094    new_path="$unix_path"
26095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26097    new_path="$unix_path"
26098  fi
26099
26100  if test "x$path" != "x$new_path"; then
26101    JAVA_HOME_PROCESSED="$new_path"
26102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26103$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26104  fi
26105
26106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26108
26109    else
26110      # We're on a unix platform. Hooray! :)
26111      path="$JAVA_HOME_PROCESSED"
26112      has_space=`$ECHO "$path" | $GREP " "`
26113      if test "x$has_space" != x; then
26114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26115$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26117      fi
26118
26119      # Use eval to expand a potential ~
26120      eval path="$path"
26121      if test ! -f "$path" && test ! -d "$path"; then
26122        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26123      fi
26124
26125      if test -d "$path"; then
26126        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26127      else
26128        dir="`$DIRNAME "$path"`"
26129        base="`$BASENAME "$path"`"
26130        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26131      fi
26132    fi
26133  fi
26134
26135    if test ! -d "$JAVA_HOME_PROCESSED"; then
26136      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26137$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26138    else
26139      # Aha, the user has set a JAVA_HOME
26140      # let us use that as the Boot JDK.
26141      BOOT_JDK="$JAVA_HOME_PROCESSED"
26142      BOOT_JDK_FOUND=maybe
26143      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26144$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26145    fi
26146  fi
26147
26148
26149    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26150    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26151      # Do we have a bin/java?
26152      if test ! -x "$BOOT_JDK/bin/java"; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26155        BOOT_JDK_FOUND=no
26156      else
26157        # Do we have a bin/javac?
26158        if test ! -x "$BOOT_JDK/bin/javac"; then
26159          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26161          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26162$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26163          BOOT_JDK_FOUND=no
26164        else
26165          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26166          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26167
26168          # Extra M4 quote needed to protect [] in grep expression.
26169          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26170          if test "x$FOUND_CORRECT_VERSION" = x; then
26171            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26173            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26174$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26175            BOOT_JDK_FOUND=no
26176          else
26177            # We're done! :-)
26178            BOOT_JDK_FOUND=yes
26179
26180  # Only process if variable expands to non-empty
26181
26182  if test "x$BOOT_JDK" != x; then
26183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26184
26185  # Input might be given as Windows format, start by converting to
26186  # unix format.
26187  path="$BOOT_JDK"
26188  new_path=`$CYGPATH -u "$path"`
26189
26190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26193  # "foo.exe" is OK but "foo" is an error.
26194  #
26195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26196  # It is also a way to make sure we got the proper file name for the real test later on.
26197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26198  if test "x$test_shortpath" = x; then
26199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26201    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26202  fi
26203
26204  # Call helper function which possibly converts this using DOS-style short mode.
26205  # If so, the updated path is stored in $new_path.
26206
26207  input_path="$new_path"
26208  # Check if we need to convert this using DOS-style short mode. If the path
26209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26210  # take no chances and rewrite it.
26211  # Note: m4 eats our [], so we need to use [ and ] instead.
26212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26213  if test "x$has_forbidden_chars" != x; then
26214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26218      # Going to short mode and back again did indeed matter. Since short mode is
26219      # case insensitive, let's make it lowercase to improve readability.
26220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26221      # Now convert it back to Unix-style (cygpath)
26222      input_path=`$CYGPATH -u "$shortmode_path"`
26223      new_path="$input_path"
26224    fi
26225  fi
26226
26227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26228  if test "x$test_cygdrive_prefix" = x; then
26229    # As a simple fix, exclude /usr/bin since it's not a real path.
26230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26232      # a path prefixed by /cygdrive for fixpath to work.
26233      new_path="$CYGWIN_ROOT_PATH$input_path"
26234    fi
26235  fi
26236
26237
26238  if test "x$path" != "x$new_path"; then
26239    BOOT_JDK="$new_path"
26240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26242  fi
26243
26244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26245
26246  path="$BOOT_JDK"
26247  has_colon=`$ECHO $path | $GREP ^.:`
26248  new_path="$path"
26249  if test "x$has_colon" = x; then
26250    # Not in mixed or Windows style, start by that.
26251    new_path=`cmd //c echo $path`
26252  fi
26253
26254
26255  input_path="$new_path"
26256  # Check if we need to convert this using DOS-style short mode. If the path
26257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26258  # take no chances and rewrite it.
26259  # Note: m4 eats our [], so we need to use [ and ] instead.
26260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26261  if test "x$has_forbidden_chars" != x; then
26262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26264  fi
26265
26266
26267  windows_path="$new_path"
26268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26269    unix_path=`$CYGPATH -u "$windows_path"`
26270    new_path="$unix_path"
26271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26273    new_path="$unix_path"
26274  fi
26275
26276  if test "x$path" != "x$new_path"; then
26277    BOOT_JDK="$new_path"
26278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26280  fi
26281
26282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26284
26285    else
26286      # We're on a unix platform. Hooray! :)
26287      path="$BOOT_JDK"
26288      has_space=`$ECHO "$path" | $GREP " "`
26289      if test "x$has_space" != x; then
26290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26293      fi
26294
26295      # Use eval to expand a potential ~
26296      eval path="$path"
26297      if test ! -f "$path" && test ! -d "$path"; then
26298        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26299      fi
26300
26301      if test -d "$path"; then
26302        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26303      else
26304        dir="`$DIRNAME "$path"`"
26305        base="`$BASENAME "$path"`"
26306        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26307      fi
26308    fi
26309  fi
26310
26311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26312$as_echo_n "checking for Boot JDK... " >&6; }
26313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26314$as_echo "$BOOT_JDK" >&6; }
26315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26316$as_echo_n "checking Boot JDK version... " >&6; }
26317            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26319$as_echo "$BOOT_JDK_VERSION" >&6; }
26320          fi # end check jdk version
26321        fi # end check javac
26322      fi # end check java
26323    fi # end check boot jdk found
26324  fi
26325
26326
26327  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26328
26329  if test "x$BOOT_JDK_FOUND" = xno; then
26330    # Now execute the test
26331
26332  # Extract the first word of "javac", so it can be a program name with args.
26333set dummy javac; ac_word=$2
26334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26335$as_echo_n "checking for $ac_word... " >&6; }
26336if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26337  $as_echo_n "(cached) " >&6
26338else
26339  case $JAVAC_CHECK in
26340  [\\/]* | ?:[\\/]*)
26341  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26342  ;;
26343  *)
26344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26345for as_dir in $PATH
26346do
26347  IFS=$as_save_IFS
26348  test -z "$as_dir" && as_dir=.
26349    for ac_exec_ext in '' $ac_executable_extensions; do
26350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26351    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26353    break 2
26354  fi
26355done
26356  done
26357IFS=$as_save_IFS
26358
26359  ;;
26360esac
26361fi
26362JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26363if test -n "$JAVAC_CHECK"; then
26364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26365$as_echo "$JAVAC_CHECK" >&6; }
26366else
26367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26368$as_echo "no" >&6; }
26369fi
26370
26371
26372  # Extract the first word of "java", so it can be a program name with args.
26373set dummy java; ac_word=$2
26374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26375$as_echo_n "checking for $ac_word... " >&6; }
26376if ${ac_cv_path_JAVA_CHECK+:} false; then :
26377  $as_echo_n "(cached) " >&6
26378else
26379  case $JAVA_CHECK in
26380  [\\/]* | ?:[\\/]*)
26381  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26382  ;;
26383  *)
26384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26385for as_dir in $PATH
26386do
26387  IFS=$as_save_IFS
26388  test -z "$as_dir" && as_dir=.
26389    for ac_exec_ext in '' $ac_executable_extensions; do
26390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26391    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26393    break 2
26394  fi
26395done
26396  done
26397IFS=$as_save_IFS
26398
26399  ;;
26400esac
26401fi
26402JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26403if test -n "$JAVA_CHECK"; then
26404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26405$as_echo "$JAVA_CHECK" >&6; }
26406else
26407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26408$as_echo "no" >&6; }
26409fi
26410
26411
26412  BINARY="$JAVAC_CHECK"
26413  if test "x$JAVAC_CHECK" = x; then
26414    BINARY="$JAVA_CHECK"
26415  fi
26416  if test "x$BINARY" != x; then
26417    # So there is a java(c) binary, it might be part of a JDK.
26418    # Lets find the JDK/JRE directory by following symbolic links.
26419    # Linux/GNU systems often have links from /usr/bin/java to
26420    # /etc/alternatives/java to the real JDK binary.
26421
26422  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26423    # Follow a chain of symbolic links. Use readlink
26424    # where it exists, else fall back to horribly
26425    # complicated shell code.
26426    if test "x$READLINK_TESTED" != yes; then
26427      # On MacOSX there is a readlink tool with a different
26428      # purpose than the GNU readlink tool. Check the found readlink.
26429      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26430      if test "x$ISGNU" = x; then
26431        # A readlink that we do not know how to use.
26432        # Are there other non-GNU readlinks out there?
26433        READLINK_TESTED=yes
26434        READLINK=
26435      fi
26436    fi
26437
26438    if test "x$READLINK" != x; then
26439      BINARY=`$READLINK -f $BINARY`
26440    else
26441      # Save the current directory for restoring afterwards
26442      STARTDIR=$PWD
26443      COUNTER=0
26444      sym_link_dir=`$DIRNAME $BINARY`
26445      sym_link_file=`$BASENAME $BINARY`
26446      cd $sym_link_dir
26447      # Use -P flag to resolve symlinks in directories.
26448      cd `$THEPWDCMD -P`
26449      sym_link_dir=`$THEPWDCMD -P`
26450      # Resolve file symlinks
26451      while test $COUNTER -lt 20; do
26452        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26453        if test "x$ISLINK" == x; then
26454          # This is not a symbolic link! We are done!
26455          break
26456        fi
26457        # Again resolve directory symlinks since the target of the just found
26458        # link could be in a different directory
26459        cd `$DIRNAME $ISLINK`
26460        sym_link_dir=`$THEPWDCMD -P`
26461        sym_link_file=`$BASENAME $ISLINK`
26462        let COUNTER=COUNTER+1
26463      done
26464      cd $STARTDIR
26465      BINARY=$sym_link_dir/$sym_link_file
26466    fi
26467  fi
26468
26469    BOOT_JDK=`dirname "$BINARY"`
26470    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26471    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26472      # Looks like we found ourselves an JDK
26473      BOOT_JDK_FOUND=maybe
26474      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26475$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26476    fi
26477  fi
26478
26479
26480    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26481    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26482      # Do we have a bin/java?
26483      if test ! -x "$BOOT_JDK/bin/java"; then
26484        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26486        BOOT_JDK_FOUND=no
26487      else
26488        # Do we have a bin/javac?
26489        if test ! -x "$BOOT_JDK/bin/javac"; then
26490          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26492          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26493$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26494          BOOT_JDK_FOUND=no
26495        else
26496          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26497          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26498
26499          # Extra M4 quote needed to protect [] in grep expression.
26500          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26501          if test "x$FOUND_CORRECT_VERSION" = x; then
26502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26504            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26505$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26506            BOOT_JDK_FOUND=no
26507          else
26508            # We're done! :-)
26509            BOOT_JDK_FOUND=yes
26510
26511  # Only process if variable expands to non-empty
26512
26513  if test "x$BOOT_JDK" != x; then
26514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26515
26516  # Input might be given as Windows format, start by converting to
26517  # unix format.
26518  path="$BOOT_JDK"
26519  new_path=`$CYGPATH -u "$path"`
26520
26521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26524  # "foo.exe" is OK but "foo" is an error.
26525  #
26526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26527  # It is also a way to make sure we got the proper file name for the real test later on.
26528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26529  if test "x$test_shortpath" = x; then
26530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26533  fi
26534
26535  # Call helper function which possibly converts this using DOS-style short mode.
26536  # If so, the updated path is stored in $new_path.
26537
26538  input_path="$new_path"
26539  # Check if we need to convert this using DOS-style short mode. If the path
26540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26541  # take no chances and rewrite it.
26542  # Note: m4 eats our [], so we need to use [ and ] instead.
26543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26544  if test "x$has_forbidden_chars" != x; then
26545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26549      # Going to short mode and back again did indeed matter. Since short mode is
26550      # case insensitive, let's make it lowercase to improve readability.
26551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26552      # Now convert it back to Unix-style (cygpath)
26553      input_path=`$CYGPATH -u "$shortmode_path"`
26554      new_path="$input_path"
26555    fi
26556  fi
26557
26558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26559  if test "x$test_cygdrive_prefix" = x; then
26560    # As a simple fix, exclude /usr/bin since it's not a real path.
26561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26563      # a path prefixed by /cygdrive for fixpath to work.
26564      new_path="$CYGWIN_ROOT_PATH$input_path"
26565    fi
26566  fi
26567
26568
26569  if test "x$path" != "x$new_path"; then
26570    BOOT_JDK="$new_path"
26571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26573  fi
26574
26575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26576
26577  path="$BOOT_JDK"
26578  has_colon=`$ECHO $path | $GREP ^.:`
26579  new_path="$path"
26580  if test "x$has_colon" = x; then
26581    # Not in mixed or Windows style, start by that.
26582    new_path=`cmd //c echo $path`
26583  fi
26584
26585
26586  input_path="$new_path"
26587  # Check if we need to convert this using DOS-style short mode. If the path
26588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26589  # take no chances and rewrite it.
26590  # Note: m4 eats our [], so we need to use [ and ] instead.
26591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26592  if test "x$has_forbidden_chars" != x; then
26593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26595  fi
26596
26597
26598  windows_path="$new_path"
26599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600    unix_path=`$CYGPATH -u "$windows_path"`
26601    new_path="$unix_path"
26602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26604    new_path="$unix_path"
26605  fi
26606
26607  if test "x$path" != "x$new_path"; then
26608    BOOT_JDK="$new_path"
26609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26611  fi
26612
26613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26615
26616    else
26617      # We're on a unix platform. Hooray! :)
26618      path="$BOOT_JDK"
26619      has_space=`$ECHO "$path" | $GREP " "`
26620      if test "x$has_space" != x; then
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26624      fi
26625
26626      # Use eval to expand a potential ~
26627      eval path="$path"
26628      if test ! -f "$path" && test ! -d "$path"; then
26629        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26630      fi
26631
26632      if test -d "$path"; then
26633        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26634      else
26635        dir="`$DIRNAME "$path"`"
26636        base="`$BASENAME "$path"`"
26637        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26638      fi
26639    fi
26640  fi
26641
26642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26643$as_echo_n "checking for Boot JDK... " >&6; }
26644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26645$as_echo "$BOOT_JDK" >&6; }
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26647$as_echo_n "checking Boot JDK version... " >&6; }
26648            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26650$as_echo "$BOOT_JDK_VERSION" >&6; }
26651          fi # end check jdk version
26652        fi # end check javac
26653      fi # end check java
26654    fi # end check boot jdk found
26655  fi
26656
26657
26658  # Test: Is there a JDK installed in default, well-known locations?
26659
26660  if test "x$BOOT_JDK_FOUND" = xno; then
26661    # Now execute the test
26662
26663  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26664
26665  if test "x$BOOT_JDK_FOUND" = xno; then
26666    # Now execute the test
26667
26668  if test "x$ProgramW6432" != x; then
26669    VIRTUAL_DIR="$ProgramW6432/Java"
26670
26671  windows_path="$VIRTUAL_DIR"
26672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26673    unix_path=`$CYGPATH -u "$windows_path"`
26674    VIRTUAL_DIR="$unix_path"
26675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26677    VIRTUAL_DIR="$unix_path"
26678  fi
26679
26680
26681  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26682  BOOT_JDK_SUFFIX=""
26683  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26684  if test "x$ALL_JDKS_FOUND" != x; then
26685    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26686
26687  if test "x$BOOT_JDK_FOUND" = xno; then
26688    # Now execute the test
26689
26690        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26691        if test -d "$BOOT_JDK"; then
26692          BOOT_JDK_FOUND=maybe
26693          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26694$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26695        fi
26696
26697
26698    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26699    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26700      # Do we have a bin/java?
26701      if test ! -x "$BOOT_JDK/bin/java"; then
26702        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26704        BOOT_JDK_FOUND=no
26705      else
26706        # Do we have a bin/javac?
26707        if test ! -x "$BOOT_JDK/bin/javac"; then
26708          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26710          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26711$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26712          BOOT_JDK_FOUND=no
26713        else
26714          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26715          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26716
26717          # Extra M4 quote needed to protect [] in grep expression.
26718          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26719          if test "x$FOUND_CORRECT_VERSION" = x; then
26720            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26722            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26723$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26724            BOOT_JDK_FOUND=no
26725          else
26726            # We're done! :-)
26727            BOOT_JDK_FOUND=yes
26728
26729  # Only process if variable expands to non-empty
26730
26731  if test "x$BOOT_JDK" != x; then
26732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26733
26734  # Input might be given as Windows format, start by converting to
26735  # unix format.
26736  path="$BOOT_JDK"
26737  new_path=`$CYGPATH -u "$path"`
26738
26739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26742  # "foo.exe" is OK but "foo" is an error.
26743  #
26744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26745  # It is also a way to make sure we got the proper file name for the real test later on.
26746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26747  if test "x$test_shortpath" = x; then
26748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26750    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26751  fi
26752
26753  # Call helper function which possibly converts this using DOS-style short mode.
26754  # If so, the updated path is stored in $new_path.
26755
26756  input_path="$new_path"
26757  # Check if we need to convert this using DOS-style short mode. If the path
26758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26759  # take no chances and rewrite it.
26760  # Note: m4 eats our [], so we need to use [ and ] instead.
26761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26762  if test "x$has_forbidden_chars" != x; then
26763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26767      # Going to short mode and back again did indeed matter. Since short mode is
26768      # case insensitive, let's make it lowercase to improve readability.
26769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26770      # Now convert it back to Unix-style (cygpath)
26771      input_path=`$CYGPATH -u "$shortmode_path"`
26772      new_path="$input_path"
26773    fi
26774  fi
26775
26776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26777  if test "x$test_cygdrive_prefix" = x; then
26778    # As a simple fix, exclude /usr/bin since it's not a real path.
26779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26781      # a path prefixed by /cygdrive for fixpath to work.
26782      new_path="$CYGWIN_ROOT_PATH$input_path"
26783    fi
26784  fi
26785
26786
26787  if test "x$path" != "x$new_path"; then
26788    BOOT_JDK="$new_path"
26789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26790$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26791  fi
26792
26793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26794
26795  path="$BOOT_JDK"
26796  has_colon=`$ECHO $path | $GREP ^.:`
26797  new_path="$path"
26798  if test "x$has_colon" = x; then
26799    # Not in mixed or Windows style, start by that.
26800    new_path=`cmd //c echo $path`
26801  fi
26802
26803
26804  input_path="$new_path"
26805  # Check if we need to convert this using DOS-style short mode. If the path
26806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26807  # take no chances and rewrite it.
26808  # Note: m4 eats our [], so we need to use [ and ] instead.
26809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26810  if test "x$has_forbidden_chars" != x; then
26811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26813  fi
26814
26815
26816  windows_path="$new_path"
26817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26818    unix_path=`$CYGPATH -u "$windows_path"`
26819    new_path="$unix_path"
26820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26822    new_path="$unix_path"
26823  fi
26824
26825  if test "x$path" != "x$new_path"; then
26826    BOOT_JDK="$new_path"
26827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26829  fi
26830
26831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26833
26834    else
26835      # We're on a unix platform. Hooray! :)
26836      path="$BOOT_JDK"
26837      has_space=`$ECHO "$path" | $GREP " "`
26838      if test "x$has_space" != x; then
26839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26842      fi
26843
26844      # Use eval to expand a potential ~
26845      eval path="$path"
26846      if test ! -f "$path" && test ! -d "$path"; then
26847        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26848      fi
26849
26850      if test -d "$path"; then
26851        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26852      else
26853        dir="`$DIRNAME "$path"`"
26854        base="`$BASENAME "$path"`"
26855        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26856      fi
26857    fi
26858  fi
26859
26860            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26861$as_echo_n "checking for Boot JDK... " >&6; }
26862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26863$as_echo "$BOOT_JDK" >&6; }
26864            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26865$as_echo_n "checking Boot JDK version... " >&6; }
26866            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26868$as_echo "$BOOT_JDK_VERSION" >&6; }
26869          fi # end check jdk version
26870        fi # end check javac
26871      fi # end check java
26872    fi # end check boot jdk found
26873  fi
26874
26875    done
26876  fi
26877
26878  fi
26879
26880
26881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26883      # Do we have a bin/java?
26884      if test ! -x "$BOOT_JDK/bin/java"; then
26885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26887        BOOT_JDK_FOUND=no
26888      else
26889        # Do we have a bin/javac?
26890        if test ! -x "$BOOT_JDK/bin/javac"; then
26891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26895          BOOT_JDK_FOUND=no
26896        else
26897          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26898          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26899
26900          # Extra M4 quote needed to protect [] in grep expression.
26901          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26902          if test "x$FOUND_CORRECT_VERSION" = x; then
26903            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26905            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26906$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26907            BOOT_JDK_FOUND=no
26908          else
26909            # We're done! :-)
26910            BOOT_JDK_FOUND=yes
26911
26912  # Only process if variable expands to non-empty
26913
26914  if test "x$BOOT_JDK" != x; then
26915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26916
26917  # Input might be given as Windows format, start by converting to
26918  # unix format.
26919  path="$BOOT_JDK"
26920  new_path=`$CYGPATH -u "$path"`
26921
26922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26925  # "foo.exe" is OK but "foo" is an error.
26926  #
26927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26928  # It is also a way to make sure we got the proper file name for the real test later on.
26929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26930  if test "x$test_shortpath" = x; then
26931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26934  fi
26935
26936  # Call helper function which possibly converts this using DOS-style short mode.
26937  # If so, the updated path is stored in $new_path.
26938
26939  input_path="$new_path"
26940  # Check if we need to convert this using DOS-style short mode. If the path
26941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26942  # take no chances and rewrite it.
26943  # Note: m4 eats our [], so we need to use [ and ] instead.
26944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26945  if test "x$has_forbidden_chars" != x; then
26946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26950      # Going to short mode and back again did indeed matter. Since short mode is
26951      # case insensitive, let's make it lowercase to improve readability.
26952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26953      # Now convert it back to Unix-style (cygpath)
26954      input_path=`$CYGPATH -u "$shortmode_path"`
26955      new_path="$input_path"
26956    fi
26957  fi
26958
26959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26960  if test "x$test_cygdrive_prefix" = x; then
26961    # As a simple fix, exclude /usr/bin since it's not a real path.
26962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26964      # a path prefixed by /cygdrive for fixpath to work.
26965      new_path="$CYGWIN_ROOT_PATH$input_path"
26966    fi
26967  fi
26968
26969
26970  if test "x$path" != "x$new_path"; then
26971    BOOT_JDK="$new_path"
26972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26974  fi
26975
26976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26977
26978  path="$BOOT_JDK"
26979  has_colon=`$ECHO $path | $GREP ^.:`
26980  new_path="$path"
26981  if test "x$has_colon" = x; then
26982    # Not in mixed or Windows style, start by that.
26983    new_path=`cmd //c echo $path`
26984  fi
26985
26986
26987  input_path="$new_path"
26988  # Check if we need to convert this using DOS-style short mode. If the path
26989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26990  # take no chances and rewrite it.
26991  # Note: m4 eats our [], so we need to use [ and ] instead.
26992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26993  if test "x$has_forbidden_chars" != x; then
26994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26996  fi
26997
26998
26999  windows_path="$new_path"
27000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27001    unix_path=`$CYGPATH -u "$windows_path"`
27002    new_path="$unix_path"
27003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27005    new_path="$unix_path"
27006  fi
27007
27008  if test "x$path" != "x$new_path"; then
27009    BOOT_JDK="$new_path"
27010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27012  fi
27013
27014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27016
27017    else
27018      # We're on a unix platform. Hooray! :)
27019      path="$BOOT_JDK"
27020      has_space=`$ECHO "$path" | $GREP " "`
27021      if test "x$has_space" != x; then
27022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27025      fi
27026
27027      # Use eval to expand a potential ~
27028      eval path="$path"
27029      if test ! -f "$path" && test ! -d "$path"; then
27030        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27031      fi
27032
27033      if test -d "$path"; then
27034        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27035      else
27036        dir="`$DIRNAME "$path"`"
27037        base="`$BASENAME "$path"`"
27038        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27039      fi
27040    fi
27041  fi
27042
27043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27044$as_echo_n "checking for Boot JDK... " >&6; }
27045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27046$as_echo "$BOOT_JDK" >&6; }
27047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27048$as_echo_n "checking Boot JDK version... " >&6; }
27049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27051$as_echo "$BOOT_JDK_VERSION" >&6; }
27052          fi # end check jdk version
27053        fi # end check javac
27054      fi # end check java
27055    fi # end check boot jdk found
27056  fi
27057
27058
27059  if test "x$BOOT_JDK_FOUND" = xno; then
27060    # Now execute the test
27061
27062  if test "x$PROGRAMW6432" != x; then
27063    VIRTUAL_DIR="$PROGRAMW6432/Java"
27064
27065  windows_path="$VIRTUAL_DIR"
27066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27067    unix_path=`$CYGPATH -u "$windows_path"`
27068    VIRTUAL_DIR="$unix_path"
27069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27071    VIRTUAL_DIR="$unix_path"
27072  fi
27073
27074
27075  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27076  BOOT_JDK_SUFFIX=""
27077  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27078  if test "x$ALL_JDKS_FOUND" != x; then
27079    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27080
27081  if test "x$BOOT_JDK_FOUND" = xno; then
27082    # Now execute the test
27083
27084        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27085        if test -d "$BOOT_JDK"; then
27086          BOOT_JDK_FOUND=maybe
27087          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27088$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27089        fi
27090
27091
27092    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27093    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27094      # Do we have a bin/java?
27095      if test ! -x "$BOOT_JDK/bin/java"; then
27096        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27098        BOOT_JDK_FOUND=no
27099      else
27100        # Do we have a bin/javac?
27101        if test ! -x "$BOOT_JDK/bin/javac"; then
27102          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27104          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27105$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27106          BOOT_JDK_FOUND=no
27107        else
27108          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27109          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27110
27111          # Extra M4 quote needed to protect [] in grep expression.
27112          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27113          if test "x$FOUND_CORRECT_VERSION" = x; then
27114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27116            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27118            BOOT_JDK_FOUND=no
27119          else
27120            # We're done! :-)
27121            BOOT_JDK_FOUND=yes
27122
27123  # Only process if variable expands to non-empty
27124
27125  if test "x$BOOT_JDK" != x; then
27126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127
27128  # Input might be given as Windows format, start by converting to
27129  # unix format.
27130  path="$BOOT_JDK"
27131  new_path=`$CYGPATH -u "$path"`
27132
27133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27136  # "foo.exe" is OK but "foo" is an error.
27137  #
27138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27139  # It is also a way to make sure we got the proper file name for the real test later on.
27140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27141  if test "x$test_shortpath" = x; then
27142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27145  fi
27146
27147  # Call helper function which possibly converts this using DOS-style short mode.
27148  # If so, the updated path is stored in $new_path.
27149
27150  input_path="$new_path"
27151  # Check if we need to convert this using DOS-style short mode. If the path
27152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27153  # take no chances and rewrite it.
27154  # Note: m4 eats our [], so we need to use [ and ] instead.
27155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27156  if test "x$has_forbidden_chars" != x; then
27157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27161      # Going to short mode and back again did indeed matter. Since short mode is
27162      # case insensitive, let's make it lowercase to improve readability.
27163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27164      # Now convert it back to Unix-style (cygpath)
27165      input_path=`$CYGPATH -u "$shortmode_path"`
27166      new_path="$input_path"
27167    fi
27168  fi
27169
27170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27171  if test "x$test_cygdrive_prefix" = x; then
27172    # As a simple fix, exclude /usr/bin since it's not a real path.
27173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27175      # a path prefixed by /cygdrive for fixpath to work.
27176      new_path="$CYGWIN_ROOT_PATH$input_path"
27177    fi
27178  fi
27179
27180
27181  if test "x$path" != "x$new_path"; then
27182    BOOT_JDK="$new_path"
27183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27185  fi
27186
27187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27188
27189  path="$BOOT_JDK"
27190  has_colon=`$ECHO $path | $GREP ^.:`
27191  new_path="$path"
27192  if test "x$has_colon" = x; then
27193    # Not in mixed or Windows style, start by that.
27194    new_path=`cmd //c echo $path`
27195  fi
27196
27197
27198  input_path="$new_path"
27199  # Check if we need to convert this using DOS-style short mode. If the path
27200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27201  # take no chances and rewrite it.
27202  # Note: m4 eats our [], so we need to use [ and ] instead.
27203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27204  if test "x$has_forbidden_chars" != x; then
27205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27207  fi
27208
27209
27210  windows_path="$new_path"
27211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27212    unix_path=`$CYGPATH -u "$windows_path"`
27213    new_path="$unix_path"
27214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27216    new_path="$unix_path"
27217  fi
27218
27219  if test "x$path" != "x$new_path"; then
27220    BOOT_JDK="$new_path"
27221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27223  fi
27224
27225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27227
27228    else
27229      # We're on a unix platform. Hooray! :)
27230      path="$BOOT_JDK"
27231      has_space=`$ECHO "$path" | $GREP " "`
27232      if test "x$has_space" != x; then
27233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27236      fi
27237
27238      # Use eval to expand a potential ~
27239      eval path="$path"
27240      if test ! -f "$path" && test ! -d "$path"; then
27241        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27242      fi
27243
27244      if test -d "$path"; then
27245        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27246      else
27247        dir="`$DIRNAME "$path"`"
27248        base="`$BASENAME "$path"`"
27249        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27250      fi
27251    fi
27252  fi
27253
27254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27255$as_echo_n "checking for Boot JDK... " >&6; }
27256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27257$as_echo "$BOOT_JDK" >&6; }
27258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27259$as_echo_n "checking Boot JDK version... " >&6; }
27260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27262$as_echo "$BOOT_JDK_VERSION" >&6; }
27263          fi # end check jdk version
27264        fi # end check javac
27265      fi # end check java
27266    fi # end check boot jdk found
27267  fi
27268
27269    done
27270  fi
27271
27272  fi
27273
27274
27275    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27276    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27277      # Do we have a bin/java?
27278      if test ! -x "$BOOT_JDK/bin/java"; then
27279        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27281        BOOT_JDK_FOUND=no
27282      else
27283        # Do we have a bin/javac?
27284        if test ! -x "$BOOT_JDK/bin/javac"; then
27285          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27287          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27288$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27289          BOOT_JDK_FOUND=no
27290        else
27291          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27292          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27293
27294          # Extra M4 quote needed to protect [] in grep expression.
27295          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27296          if test "x$FOUND_CORRECT_VERSION" = x; then
27297            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27299            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27300$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27301            BOOT_JDK_FOUND=no
27302          else
27303            # We're done! :-)
27304            BOOT_JDK_FOUND=yes
27305
27306  # Only process if variable expands to non-empty
27307
27308  if test "x$BOOT_JDK" != x; then
27309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310
27311  # Input might be given as Windows format, start by converting to
27312  # unix format.
27313  path="$BOOT_JDK"
27314  new_path=`$CYGPATH -u "$path"`
27315
27316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27319  # "foo.exe" is OK but "foo" is an error.
27320  #
27321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27322  # It is also a way to make sure we got the proper file name for the real test later on.
27323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27324  if test "x$test_shortpath" = x; then
27325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27327    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27328  fi
27329
27330  # Call helper function which possibly converts this using DOS-style short mode.
27331  # If so, the updated path is stored in $new_path.
27332
27333  input_path="$new_path"
27334  # Check if we need to convert this using DOS-style short mode. If the path
27335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27336  # take no chances and rewrite it.
27337  # Note: m4 eats our [], so we need to use [ and ] instead.
27338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27339  if test "x$has_forbidden_chars" != x; then
27340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27344      # Going to short mode and back again did indeed matter. Since short mode is
27345      # case insensitive, let's make it lowercase to improve readability.
27346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27347      # Now convert it back to Unix-style (cygpath)
27348      input_path=`$CYGPATH -u "$shortmode_path"`
27349      new_path="$input_path"
27350    fi
27351  fi
27352
27353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27354  if test "x$test_cygdrive_prefix" = x; then
27355    # As a simple fix, exclude /usr/bin since it's not a real path.
27356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27358      # a path prefixed by /cygdrive for fixpath to work.
27359      new_path="$CYGWIN_ROOT_PATH$input_path"
27360    fi
27361  fi
27362
27363
27364  if test "x$path" != "x$new_path"; then
27365    BOOT_JDK="$new_path"
27366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27367$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27368  fi
27369
27370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27371
27372  path="$BOOT_JDK"
27373  has_colon=`$ECHO $path | $GREP ^.:`
27374  new_path="$path"
27375  if test "x$has_colon" = x; then
27376    # Not in mixed or Windows style, start by that.
27377    new_path=`cmd //c echo $path`
27378  fi
27379
27380
27381  input_path="$new_path"
27382  # Check if we need to convert this using DOS-style short mode. If the path
27383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27384  # take no chances and rewrite it.
27385  # Note: m4 eats our [], so we need to use [ and ] instead.
27386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27387  if test "x$has_forbidden_chars" != x; then
27388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27390  fi
27391
27392
27393  windows_path="$new_path"
27394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27395    unix_path=`$CYGPATH -u "$windows_path"`
27396    new_path="$unix_path"
27397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27399    new_path="$unix_path"
27400  fi
27401
27402  if test "x$path" != "x$new_path"; then
27403    BOOT_JDK="$new_path"
27404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27406  fi
27407
27408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27410
27411    else
27412      # We're on a unix platform. Hooray! :)
27413      path="$BOOT_JDK"
27414      has_space=`$ECHO "$path" | $GREP " "`
27415      if test "x$has_space" != x; then
27416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27419      fi
27420
27421      # Use eval to expand a potential ~
27422      eval path="$path"
27423      if test ! -f "$path" && test ! -d "$path"; then
27424        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27425      fi
27426
27427      if test -d "$path"; then
27428        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27429      else
27430        dir="`$DIRNAME "$path"`"
27431        base="`$BASENAME "$path"`"
27432        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27433      fi
27434    fi
27435  fi
27436
27437            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27438$as_echo_n "checking for Boot JDK... " >&6; }
27439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27440$as_echo "$BOOT_JDK" >&6; }
27441            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27442$as_echo_n "checking Boot JDK version... " >&6; }
27443            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27445$as_echo "$BOOT_JDK_VERSION" >&6; }
27446          fi # end check jdk version
27447        fi # end check javac
27448      fi # end check java
27449    fi # end check boot jdk found
27450  fi
27451
27452
27453  if test "x$BOOT_JDK_FOUND" = xno; then
27454    # Now execute the test
27455
27456  if test "x$PROGRAMFILES" != x; then
27457    VIRTUAL_DIR="$PROGRAMFILES/Java"
27458
27459  windows_path="$VIRTUAL_DIR"
27460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27461    unix_path=`$CYGPATH -u "$windows_path"`
27462    VIRTUAL_DIR="$unix_path"
27463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27465    VIRTUAL_DIR="$unix_path"
27466  fi
27467
27468
27469  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27470  BOOT_JDK_SUFFIX=""
27471  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27472  if test "x$ALL_JDKS_FOUND" != x; then
27473    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27474
27475  if test "x$BOOT_JDK_FOUND" = xno; then
27476    # Now execute the test
27477
27478        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27479        if test -d "$BOOT_JDK"; then
27480          BOOT_JDK_FOUND=maybe
27481          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27482$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27483        fi
27484
27485
27486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27488      # Do we have a bin/java?
27489      if test ! -x "$BOOT_JDK/bin/java"; then
27490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27492        BOOT_JDK_FOUND=no
27493      else
27494        # Do we have a bin/javac?
27495        if test ! -x "$BOOT_JDK/bin/javac"; then
27496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27500          BOOT_JDK_FOUND=no
27501        else
27502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27504
27505          # Extra M4 quote needed to protect [] in grep expression.
27506          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27507          if test "x$FOUND_CORRECT_VERSION" = x; then
27508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27512            BOOT_JDK_FOUND=no
27513          else
27514            # We're done! :-)
27515            BOOT_JDK_FOUND=yes
27516
27517  # Only process if variable expands to non-empty
27518
27519  if test "x$BOOT_JDK" != x; then
27520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521
27522  # Input might be given as Windows format, start by converting to
27523  # unix format.
27524  path="$BOOT_JDK"
27525  new_path=`$CYGPATH -u "$path"`
27526
27527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27530  # "foo.exe" is OK but "foo" is an error.
27531  #
27532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27533  # It is also a way to make sure we got the proper file name for the real test later on.
27534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27535  if test "x$test_shortpath" = x; then
27536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27539  fi
27540
27541  # Call helper function which possibly converts this using DOS-style short mode.
27542  # If so, the updated path is stored in $new_path.
27543
27544  input_path="$new_path"
27545  # Check if we need to convert this using DOS-style short mode. If the path
27546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27547  # take no chances and rewrite it.
27548  # Note: m4 eats our [], so we need to use [ and ] instead.
27549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27550  if test "x$has_forbidden_chars" != x; then
27551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27555      # Going to short mode and back again did indeed matter. Since short mode is
27556      # case insensitive, let's make it lowercase to improve readability.
27557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27558      # Now convert it back to Unix-style (cygpath)
27559      input_path=`$CYGPATH -u "$shortmode_path"`
27560      new_path="$input_path"
27561    fi
27562  fi
27563
27564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27565  if test "x$test_cygdrive_prefix" = x; then
27566    # As a simple fix, exclude /usr/bin since it's not a real path.
27567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27569      # a path prefixed by /cygdrive for fixpath to work.
27570      new_path="$CYGWIN_ROOT_PATH$input_path"
27571    fi
27572  fi
27573
27574
27575  if test "x$path" != "x$new_path"; then
27576    BOOT_JDK="$new_path"
27577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27579  fi
27580
27581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27582
27583  path="$BOOT_JDK"
27584  has_colon=`$ECHO $path | $GREP ^.:`
27585  new_path="$path"
27586  if test "x$has_colon" = x; then
27587    # Not in mixed or Windows style, start by that.
27588    new_path=`cmd //c echo $path`
27589  fi
27590
27591
27592  input_path="$new_path"
27593  # Check if we need to convert this using DOS-style short mode. If the path
27594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27595  # take no chances and rewrite it.
27596  # Note: m4 eats our [], so we need to use [ and ] instead.
27597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27598  if test "x$has_forbidden_chars" != x; then
27599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27601  fi
27602
27603
27604  windows_path="$new_path"
27605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27606    unix_path=`$CYGPATH -u "$windows_path"`
27607    new_path="$unix_path"
27608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27610    new_path="$unix_path"
27611  fi
27612
27613  if test "x$path" != "x$new_path"; then
27614    BOOT_JDK="$new_path"
27615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27617  fi
27618
27619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27621
27622    else
27623      # We're on a unix platform. Hooray! :)
27624      path="$BOOT_JDK"
27625      has_space=`$ECHO "$path" | $GREP " "`
27626      if test "x$has_space" != x; then
27627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27630      fi
27631
27632      # Use eval to expand a potential ~
27633      eval path="$path"
27634      if test ! -f "$path" && test ! -d "$path"; then
27635        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27636      fi
27637
27638      if test -d "$path"; then
27639        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27640      else
27641        dir="`$DIRNAME "$path"`"
27642        base="`$BASENAME "$path"`"
27643        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27644      fi
27645    fi
27646  fi
27647
27648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27649$as_echo_n "checking for Boot JDK... " >&6; }
27650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27651$as_echo "$BOOT_JDK" >&6; }
27652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27653$as_echo_n "checking Boot JDK version... " >&6; }
27654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27656$as_echo "$BOOT_JDK_VERSION" >&6; }
27657          fi # end check jdk version
27658        fi # end check javac
27659      fi # end check java
27660    fi # end check boot jdk found
27661  fi
27662
27663    done
27664  fi
27665
27666  fi
27667
27668
27669    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27670    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27671      # Do we have a bin/java?
27672      if test ! -x "$BOOT_JDK/bin/java"; then
27673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27675        BOOT_JDK_FOUND=no
27676      else
27677        # Do we have a bin/javac?
27678        if test ! -x "$BOOT_JDK/bin/javac"; then
27679          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27681          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27682$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27683          BOOT_JDK_FOUND=no
27684        else
27685          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27686          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27687
27688          # Extra M4 quote needed to protect [] in grep expression.
27689          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27690          if test "x$FOUND_CORRECT_VERSION" = x; then
27691            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27693            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27694$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27695            BOOT_JDK_FOUND=no
27696          else
27697            # We're done! :-)
27698            BOOT_JDK_FOUND=yes
27699
27700  # Only process if variable expands to non-empty
27701
27702  if test "x$BOOT_JDK" != x; then
27703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704
27705  # Input might be given as Windows format, start by converting to
27706  # unix format.
27707  path="$BOOT_JDK"
27708  new_path=`$CYGPATH -u "$path"`
27709
27710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27713  # "foo.exe" is OK but "foo" is an error.
27714  #
27715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27716  # It is also a way to make sure we got the proper file name for the real test later on.
27717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27718  if test "x$test_shortpath" = x; then
27719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27720$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27721    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27722  fi
27723
27724  # Call helper function which possibly converts this using DOS-style short mode.
27725  # If so, the updated path is stored in $new_path.
27726
27727  input_path="$new_path"
27728  # Check if we need to convert this using DOS-style short mode. If the path
27729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27730  # take no chances and rewrite it.
27731  # Note: m4 eats our [], so we need to use [ and ] instead.
27732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27733  if test "x$has_forbidden_chars" != x; then
27734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27738      # Going to short mode and back again did indeed matter. Since short mode is
27739      # case insensitive, let's make it lowercase to improve readability.
27740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27741      # Now convert it back to Unix-style (cygpath)
27742      input_path=`$CYGPATH -u "$shortmode_path"`
27743      new_path="$input_path"
27744    fi
27745  fi
27746
27747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27748  if test "x$test_cygdrive_prefix" = x; then
27749    # As a simple fix, exclude /usr/bin since it's not a real path.
27750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27752      # a path prefixed by /cygdrive for fixpath to work.
27753      new_path="$CYGWIN_ROOT_PATH$input_path"
27754    fi
27755  fi
27756
27757
27758  if test "x$path" != "x$new_path"; then
27759    BOOT_JDK="$new_path"
27760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27762  fi
27763
27764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27765
27766  path="$BOOT_JDK"
27767  has_colon=`$ECHO $path | $GREP ^.:`
27768  new_path="$path"
27769  if test "x$has_colon" = x; then
27770    # Not in mixed or Windows style, start by that.
27771    new_path=`cmd //c echo $path`
27772  fi
27773
27774
27775  input_path="$new_path"
27776  # Check if we need to convert this using DOS-style short mode. If the path
27777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27778  # take no chances and rewrite it.
27779  # Note: m4 eats our [], so we need to use [ and ] instead.
27780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27781  if test "x$has_forbidden_chars" != x; then
27782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27784  fi
27785
27786
27787  windows_path="$new_path"
27788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27789    unix_path=`$CYGPATH -u "$windows_path"`
27790    new_path="$unix_path"
27791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27793    new_path="$unix_path"
27794  fi
27795
27796  if test "x$path" != "x$new_path"; then
27797    BOOT_JDK="$new_path"
27798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27800  fi
27801
27802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27804
27805    else
27806      # We're on a unix platform. Hooray! :)
27807      path="$BOOT_JDK"
27808      has_space=`$ECHO "$path" | $GREP " "`
27809      if test "x$has_space" != x; then
27810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27813      fi
27814
27815      # Use eval to expand a potential ~
27816      eval path="$path"
27817      if test ! -f "$path" && test ! -d "$path"; then
27818        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27819      fi
27820
27821      if test -d "$path"; then
27822        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27823      else
27824        dir="`$DIRNAME "$path"`"
27825        base="`$BASENAME "$path"`"
27826        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27827      fi
27828    fi
27829  fi
27830
27831            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27832$as_echo_n "checking for Boot JDK... " >&6; }
27833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27834$as_echo "$BOOT_JDK" >&6; }
27835            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27836$as_echo_n "checking Boot JDK version... " >&6; }
27837            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27839$as_echo "$BOOT_JDK_VERSION" >&6; }
27840          fi # end check jdk version
27841        fi # end check javac
27842      fi # end check java
27843    fi # end check boot jdk found
27844  fi
27845
27846
27847  if test "x$BOOT_JDK_FOUND" = xno; then
27848    # Now execute the test
27849
27850  if test "x$ProgramFiles" != x; then
27851    VIRTUAL_DIR="$ProgramFiles/Java"
27852
27853  windows_path="$VIRTUAL_DIR"
27854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27855    unix_path=`$CYGPATH -u "$windows_path"`
27856    VIRTUAL_DIR="$unix_path"
27857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27859    VIRTUAL_DIR="$unix_path"
27860  fi
27861
27862
27863  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27864  BOOT_JDK_SUFFIX=""
27865  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27866  if test "x$ALL_JDKS_FOUND" != x; then
27867    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27868
27869  if test "x$BOOT_JDK_FOUND" = xno; then
27870    # Now execute the test
27871
27872        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27873        if test -d "$BOOT_JDK"; then
27874          BOOT_JDK_FOUND=maybe
27875          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27876$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27877        fi
27878
27879
27880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27882      # Do we have a bin/java?
27883      if test ! -x "$BOOT_JDK/bin/java"; then
27884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27886        BOOT_JDK_FOUND=no
27887      else
27888        # Do we have a bin/javac?
27889        if test ! -x "$BOOT_JDK/bin/javac"; then
27890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27894          BOOT_JDK_FOUND=no
27895        else
27896          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27897          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27898
27899          # Extra M4 quote needed to protect [] in grep expression.
27900          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27901          if test "x$FOUND_CORRECT_VERSION" = x; then
27902            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27904            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27906            BOOT_JDK_FOUND=no
27907          else
27908            # We're done! :-)
27909            BOOT_JDK_FOUND=yes
27910
27911  # Only process if variable expands to non-empty
27912
27913  if test "x$BOOT_JDK" != x; then
27914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27915
27916  # Input might be given as Windows format, start by converting to
27917  # unix format.
27918  path="$BOOT_JDK"
27919  new_path=`$CYGPATH -u "$path"`
27920
27921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27924  # "foo.exe" is OK but "foo" is an error.
27925  #
27926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27927  # It is also a way to make sure we got the proper file name for the real test later on.
27928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27929  if test "x$test_shortpath" = x; then
27930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27932    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27933  fi
27934
27935  # Call helper function which possibly converts this using DOS-style short mode.
27936  # If so, the updated path is stored in $new_path.
27937
27938  input_path="$new_path"
27939  # Check if we need to convert this using DOS-style short mode. If the path
27940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27941  # take no chances and rewrite it.
27942  # Note: m4 eats our [], so we need to use [ and ] instead.
27943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27944  if test "x$has_forbidden_chars" != x; then
27945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27949      # Going to short mode and back again did indeed matter. Since short mode is
27950      # case insensitive, let's make it lowercase to improve readability.
27951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27952      # Now convert it back to Unix-style (cygpath)
27953      input_path=`$CYGPATH -u "$shortmode_path"`
27954      new_path="$input_path"
27955    fi
27956  fi
27957
27958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27959  if test "x$test_cygdrive_prefix" = x; then
27960    # As a simple fix, exclude /usr/bin since it's not a real path.
27961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27963      # a path prefixed by /cygdrive for fixpath to work.
27964      new_path="$CYGWIN_ROOT_PATH$input_path"
27965    fi
27966  fi
27967
27968
27969  if test "x$path" != "x$new_path"; then
27970    BOOT_JDK="$new_path"
27971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27973  fi
27974
27975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27976
27977  path="$BOOT_JDK"
27978  has_colon=`$ECHO $path | $GREP ^.:`
27979  new_path="$path"
27980  if test "x$has_colon" = x; then
27981    # Not in mixed or Windows style, start by that.
27982    new_path=`cmd //c echo $path`
27983  fi
27984
27985
27986  input_path="$new_path"
27987  # Check if we need to convert this using DOS-style short mode. If the path
27988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27989  # take no chances and rewrite it.
27990  # Note: m4 eats our [], so we need to use [ and ] instead.
27991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27992  if test "x$has_forbidden_chars" != x; then
27993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27995  fi
27996
27997
27998  windows_path="$new_path"
27999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28000    unix_path=`$CYGPATH -u "$windows_path"`
28001    new_path="$unix_path"
28002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28004    new_path="$unix_path"
28005  fi
28006
28007  if test "x$path" != "x$new_path"; then
28008    BOOT_JDK="$new_path"
28009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28011  fi
28012
28013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28015
28016    else
28017      # We're on a unix platform. Hooray! :)
28018      path="$BOOT_JDK"
28019      has_space=`$ECHO "$path" | $GREP " "`
28020      if test "x$has_space" != x; then
28021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28024      fi
28025
28026      # Use eval to expand a potential ~
28027      eval path="$path"
28028      if test ! -f "$path" && test ! -d "$path"; then
28029        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28030      fi
28031
28032      if test -d "$path"; then
28033        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28034      else
28035        dir="`$DIRNAME "$path"`"
28036        base="`$BASENAME "$path"`"
28037        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28038      fi
28039    fi
28040  fi
28041
28042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28043$as_echo_n "checking for Boot JDK... " >&6; }
28044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28045$as_echo "$BOOT_JDK" >&6; }
28046            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28047$as_echo_n "checking Boot JDK version... " >&6; }
28048            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28050$as_echo "$BOOT_JDK_VERSION" >&6; }
28051          fi # end check jdk version
28052        fi # end check javac
28053      fi # end check java
28054    fi # end check boot jdk found
28055  fi
28056
28057    done
28058  fi
28059
28060  fi
28061
28062
28063    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28064    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28065      # Do we have a bin/java?
28066      if test ! -x "$BOOT_JDK/bin/java"; then
28067        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28069        BOOT_JDK_FOUND=no
28070      else
28071        # Do we have a bin/javac?
28072        if test ! -x "$BOOT_JDK/bin/javac"; then
28073          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28075          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28076$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28077          BOOT_JDK_FOUND=no
28078        else
28079          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28080          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28081
28082          # Extra M4 quote needed to protect [] in grep expression.
28083          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28084          if test "x$FOUND_CORRECT_VERSION" = x; then
28085            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28087            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28088$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28089            BOOT_JDK_FOUND=no
28090          else
28091            # We're done! :-)
28092            BOOT_JDK_FOUND=yes
28093
28094  # Only process if variable expands to non-empty
28095
28096  if test "x$BOOT_JDK" != x; then
28097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098
28099  # Input might be given as Windows format, start by converting to
28100  # unix format.
28101  path="$BOOT_JDK"
28102  new_path=`$CYGPATH -u "$path"`
28103
28104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28107  # "foo.exe" is OK but "foo" is an error.
28108  #
28109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28110  # It is also a way to make sure we got the proper file name for the real test later on.
28111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28112  if test "x$test_shortpath" = x; then
28113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28115    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28116  fi
28117
28118  # Call helper function which possibly converts this using DOS-style short mode.
28119  # If so, the updated path is stored in $new_path.
28120
28121  input_path="$new_path"
28122  # Check if we need to convert this using DOS-style short mode. If the path
28123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28124  # take no chances and rewrite it.
28125  # Note: m4 eats our [], so we need to use [ and ] instead.
28126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28127  if test "x$has_forbidden_chars" != x; then
28128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28132      # Going to short mode and back again did indeed matter. Since short mode is
28133      # case insensitive, let's make it lowercase to improve readability.
28134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28135      # Now convert it back to Unix-style (cygpath)
28136      input_path=`$CYGPATH -u "$shortmode_path"`
28137      new_path="$input_path"
28138    fi
28139  fi
28140
28141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28142  if test "x$test_cygdrive_prefix" = x; then
28143    # As a simple fix, exclude /usr/bin since it's not a real path.
28144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28146      # a path prefixed by /cygdrive for fixpath to work.
28147      new_path="$CYGWIN_ROOT_PATH$input_path"
28148    fi
28149  fi
28150
28151
28152  if test "x$path" != "x$new_path"; then
28153    BOOT_JDK="$new_path"
28154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28155$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28156  fi
28157
28158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28159
28160  path="$BOOT_JDK"
28161  has_colon=`$ECHO $path | $GREP ^.:`
28162  new_path="$path"
28163  if test "x$has_colon" = x; then
28164    # Not in mixed or Windows style, start by that.
28165    new_path=`cmd //c echo $path`
28166  fi
28167
28168
28169  input_path="$new_path"
28170  # Check if we need to convert this using DOS-style short mode. If the path
28171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28172  # take no chances and rewrite it.
28173  # Note: m4 eats our [], so we need to use [ and ] instead.
28174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28175  if test "x$has_forbidden_chars" != x; then
28176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28178  fi
28179
28180
28181  windows_path="$new_path"
28182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28183    unix_path=`$CYGPATH -u "$windows_path"`
28184    new_path="$unix_path"
28185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28187    new_path="$unix_path"
28188  fi
28189
28190  if test "x$path" != "x$new_path"; then
28191    BOOT_JDK="$new_path"
28192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28194  fi
28195
28196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28198
28199    else
28200      # We're on a unix platform. Hooray! :)
28201      path="$BOOT_JDK"
28202      has_space=`$ECHO "$path" | $GREP " "`
28203      if test "x$has_space" != x; then
28204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28207      fi
28208
28209      # Use eval to expand a potential ~
28210      eval path="$path"
28211      if test ! -f "$path" && test ! -d "$path"; then
28212        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28213      fi
28214
28215      if test -d "$path"; then
28216        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28217      else
28218        dir="`$DIRNAME "$path"`"
28219        base="`$BASENAME "$path"`"
28220        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28221      fi
28222    fi
28223  fi
28224
28225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28226$as_echo_n "checking for Boot JDK... " >&6; }
28227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28228$as_echo "$BOOT_JDK" >&6; }
28229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28230$as_echo_n "checking Boot JDK version... " >&6; }
28231            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28233$as_echo "$BOOT_JDK_VERSION" >&6; }
28234          fi # end check jdk version
28235        fi # end check javac
28236      fi # end check java
28237    fi # end check boot jdk found
28238  fi
28239
28240
28241  if test "x$BOOT_JDK_FOUND" = xno; then
28242    # Now execute the test
28243
28244  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28245  BOOT_JDK_SUFFIX=""
28246  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28247  if test "x$ALL_JDKS_FOUND" != x; then
28248    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28249
28250  if test "x$BOOT_JDK_FOUND" = xno; then
28251    # Now execute the test
28252
28253        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28254        if test -d "$BOOT_JDK"; then
28255          BOOT_JDK_FOUND=maybe
28256          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28257$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28258        fi
28259
28260
28261    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28262    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28263      # Do we have a bin/java?
28264      if test ! -x "$BOOT_JDK/bin/java"; then
28265        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28267        BOOT_JDK_FOUND=no
28268      else
28269        # Do we have a bin/javac?
28270        if test ! -x "$BOOT_JDK/bin/javac"; then
28271          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28273          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28274$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28275          BOOT_JDK_FOUND=no
28276        else
28277          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28278          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28279
28280          # Extra M4 quote needed to protect [] in grep expression.
28281          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28282          if test "x$FOUND_CORRECT_VERSION" = x; then
28283            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28285            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28286$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28287            BOOT_JDK_FOUND=no
28288          else
28289            # We're done! :-)
28290            BOOT_JDK_FOUND=yes
28291
28292  # Only process if variable expands to non-empty
28293
28294  if test "x$BOOT_JDK" != x; then
28295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28296
28297  # Input might be given as Windows format, start by converting to
28298  # unix format.
28299  path="$BOOT_JDK"
28300  new_path=`$CYGPATH -u "$path"`
28301
28302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28305  # "foo.exe" is OK but "foo" is an error.
28306  #
28307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28308  # It is also a way to make sure we got the proper file name for the real test later on.
28309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28310  if test "x$test_shortpath" = x; then
28311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28313    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28314  fi
28315
28316  # Call helper function which possibly converts this using DOS-style short mode.
28317  # If so, the updated path is stored in $new_path.
28318
28319  input_path="$new_path"
28320  # Check if we need to convert this using DOS-style short mode. If the path
28321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28322  # take no chances and rewrite it.
28323  # Note: m4 eats our [], so we need to use [ and ] instead.
28324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28325  if test "x$has_forbidden_chars" != x; then
28326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28330      # Going to short mode and back again did indeed matter. Since short mode is
28331      # case insensitive, let's make it lowercase to improve readability.
28332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28333      # Now convert it back to Unix-style (cygpath)
28334      input_path=`$CYGPATH -u "$shortmode_path"`
28335      new_path="$input_path"
28336    fi
28337  fi
28338
28339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28340  if test "x$test_cygdrive_prefix" = x; then
28341    # As a simple fix, exclude /usr/bin since it's not a real path.
28342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28344      # a path prefixed by /cygdrive for fixpath to work.
28345      new_path="$CYGWIN_ROOT_PATH$input_path"
28346    fi
28347  fi
28348
28349
28350  if test "x$path" != "x$new_path"; then
28351    BOOT_JDK="$new_path"
28352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28354  fi
28355
28356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28357
28358  path="$BOOT_JDK"
28359  has_colon=`$ECHO $path | $GREP ^.:`
28360  new_path="$path"
28361  if test "x$has_colon" = x; then
28362    # Not in mixed or Windows style, start by that.
28363    new_path=`cmd //c echo $path`
28364  fi
28365
28366
28367  input_path="$new_path"
28368  # Check if we need to convert this using DOS-style short mode. If the path
28369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28370  # take no chances and rewrite it.
28371  # Note: m4 eats our [], so we need to use [ and ] instead.
28372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28373  if test "x$has_forbidden_chars" != x; then
28374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28376  fi
28377
28378
28379  windows_path="$new_path"
28380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28381    unix_path=`$CYGPATH -u "$windows_path"`
28382    new_path="$unix_path"
28383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28385    new_path="$unix_path"
28386  fi
28387
28388  if test "x$path" != "x$new_path"; then
28389    BOOT_JDK="$new_path"
28390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28391$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28392  fi
28393
28394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28396
28397    else
28398      # We're on a unix platform. Hooray! :)
28399      path="$BOOT_JDK"
28400      has_space=`$ECHO "$path" | $GREP " "`
28401      if test "x$has_space" != x; then
28402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28404        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28405      fi
28406
28407      # Use eval to expand a potential ~
28408      eval path="$path"
28409      if test ! -f "$path" && test ! -d "$path"; then
28410        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28411      fi
28412
28413      if test -d "$path"; then
28414        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28415      else
28416        dir="`$DIRNAME "$path"`"
28417        base="`$BASENAME "$path"`"
28418        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28419      fi
28420    fi
28421  fi
28422
28423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28424$as_echo_n "checking for Boot JDK... " >&6; }
28425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28426$as_echo "$BOOT_JDK" >&6; }
28427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28428$as_echo_n "checking Boot JDK version... " >&6; }
28429            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28431$as_echo "$BOOT_JDK_VERSION" >&6; }
28432          fi # end check jdk version
28433        fi # end check javac
28434      fi # end check java
28435    fi # end check boot jdk found
28436  fi
28437
28438    done
28439  fi
28440
28441
28442    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28443    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28444      # Do we have a bin/java?
28445      if test ! -x "$BOOT_JDK/bin/java"; then
28446        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28448        BOOT_JDK_FOUND=no
28449      else
28450        # Do we have a bin/javac?
28451        if test ! -x "$BOOT_JDK/bin/javac"; then
28452          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28454          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28455$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28456          BOOT_JDK_FOUND=no
28457        else
28458          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28459          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28460
28461          # Extra M4 quote needed to protect [] in grep expression.
28462          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28463          if test "x$FOUND_CORRECT_VERSION" = x; then
28464            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28466            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28467$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28468            BOOT_JDK_FOUND=no
28469          else
28470            # We're done! :-)
28471            BOOT_JDK_FOUND=yes
28472
28473  # Only process if variable expands to non-empty
28474
28475  if test "x$BOOT_JDK" != x; then
28476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477
28478  # Input might be given as Windows format, start by converting to
28479  # unix format.
28480  path="$BOOT_JDK"
28481  new_path=`$CYGPATH -u "$path"`
28482
28483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28486  # "foo.exe" is OK but "foo" is an error.
28487  #
28488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28489  # It is also a way to make sure we got the proper file name for the real test later on.
28490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28491  if test "x$test_shortpath" = x; then
28492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28495  fi
28496
28497  # Call helper function which possibly converts this using DOS-style short mode.
28498  # If so, the updated path is stored in $new_path.
28499
28500  input_path="$new_path"
28501  # Check if we need to convert this using DOS-style short mode. If the path
28502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28503  # take no chances and rewrite it.
28504  # Note: m4 eats our [], so we need to use [ and ] instead.
28505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28506  if test "x$has_forbidden_chars" != x; then
28507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28511      # Going to short mode and back again did indeed matter. Since short mode is
28512      # case insensitive, let's make it lowercase to improve readability.
28513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28514      # Now convert it back to Unix-style (cygpath)
28515      input_path=`$CYGPATH -u "$shortmode_path"`
28516      new_path="$input_path"
28517    fi
28518  fi
28519
28520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28521  if test "x$test_cygdrive_prefix" = x; then
28522    # As a simple fix, exclude /usr/bin since it's not a real path.
28523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28525      # a path prefixed by /cygdrive for fixpath to work.
28526      new_path="$CYGWIN_ROOT_PATH$input_path"
28527    fi
28528  fi
28529
28530
28531  if test "x$path" != "x$new_path"; then
28532    BOOT_JDK="$new_path"
28533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28535  fi
28536
28537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28538
28539  path="$BOOT_JDK"
28540  has_colon=`$ECHO $path | $GREP ^.:`
28541  new_path="$path"
28542  if test "x$has_colon" = x; then
28543    # Not in mixed or Windows style, start by that.
28544    new_path=`cmd //c echo $path`
28545  fi
28546
28547
28548  input_path="$new_path"
28549  # Check if we need to convert this using DOS-style short mode. If the path
28550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28551  # take no chances and rewrite it.
28552  # Note: m4 eats our [], so we need to use [ and ] instead.
28553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28554  if test "x$has_forbidden_chars" != x; then
28555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28557  fi
28558
28559
28560  windows_path="$new_path"
28561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28562    unix_path=`$CYGPATH -u "$windows_path"`
28563    new_path="$unix_path"
28564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28566    new_path="$unix_path"
28567  fi
28568
28569  if test "x$path" != "x$new_path"; then
28570    BOOT_JDK="$new_path"
28571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28573  fi
28574
28575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28577
28578    else
28579      # We're on a unix platform. Hooray! :)
28580      path="$BOOT_JDK"
28581      has_space=`$ECHO "$path" | $GREP " "`
28582      if test "x$has_space" != x; then
28583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28586      fi
28587
28588      # Use eval to expand a potential ~
28589      eval path="$path"
28590      if test ! -f "$path" && test ! -d "$path"; then
28591        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28592      fi
28593
28594      if test -d "$path"; then
28595        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28596      else
28597        dir="`$DIRNAME "$path"`"
28598        base="`$BASENAME "$path"`"
28599        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28600      fi
28601    fi
28602  fi
28603
28604            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28605$as_echo_n "checking for Boot JDK... " >&6; }
28606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28607$as_echo "$BOOT_JDK" >&6; }
28608            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28609$as_echo_n "checking Boot JDK version... " >&6; }
28610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28612$as_echo "$BOOT_JDK_VERSION" >&6; }
28613          fi # end check jdk version
28614        fi # end check javac
28615      fi # end check java
28616    fi # end check boot jdk found
28617  fi
28618
28619  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28620
28621  if test "x$BOOT_JDK_FOUND" = xno; then
28622    # Now execute the test
28623
28624  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28625  BOOT_JDK_SUFFIX="/Contents/Home"
28626  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28627  if test "x$ALL_JDKS_FOUND" != x; then
28628    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28629
28630  if test "x$BOOT_JDK_FOUND" = xno; then
28631    # Now execute the test
28632
28633        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28634        if test -d "$BOOT_JDK"; then
28635          BOOT_JDK_FOUND=maybe
28636          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28637$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28638        fi
28639
28640
28641    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28642    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28643      # Do we have a bin/java?
28644      if test ! -x "$BOOT_JDK/bin/java"; then
28645        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28647        BOOT_JDK_FOUND=no
28648      else
28649        # Do we have a bin/javac?
28650        if test ! -x "$BOOT_JDK/bin/javac"; then
28651          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28653          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28654$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28655          BOOT_JDK_FOUND=no
28656        else
28657          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28658          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28659
28660          # Extra M4 quote needed to protect [] in grep expression.
28661          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28662          if test "x$FOUND_CORRECT_VERSION" = x; then
28663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28665            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28666$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28667            BOOT_JDK_FOUND=no
28668          else
28669            # We're done! :-)
28670            BOOT_JDK_FOUND=yes
28671
28672  # Only process if variable expands to non-empty
28673
28674  if test "x$BOOT_JDK" != x; then
28675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28676
28677  # Input might be given as Windows format, start by converting to
28678  # unix format.
28679  path="$BOOT_JDK"
28680  new_path=`$CYGPATH -u "$path"`
28681
28682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28685  # "foo.exe" is OK but "foo" is an error.
28686  #
28687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28688  # It is also a way to make sure we got the proper file name for the real test later on.
28689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28690  if test "x$test_shortpath" = x; then
28691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28693    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28694  fi
28695
28696  # Call helper function which possibly converts this using DOS-style short mode.
28697  # If so, the updated path is stored in $new_path.
28698
28699  input_path="$new_path"
28700  # Check if we need to convert this using DOS-style short mode. If the path
28701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28702  # take no chances and rewrite it.
28703  # Note: m4 eats our [], so we need to use [ and ] instead.
28704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28705  if test "x$has_forbidden_chars" != x; then
28706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28710      # Going to short mode and back again did indeed matter. Since short mode is
28711      # case insensitive, let's make it lowercase to improve readability.
28712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28713      # Now convert it back to Unix-style (cygpath)
28714      input_path=`$CYGPATH -u "$shortmode_path"`
28715      new_path="$input_path"
28716    fi
28717  fi
28718
28719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28720  if test "x$test_cygdrive_prefix" = x; then
28721    # As a simple fix, exclude /usr/bin since it's not a real path.
28722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28724      # a path prefixed by /cygdrive for fixpath to work.
28725      new_path="$CYGWIN_ROOT_PATH$input_path"
28726    fi
28727  fi
28728
28729
28730  if test "x$path" != "x$new_path"; then
28731    BOOT_JDK="$new_path"
28732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28734  fi
28735
28736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28737
28738  path="$BOOT_JDK"
28739  has_colon=`$ECHO $path | $GREP ^.:`
28740  new_path="$path"
28741  if test "x$has_colon" = x; then
28742    # Not in mixed or Windows style, start by that.
28743    new_path=`cmd //c echo $path`
28744  fi
28745
28746
28747  input_path="$new_path"
28748  # Check if we need to convert this using DOS-style short mode. If the path
28749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28750  # take no chances and rewrite it.
28751  # Note: m4 eats our [], so we need to use [ and ] instead.
28752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28753  if test "x$has_forbidden_chars" != x; then
28754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28756  fi
28757
28758
28759  windows_path="$new_path"
28760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28761    unix_path=`$CYGPATH -u "$windows_path"`
28762    new_path="$unix_path"
28763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28765    new_path="$unix_path"
28766  fi
28767
28768  if test "x$path" != "x$new_path"; then
28769    BOOT_JDK="$new_path"
28770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28772  fi
28773
28774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28776
28777    else
28778      # We're on a unix platform. Hooray! :)
28779      path="$BOOT_JDK"
28780      has_space=`$ECHO "$path" | $GREP " "`
28781      if test "x$has_space" != x; then
28782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28785      fi
28786
28787      # Use eval to expand a potential ~
28788      eval path="$path"
28789      if test ! -f "$path" && test ! -d "$path"; then
28790        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28791      fi
28792
28793      if test -d "$path"; then
28794        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28795      else
28796        dir="`$DIRNAME "$path"`"
28797        base="`$BASENAME "$path"`"
28798        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28799      fi
28800    fi
28801  fi
28802
28803            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28804$as_echo_n "checking for Boot JDK... " >&6; }
28805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28806$as_echo "$BOOT_JDK" >&6; }
28807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28808$as_echo_n "checking Boot JDK version... " >&6; }
28809            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28811$as_echo "$BOOT_JDK_VERSION" >&6; }
28812          fi # end check jdk version
28813        fi # end check javac
28814      fi # end check java
28815    fi # end check boot jdk found
28816  fi
28817
28818    done
28819  fi
28820
28821
28822    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28823    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28824      # Do we have a bin/java?
28825      if test ! -x "$BOOT_JDK/bin/java"; then
28826        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28828        BOOT_JDK_FOUND=no
28829      else
28830        # Do we have a bin/javac?
28831        if test ! -x "$BOOT_JDK/bin/javac"; then
28832          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28834          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28835$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28836          BOOT_JDK_FOUND=no
28837        else
28838          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28839          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28840
28841          # Extra M4 quote needed to protect [] in grep expression.
28842          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28843          if test "x$FOUND_CORRECT_VERSION" = x; then
28844            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28846            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28847$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28848            BOOT_JDK_FOUND=no
28849          else
28850            # We're done! :-)
28851            BOOT_JDK_FOUND=yes
28852
28853  # Only process if variable expands to non-empty
28854
28855  if test "x$BOOT_JDK" != x; then
28856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28857
28858  # Input might be given as Windows format, start by converting to
28859  # unix format.
28860  path="$BOOT_JDK"
28861  new_path=`$CYGPATH -u "$path"`
28862
28863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28866  # "foo.exe" is OK but "foo" is an error.
28867  #
28868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28869  # It is also a way to make sure we got the proper file name for the real test later on.
28870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28871  if test "x$test_shortpath" = x; then
28872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28873$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28874    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28875  fi
28876
28877  # Call helper function which possibly converts this using DOS-style short mode.
28878  # If so, the updated path is stored in $new_path.
28879
28880  input_path="$new_path"
28881  # Check if we need to convert this using DOS-style short mode. If the path
28882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28883  # take no chances and rewrite it.
28884  # Note: m4 eats our [], so we need to use [ and ] instead.
28885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28886  if test "x$has_forbidden_chars" != x; then
28887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28891      # Going to short mode and back again did indeed matter. Since short mode is
28892      # case insensitive, let's make it lowercase to improve readability.
28893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28894      # Now convert it back to Unix-style (cygpath)
28895      input_path=`$CYGPATH -u "$shortmode_path"`
28896      new_path="$input_path"
28897    fi
28898  fi
28899
28900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28901  if test "x$test_cygdrive_prefix" = x; then
28902    # As a simple fix, exclude /usr/bin since it's not a real path.
28903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28905      # a path prefixed by /cygdrive for fixpath to work.
28906      new_path="$CYGWIN_ROOT_PATH$input_path"
28907    fi
28908  fi
28909
28910
28911  if test "x$path" != "x$new_path"; then
28912    BOOT_JDK="$new_path"
28913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28915  fi
28916
28917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28918
28919  path="$BOOT_JDK"
28920  has_colon=`$ECHO $path | $GREP ^.:`
28921  new_path="$path"
28922  if test "x$has_colon" = x; then
28923    # Not in mixed or Windows style, start by that.
28924    new_path=`cmd //c echo $path`
28925  fi
28926
28927
28928  input_path="$new_path"
28929  # Check if we need to convert this using DOS-style short mode. If the path
28930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28931  # take no chances and rewrite it.
28932  # Note: m4 eats our [], so we need to use [ and ] instead.
28933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28934  if test "x$has_forbidden_chars" != x; then
28935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28937  fi
28938
28939
28940  windows_path="$new_path"
28941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28942    unix_path=`$CYGPATH -u "$windows_path"`
28943    new_path="$unix_path"
28944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28946    new_path="$unix_path"
28947  fi
28948
28949  if test "x$path" != "x$new_path"; then
28950    BOOT_JDK="$new_path"
28951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28952$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28953  fi
28954
28955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28957
28958    else
28959      # We're on a unix platform. Hooray! :)
28960      path="$BOOT_JDK"
28961      has_space=`$ECHO "$path" | $GREP " "`
28962      if test "x$has_space" != x; then
28963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28966      fi
28967
28968      # Use eval to expand a potential ~
28969      eval path="$path"
28970      if test ! -f "$path" && test ! -d "$path"; then
28971        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28972      fi
28973
28974      if test -d "$path"; then
28975        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28976      else
28977        dir="`$DIRNAME "$path"`"
28978        base="`$BASENAME "$path"`"
28979        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28980      fi
28981    fi
28982  fi
28983
28984            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28985$as_echo_n "checking for Boot JDK... " >&6; }
28986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28987$as_echo "$BOOT_JDK" >&6; }
28988            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28989$as_echo_n "checking Boot JDK version... " >&6; }
28990            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28992$as_echo "$BOOT_JDK_VERSION" >&6; }
28993          fi # end check jdk version
28994        fi # end check javac
28995      fi # end check java
28996    fi # end check boot jdk found
28997  fi
28998
28999
29000  if test "x$BOOT_JDK_FOUND" = xno; then
29001    # Now execute the test
29002
29003  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29004  BOOT_JDK_SUFFIX="/Contents/Home"
29005  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29006  if test "x$ALL_JDKS_FOUND" != x; then
29007    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29008
29009  if test "x$BOOT_JDK_FOUND" = xno; then
29010    # Now execute the test
29011
29012        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29013        if test -d "$BOOT_JDK"; then
29014          BOOT_JDK_FOUND=maybe
29015          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29016$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29017        fi
29018
29019
29020    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29021    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29022      # Do we have a bin/java?
29023      if test ! -x "$BOOT_JDK/bin/java"; then
29024        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29026        BOOT_JDK_FOUND=no
29027      else
29028        # Do we have a bin/javac?
29029        if test ! -x "$BOOT_JDK/bin/javac"; then
29030          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29032          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29033$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29034          BOOT_JDK_FOUND=no
29035        else
29036          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29037          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29038
29039          # Extra M4 quote needed to protect [] in grep expression.
29040          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29041          if test "x$FOUND_CORRECT_VERSION" = x; then
29042            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29044            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29045$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29046            BOOT_JDK_FOUND=no
29047          else
29048            # We're done! :-)
29049            BOOT_JDK_FOUND=yes
29050
29051  # Only process if variable expands to non-empty
29052
29053  if test "x$BOOT_JDK" != x; then
29054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29055
29056  # Input might be given as Windows format, start by converting to
29057  # unix format.
29058  path="$BOOT_JDK"
29059  new_path=`$CYGPATH -u "$path"`
29060
29061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29064  # "foo.exe" is OK but "foo" is an error.
29065  #
29066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29067  # It is also a way to make sure we got the proper file name for the real test later on.
29068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29069  if test "x$test_shortpath" = x; then
29070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29072    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29073  fi
29074
29075  # Call helper function which possibly converts this using DOS-style short mode.
29076  # If so, the updated path is stored in $new_path.
29077
29078  input_path="$new_path"
29079  # Check if we need to convert this using DOS-style short mode. If the path
29080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29081  # take no chances and rewrite it.
29082  # Note: m4 eats our [], so we need to use [ and ] instead.
29083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29084  if test "x$has_forbidden_chars" != x; then
29085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29089      # Going to short mode and back again did indeed matter. Since short mode is
29090      # case insensitive, let's make it lowercase to improve readability.
29091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29092      # Now convert it back to Unix-style (cygpath)
29093      input_path=`$CYGPATH -u "$shortmode_path"`
29094      new_path="$input_path"
29095    fi
29096  fi
29097
29098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29099  if test "x$test_cygdrive_prefix" = x; then
29100    # As a simple fix, exclude /usr/bin since it's not a real path.
29101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29103      # a path prefixed by /cygdrive for fixpath to work.
29104      new_path="$CYGWIN_ROOT_PATH$input_path"
29105    fi
29106  fi
29107
29108
29109  if test "x$path" != "x$new_path"; then
29110    BOOT_JDK="$new_path"
29111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29113  fi
29114
29115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29116
29117  path="$BOOT_JDK"
29118  has_colon=`$ECHO $path | $GREP ^.:`
29119  new_path="$path"
29120  if test "x$has_colon" = x; then
29121    # Not in mixed or Windows style, start by that.
29122    new_path=`cmd //c echo $path`
29123  fi
29124
29125
29126  input_path="$new_path"
29127  # Check if we need to convert this using DOS-style short mode. If the path
29128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29129  # take no chances and rewrite it.
29130  # Note: m4 eats our [], so we need to use [ and ] instead.
29131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29132  if test "x$has_forbidden_chars" != x; then
29133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29135  fi
29136
29137
29138  windows_path="$new_path"
29139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29140    unix_path=`$CYGPATH -u "$windows_path"`
29141    new_path="$unix_path"
29142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29144    new_path="$unix_path"
29145  fi
29146
29147  if test "x$path" != "x$new_path"; then
29148    BOOT_JDK="$new_path"
29149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29151  fi
29152
29153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29155
29156    else
29157      # We're on a unix platform. Hooray! :)
29158      path="$BOOT_JDK"
29159      has_space=`$ECHO "$path" | $GREP " "`
29160      if test "x$has_space" != x; then
29161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29164      fi
29165
29166      # Use eval to expand a potential ~
29167      eval path="$path"
29168      if test ! -f "$path" && test ! -d "$path"; then
29169        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29170      fi
29171
29172      if test -d "$path"; then
29173        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29174      else
29175        dir="`$DIRNAME "$path"`"
29176        base="`$BASENAME "$path"`"
29177        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29178      fi
29179    fi
29180  fi
29181
29182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29183$as_echo_n "checking for Boot JDK... " >&6; }
29184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29185$as_echo "$BOOT_JDK" >&6; }
29186            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29187$as_echo_n "checking Boot JDK version... " >&6; }
29188            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29190$as_echo "$BOOT_JDK_VERSION" >&6; }
29191          fi # end check jdk version
29192        fi # end check javac
29193      fi # end check java
29194    fi # end check boot jdk found
29195  fi
29196
29197    done
29198  fi
29199
29200
29201    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29202    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29203      # Do we have a bin/java?
29204      if test ! -x "$BOOT_JDK/bin/java"; then
29205        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29207        BOOT_JDK_FOUND=no
29208      else
29209        # Do we have a bin/javac?
29210        if test ! -x "$BOOT_JDK/bin/javac"; then
29211          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29213          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29214$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29215          BOOT_JDK_FOUND=no
29216        else
29217          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29218          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29219
29220          # Extra M4 quote needed to protect [] in grep expression.
29221          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29222          if test "x$FOUND_CORRECT_VERSION" = x; then
29223            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29225            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29226$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29227            BOOT_JDK_FOUND=no
29228          else
29229            # We're done! :-)
29230            BOOT_JDK_FOUND=yes
29231
29232  # Only process if variable expands to non-empty
29233
29234  if test "x$BOOT_JDK" != x; then
29235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29236
29237  # Input might be given as Windows format, start by converting to
29238  # unix format.
29239  path="$BOOT_JDK"
29240  new_path=`$CYGPATH -u "$path"`
29241
29242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29245  # "foo.exe" is OK but "foo" is an error.
29246  #
29247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29248  # It is also a way to make sure we got the proper file name for the real test later on.
29249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29250  if test "x$test_shortpath" = x; then
29251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29253    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29254  fi
29255
29256  # Call helper function which possibly converts this using DOS-style short mode.
29257  # If so, the updated path is stored in $new_path.
29258
29259  input_path="$new_path"
29260  # Check if we need to convert this using DOS-style short mode. If the path
29261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29262  # take no chances and rewrite it.
29263  # Note: m4 eats our [], so we need to use [ and ] instead.
29264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29265  if test "x$has_forbidden_chars" != x; then
29266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29270      # Going to short mode and back again did indeed matter. Since short mode is
29271      # case insensitive, let's make it lowercase to improve readability.
29272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29273      # Now convert it back to Unix-style (cygpath)
29274      input_path=`$CYGPATH -u "$shortmode_path"`
29275      new_path="$input_path"
29276    fi
29277  fi
29278
29279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29280  if test "x$test_cygdrive_prefix" = x; then
29281    # As a simple fix, exclude /usr/bin since it's not a real path.
29282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29284      # a path prefixed by /cygdrive for fixpath to work.
29285      new_path="$CYGWIN_ROOT_PATH$input_path"
29286    fi
29287  fi
29288
29289
29290  if test "x$path" != "x$new_path"; then
29291    BOOT_JDK="$new_path"
29292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29294  fi
29295
29296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29297
29298  path="$BOOT_JDK"
29299  has_colon=`$ECHO $path | $GREP ^.:`
29300  new_path="$path"
29301  if test "x$has_colon" = x; then
29302    # Not in mixed or Windows style, start by that.
29303    new_path=`cmd //c echo $path`
29304  fi
29305
29306
29307  input_path="$new_path"
29308  # Check if we need to convert this using DOS-style short mode. If the path
29309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29310  # take no chances and rewrite it.
29311  # Note: m4 eats our [], so we need to use [ and ] instead.
29312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29313  if test "x$has_forbidden_chars" != x; then
29314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29316  fi
29317
29318
29319  windows_path="$new_path"
29320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29321    unix_path=`$CYGPATH -u "$windows_path"`
29322    new_path="$unix_path"
29323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29325    new_path="$unix_path"
29326  fi
29327
29328  if test "x$path" != "x$new_path"; then
29329    BOOT_JDK="$new_path"
29330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29332  fi
29333
29334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29336
29337    else
29338      # We're on a unix platform. Hooray! :)
29339      path="$BOOT_JDK"
29340      has_space=`$ECHO "$path" | $GREP " "`
29341      if test "x$has_space" != x; then
29342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29345      fi
29346
29347      # Use eval to expand a potential ~
29348      eval path="$path"
29349      if test ! -f "$path" && test ! -d "$path"; then
29350        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29351      fi
29352
29353      if test -d "$path"; then
29354        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29355      else
29356        dir="`$DIRNAME "$path"`"
29357        base="`$BASENAME "$path"`"
29358        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29359      fi
29360    fi
29361  fi
29362
29363            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29364$as_echo_n "checking for Boot JDK... " >&6; }
29365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29366$as_echo "$BOOT_JDK" >&6; }
29367            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29368$as_echo_n "checking Boot JDK version... " >&6; }
29369            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29371$as_echo "$BOOT_JDK_VERSION" >&6; }
29372          fi # end check jdk version
29373        fi # end check javac
29374      fi # end check java
29375    fi # end check boot jdk found
29376  fi
29377
29378  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29379
29380  if test "x$BOOT_JDK_FOUND" = xno; then
29381    # Now execute the test
29382
29383  BOOT_JDK_PREFIX="/usr/lib/jvm"
29384  BOOT_JDK_SUFFIX=""
29385  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29386  if test "x$ALL_JDKS_FOUND" != x; then
29387    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29388
29389  if test "x$BOOT_JDK_FOUND" = xno; then
29390    # Now execute the test
29391
29392        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29393        if test -d "$BOOT_JDK"; then
29394          BOOT_JDK_FOUND=maybe
29395          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29396$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29397        fi
29398
29399
29400    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29401    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29402      # Do we have a bin/java?
29403      if test ! -x "$BOOT_JDK/bin/java"; then
29404        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29406        BOOT_JDK_FOUND=no
29407      else
29408        # Do we have a bin/javac?
29409        if test ! -x "$BOOT_JDK/bin/javac"; then
29410          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29412          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29413$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29414          BOOT_JDK_FOUND=no
29415        else
29416          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29417          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29418
29419          # Extra M4 quote needed to protect [] in grep expression.
29420          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29421          if test "x$FOUND_CORRECT_VERSION" = x; then
29422            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29424            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29425$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29426            BOOT_JDK_FOUND=no
29427          else
29428            # We're done! :-)
29429            BOOT_JDK_FOUND=yes
29430
29431  # Only process if variable expands to non-empty
29432
29433  if test "x$BOOT_JDK" != x; then
29434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29435
29436  # Input might be given as Windows format, start by converting to
29437  # unix format.
29438  path="$BOOT_JDK"
29439  new_path=`$CYGPATH -u "$path"`
29440
29441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29444  # "foo.exe" is OK but "foo" is an error.
29445  #
29446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29447  # It is also a way to make sure we got the proper file name for the real test later on.
29448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29449  if test "x$test_shortpath" = x; then
29450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29453  fi
29454
29455  # Call helper function which possibly converts this using DOS-style short mode.
29456  # If so, the updated path is stored in $new_path.
29457
29458  input_path="$new_path"
29459  # Check if we need to convert this using DOS-style short mode. If the path
29460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29461  # take no chances and rewrite it.
29462  # Note: m4 eats our [], so we need to use [ and ] instead.
29463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29464  if test "x$has_forbidden_chars" != x; then
29465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29469      # Going to short mode and back again did indeed matter. Since short mode is
29470      # case insensitive, let's make it lowercase to improve readability.
29471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29472      # Now convert it back to Unix-style (cygpath)
29473      input_path=`$CYGPATH -u "$shortmode_path"`
29474      new_path="$input_path"
29475    fi
29476  fi
29477
29478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29479  if test "x$test_cygdrive_prefix" = x; then
29480    # As a simple fix, exclude /usr/bin since it's not a real path.
29481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29483      # a path prefixed by /cygdrive for fixpath to work.
29484      new_path="$CYGWIN_ROOT_PATH$input_path"
29485    fi
29486  fi
29487
29488
29489  if test "x$path" != "x$new_path"; then
29490    BOOT_JDK="$new_path"
29491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29493  fi
29494
29495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29496
29497  path="$BOOT_JDK"
29498  has_colon=`$ECHO $path | $GREP ^.:`
29499  new_path="$path"
29500  if test "x$has_colon" = x; then
29501    # Not in mixed or Windows style, start by that.
29502    new_path=`cmd //c echo $path`
29503  fi
29504
29505
29506  input_path="$new_path"
29507  # Check if we need to convert this using DOS-style short mode. If the path
29508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29509  # take no chances and rewrite it.
29510  # Note: m4 eats our [], so we need to use [ and ] instead.
29511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29512  if test "x$has_forbidden_chars" != x; then
29513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29515  fi
29516
29517
29518  windows_path="$new_path"
29519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29520    unix_path=`$CYGPATH -u "$windows_path"`
29521    new_path="$unix_path"
29522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29524    new_path="$unix_path"
29525  fi
29526
29527  if test "x$path" != "x$new_path"; then
29528    BOOT_JDK="$new_path"
29529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29531  fi
29532
29533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29535
29536    else
29537      # We're on a unix platform. Hooray! :)
29538      path="$BOOT_JDK"
29539      has_space=`$ECHO "$path" | $GREP " "`
29540      if test "x$has_space" != x; then
29541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29544      fi
29545
29546      # Use eval to expand a potential ~
29547      eval path="$path"
29548      if test ! -f "$path" && test ! -d "$path"; then
29549        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29550      fi
29551
29552      if test -d "$path"; then
29553        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29554      else
29555        dir="`$DIRNAME "$path"`"
29556        base="`$BASENAME "$path"`"
29557        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29558      fi
29559    fi
29560  fi
29561
29562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29563$as_echo_n "checking for Boot JDK... " >&6; }
29564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29565$as_echo "$BOOT_JDK" >&6; }
29566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29567$as_echo_n "checking Boot JDK version... " >&6; }
29568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29570$as_echo "$BOOT_JDK_VERSION" >&6; }
29571          fi # end check jdk version
29572        fi # end check javac
29573      fi # end check java
29574    fi # end check boot jdk found
29575  fi
29576
29577    done
29578  fi
29579
29580
29581    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29582    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29583      # Do we have a bin/java?
29584      if test ! -x "$BOOT_JDK/bin/java"; then
29585        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29587        BOOT_JDK_FOUND=no
29588      else
29589        # Do we have a bin/javac?
29590        if test ! -x "$BOOT_JDK/bin/javac"; then
29591          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29593          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29594$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29595          BOOT_JDK_FOUND=no
29596        else
29597          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29598          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29599
29600          # Extra M4 quote needed to protect [] in grep expression.
29601          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29602          if test "x$FOUND_CORRECT_VERSION" = x; then
29603            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29605            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29606$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29607            BOOT_JDK_FOUND=no
29608          else
29609            # We're done! :-)
29610            BOOT_JDK_FOUND=yes
29611
29612  # Only process if variable expands to non-empty
29613
29614  if test "x$BOOT_JDK" != x; then
29615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29616
29617  # Input might be given as Windows format, start by converting to
29618  # unix format.
29619  path="$BOOT_JDK"
29620  new_path=`$CYGPATH -u "$path"`
29621
29622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29625  # "foo.exe" is OK but "foo" is an error.
29626  #
29627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29628  # It is also a way to make sure we got the proper file name for the real test later on.
29629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29630  if test "x$test_shortpath" = x; then
29631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29633    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29634  fi
29635
29636  # Call helper function which possibly converts this using DOS-style short mode.
29637  # If so, the updated path is stored in $new_path.
29638
29639  input_path="$new_path"
29640  # Check if we need to convert this using DOS-style short mode. If the path
29641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29642  # take no chances and rewrite it.
29643  # Note: m4 eats our [], so we need to use [ and ] instead.
29644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29645  if test "x$has_forbidden_chars" != x; then
29646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29650      # Going to short mode and back again did indeed matter. Since short mode is
29651      # case insensitive, let's make it lowercase to improve readability.
29652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29653      # Now convert it back to Unix-style (cygpath)
29654      input_path=`$CYGPATH -u "$shortmode_path"`
29655      new_path="$input_path"
29656    fi
29657  fi
29658
29659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29660  if test "x$test_cygdrive_prefix" = x; then
29661    # As a simple fix, exclude /usr/bin since it's not a real path.
29662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29664      # a path prefixed by /cygdrive for fixpath to work.
29665      new_path="$CYGWIN_ROOT_PATH$input_path"
29666    fi
29667  fi
29668
29669
29670  if test "x$path" != "x$new_path"; then
29671    BOOT_JDK="$new_path"
29672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29674  fi
29675
29676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29677
29678  path="$BOOT_JDK"
29679  has_colon=`$ECHO $path | $GREP ^.:`
29680  new_path="$path"
29681  if test "x$has_colon" = x; then
29682    # Not in mixed or Windows style, start by that.
29683    new_path=`cmd //c echo $path`
29684  fi
29685
29686
29687  input_path="$new_path"
29688  # Check if we need to convert this using DOS-style short mode. If the path
29689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29690  # take no chances and rewrite it.
29691  # Note: m4 eats our [], so we need to use [ and ] instead.
29692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29693  if test "x$has_forbidden_chars" != x; then
29694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29696  fi
29697
29698
29699  windows_path="$new_path"
29700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29701    unix_path=`$CYGPATH -u "$windows_path"`
29702    new_path="$unix_path"
29703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29705    new_path="$unix_path"
29706  fi
29707
29708  if test "x$path" != "x$new_path"; then
29709    BOOT_JDK="$new_path"
29710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29712  fi
29713
29714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29716
29717    else
29718      # We're on a unix platform. Hooray! :)
29719      path="$BOOT_JDK"
29720      has_space=`$ECHO "$path" | $GREP " "`
29721      if test "x$has_space" != x; then
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29725      fi
29726
29727      # Use eval to expand a potential ~
29728      eval path="$path"
29729      if test ! -f "$path" && test ! -d "$path"; then
29730        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29731      fi
29732
29733      if test -d "$path"; then
29734        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29735      else
29736        dir="`$DIRNAME "$path"`"
29737        base="`$BASENAME "$path"`"
29738        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29739      fi
29740    fi
29741  fi
29742
29743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29744$as_echo_n "checking for Boot JDK... " >&6; }
29745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29746$as_echo "$BOOT_JDK" >&6; }
29747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29748$as_echo_n "checking Boot JDK version... " >&6; }
29749            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29751$as_echo "$BOOT_JDK_VERSION" >&6; }
29752          fi # end check jdk version
29753        fi # end check javac
29754      fi # end check java
29755    fi # end check boot jdk found
29756  fi
29757
29758  fi
29759
29760
29761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29763      # Do we have a bin/java?
29764      if test ! -x "$BOOT_JDK/bin/java"; then
29765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29767        BOOT_JDK_FOUND=no
29768      else
29769        # Do we have a bin/javac?
29770        if test ! -x "$BOOT_JDK/bin/javac"; then
29771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29775          BOOT_JDK_FOUND=no
29776        else
29777          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29778          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29779
29780          # Extra M4 quote needed to protect [] in grep expression.
29781          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29782          if test "x$FOUND_CORRECT_VERSION" = x; then
29783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29785            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29786$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29787            BOOT_JDK_FOUND=no
29788          else
29789            # We're done! :-)
29790            BOOT_JDK_FOUND=yes
29791
29792  # Only process if variable expands to non-empty
29793
29794  if test "x$BOOT_JDK" != x; then
29795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29796
29797  # Input might be given as Windows format, start by converting to
29798  # unix format.
29799  path="$BOOT_JDK"
29800  new_path=`$CYGPATH -u "$path"`
29801
29802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29805  # "foo.exe" is OK but "foo" is an error.
29806  #
29807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29808  # It is also a way to make sure we got the proper file name for the real test later on.
29809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29810  if test "x$test_shortpath" = x; then
29811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29814  fi
29815
29816  # Call helper function which possibly converts this using DOS-style short mode.
29817  # If so, the updated path is stored in $new_path.
29818
29819  input_path="$new_path"
29820  # Check if we need to convert this using DOS-style short mode. If the path
29821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29822  # take no chances and rewrite it.
29823  # Note: m4 eats our [], so we need to use [ and ] instead.
29824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29825  if test "x$has_forbidden_chars" != x; then
29826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29830      # Going to short mode and back again did indeed matter. Since short mode is
29831      # case insensitive, let's make it lowercase to improve readability.
29832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29833      # Now convert it back to Unix-style (cygpath)
29834      input_path=`$CYGPATH -u "$shortmode_path"`
29835      new_path="$input_path"
29836    fi
29837  fi
29838
29839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29840  if test "x$test_cygdrive_prefix" = x; then
29841    # As a simple fix, exclude /usr/bin since it's not a real path.
29842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29844      # a path prefixed by /cygdrive for fixpath to work.
29845      new_path="$CYGWIN_ROOT_PATH$input_path"
29846    fi
29847  fi
29848
29849
29850  if test "x$path" != "x$new_path"; then
29851    BOOT_JDK="$new_path"
29852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29854  fi
29855
29856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29857
29858  path="$BOOT_JDK"
29859  has_colon=`$ECHO $path | $GREP ^.:`
29860  new_path="$path"
29861  if test "x$has_colon" = x; then
29862    # Not in mixed or Windows style, start by that.
29863    new_path=`cmd //c echo $path`
29864  fi
29865
29866
29867  input_path="$new_path"
29868  # Check if we need to convert this using DOS-style short mode. If the path
29869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29870  # take no chances and rewrite it.
29871  # Note: m4 eats our [], so we need to use [ and ] instead.
29872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29873  if test "x$has_forbidden_chars" != x; then
29874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29876  fi
29877
29878
29879  windows_path="$new_path"
29880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29881    unix_path=`$CYGPATH -u "$windows_path"`
29882    new_path="$unix_path"
29883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29885    new_path="$unix_path"
29886  fi
29887
29888  if test "x$path" != "x$new_path"; then
29889    BOOT_JDK="$new_path"
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29892  fi
29893
29894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29896
29897    else
29898      # We're on a unix platform. Hooray! :)
29899      path="$BOOT_JDK"
29900      has_space=`$ECHO "$path" | $GREP " "`
29901      if test "x$has_space" != x; then
29902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29905      fi
29906
29907      # Use eval to expand a potential ~
29908      eval path="$path"
29909      if test ! -f "$path" && test ! -d "$path"; then
29910        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29911      fi
29912
29913      if test -d "$path"; then
29914        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29915      else
29916        dir="`$DIRNAME "$path"`"
29917        base="`$BASENAME "$path"`"
29918        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29919      fi
29920    fi
29921  fi
29922
29923            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29924$as_echo_n "checking for Boot JDK... " >&6; }
29925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29926$as_echo "$BOOT_JDK" >&6; }
29927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29928$as_echo_n "checking Boot JDK version... " >&6; }
29929            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29931$as_echo "$BOOT_JDK_VERSION" >&6; }
29932          fi # end check jdk version
29933        fi # end check javac
29934      fi # end check java
29935    fi # end check boot jdk found
29936  fi
29937
29938
29939  # If we haven't found anything yet, we've truly lost. Give up.
29940  if test "x$BOOT_JDK_FOUND" = xno; then
29941
29942  # Print a helpful message on how to acquire the necessary build dependency.
29943  # openjdk is the help tag: freetype, cups, alsa etc
29944  MISSING_DEPENDENCY=openjdk
29945
29946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29947    cygwin_help $MISSING_DEPENDENCY
29948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29949    msys_help $MISSING_DEPENDENCY
29950  else
29951    PKGHANDLER_COMMAND=
29952
29953    case $PKGHANDLER in
29954      apt-get)
29955        apt_help     $MISSING_DEPENDENCY ;;
29956      yum)
29957        yum_help     $MISSING_DEPENDENCY ;;
29958      brew)
29959        brew_help    $MISSING_DEPENDENCY ;;
29960      port)
29961        port_help    $MISSING_DEPENDENCY ;;
29962      pkgutil)
29963        pkgutil_help $MISSING_DEPENDENCY ;;
29964      pkgadd)
29965        pkgadd_help  $MISSING_DEPENDENCY ;;
29966    esac
29967
29968    if test "x$PKGHANDLER_COMMAND" != x; then
29969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29970    fi
29971  fi
29972
29973    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29974$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29975    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29976$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29977    as_fn_error $? "Cannot continue" "$LINENO" 5
29978  fi
29979
29980
29981
29982  # Setup tools from the Boot JDK.
29983
29984  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29985
29986  # Publish this variable in the help.
29987
29988
29989  if [ -z "${JAVA+x}" ]; then
29990    # The variable is not set by user, try to locate tool using the code snippet
29991
29992      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29993$as_echo_n "checking for java in Boot JDK... " >&6; }
29994      JAVA=$BOOT_JDK/bin/java
29995      if test ! -x $JAVA; then
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29997$as_echo "not found" >&6; }
29998        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29999$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30000        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30001      fi
30002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30003$as_echo "ok" >&6; }
30004
30005
30006  else
30007    # The variable is set, but is it from the command line or the environment?
30008
30009    # Try to remove the string !JAVA! from our list.
30010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30012      # If it failed, the variable was not from the command line. Ignore it,
30013      # but warn the user (except for BASH, which is always set by the calling BASH).
30014      if test "xJAVA" != xBASH; then
30015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30016$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30017      fi
30018      # Try to locate tool using the code snippet
30019
30020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30021$as_echo_n "checking for java in Boot JDK... " >&6; }
30022      JAVA=$BOOT_JDK/bin/java
30023      if test ! -x $JAVA; then
30024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30025$as_echo "not found" >&6; }
30026        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30027$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30028        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30029      fi
30030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30031$as_echo "ok" >&6; }
30032
30033
30034    else
30035      # If it succeeded, then it was overridden by the user. We will use it
30036      # for the tool.
30037
30038      # First remove it from the list of overridden variables, so we can test
30039      # for unknown variables in the end.
30040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30041
30042      # Check if we try to supply an empty value
30043      if test "x$JAVA" = x; then
30044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30045$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30047$as_echo_n "checking for JAVA... " >&6; }
30048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30049$as_echo "disabled" >&6; }
30050      else
30051        # Check if the provided tool contains a complete path.
30052        tool_specified="$JAVA"
30053        tool_basename="${tool_specified##*/}"
30054        if test "x$tool_basename" = "x$tool_specified"; then
30055          # A command without a complete path is provided, search $PATH.
30056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30057$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30058          # Extract the first word of "$tool_basename", so it can be a program name with args.
30059set dummy $tool_basename; ac_word=$2
30060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30061$as_echo_n "checking for $ac_word... " >&6; }
30062if ${ac_cv_path_JAVA+:} false; then :
30063  $as_echo_n "(cached) " >&6
30064else
30065  case $JAVA in
30066  [\\/]* | ?:[\\/]*)
30067  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30068  ;;
30069  *)
30070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30071for as_dir in $PATH
30072do
30073  IFS=$as_save_IFS
30074  test -z "$as_dir" && as_dir=.
30075    for ac_exec_ext in '' $ac_executable_extensions; do
30076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30077    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30079    break 2
30080  fi
30081done
30082  done
30083IFS=$as_save_IFS
30084
30085  ;;
30086esac
30087fi
30088JAVA=$ac_cv_path_JAVA
30089if test -n "$JAVA"; then
30090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30091$as_echo "$JAVA" >&6; }
30092else
30093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30094$as_echo "no" >&6; }
30095fi
30096
30097
30098          if test "x$JAVA" = x; then
30099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30100          fi
30101        else
30102          # Otherwise we believe it is a complete path. Use it as it is.
30103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30104$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30106$as_echo_n "checking for JAVA... " >&6; }
30107          if test ! -x "$tool_specified"; then
30108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30109$as_echo "not found" >&6; }
30110            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30111          fi
30112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30113$as_echo "$tool_specified" >&6; }
30114        fi
30115      fi
30116    fi
30117
30118  fi
30119
30120
30121
30122  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30123
30124  # Publish this variable in the help.
30125
30126
30127  if [ -z "${JAVAC+x}" ]; then
30128    # The variable is not set by user, try to locate tool using the code snippet
30129
30130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30131$as_echo_n "checking for javac in Boot JDK... " >&6; }
30132      JAVAC=$BOOT_JDK/bin/javac
30133      if test ! -x $JAVAC; then
30134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30135$as_echo "not found" >&6; }
30136        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30137$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30138        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30139      fi
30140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30141$as_echo "ok" >&6; }
30142
30143
30144  else
30145    # The variable is set, but is it from the command line or the environment?
30146
30147    # Try to remove the string !JAVAC! from our list.
30148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30150      # If it failed, the variable was not from the command line. Ignore it,
30151      # but warn the user (except for BASH, which is always set by the calling BASH).
30152      if test "xJAVAC" != xBASH; then
30153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30154$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30155      fi
30156      # Try to locate tool using the code snippet
30157
30158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30159$as_echo_n "checking for javac in Boot JDK... " >&6; }
30160      JAVAC=$BOOT_JDK/bin/javac
30161      if test ! -x $JAVAC; then
30162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30163$as_echo "not found" >&6; }
30164        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30165$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30166        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30167      fi
30168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30169$as_echo "ok" >&6; }
30170
30171
30172    else
30173      # If it succeeded, then it was overridden by the user. We will use it
30174      # for the tool.
30175
30176      # First remove it from the list of overridden variables, so we can test
30177      # for unknown variables in the end.
30178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30179
30180      # Check if we try to supply an empty value
30181      if test "x$JAVAC" = x; then
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30183$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30185$as_echo_n "checking for JAVAC... " >&6; }
30186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30187$as_echo "disabled" >&6; }
30188      else
30189        # Check if the provided tool contains a complete path.
30190        tool_specified="$JAVAC"
30191        tool_basename="${tool_specified##*/}"
30192        if test "x$tool_basename" = "x$tool_specified"; then
30193          # A command without a complete path is provided, search $PATH.
30194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30195$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30196          # Extract the first word of "$tool_basename", so it can be a program name with args.
30197set dummy $tool_basename; ac_word=$2
30198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30199$as_echo_n "checking for $ac_word... " >&6; }
30200if ${ac_cv_path_JAVAC+:} false; then :
30201  $as_echo_n "(cached) " >&6
30202else
30203  case $JAVAC in
30204  [\\/]* | ?:[\\/]*)
30205  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30206  ;;
30207  *)
30208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30209for as_dir in $PATH
30210do
30211  IFS=$as_save_IFS
30212  test -z "$as_dir" && as_dir=.
30213    for ac_exec_ext in '' $ac_executable_extensions; do
30214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30215    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30217    break 2
30218  fi
30219done
30220  done
30221IFS=$as_save_IFS
30222
30223  ;;
30224esac
30225fi
30226JAVAC=$ac_cv_path_JAVAC
30227if test -n "$JAVAC"; then
30228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30229$as_echo "$JAVAC" >&6; }
30230else
30231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30232$as_echo "no" >&6; }
30233fi
30234
30235
30236          if test "x$JAVAC" = x; then
30237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30238          fi
30239        else
30240          # Otherwise we believe it is a complete path. Use it as it is.
30241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30242$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30244$as_echo_n "checking for JAVAC... " >&6; }
30245          if test ! -x "$tool_specified"; then
30246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30247$as_echo "not found" >&6; }
30248            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30249          fi
30250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30251$as_echo "$tool_specified" >&6; }
30252        fi
30253      fi
30254    fi
30255
30256  fi
30257
30258
30259
30260  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30261
30262  # Publish this variable in the help.
30263
30264
30265  if [ -z "${JAVAH+x}" ]; then
30266    # The variable is not set by user, try to locate tool using the code snippet
30267
30268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30269$as_echo_n "checking for javah in Boot JDK... " >&6; }
30270      JAVAH=$BOOT_JDK/bin/javah
30271      if test ! -x $JAVAH; then
30272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30273$as_echo "not found" >&6; }
30274        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30275$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30276        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30277      fi
30278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30279$as_echo "ok" >&6; }
30280
30281
30282  else
30283    # The variable is set, but is it from the command line or the environment?
30284
30285    # Try to remove the string !JAVAH! from our list.
30286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30288      # If it failed, the variable was not from the command line. Ignore it,
30289      # but warn the user (except for BASH, which is always set by the calling BASH).
30290      if test "xJAVAH" != xBASH; then
30291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30292$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30293      fi
30294      # Try to locate tool using the code snippet
30295
30296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30297$as_echo_n "checking for javah in Boot JDK... " >&6; }
30298      JAVAH=$BOOT_JDK/bin/javah
30299      if test ! -x $JAVAH; then
30300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30301$as_echo "not found" >&6; }
30302        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30303$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30304        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30305      fi
30306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30307$as_echo "ok" >&6; }
30308
30309
30310    else
30311      # If it succeeded, then it was overridden by the user. We will use it
30312      # for the tool.
30313
30314      # First remove it from the list of overridden variables, so we can test
30315      # for unknown variables in the end.
30316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30317
30318      # Check if we try to supply an empty value
30319      if test "x$JAVAH" = x; then
30320        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30321$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30323$as_echo_n "checking for JAVAH... " >&6; }
30324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30325$as_echo "disabled" >&6; }
30326      else
30327        # Check if the provided tool contains a complete path.
30328        tool_specified="$JAVAH"
30329        tool_basename="${tool_specified##*/}"
30330        if test "x$tool_basename" = "x$tool_specified"; then
30331          # A command without a complete path is provided, search $PATH.
30332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30333$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30334          # Extract the first word of "$tool_basename", so it can be a program name with args.
30335set dummy $tool_basename; ac_word=$2
30336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30337$as_echo_n "checking for $ac_word... " >&6; }
30338if ${ac_cv_path_JAVAH+:} false; then :
30339  $as_echo_n "(cached) " >&6
30340else
30341  case $JAVAH in
30342  [\\/]* | ?:[\\/]*)
30343  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30344  ;;
30345  *)
30346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30347for as_dir in $PATH
30348do
30349  IFS=$as_save_IFS
30350  test -z "$as_dir" && as_dir=.
30351    for ac_exec_ext in '' $ac_executable_extensions; do
30352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30353    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30355    break 2
30356  fi
30357done
30358  done
30359IFS=$as_save_IFS
30360
30361  ;;
30362esac
30363fi
30364JAVAH=$ac_cv_path_JAVAH
30365if test -n "$JAVAH"; then
30366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30367$as_echo "$JAVAH" >&6; }
30368else
30369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30370$as_echo "no" >&6; }
30371fi
30372
30373
30374          if test "x$JAVAH" = x; then
30375            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30376          fi
30377        else
30378          # Otherwise we believe it is a complete path. Use it as it is.
30379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30380$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30381          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30382$as_echo_n "checking for JAVAH... " >&6; }
30383          if test ! -x "$tool_specified"; then
30384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30385$as_echo "not found" >&6; }
30386            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30387          fi
30388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30389$as_echo "$tool_specified" >&6; }
30390        fi
30391      fi
30392    fi
30393
30394  fi
30395
30396
30397
30398  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30399
30400  # Publish this variable in the help.
30401
30402
30403  if [ -z "${JAR+x}" ]; then
30404    # The variable is not set by user, try to locate tool using the code snippet
30405
30406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30407$as_echo_n "checking for jar in Boot JDK... " >&6; }
30408      JAR=$BOOT_JDK/bin/jar
30409      if test ! -x $JAR; then
30410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30411$as_echo "not found" >&6; }
30412        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30413$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30414        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30415      fi
30416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30417$as_echo "ok" >&6; }
30418
30419
30420  else
30421    # The variable is set, but is it from the command line or the environment?
30422
30423    # Try to remove the string !JAR! from our list.
30424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30426      # If it failed, the variable was not from the command line. Ignore it,
30427      # but warn the user (except for BASH, which is always set by the calling BASH).
30428      if test "xJAR" != xBASH; then
30429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30430$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30431      fi
30432      # Try to locate tool using the code snippet
30433
30434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30435$as_echo_n "checking for jar in Boot JDK... " >&6; }
30436      JAR=$BOOT_JDK/bin/jar
30437      if test ! -x $JAR; then
30438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30439$as_echo "not found" >&6; }
30440        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30441$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30442        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30443      fi
30444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30445$as_echo "ok" >&6; }
30446
30447
30448    else
30449      # If it succeeded, then it was overridden by the user. We will use it
30450      # for the tool.
30451
30452      # First remove it from the list of overridden variables, so we can test
30453      # for unknown variables in the end.
30454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30455
30456      # Check if we try to supply an empty value
30457      if test "x$JAR" = x; then
30458        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30459$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30461$as_echo_n "checking for JAR... " >&6; }
30462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30463$as_echo "disabled" >&6; }
30464      else
30465        # Check if the provided tool contains a complete path.
30466        tool_specified="$JAR"
30467        tool_basename="${tool_specified##*/}"
30468        if test "x$tool_basename" = "x$tool_specified"; then
30469          # A command without a complete path is provided, search $PATH.
30470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30471$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30472          # Extract the first word of "$tool_basename", so it can be a program name with args.
30473set dummy $tool_basename; ac_word=$2
30474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30475$as_echo_n "checking for $ac_word... " >&6; }
30476if ${ac_cv_path_JAR+:} false; then :
30477  $as_echo_n "(cached) " >&6
30478else
30479  case $JAR in
30480  [\\/]* | ?:[\\/]*)
30481  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30482  ;;
30483  *)
30484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30485for as_dir in $PATH
30486do
30487  IFS=$as_save_IFS
30488  test -z "$as_dir" && as_dir=.
30489    for ac_exec_ext in '' $ac_executable_extensions; do
30490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30491    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30493    break 2
30494  fi
30495done
30496  done
30497IFS=$as_save_IFS
30498
30499  ;;
30500esac
30501fi
30502JAR=$ac_cv_path_JAR
30503if test -n "$JAR"; then
30504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30505$as_echo "$JAR" >&6; }
30506else
30507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30508$as_echo "no" >&6; }
30509fi
30510
30511
30512          if test "x$JAR" = x; then
30513            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30514          fi
30515        else
30516          # Otherwise we believe it is a complete path. Use it as it is.
30517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30518$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30519          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30520$as_echo_n "checking for JAR... " >&6; }
30521          if test ! -x "$tool_specified"; then
30522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30523$as_echo "not found" >&6; }
30524            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30525          fi
30526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30527$as_echo "$tool_specified" >&6; }
30528        fi
30529      fi
30530    fi
30531
30532  fi
30533
30534
30535
30536  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30537
30538  # Publish this variable in the help.
30539
30540
30541  if [ -z "${JARSIGNER+x}" ]; then
30542    # The variable is not set by user, try to locate tool using the code snippet
30543
30544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30545$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30546      JARSIGNER=$BOOT_JDK/bin/jarsigner
30547      if test ! -x $JARSIGNER; then
30548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30549$as_echo "not found" >&6; }
30550        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30551$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30552        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30553      fi
30554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30555$as_echo "ok" >&6; }
30556
30557
30558  else
30559    # The variable is set, but is it from the command line or the environment?
30560
30561    # Try to remove the string !JARSIGNER! from our list.
30562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30564      # If it failed, the variable was not from the command line. Ignore it,
30565      # but warn the user (except for BASH, which is always set by the calling BASH).
30566      if test "xJARSIGNER" != xBASH; then
30567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30568$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30569      fi
30570      # Try to locate tool using the code snippet
30571
30572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30573$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30574      JARSIGNER=$BOOT_JDK/bin/jarsigner
30575      if test ! -x $JARSIGNER; then
30576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30577$as_echo "not found" >&6; }
30578        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30579$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30580        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30581      fi
30582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30583$as_echo "ok" >&6; }
30584
30585
30586    else
30587      # If it succeeded, then it was overridden by the user. We will use it
30588      # for the tool.
30589
30590      # First remove it from the list of overridden variables, so we can test
30591      # for unknown variables in the end.
30592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30593
30594      # Check if we try to supply an empty value
30595      if test "x$JARSIGNER" = x; then
30596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30597$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30599$as_echo_n "checking for JARSIGNER... " >&6; }
30600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30601$as_echo "disabled" >&6; }
30602      else
30603        # Check if the provided tool contains a complete path.
30604        tool_specified="$JARSIGNER"
30605        tool_basename="${tool_specified##*/}"
30606        if test "x$tool_basename" = "x$tool_specified"; then
30607          # A command without a complete path is provided, search $PATH.
30608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30609$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30610          # Extract the first word of "$tool_basename", so it can be a program name with args.
30611set dummy $tool_basename; ac_word=$2
30612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30613$as_echo_n "checking for $ac_word... " >&6; }
30614if ${ac_cv_path_JARSIGNER+:} false; then :
30615  $as_echo_n "(cached) " >&6
30616else
30617  case $JARSIGNER in
30618  [\\/]* | ?:[\\/]*)
30619  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30620  ;;
30621  *)
30622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30623for as_dir in $PATH
30624do
30625  IFS=$as_save_IFS
30626  test -z "$as_dir" && as_dir=.
30627    for ac_exec_ext in '' $ac_executable_extensions; do
30628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30629    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30631    break 2
30632  fi
30633done
30634  done
30635IFS=$as_save_IFS
30636
30637  ;;
30638esac
30639fi
30640JARSIGNER=$ac_cv_path_JARSIGNER
30641if test -n "$JARSIGNER"; then
30642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30643$as_echo "$JARSIGNER" >&6; }
30644else
30645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30646$as_echo "no" >&6; }
30647fi
30648
30649
30650          if test "x$JARSIGNER" = x; then
30651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30652          fi
30653        else
30654          # Otherwise we believe it is a complete path. Use it as it is.
30655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30656$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30658$as_echo_n "checking for JARSIGNER... " >&6; }
30659          if test ! -x "$tool_specified"; then
30660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30661$as_echo "not found" >&6; }
30662            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30663          fi
30664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30665$as_echo "$tool_specified" >&6; }
30666        fi
30667      fi
30668    fi
30669
30670  fi
30671
30672
30673
30674  # Finally, set some other options...
30675
30676  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30677  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30678
30679
30680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30681$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30682  if "$JAVA" --list-modules > /dev/null 2>&1; then
30683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30684$as_echo "yes" >&6; }
30685    BOOT_JDK_MODULAR="true"
30686  else
30687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30688$as_echo "no" >&6; }
30689    BOOT_JDK_MODULAR="false"
30690  fi
30691
30692
30693
30694
30695  # Check if the boot jdk is 32 or 64 bit
30696  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30697    BOOT_JDK_BITS="64"
30698  else
30699    BOOT_JDK_BITS="32"
30700  fi
30701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30702$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30704$as_echo "$BOOT_JDK_BITS" >&6; }
30705
30706
30707
30708
30709# Check whether --with-build-jdk was given.
30710if test "${with_build_jdk+set}" = set; then :
30711  withval=$with_build_jdk;
30712fi
30713
30714
30715  CREATE_BUILDJDK=false
30716  EXTERNAL_BUILDJDK=false
30717  BUILD_JDK_FOUND="no"
30718  if test "x$with_build_jdk" != "x"; then
30719
30720  if test "x$BUILD_JDK_FOUND" = xno; then
30721    # Execute the test
30722
30723       if test "x$with_build_jdk" != x; then
30724         BUILD_JDK=$with_build_jdk
30725         BUILD_JDK_FOUND=maybe
30726         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30727$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30728       fi
30729
30730    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30731    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30732      # Do we have a bin/java?
30733      if test ! -x "$BUILD_JDK/bin/java"; then
30734        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30735$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30736        BUILD_JDK_FOUND=no
30737      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30738        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30739$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30740        BUILD_JDK_FOUND=no
30741      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30742        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30743$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30744        BUILD_JDK_FOUND=no
30745      elif test ! -x "$BUILD_JDK/bin/javac"; then
30746        # Do we have a bin/javac?
30747        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30748$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30749        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30750$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30751        BUILD_JDK_FOUND=no
30752      else
30753        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30754        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30755
30756        # Extra M4 quote needed to protect [] in grep expression.
30757        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30758        if test "x$FOUND_CORRECT_VERSION" = x; then
30759          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30760$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30761          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30762$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30763          BUILD_JDK_FOUND=no
30764        else
30765          # We're done!
30766          BUILD_JDK_FOUND=yes
30767
30768  # Only process if variable expands to non-empty
30769
30770  if test "x$BUILD_JDK" != x; then
30771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30772
30773  # Input might be given as Windows format, start by converting to
30774  # unix format.
30775  path="$BUILD_JDK"
30776  new_path=`$CYGPATH -u "$path"`
30777
30778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30781  # "foo.exe" is OK but "foo" is an error.
30782  #
30783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30784  # It is also a way to make sure we got the proper file name for the real test later on.
30785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30786  if test "x$test_shortpath" = x; then
30787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30788$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30789    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30790  fi
30791
30792  # Call helper function which possibly converts this using DOS-style short mode.
30793  # If so, the updated path is stored in $new_path.
30794
30795  input_path="$new_path"
30796  # Check if we need to convert this using DOS-style short mode. If the path
30797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30798  # take no chances and rewrite it.
30799  # Note: m4 eats our [], so we need to use [ and ] instead.
30800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30801  if test "x$has_forbidden_chars" != x; then
30802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30806      # Going to short mode and back again did indeed matter. Since short mode is
30807      # case insensitive, let's make it lowercase to improve readability.
30808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30809      # Now convert it back to Unix-style (cygpath)
30810      input_path=`$CYGPATH -u "$shortmode_path"`
30811      new_path="$input_path"
30812    fi
30813  fi
30814
30815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30816  if test "x$test_cygdrive_prefix" = x; then
30817    # As a simple fix, exclude /usr/bin since it's not a real path.
30818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30820      # a path prefixed by /cygdrive for fixpath to work.
30821      new_path="$CYGWIN_ROOT_PATH$input_path"
30822    fi
30823  fi
30824
30825
30826  if test "x$path" != "x$new_path"; then
30827    BUILD_JDK="$new_path"
30828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30829$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30830  fi
30831
30832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30833
30834  path="$BUILD_JDK"
30835  has_colon=`$ECHO $path | $GREP ^.:`
30836  new_path="$path"
30837  if test "x$has_colon" = x; then
30838    # Not in mixed or Windows style, start by that.
30839    new_path=`cmd //c echo $path`
30840  fi
30841
30842
30843  input_path="$new_path"
30844  # Check if we need to convert this using DOS-style short mode. If the path
30845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30846  # take no chances and rewrite it.
30847  # Note: m4 eats our [], so we need to use [ and ] instead.
30848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30849  if test "x$has_forbidden_chars" != x; then
30850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30852  fi
30853
30854
30855  windows_path="$new_path"
30856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30857    unix_path=`$CYGPATH -u "$windows_path"`
30858    new_path="$unix_path"
30859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30861    new_path="$unix_path"
30862  fi
30863
30864  if test "x$path" != "x$new_path"; then
30865    BUILD_JDK="$new_path"
30866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30867$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30868  fi
30869
30870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30872
30873    else
30874      # We're on a unix platform. Hooray! :)
30875      path="$BUILD_JDK"
30876      has_space=`$ECHO "$path" | $GREP " "`
30877      if test "x$has_space" != x; then
30878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30879$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30881      fi
30882
30883      # Use eval to expand a potential ~
30884      eval path="$path"
30885      if test ! -f "$path" && test ! -d "$path"; then
30886        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30887      fi
30888
30889      if test -d "$path"; then
30890        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30891      else
30892        dir="`$DIRNAME "$path"`"
30893        base="`$BASENAME "$path"`"
30894        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30895      fi
30896    fi
30897  fi
30898
30899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30900$as_echo_n "checking for Build JDK... " >&6; }
30901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30902$as_echo "$BUILD_JDK" >&6; }
30903          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30904$as_echo_n "checking Build JDK version... " >&6; }
30905          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30907$as_echo "$BUILD_JDK_VERSION" >&6; }
30908        fi # end check jdk version
30909      fi # end check java
30910    fi # end check build jdk found
30911  fi
30912
30913    EXTERNAL_BUILDJDK=true
30914  else
30915    if test "x$COMPILE_TYPE" = "xcross"; then
30916      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30917      BUILD_JDK_FOUND=yes
30918      CREATE_BUILDJDK=true
30919      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30920$as_echo_n "checking for Build JDK... " >&6; }
30921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30922$as_echo "yes, will build it for the host platform" >&6; }
30923    else
30924      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30925      BUILD_JDK_FOUND=yes
30926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30927$as_echo_n "checking for Build JDK... " >&6; }
30928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30929$as_echo "yes, will use output dir" >&6; }
30930    fi
30931  fi
30932
30933  JMOD="$BUILD_JDK/bin/jmod"
30934  JLINK="$BUILD_JDK/bin/jlink"
30935
30936
30937
30938  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30940$as_echo_n "checking for Build JDK... " >&6; }
30941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30942$as_echo "no" >&6; }
30943    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30944  fi
30945
30946
30947
30948
30949
30950
30951###############################################################################
30952#
30953# Configure the sources to use. We can add or override individual directories.
30954#
30955###############################################################################
30956
30957
30958  # Where are the sources.
30959  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30960  CORBA_TOPDIR="$SRC_ROOT/corba"
30961  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30962  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30963  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30964  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30965  JDK_TOPDIR="$SRC_ROOT/jdk"
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975  # This feature is no longer supported.
30976
30977
30978
30979# Check whether --with-add-source-root was given.
30980if test "${with_add_source_root+set}" = set; then :
30981  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
30982$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-source-root was given.
30989if test "${with_override_source_root+set}" = set; then :
30990  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
30991$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997# Check whether --with-adds-and-overrides was given.
30998if test "${with_adds_and_overrides+set}" = set; then :
30999  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
31000$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31001fi
31002
31003
31004
31005
31006# Check whether --with-override-langtools was given.
31007if test "${with_override_langtools+set}" = set; then :
31008  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31009$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31010fi
31011
31012
31013
31014
31015# Check whether --with-override-corba was given.
31016if test "${with_override_corba+set}" = set; then :
31017  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31018$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31019fi
31020
31021
31022
31023
31024# Check whether --with-override-jaxp was given.
31025if test "${with_override_jaxp+set}" = set; then :
31026  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31027$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31028fi
31029
31030
31031
31032
31033# Check whether --with-override-jaxws was given.
31034if test "${with_override_jaxws+set}" = set; then :
31035  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31036$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31037fi
31038
31039
31040
31041
31042# Check whether --with-override-hotspot was given.
31043if test "${with_override_hotspot+set}" = set; then :
31044  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31045$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31046fi
31047
31048
31049
31050
31051# Check whether --with-override-nashorn was given.
31052if test "${with_override_nashorn+set}" = set; then :
31053  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31054$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31055fi
31056
31057
31058
31059
31060# Check whether --with-override-jdk was given.
31061if test "${with_override_jdk+set}" = set; then :
31062  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31063$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31064fi
31065
31066
31067
31068
31069  BUILD_OUTPUT="$OUTPUT_ROOT"
31070
31071  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31072
31073
31074
31075# Check whether --with-import_hotspot was given.
31076if test "${with_import_hotspot+set}" = set; then :
31077  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31078$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31079fi
31080
31081
31082
31083
31084
31085
31086# Check whether --with-import-modules was given.
31087if test "${with_import_modules+set}" = set; then :
31088  withval=$with_import_modules;
31089fi
31090
31091
31092  if test "x$with_import_modules" != x \
31093      && test "x$with_import_modules" != "xno"; then
31094    if test -d "$with_import_modules"; then
31095      IMPORT_MODULES_TOPDIR="$with_import_modules"
31096
31097  # Only process if variable expands to non-empty
31098
31099  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31101
31102  # Input might be given as Windows format, start by converting to
31103  # unix format.
31104  path="$IMPORT_MODULES_TOPDIR"
31105  new_path=`$CYGPATH -u "$path"`
31106
31107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31110  # "foo.exe" is OK but "foo" is an error.
31111  #
31112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31113  # It is also a way to make sure we got the proper file name for the real test later on.
31114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31115  if test "x$test_shortpath" = x; then
31116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31117$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31118    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31119  fi
31120
31121  # Call helper function which possibly converts this using DOS-style short mode.
31122  # If so, the updated path is stored in $new_path.
31123
31124  input_path="$new_path"
31125  # Check if we need to convert this using DOS-style short mode. If the path
31126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31127  # take no chances and rewrite it.
31128  # Note: m4 eats our [], so we need to use [ and ] instead.
31129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31130  if test "x$has_forbidden_chars" != x; then
31131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31135      # Going to short mode and back again did indeed matter. Since short mode is
31136      # case insensitive, let's make it lowercase to improve readability.
31137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31138      # Now convert it back to Unix-style (cygpath)
31139      input_path=`$CYGPATH -u "$shortmode_path"`
31140      new_path="$input_path"
31141    fi
31142  fi
31143
31144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31145  if test "x$test_cygdrive_prefix" = x; then
31146    # As a simple fix, exclude /usr/bin since it's not a real path.
31147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31149      # a path prefixed by /cygdrive for fixpath to work.
31150      new_path="$CYGWIN_ROOT_PATH$input_path"
31151    fi
31152  fi
31153
31154
31155  if test "x$path" != "x$new_path"; then
31156    IMPORT_MODULES_TOPDIR="$new_path"
31157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31158$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31159  fi
31160
31161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31162
31163  path="$IMPORT_MODULES_TOPDIR"
31164  has_colon=`$ECHO $path | $GREP ^.:`
31165  new_path="$path"
31166  if test "x$has_colon" = x; then
31167    # Not in mixed or Windows style, start by that.
31168    new_path=`cmd //c echo $path`
31169  fi
31170
31171
31172  input_path="$new_path"
31173  # Check if we need to convert this using DOS-style short mode. If the path
31174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31175  # take no chances and rewrite it.
31176  # Note: m4 eats our [], so we need to use [ and ] instead.
31177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31178  if test "x$has_forbidden_chars" != x; then
31179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31181  fi
31182
31183
31184  windows_path="$new_path"
31185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31186    unix_path=`$CYGPATH -u "$windows_path"`
31187    new_path="$unix_path"
31188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31190    new_path="$unix_path"
31191  fi
31192
31193  if test "x$path" != "x$new_path"; then
31194    IMPORT_MODULES_TOPDIR="$new_path"
31195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31196$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31197  fi
31198
31199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31201
31202    else
31203      # We're on a unix platform. Hooray! :)
31204      path="$IMPORT_MODULES_TOPDIR"
31205      has_space=`$ECHO "$path" | $GREP " "`
31206      if test "x$has_space" != x; then
31207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31208$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31210      fi
31211
31212      # Use eval to expand a potential ~
31213      eval path="$path"
31214      if test ! -f "$path" && test ! -d "$path"; then
31215        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31216      fi
31217
31218      if test -d "$path"; then
31219        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31220      else
31221        dir="`$DIRNAME "$path"`"
31222        base="`$BASENAME "$path"`"
31223        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31224      fi
31225    fi
31226  fi
31227
31228    elif test -e "$with_import_modules"; then
31229      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31230      $RM -rf "$IMPORT_MODULES_TOPDIR"
31231      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31232      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31233        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31234      fi
31235    else
31236      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31237    fi
31238  fi
31239
31240  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31241    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31242  fi
31243  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31244    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31245  fi
31246  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31247    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31248  fi
31249  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31250    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31251  fi
31252  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31253    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31254  fi
31255  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31256    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31257  fi
31258  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31259    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31260  fi
31261  # Workaround for using different imported module-info.java in Jake due to a
31262  # change in format. Remove once new format is standard in JDK 9 and javafx
31263  # delivers just that.
31264  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31265    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31266  fi
31267  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31268    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31269  fi
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281###############################################################################
31282#
31283# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31284# native code.
31285#
31286###############################################################################
31287
31288# See if we are doing a complete static build or not
31289
31290  # Check whether --enable-static-build was given.
31291if test "${enable_static_build+set}" = set; then :
31292  enableval=$enable_static_build;
31293fi
31294
31295  STATIC_BUILD=false
31296  if test "x$enable_static_build" = "xyes"; then
31297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31298$as_echo_n "checking if static build is enabled... " >&6; }
31299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31300$as_echo "yes" >&6; }
31301    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31302      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31303    fi
31304    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31305    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31306    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31307    STATIC_BUILD=true
31308  elif test "x$enable_static_build" = "xno"; then
31309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31310$as_echo_n "checking if static build is enabled... " >&6; }
31311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31312$as_echo "no" >&6; }
31313  elif test "x$enable_static_build" != "x"; then
31314    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31315  fi
31316
31317
31318
31319
31320# First determine the toolchain type (compiler family)
31321
31322
31323# Check whether --with-toolchain-type was given.
31324if test "${with_toolchain_type+set}" = set; then :
31325  withval=$with_toolchain_type;
31326fi
31327
31328
31329  # Use indirect variable referencing
31330  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31331  VALID_TOOLCHAINS=${!toolchain_var_name}
31332
31333  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31334    if test -n "$XCODEBUILD"; then
31335      # On Mac OS X, default toolchain to clang after Xcode 5
31336      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31337      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31338      if test $? -ne 0; then
31339        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31340      fi
31341      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31342          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31343          $CUT -f 1 -d .`
31344      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31345$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31346      if test $XCODE_MAJOR_VERSION -ge 5; then
31347          DEFAULT_TOOLCHAIN="clang"
31348      else
31349          DEFAULT_TOOLCHAIN="gcc"
31350      fi
31351    else
31352      # If Xcode is not installed, but the command line tools are
31353      # then we can't run xcodebuild. On these systems we should
31354      # default to clang
31355      DEFAULT_TOOLCHAIN="clang"
31356    fi
31357  else
31358    # First toolchain type in the list is the default
31359    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31360  fi
31361
31362  if test "x$with_toolchain_type" = xlist; then
31363    # List all toolchains
31364    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31365$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31366    for toolchain in $VALID_TOOLCHAINS; do
31367      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31368      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31369      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31370    done
31371
31372    exit 0
31373  elif test "x$with_toolchain_type" != x; then
31374    # User override; check that it is valid
31375    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31376      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31377$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31378      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31379$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31380      as_fn_error $? "Cannot continue." "$LINENO" 5
31381    fi
31382    TOOLCHAIN_TYPE=$with_toolchain_type
31383  else
31384    # No flag given, use default
31385    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31386  fi
31387
31388
31389  TOOLCHAIN_CC_BINARY_clang="clang"
31390  TOOLCHAIN_CC_BINARY_gcc="gcc"
31391  TOOLCHAIN_CC_BINARY_microsoft="cl"
31392  TOOLCHAIN_CC_BINARY_solstudio="cc"
31393  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31394
31395  TOOLCHAIN_CXX_BINARY_clang="clang++"
31396  TOOLCHAIN_CXX_BINARY_gcc="g++"
31397  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31398  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31399  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31400
31401  # Use indirect variable referencing
31402  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31403  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31404  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31405  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31406  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31407  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31408  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31409  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31410
31411
31412  # Define filename patterns
31413  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31414    LIBRARY_PREFIX=
31415    SHARED_LIBRARY_SUFFIX='.dll'
31416    STATIC_LIBRARY_SUFFIX='.lib'
31417    SHARED_LIBRARY='$1.dll'
31418    STATIC_LIBRARY='$1.lib'
31419    OBJ_SUFFIX='.obj'
31420    EXE_SUFFIX='.exe'
31421  else
31422    LIBRARY_PREFIX=lib
31423    SHARED_LIBRARY_SUFFIX='.so'
31424    STATIC_LIBRARY_SUFFIX='.a'
31425    SHARED_LIBRARY='lib$1.so'
31426    STATIC_LIBRARY='lib$1.a'
31427    OBJ_SUFFIX='.o'
31428    EXE_SUFFIX=''
31429    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31430      # For full static builds, we're overloading the SHARED_LIBRARY
31431      # variables in order to limit the amount of changes required.
31432      # It would be better to remove SHARED and just use LIBRARY and
31433      # LIBRARY_SUFFIX for libraries that can be built either
31434      # shared or static and use STATIC_* for libraries that are
31435      # always built statically.
31436      if test "x$STATIC_BUILD" = xtrue; then
31437        SHARED_LIBRARY='lib$1.a'
31438        SHARED_LIBRARY_SUFFIX='.a'
31439      else
31440        SHARED_LIBRARY='lib$1.dylib'
31441        SHARED_LIBRARY_SUFFIX='.dylib'
31442      fi
31443    fi
31444  fi
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31456    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31457$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31458  else
31459    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31460$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31461  fi
31462
31463
31464# User supplied flags should be used when configure detects compilers
31465
31466  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31467    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31468$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31469  fi
31470
31471  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31473$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31474  fi
31475
31476  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31478$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31479  fi
31480
31481
31482# Check whether --with-extra-cflags was given.
31483if test "${with_extra_cflags+set}" = set; then :
31484  withval=$with_extra_cflags;
31485fi
31486
31487
31488
31489# Check whether --with-extra-cxxflags was given.
31490if test "${with_extra_cxxflags+set}" = set; then :
31491  withval=$with_extra_cxxflags;
31492fi
31493
31494
31495
31496# Check whether --with-extra-ldflags was given.
31497if test "${with_extra_ldflags+set}" = set; then :
31498  withval=$with_extra_ldflags;
31499fi
31500
31501
31502  EXTRA_CFLAGS="$with_extra_cflags"
31503  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31504  EXTRA_LDFLAGS="$with_extra_ldflags"
31505
31506
31507
31508
31509
31510  # The global CFLAGS and LDLAGS variables are used by configure tests and
31511  # should include the extra parameters
31512  CFLAGS="$EXTRA_CFLAGS"
31513  CXXFLAGS="$EXTRA_CXXFLAGS"
31514  LDFLAGS="$EXTRA_LDFLAGS"
31515  CPPFLAGS=""
31516
31517# The sysroot cflags are needed for configure to be able to run the compilers
31518
31519  if test "x$SYSROOT" != "x"; then
31520    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31521      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31522        # Solaris Studio does not have a concept of sysroot. Instead we must
31523        # make sure the default include and lib dirs are appended to each
31524        # compile and link command line. Must also add -I-xbuiltin to enable
31525        # inlining of system functions and intrinsics.
31526        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31527        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31528            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31529      fi
31530    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31531      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31532      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31533    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31534      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31535      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31536    fi
31537    # The global CFLAGS and LDFLAGS variables need these for configure to function
31538    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31539    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31540    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31541    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31542  fi
31543
31544  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31545    # We also need -iframework<path>/System/Library/Frameworks
31546    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31547    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31548    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31549    # set this here so it doesn't have to be peppered throughout the forest
31550    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31551    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31552  fi
31553
31554
31555
31556
31557
31558# Then detect the actual binaries needed
31559
31560  # FIXME: Is this needed?
31561  ac_ext=cpp
31562ac_cpp='$CXXCPP $CPPFLAGS'
31563ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31564ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31565ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31566
31567
31568  # Store the CFLAGS etc passed to the configure script.
31569  ORG_CFLAGS="$CFLAGS"
31570  ORG_CXXFLAGS="$CXXFLAGS"
31571
31572  # autoconf magic only relies on PATH, so update it if tools dir is specified
31573  OLD_PATH="$PATH"
31574
31575  # On Windows, we need to detect the visual studio installation first.
31576  # This will change the PATH, but we need to keep that new PATH even
31577  # after toolchain detection is done, since the compiler (on x86) uses
31578  # it for DLL resolution in runtime.
31579  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31580      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31581
31582  # Store path to cygwin link.exe to help excluding it when searching for
31583  # VS linker. This must be done before changing the PATH when looking for VS.
31584  # Extract the first word of "link", so it can be a program name with args.
31585set dummy link; ac_word=$2
31586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31587$as_echo_n "checking for $ac_word... " >&6; }
31588if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31589  $as_echo_n "(cached) " >&6
31590else
31591  case $CYGWIN_LINK in
31592  [\\/]* | ?:[\\/]*)
31593  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31594  ;;
31595  *)
31596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31597for as_dir in $PATH
31598do
31599  IFS=$as_save_IFS
31600  test -z "$as_dir" && as_dir=.
31601    for ac_exec_ext in '' $ac_executable_extensions; do
31602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31603    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31605    break 2
31606  fi
31607done
31608  done
31609IFS=$as_save_IFS
31610
31611  ;;
31612esac
31613fi
31614CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31615if test -n "$CYGWIN_LINK"; then
31616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31617$as_echo "$CYGWIN_LINK" >&6; }
31618else
31619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31620$as_echo "no" >&6; }
31621fi
31622
31623
31624  if test "x$CYGWIN_LINK" != x; then
31625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31626$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31627    "$CYGWIN_LINK" --version > /dev/null
31628    if test $? -eq 0 ; then
31629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31630$as_echo "yes" >&6; }
31631    else
31632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31633$as_echo "no" >&6; }
31634      # This might be the VS linker. Don't exclude it later on.
31635      CYGWIN_LINK=""
31636    fi
31637  fi
31638
31639  # First-hand choice is to locate and run the vsvars bat file.
31640
31641
31642# Check whether --with-toolchain-version was given.
31643if test "${with_toolchain_version+set}" = set; then :
31644  withval=$with_toolchain_version;
31645fi
31646
31647
31648  if test "x$with_toolchain_version" = xlist; then
31649    # List all toolchains
31650    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31651$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31652    for version in $VALID_VS_VERSIONS; do
31653      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31654      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31655    done
31656
31657    exit 0
31658  elif test "x$DEVKIT_VS_VERSION" != x; then
31659    VS_VERSION=$DEVKIT_VS_VERSION
31660    TOOLCHAIN_VERSION=$VS_VERSION
31661    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31662    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31663    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31664    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31665    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31666    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31667
31668    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31669    # can still be exported as INCLUDE for compiler invocations without
31670    # SYSROOT_CFLAGS
31671    OLDIFS="$IFS"
31672    IFS=";"
31673    for i in $DEVKIT_VS_INCLUDE; do
31674      ipath=$i
31675
31676  unix_path="$ipath"
31677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31678    windows_path=`$CYGPATH -m "$unix_path"`
31679    ipath="$windows_path"
31680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31681    windows_path=`cmd //c echo $unix_path`
31682    ipath="$windows_path"
31683  fi
31684
31685      VS_INCLUDE="$VS_INCLUDE;$ipath"
31686    done
31687    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31688    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31689    for i in $DEVKIT_VS_LIB; do
31690      libpath=$i
31691
31692  unix_path="$libpath"
31693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31694    windows_path=`$CYGPATH -m "$unix_path"`
31695    libpath="$windows_path"
31696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31697    windows_path=`cmd //c echo $unix_path`
31698    libpath="$windows_path"
31699  fi
31700
31701      VS_LIB="$VS_LIB;$libpath"
31702    done
31703    IFS="$OLDIFS"
31704
31705    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31706$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31707
31708  elif test "x$with_toolchain_version" != x; then
31709    # User override; check that it is valid
31710    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31711      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31712$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31713      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31714$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31715      as_fn_error $? "Cannot continue." "$LINENO" 5
31716    fi
31717    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31718  else
31719    # No flag given, use default
31720    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31721  fi
31722
31723  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31724
31725  VS_VERSION="$VS_VERSION"
31726  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31727  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31728  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31729  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31730
31731  # When using --with-tools-dir, assume it points to the correct and default
31732  # version of Visual Studio or that --with-toolchain-version was also set.
31733  if test "x$with_tools_dir" != x; then
31734
31735  if test "x$VS_ENV_CMD" = x; then
31736    VS_VERSION="${VS_VERSION}"
31737    VS_BASE="$with_tools_dir/../.."
31738    METHOD="--with-tools-dir"
31739
31740    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31741      VCVARSFILE="vc/bin/vcvars32.bat"
31742    else
31743      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31744    fi
31745
31746
31747  windows_path="$VS_BASE"
31748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31749    unix_path=`$CYGPATH -u "$windows_path"`
31750    VS_BASE="$unix_path"
31751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31753    VS_BASE="$unix_path"
31754  fi
31755
31756    if test -d "$VS_BASE"; then
31757      if test -f "$VS_BASE/$VCVARSFILE"; then
31758        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31759$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31760        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31761        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31762        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31763        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31764      else
31765        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31766$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31767        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31768$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31769      fi
31770    fi
31771  fi
31772
31773
31774  if test "x$VS_ENV_CMD" = x; then
31775    VS_VERSION="${VS_VERSION}"
31776    VS_BASE="$with_tools_dir/../../.."
31777    METHOD="--with-tools-dir"
31778
31779    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31780      VCVARSFILE="vc/bin/vcvars32.bat"
31781    else
31782      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31783    fi
31784
31785
31786  windows_path="$VS_BASE"
31787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31788    unix_path=`$CYGPATH -u "$windows_path"`
31789    VS_BASE="$unix_path"
31790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31792    VS_BASE="$unix_path"
31793  fi
31794
31795    if test -d "$VS_BASE"; then
31796      if test -f "$VS_BASE/$VCVARSFILE"; then
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31798$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31799        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31800        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31801        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31802        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31803      else
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31808      fi
31809    fi
31810  fi
31811
31812    if test "x$VS_ENV_CMD" = x; then
31813      # Having specified an argument which is incorrect will produce an instant failure;
31814      # we should not go on looking
31815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31816$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31817      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31818$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31819      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31820$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31821      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31822    fi
31823  fi
31824
31825  VS_ENV_CMD=""
31826  VS_ENV_ARGS=""
31827
31828  if test "x$VS_COMNTOOLS" != x; then
31829
31830  if test "x$VS_ENV_CMD" = x; then
31831    VS_VERSION="${VS_VERSION}"
31832    VS_BASE="$VS_COMNTOOLS/../.."
31833    METHOD="$VS_COMNTOOLS_VAR variable"
31834
31835    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31836      VCVARSFILE="vc/bin/vcvars32.bat"
31837    else
31838      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31839    fi
31840
31841
31842  windows_path="$VS_BASE"
31843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31844    unix_path=`$CYGPATH -u "$windows_path"`
31845    VS_BASE="$unix_path"
31846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31848    VS_BASE="$unix_path"
31849  fi
31850
31851    if test -d "$VS_BASE"; then
31852      if test -f "$VS_BASE/$VCVARSFILE"; then
31853        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31854$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31855        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31856        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31857        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31858        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31859      else
31860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31861$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31862        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31863$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31864      fi
31865    fi
31866  fi
31867
31868  fi
31869  if test "x$PROGRAMFILES" != x; then
31870
31871  if test "x$VS_ENV_CMD" = x; then
31872    VS_VERSION="${VS_VERSION}"
31873    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31874    METHOD="well-known name"
31875
31876    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31877      VCVARSFILE="vc/bin/vcvars32.bat"
31878    else
31879      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31880    fi
31881
31882
31883  windows_path="$VS_BASE"
31884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31885    unix_path=`$CYGPATH -u "$windows_path"`
31886    VS_BASE="$unix_path"
31887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31889    VS_BASE="$unix_path"
31890  fi
31891
31892    if test -d "$VS_BASE"; then
31893      if test -f "$VS_BASE/$VCVARSFILE"; then
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31895$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31896        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31897        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31898        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31899        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31900      else
31901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31902$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31903        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31904$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31905      fi
31906    fi
31907  fi
31908
31909  fi
31910  # Work around the insanely named ProgramFiles(x86) env variable
31911  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31912  if test "x$PROGRAMFILES_X86" != x; then
31913
31914  if test "x$VS_ENV_CMD" = x; then
31915    VS_VERSION="${VS_VERSION}"
31916    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31917    METHOD="well-known name"
31918
31919    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31920      VCVARSFILE="vc/bin/vcvars32.bat"
31921    else
31922      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31923    fi
31924
31925
31926  windows_path="$VS_BASE"
31927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31928    unix_path=`$CYGPATH -u "$windows_path"`
31929    VS_BASE="$unix_path"
31930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31932    VS_BASE="$unix_path"
31933  fi
31934
31935    if test -d "$VS_BASE"; then
31936      if test -f "$VS_BASE/$VCVARSFILE"; then
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31938$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31939        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31940        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31941        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31942        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31943      else
31944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31945$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31947$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31948      fi
31949    fi
31950  fi
31951
31952  fi
31953
31954  if test "x$VS_ENV_CMD" = x; then
31955    VS_VERSION="${VS_VERSION}"
31956    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31957    METHOD="well-known name"
31958
31959    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31960      VCVARSFILE="vc/bin/vcvars32.bat"
31961    else
31962      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31963    fi
31964
31965
31966  windows_path="$VS_BASE"
31967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31968    unix_path=`$CYGPATH -u "$windows_path"`
31969    VS_BASE="$unix_path"
31970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31972    VS_BASE="$unix_path"
31973  fi
31974
31975    if test -d "$VS_BASE"; then
31976      if test -f "$VS_BASE/$VCVARSFILE"; then
31977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31978$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31979        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31980        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31981        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31982        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31983      else
31984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31985$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31987$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31988      fi
31989    fi
31990  fi
31991
31992
31993  if test "x$VS_ENV_CMD" = x; then
31994    VS_VERSION="${VS_VERSION}"
31995    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31996    METHOD="well-known name"
31997
31998    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31999      VCVARSFILE="vc/bin/vcvars32.bat"
32000    else
32001      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32002    fi
32003
32004
32005  windows_path="$VS_BASE"
32006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32007    unix_path=`$CYGPATH -u "$windows_path"`
32008    VS_BASE="$unix_path"
32009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32011    VS_BASE="$unix_path"
32012  fi
32013
32014    if test -d "$VS_BASE"; then
32015      if test -f "$VS_BASE/$VCVARSFILE"; then
32016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32017$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32018        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32019        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32020        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32021        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32022      else
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32024$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32026$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32027      fi
32028    fi
32029  fi
32030
32031
32032  if test "x$SDK_INSTALL_DIR" != x; then
32033    if test "x$ProgramW6432" != x; then
32034
32035  if test "x$VS_ENV_CMD" = x; then
32036    VS_VERSION="${VS_VERSION}"
32037    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32038    METHOD="well-known name"
32039
32040  windows_path="$WIN_SDK_BASE"
32041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32042    unix_path=`$CYGPATH -u "$windows_path"`
32043    WIN_SDK_BASE="$unix_path"
32044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32046    WIN_SDK_BASE="$unix_path"
32047  fi
32048
32049    if test -d "$WIN_SDK_BASE"; then
32050      # There have been cases of partial or broken SDK installations. A missing
32051      # lib dir is not going to work.
32052      if test ! -d "$WIN_SDK_BASE/lib"; then
32053        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32054$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32056$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32057      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32060        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32061        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32062          VS_ENV_ARGS="/x86"
32063        else
32064          VS_ENV_ARGS="/x64"
32065        fi
32066        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32067        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32068        # TODO: improve detection for other versions of SDK
32069        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32070      else
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32073        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32074$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32075      fi
32076    fi
32077  fi
32078
32079    fi
32080    if test "x$PROGRAMW6432" != x; then
32081
32082  if test "x$VS_ENV_CMD" = x; then
32083    VS_VERSION="${VS_VERSION}"
32084    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32085    METHOD="well-known name"
32086
32087  windows_path="$WIN_SDK_BASE"
32088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32089    unix_path=`$CYGPATH -u "$windows_path"`
32090    WIN_SDK_BASE="$unix_path"
32091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32093    WIN_SDK_BASE="$unix_path"
32094  fi
32095
32096    if test -d "$WIN_SDK_BASE"; then
32097      # There have been cases of partial or broken SDK installations. A missing
32098      # lib dir is not going to work.
32099      if test ! -d "$WIN_SDK_BASE/lib"; then
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32103$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32104      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32107        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32108        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32109          VS_ENV_ARGS="/x86"
32110        else
32111          VS_ENV_ARGS="/x64"
32112        fi
32113        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32114        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32115        # TODO: improve detection for other versions of SDK
32116        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32117      else
32118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32121$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32122      fi
32123    fi
32124  fi
32125
32126    fi
32127    if test "x$PROGRAMFILES" != x; then
32128
32129  if test "x$VS_ENV_CMD" = x; then
32130    VS_VERSION="${VS_VERSION}"
32131    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32132    METHOD="well-known name"
32133
32134  windows_path="$WIN_SDK_BASE"
32135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32136    unix_path=`$CYGPATH -u "$windows_path"`
32137    WIN_SDK_BASE="$unix_path"
32138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32140    WIN_SDK_BASE="$unix_path"
32141  fi
32142
32143    if test -d "$WIN_SDK_BASE"; then
32144      # There have been cases of partial or broken SDK installations. A missing
32145      # lib dir is not going to work.
32146      if test ! -d "$WIN_SDK_BASE/lib"; then
32147        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32148$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32149        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32150$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32151      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32153$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32154        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32155        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32156          VS_ENV_ARGS="/x86"
32157        else
32158          VS_ENV_ARGS="/x64"
32159        fi
32160        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32161        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32162        # TODO: improve detection for other versions of SDK
32163        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32164      else
32165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32168$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32169      fi
32170    fi
32171  fi
32172
32173    fi
32174
32175  if test "x$VS_ENV_CMD" = x; then
32176    VS_VERSION="${VS_VERSION}"
32177    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32178    METHOD="well-known name"
32179
32180  windows_path="$WIN_SDK_BASE"
32181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32182    unix_path=`$CYGPATH -u "$windows_path"`
32183    WIN_SDK_BASE="$unix_path"
32184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32186    WIN_SDK_BASE="$unix_path"
32187  fi
32188
32189    if test -d "$WIN_SDK_BASE"; then
32190      # There have been cases of partial or broken SDK installations. A missing
32191      # lib dir is not going to work.
32192      if test ! -d "$WIN_SDK_BASE/lib"; then
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32195        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32196$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32197      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32200        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32201        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32202          VS_ENV_ARGS="/x86"
32203        else
32204          VS_ENV_ARGS="/x64"
32205        fi
32206        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32207        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32208        # TODO: improve detection for other versions of SDK
32209        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32210      else
32211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32213        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32214$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32215      fi
32216    fi
32217  fi
32218
32219
32220  if test "x$VS_ENV_CMD" = x; then
32221    VS_VERSION="${VS_VERSION}"
32222    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32223    METHOD="well-known name"
32224
32225  windows_path="$WIN_SDK_BASE"
32226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32227    unix_path=`$CYGPATH -u "$windows_path"`
32228    WIN_SDK_BASE="$unix_path"
32229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32231    WIN_SDK_BASE="$unix_path"
32232  fi
32233
32234    if test -d "$WIN_SDK_BASE"; then
32235      # There have been cases of partial or broken SDK installations. A missing
32236      # lib dir is not going to work.
32237      if test ! -d "$WIN_SDK_BASE/lib"; then
32238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32239$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32240        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32241$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32242      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32243        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32244$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32245        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32246        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32247          VS_ENV_ARGS="/x86"
32248        else
32249          VS_ENV_ARGS="/x64"
32250        fi
32251        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32252        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32253        # TODO: improve detection for other versions of SDK
32254        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32255      else
32256        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32257$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32258        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32259$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32260      fi
32261    fi
32262  fi
32263
32264  fi
32265
32266    if test "x$VS_ENV_CMD" != x; then
32267      TOOLCHAIN_VERSION=$VS_VERSION
32268      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32269      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32270      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32271      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32272      # The rest of the variables are already evaled while probing
32273      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32274$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32275      break
32276    fi
32277  done
32278
32279
32280  # If we have a devkit, skip all of the below.
32281  if test "x$DEVKIT_VS_VERSION" = x; then
32282    if test "x$VS_ENV_CMD" != x; then
32283      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32284
32285  # Only process if variable expands to non-empty
32286
32287  if test "x$VS_ENV_CMD" != x; then
32288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32289
32290  # First separate the path from the arguments. This will split at the first
32291  # space.
32292  complete="$VS_ENV_CMD"
32293  path="${complete%% *}"
32294  tmp="$complete EOL"
32295  arguments="${tmp#* }"
32296
32297  # Input might be given as Windows format, start by converting to
32298  # unix format.
32299  new_path=`$CYGPATH -u "$path"`
32300
32301  # Now try to locate executable using which
32302  new_path=`$WHICH "$new_path" 2> /dev/null`
32303  # bat and cmd files are not always considered executable in cygwin causing which
32304  # to not find them
32305  if test "x$new_path" = x \
32306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32308    new_path=`$CYGPATH -u "$path"`
32309  fi
32310  if test "x$new_path" = x; then
32311    # Oops. Which didn't find the executable.
32312    # The splitting of arguments from the executable at a space might have been incorrect,
32313    # since paths with space are more likely in Windows. Give it another try with the whole
32314    # argument.
32315    path="$complete"
32316    arguments="EOL"
32317    new_path=`$CYGPATH -u "$path"`
32318    new_path=`$WHICH "$new_path" 2> /dev/null`
32319    # bat and cmd files are not always considered executable in cygwin causing which
32320    # to not find them
32321    if test "x$new_path" = x \
32322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32324      new_path=`$CYGPATH -u "$path"`
32325    fi
32326    if test "x$new_path" = x; then
32327      # It's still not found. Now this is an unrecoverable error.
32328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32329$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32330      has_space=`$ECHO "$complete" | $GREP " "`
32331      if test "x$has_space" != x; then
32332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32334      fi
32335      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32336    fi
32337  fi
32338
32339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32342  # "foo.exe" is OK but "foo" is an error.
32343  #
32344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32345  # It is also a way to make sure we got the proper file name for the real test later on.
32346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32347  if test "x$test_shortpath" = x; then
32348    # Short path failed, file does not exist as specified.
32349    # Try adding .exe or .cmd
32350    if test -f "${new_path}.exe"; then
32351      input_to_shortpath="${new_path}.exe"
32352    elif test -f "${new_path}.cmd"; then
32353      input_to_shortpath="${new_path}.cmd"
32354    else
32355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32356$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32359      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32360    fi
32361  else
32362    input_to_shortpath="$new_path"
32363  fi
32364
32365  # Call helper function which possibly converts this using DOS-style short mode.
32366  # If so, the updated path is stored in $new_path.
32367  new_path="$input_to_shortpath"
32368
32369  input_path="$input_to_shortpath"
32370  # Check if we need to convert this using DOS-style short mode. If the path
32371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32372  # take no chances and rewrite it.
32373  # Note: m4 eats our [], so we need to use [ and ] instead.
32374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32375  if test "x$has_forbidden_chars" != x; then
32376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32380      # Going to short mode and back again did indeed matter. Since short mode is
32381      # case insensitive, let's make it lowercase to improve readability.
32382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32383      # Now convert it back to Unix-style (cygpath)
32384      input_path=`$CYGPATH -u "$shortmode_path"`
32385      new_path="$input_path"
32386    fi
32387  fi
32388
32389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32390  if test "x$test_cygdrive_prefix" = x; then
32391    # As a simple fix, exclude /usr/bin since it's not a real path.
32392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32394      # a path prefixed by /cygdrive for fixpath to work.
32395      new_path="$CYGWIN_ROOT_PATH$input_path"
32396    fi
32397  fi
32398
32399  # remove trailing .exe if any
32400  new_path="${new_path/%.exe/}"
32401
32402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32403
32404  # First separate the path from the arguments. This will split at the first
32405  # space.
32406  complete="$VS_ENV_CMD"
32407  path="${complete%% *}"
32408  tmp="$complete EOL"
32409  arguments="${tmp#* }"
32410
32411  # Input might be given as Windows format, start by converting to
32412  # unix format.
32413  new_path="$path"
32414
32415  windows_path="$new_path"
32416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32417    unix_path=`$CYGPATH -u "$windows_path"`
32418    new_path="$unix_path"
32419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32421    new_path="$unix_path"
32422  fi
32423
32424
32425  # Now try to locate executable using which
32426  new_path=`$WHICH "$new_path" 2> /dev/null`
32427
32428  if test "x$new_path" = x; then
32429    # Oops. Which didn't find the executable.
32430    # The splitting of arguments from the executable at a space might have been incorrect,
32431    # since paths with space are more likely in Windows. Give it another try with the whole
32432    # argument.
32433    path="$complete"
32434    arguments="EOL"
32435    new_path="$path"
32436
32437  windows_path="$new_path"
32438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32439    unix_path=`$CYGPATH -u "$windows_path"`
32440    new_path="$unix_path"
32441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32443    new_path="$unix_path"
32444  fi
32445
32446
32447    new_path=`$WHICH "$new_path" 2> /dev/null`
32448    # bat and cmd files are not always considered executable in MSYS causing which
32449    # to not find them
32450    if test "x$new_path" = x \
32451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32453      new_path="$path"
32454
32455  windows_path="$new_path"
32456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32457    unix_path=`$CYGPATH -u "$windows_path"`
32458    new_path="$unix_path"
32459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32461    new_path="$unix_path"
32462  fi
32463
32464    fi
32465
32466    if test "x$new_path" = x; then
32467      # It's still not found. Now this is an unrecoverable error.
32468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32469$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32470      has_space=`$ECHO "$complete" | $GREP " "`
32471      if test "x$has_space" != x; then
32472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32474      fi
32475      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32476    fi
32477  fi
32478
32479  # Now new_path has a complete unix path to the binary
32480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32481    # Keep paths in /bin as-is, but remove trailing .exe if any
32482    new_path="${new_path/%.exe/}"
32483    # Do not save /bin paths to all_fixpath_prefixes!
32484  else
32485    # Not in mixed or Windows style, start by that.
32486    new_path=`cmd //c echo $new_path`
32487
32488  input_path="$new_path"
32489  # Check if we need to convert this using DOS-style short mode. If the path
32490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32491  # take no chances and rewrite it.
32492  # Note: m4 eats our [], so we need to use [ and ] instead.
32493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32494  if test "x$has_forbidden_chars" != x; then
32495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32497  fi
32498
32499    # Output is in $new_path
32500
32501  windows_path="$new_path"
32502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32503    unix_path=`$CYGPATH -u "$windows_path"`
32504    new_path="$unix_path"
32505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32507    new_path="$unix_path"
32508  fi
32509
32510    # remove trailing .exe if any
32511    new_path="${new_path/%.exe/}"
32512
32513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32515  fi
32516
32517    else
32518      # We're on a unix platform. Hooray! :)
32519      # First separate the path from the arguments. This will split at the first
32520      # space.
32521      complete="$VS_ENV_CMD"
32522      path="${complete%% *}"
32523      tmp="$complete EOL"
32524      arguments="${tmp#* }"
32525
32526      # Cannot rely on the command "which" here since it doesn't always work.
32527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32528      if test -z "$is_absolute_path"; then
32529        # Path to executable is not absolute. Find it.
32530        IFS_save="$IFS"
32531        IFS=:
32532        for p in $PATH; do
32533          if test -f "$p/$path" && test -x "$p/$path"; then
32534            new_path="$p/$path"
32535            break
32536          fi
32537        done
32538        IFS="$IFS_save"
32539      else
32540        # This is an absolute path, we can use it without further modifications.
32541        new_path="$path"
32542      fi
32543
32544      if test "x$new_path" = x; then
32545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32546$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32547        has_space=`$ECHO "$complete" | $GREP " "`
32548        if test "x$has_space" != x; then
32549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32551        fi
32552        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32553      fi
32554    fi
32555
32556    # Now join together the path and the arguments once again
32557    if test "x$arguments" != xEOL; then
32558      new_complete="$new_path ${arguments% *}"
32559    else
32560      new_complete="$new_path"
32561    fi
32562
32563    if test "x$complete" != "x$new_complete"; then
32564      VS_ENV_CMD="$new_complete"
32565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32566$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32567    fi
32568  fi
32569
32570
32571      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32572      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32573$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32574
32575      # We need to create a couple of temporary files.
32576      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32577      $MKDIR -p $VS_ENV_TMP_DIR
32578
32579      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32580      # Instead create a shell script which will set the relevant variables when run.
32581      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32582
32583  unix_path="$WINPATH_VS_ENV_CMD"
32584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32585    windows_path=`$CYGPATH -m "$unix_path"`
32586    WINPATH_VS_ENV_CMD="$windows_path"
32587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32588    windows_path=`cmd //c echo $unix_path`
32589    WINPATH_VS_ENV_CMD="$windows_path"
32590  fi
32591
32592      WINPATH_BASH="$BASH"
32593
32594  unix_path="$WINPATH_BASH"
32595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32596    windows_path=`$CYGPATH -m "$unix_path"`
32597    WINPATH_BASH="$windows_path"
32598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32599    windows_path=`cmd //c echo $unix_path`
32600    WINPATH_BASH="$windows_path"
32601  fi
32602
32603
32604      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32605      # script (executable by bash) that will setup the important variables.
32606      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32607      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32608      # This will end up something like:
32609      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32610      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32611      # These will end up something like:
32612      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32613      # The trailing space for everyone except PATH is no typo, but is needed due
32614      # to trailing \ in the Windows paths. These will be stripped later.
32615      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32616          >> $EXTRACT_VC_ENV_BAT_FILE
32617      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32618          >> $EXTRACT_VC_ENV_BAT_FILE
32619      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32620          >> $EXTRACT_VC_ENV_BAT_FILE
32621      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32622          >> $EXTRACT_VC_ENV_BAT_FILE
32623      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32624          >> $EXTRACT_VC_ENV_BAT_FILE
32625      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32626          >> $EXTRACT_VC_ENV_BAT_FILE
32627
32628      # Now execute the newly created bat file.
32629      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32630      # Change directory so we don't need to mess with Windows paths in redirects.
32631      cd $VS_ENV_TMP_DIR
32632      cmd /c extract-vs-env.bat | $CAT
32633      cd $CURDIR
32634
32635      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32637$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32638        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32639$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32640        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32641$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32642        as_fn_error $? "Cannot continue" "$LINENO" 5
32643      fi
32644
32645      # Now set all paths and other env variables. This will allow the rest of
32646      # the configure script to find and run the compiler in the proper way.
32647      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32648$as_echo "$as_me: Setting extracted environment variables" >&6;}
32649      . $VS_ENV_TMP_DIR/set-vs-env.sh
32650      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32651      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32652    else
32653      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32654      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32655$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32656    fi
32657  fi
32658
32659  # At this point, we should have correct variables in the environment, or we can't continue.
32660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32661$as_echo_n "checking for Visual Studio variables... " >&6; }
32662
32663  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32664      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32665    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32667$as_echo "present but broken" >&6; }
32668      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32669    else
32670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32671$as_echo "ok" >&6; }
32672      # Remove any trailing "\" ";" and " " from the variables.
32673      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32674      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32675      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32676      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32677      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32678      # Remove any paths containing # (typically F#) as that messes up make. This
32679      # is needed if visual studio was installed with F# support.
32680      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32681
32682
32683
32684
32685
32686      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32687      OLDIFS="$IFS"
32688      IFS=";"
32689      for i in $VS_INCLUDE; do
32690        ipath=$i
32691        # Only process non-empty elements
32692        if test "x$ipath" != x; then
32693          IFS="$OLDIFS"
32694          # Check that directory exists before calling fixup_path
32695          testpath=$ipath
32696
32697  windows_path="$testpath"
32698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32699    unix_path=`$CYGPATH -u "$windows_path"`
32700    testpath="$unix_path"
32701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32703    testpath="$unix_path"
32704  fi
32705
32706          if test -d "$testpath"; then
32707
32708  # Only process if variable expands to non-empty
32709
32710  if test "x$ipath" != x; then
32711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32712
32713  # Input might be given as Windows format, start by converting to
32714  # unix format.
32715  path="$ipath"
32716  new_path=`$CYGPATH -u "$path"`
32717
32718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32721  # "foo.exe" is OK but "foo" is an error.
32722  #
32723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32724  # It is also a way to make sure we got the proper file name for the real test later on.
32725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32726  if test "x$test_shortpath" = x; then
32727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32728$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32729    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32730  fi
32731
32732  # Call helper function which possibly converts this using DOS-style short mode.
32733  # If so, the updated path is stored in $new_path.
32734
32735  input_path="$new_path"
32736  # Check if we need to convert this using DOS-style short mode. If the path
32737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32738  # take no chances and rewrite it.
32739  # Note: m4 eats our [], so we need to use [ and ] instead.
32740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32741  if test "x$has_forbidden_chars" != x; then
32742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32746      # Going to short mode and back again did indeed matter. Since short mode is
32747      # case insensitive, let's make it lowercase to improve readability.
32748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32749      # Now convert it back to Unix-style (cygpath)
32750      input_path=`$CYGPATH -u "$shortmode_path"`
32751      new_path="$input_path"
32752    fi
32753  fi
32754
32755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32756  if test "x$test_cygdrive_prefix" = x; then
32757    # As a simple fix, exclude /usr/bin since it's not a real path.
32758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32760      # a path prefixed by /cygdrive for fixpath to work.
32761      new_path="$CYGWIN_ROOT_PATH$input_path"
32762    fi
32763  fi
32764
32765
32766  if test "x$path" != "x$new_path"; then
32767    ipath="$new_path"
32768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32769$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32770  fi
32771
32772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32773
32774  path="$ipath"
32775  has_colon=`$ECHO $path | $GREP ^.:`
32776  new_path="$path"
32777  if test "x$has_colon" = x; then
32778    # Not in mixed or Windows style, start by that.
32779    new_path=`cmd //c echo $path`
32780  fi
32781
32782
32783  input_path="$new_path"
32784  # Check if we need to convert this using DOS-style short mode. If the path
32785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32786  # take no chances and rewrite it.
32787  # Note: m4 eats our [], so we need to use [ and ] instead.
32788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32789  if test "x$has_forbidden_chars" != x; then
32790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32792  fi
32793
32794
32795  windows_path="$new_path"
32796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32797    unix_path=`$CYGPATH -u "$windows_path"`
32798    new_path="$unix_path"
32799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32801    new_path="$unix_path"
32802  fi
32803
32804  if test "x$path" != "x$new_path"; then
32805    ipath="$new_path"
32806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32807$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32808  fi
32809
32810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32812
32813    else
32814      # We're on a unix platform. Hooray! :)
32815      path="$ipath"
32816      has_space=`$ECHO "$path" | $GREP " "`
32817      if test "x$has_space" != x; then
32818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32819$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32821      fi
32822
32823      # Use eval to expand a potential ~
32824      eval path="$path"
32825      if test ! -f "$path" && test ! -d "$path"; then
32826        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32827      fi
32828
32829      if test -d "$path"; then
32830        ipath="`cd "$path"; $THEPWDCMD -L`"
32831      else
32832        dir="`$DIRNAME "$path"`"
32833        base="`$BASENAME "$path"`"
32834        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32835      fi
32836    fi
32837  fi
32838
32839            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32840          fi
32841          IFS=";"
32842        fi
32843      done
32844      # Convert VS_LIB into SYSROOT_LDFLAGS
32845      for i in $VS_LIB; do
32846        libpath=$i
32847        # Only process non-empty elements
32848        if test "x$libpath" != x; then
32849          IFS="$OLDIFS"
32850          # Check that directory exists before calling fixup_path
32851          testpath=$libpath
32852
32853  windows_path="$testpath"
32854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32855    unix_path=`$CYGPATH -u "$windows_path"`
32856    testpath="$unix_path"
32857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32859    testpath="$unix_path"
32860  fi
32861
32862          if test -d "$testpath"; then
32863
32864  # Only process if variable expands to non-empty
32865
32866  if test "x$libpath" != x; then
32867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32868
32869  # Input might be given as Windows format, start by converting to
32870  # unix format.
32871  path="$libpath"
32872  new_path=`$CYGPATH -u "$path"`
32873
32874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32877  # "foo.exe" is OK but "foo" is an error.
32878  #
32879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32880  # It is also a way to make sure we got the proper file name for the real test later on.
32881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32882  if test "x$test_shortpath" = x; then
32883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32884$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32885    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32886  fi
32887
32888  # Call helper function which possibly converts this using DOS-style short mode.
32889  # If so, the updated path is stored in $new_path.
32890
32891  input_path="$new_path"
32892  # Check if we need to convert this using DOS-style short mode. If the path
32893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32894  # take no chances and rewrite it.
32895  # Note: m4 eats our [], so we need to use [ and ] instead.
32896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32897  if test "x$has_forbidden_chars" != x; then
32898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32902      # Going to short mode and back again did indeed matter. Since short mode is
32903      # case insensitive, let's make it lowercase to improve readability.
32904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32905      # Now convert it back to Unix-style (cygpath)
32906      input_path=`$CYGPATH -u "$shortmode_path"`
32907      new_path="$input_path"
32908    fi
32909  fi
32910
32911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32912  if test "x$test_cygdrive_prefix" = x; then
32913    # As a simple fix, exclude /usr/bin since it's not a real path.
32914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32916      # a path prefixed by /cygdrive for fixpath to work.
32917      new_path="$CYGWIN_ROOT_PATH$input_path"
32918    fi
32919  fi
32920
32921
32922  if test "x$path" != "x$new_path"; then
32923    libpath="$new_path"
32924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32925$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32926  fi
32927
32928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32929
32930  path="$libpath"
32931  has_colon=`$ECHO $path | $GREP ^.:`
32932  new_path="$path"
32933  if test "x$has_colon" = x; then
32934    # Not in mixed or Windows style, start by that.
32935    new_path=`cmd //c echo $path`
32936  fi
32937
32938
32939  input_path="$new_path"
32940  # Check if we need to convert this using DOS-style short mode. If the path
32941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32942  # take no chances and rewrite it.
32943  # Note: m4 eats our [], so we need to use [ and ] instead.
32944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32945  if test "x$has_forbidden_chars" != x; then
32946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32948  fi
32949
32950
32951  windows_path="$new_path"
32952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32953    unix_path=`$CYGPATH -u "$windows_path"`
32954    new_path="$unix_path"
32955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32957    new_path="$unix_path"
32958  fi
32959
32960  if test "x$path" != "x$new_path"; then
32961    libpath="$new_path"
32962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32963$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32964  fi
32965
32966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32968
32969    else
32970      # We're on a unix platform. Hooray! :)
32971      path="$libpath"
32972      has_space=`$ECHO "$path" | $GREP " "`
32973      if test "x$has_space" != x; then
32974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32975$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32977      fi
32978
32979      # Use eval to expand a potential ~
32980      eval path="$path"
32981      if test ! -f "$path" && test ! -d "$path"; then
32982        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32983      fi
32984
32985      if test -d "$path"; then
32986        libpath="`cd "$path"; $THEPWDCMD -L`"
32987      else
32988        dir="`$DIRNAME "$path"`"
32989        base="`$BASENAME "$path"`"
32990        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32991      fi
32992    fi
32993  fi
32994
32995            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32996          fi
32997          IFS=";"
32998        fi
32999      done
33000      IFS="$OLDIFS"
33001    fi
33002  else
33003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33004$as_echo "not found" >&6; }
33005
33006    if test "x$VS_ENV_CMD" = x; then
33007      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33008$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33009      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33010$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33011    else
33012      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33013$as_echo "$as_me: Running the extraction script failed." >&6;}
33014    fi
33015    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33016$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33017    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33018$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33019    as_fn_error $? "Cannot continue" "$LINENO" 5
33020  fi
33021
33022    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33023    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33024    PATH="$VS_PATH"
33025    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33026    export INCLUDE="$VS_INCLUDE"
33027    export LIB="$VS_LIB"
33028  else
33029    if test "x$XCODE_VERSION_OUTPUT" != x; then
33030      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33031      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33032      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33033    else
33034      # Currently we do not define this for other toolchains. This might change as the need arise.
33035      TOOLCHAIN_VERSION=
33036    fi
33037  fi
33038
33039
33040  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33041  # override all other locations.
33042  if test "x$TOOLCHAIN_PATH" != x; then
33043    PATH=$TOOLCHAIN_PATH:$PATH
33044  fi
33045
33046
33047  #
33048  # Setup the compilers (CC and CXX)
33049  #
33050
33051  COMPILER_NAME=C
33052  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33053
33054  if test "x$CC" != x; then
33055    # User has supplied compiler name already, always let that override.
33056    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33057$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33058    if test "x`basename $CC`" = "x$CC"; then
33059      # A command without a complete path is provided, search $PATH.
33060
33061      for ac_prog in $CC
33062do
33063  # Extract the first word of "$ac_prog", so it can be a program name with args.
33064set dummy $ac_prog; ac_word=$2
33065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33066$as_echo_n "checking for $ac_word... " >&6; }
33067if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33068  $as_echo_n "(cached) " >&6
33069else
33070  case $POTENTIAL_CC in
33071  [\\/]* | ?:[\\/]*)
33072  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33073  ;;
33074  *)
33075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33076for as_dir in $PATH
33077do
33078  IFS=$as_save_IFS
33079  test -z "$as_dir" && as_dir=.
33080    for ac_exec_ext in '' $ac_executable_extensions; do
33081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33082    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33084    break 2
33085  fi
33086done
33087  done
33088IFS=$as_save_IFS
33089
33090  ;;
33091esac
33092fi
33093POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33094if test -n "$POTENTIAL_CC"; then
33095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33096$as_echo "$POTENTIAL_CC" >&6; }
33097else
33098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33099$as_echo "no" >&6; }
33100fi
33101
33102
33103  test -n "$POTENTIAL_CC" && break
33104done
33105
33106      if test "x$POTENTIAL_CC" != x; then
33107        CC=$POTENTIAL_CC
33108      else
33109        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33110      fi
33111    else
33112      # Otherwise it might already be a complete path
33113      if test ! -x "$CC"; then
33114        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33115      fi
33116    fi
33117  else
33118    # No user supplied value. Locate compiler ourselves.
33119
33120    # If we are cross compiling, assume cross compilation tools follows the
33121    # cross compilation standard where they are prefixed with the autoconf
33122    # standard name for the target. For example the binary
33123    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33124    # If we are not cross compiling, then the default compiler name will be
33125    # used.
33126
33127    CC=
33128    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33129    # before checking the rest of the PATH.
33130    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33131    # step, this should not be necessary.
33132    if test -n "$TOOLCHAIN_PATH"; then
33133      PATH_save="$PATH"
33134      PATH="$TOOLCHAIN_PATH"
33135      for ac_prog in $SEARCH_LIST
33136do
33137  # Extract the first word of "$ac_prog", so it can be a program name with args.
33138set dummy $ac_prog; ac_word=$2
33139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33140$as_echo_n "checking for $ac_word... " >&6; }
33141if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33142  $as_echo_n "(cached) " >&6
33143else
33144  case $TOOLCHAIN_PATH_CC in
33145  [\\/]* | ?:[\\/]*)
33146  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33147  ;;
33148  *)
33149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33150for as_dir in $PATH
33151do
33152  IFS=$as_save_IFS
33153  test -z "$as_dir" && as_dir=.
33154    for ac_exec_ext in '' $ac_executable_extensions; do
33155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33156    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33158    break 2
33159  fi
33160done
33161  done
33162IFS=$as_save_IFS
33163
33164  ;;
33165esac
33166fi
33167TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33168if test -n "$TOOLCHAIN_PATH_CC"; then
33169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33170$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33171else
33172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33173$as_echo "no" >&6; }
33174fi
33175
33176
33177  test -n "$TOOLCHAIN_PATH_CC" && break
33178done
33179
33180      CC=$TOOLCHAIN_PATH_CC
33181      PATH="$PATH_save"
33182    fi
33183
33184    # AC_PATH_PROGS can't be run multiple times with the same variable,
33185    # so create a new name for this run.
33186    if test "x$CC" = x; then
33187      for ac_prog in $SEARCH_LIST
33188do
33189  # Extract the first word of "$ac_prog", so it can be a program name with args.
33190set dummy $ac_prog; ac_word=$2
33191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33192$as_echo_n "checking for $ac_word... " >&6; }
33193if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33194  $as_echo_n "(cached) " >&6
33195else
33196  case $POTENTIAL_CC in
33197  [\\/]* | ?:[\\/]*)
33198  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33199  ;;
33200  *)
33201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33202for as_dir in $PATH
33203do
33204  IFS=$as_save_IFS
33205  test -z "$as_dir" && as_dir=.
33206    for ac_exec_ext in '' $ac_executable_extensions; do
33207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33208    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33210    break 2
33211  fi
33212done
33213  done
33214IFS=$as_save_IFS
33215
33216  ;;
33217esac
33218fi
33219POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33220if test -n "$POTENTIAL_CC"; then
33221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33222$as_echo "$POTENTIAL_CC" >&6; }
33223else
33224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33225$as_echo "no" >&6; }
33226fi
33227
33228
33229  test -n "$POTENTIAL_CC" && break
33230done
33231
33232      CC=$POTENTIAL_CC
33233    fi
33234
33235    if test "x$CC" = x; then
33236
33237  # Print a helpful message on how to acquire the necessary build dependency.
33238  # devkit is the help tag: freetype, cups, alsa etc
33239  MISSING_DEPENDENCY=devkit
33240
33241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33242    cygwin_help $MISSING_DEPENDENCY
33243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33244    msys_help $MISSING_DEPENDENCY
33245  else
33246    PKGHANDLER_COMMAND=
33247
33248    case $PKGHANDLER in
33249      apt-get)
33250        apt_help     $MISSING_DEPENDENCY ;;
33251      yum)
33252        yum_help     $MISSING_DEPENDENCY ;;
33253      brew)
33254        brew_help    $MISSING_DEPENDENCY ;;
33255      port)
33256        port_help    $MISSING_DEPENDENCY ;;
33257      pkgutil)
33258        pkgutil_help $MISSING_DEPENDENCY ;;
33259      pkgadd)
33260        pkgadd_help  $MISSING_DEPENDENCY ;;
33261    esac
33262
33263    if test "x$PKGHANDLER_COMMAND" != x; then
33264      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33265    fi
33266  fi
33267
33268      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33269    fi
33270  fi
33271
33272  # Now we have a compiler binary in CC. Make sure it's okay.
33273
33274  # Only process if variable expands to non-empty
33275
33276  if test "x$CC" != x; then
33277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33278
33279  # First separate the path from the arguments. This will split at the first
33280  # space.
33281  complete="$CC"
33282  path="${complete%% *}"
33283  tmp="$complete EOL"
33284  arguments="${tmp#* }"
33285
33286  # Input might be given as Windows format, start by converting to
33287  # unix format.
33288  new_path=`$CYGPATH -u "$path"`
33289
33290  # Now try to locate executable using which
33291  new_path=`$WHICH "$new_path" 2> /dev/null`
33292  # bat and cmd files are not always considered executable in cygwin causing which
33293  # to not find them
33294  if test "x$new_path" = x \
33295      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33296      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33297    new_path=`$CYGPATH -u "$path"`
33298  fi
33299  if test "x$new_path" = x; then
33300    # Oops. Which didn't find the executable.
33301    # The splitting of arguments from the executable at a space might have been incorrect,
33302    # since paths with space are more likely in Windows. Give it another try with the whole
33303    # argument.
33304    path="$complete"
33305    arguments="EOL"
33306    new_path=`$CYGPATH -u "$path"`
33307    new_path=`$WHICH "$new_path" 2> /dev/null`
33308    # bat and cmd files are not always considered executable in cygwin causing which
33309    # to not find them
33310    if test "x$new_path" = x \
33311        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33312        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33313      new_path=`$CYGPATH -u "$path"`
33314    fi
33315    if test "x$new_path" = x; then
33316      # It's still not found. Now this is an unrecoverable error.
33317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33318$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33319      has_space=`$ECHO "$complete" | $GREP " "`
33320      if test "x$has_space" != x; then
33321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33323      fi
33324      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33325    fi
33326  fi
33327
33328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33331  # "foo.exe" is OK but "foo" is an error.
33332  #
33333  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33334  # It is also a way to make sure we got the proper file name for the real test later on.
33335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33336  if test "x$test_shortpath" = x; then
33337    # Short path failed, file does not exist as specified.
33338    # Try adding .exe or .cmd
33339    if test -f "${new_path}.exe"; then
33340      input_to_shortpath="${new_path}.exe"
33341    elif test -f "${new_path}.cmd"; then
33342      input_to_shortpath="${new_path}.cmd"
33343    else
33344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33345$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33348      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33349    fi
33350  else
33351    input_to_shortpath="$new_path"
33352  fi
33353
33354  # Call helper function which possibly converts this using DOS-style short mode.
33355  # If so, the updated path is stored in $new_path.
33356  new_path="$input_to_shortpath"
33357
33358  input_path="$input_to_shortpath"
33359  # Check if we need to convert this using DOS-style short mode. If the path
33360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33361  # take no chances and rewrite it.
33362  # Note: m4 eats our [], so we need to use [ and ] instead.
33363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33364  if test "x$has_forbidden_chars" != x; then
33365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33369      # Going to short mode and back again did indeed matter. Since short mode is
33370      # case insensitive, let's make it lowercase to improve readability.
33371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33372      # Now convert it back to Unix-style (cygpath)
33373      input_path=`$CYGPATH -u "$shortmode_path"`
33374      new_path="$input_path"
33375    fi
33376  fi
33377
33378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33379  if test "x$test_cygdrive_prefix" = x; then
33380    # As a simple fix, exclude /usr/bin since it's not a real path.
33381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33383      # a path prefixed by /cygdrive for fixpath to work.
33384      new_path="$CYGWIN_ROOT_PATH$input_path"
33385    fi
33386  fi
33387
33388  # remove trailing .exe if any
33389  new_path="${new_path/%.exe/}"
33390
33391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33392
33393  # First separate the path from the arguments. This will split at the first
33394  # space.
33395  complete="$CC"
33396  path="${complete%% *}"
33397  tmp="$complete EOL"
33398  arguments="${tmp#* }"
33399
33400  # Input might be given as Windows format, start by converting to
33401  # unix format.
33402  new_path="$path"
33403
33404  windows_path="$new_path"
33405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33406    unix_path=`$CYGPATH -u "$windows_path"`
33407    new_path="$unix_path"
33408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33410    new_path="$unix_path"
33411  fi
33412
33413
33414  # Now try to locate executable using which
33415  new_path=`$WHICH "$new_path" 2> /dev/null`
33416
33417  if test "x$new_path" = x; then
33418    # Oops. Which didn't find the executable.
33419    # The splitting of arguments from the executable at a space might have been incorrect,
33420    # since paths with space are more likely in Windows. Give it another try with the whole
33421    # argument.
33422    path="$complete"
33423    arguments="EOL"
33424    new_path="$path"
33425
33426  windows_path="$new_path"
33427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33428    unix_path=`$CYGPATH -u "$windows_path"`
33429    new_path="$unix_path"
33430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33432    new_path="$unix_path"
33433  fi
33434
33435
33436    new_path=`$WHICH "$new_path" 2> /dev/null`
33437    # bat and cmd files are not always considered executable in MSYS causing which
33438    # to not find them
33439    if test "x$new_path" = x \
33440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33442      new_path="$path"
33443
33444  windows_path="$new_path"
33445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33446    unix_path=`$CYGPATH -u "$windows_path"`
33447    new_path="$unix_path"
33448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33450    new_path="$unix_path"
33451  fi
33452
33453    fi
33454
33455    if test "x$new_path" = x; then
33456      # It's still not found. Now this is an unrecoverable error.
33457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33458$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33459      has_space=`$ECHO "$complete" | $GREP " "`
33460      if test "x$has_space" != x; then
33461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33463      fi
33464      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33465    fi
33466  fi
33467
33468  # Now new_path has a complete unix path to the binary
33469  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33470    # Keep paths in /bin as-is, but remove trailing .exe if any
33471    new_path="${new_path/%.exe/}"
33472    # Do not save /bin paths to all_fixpath_prefixes!
33473  else
33474    # Not in mixed or Windows style, start by that.
33475    new_path=`cmd //c echo $new_path`
33476
33477  input_path="$new_path"
33478  # Check if we need to convert this using DOS-style short mode. If the path
33479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33480  # take no chances and rewrite it.
33481  # Note: m4 eats our [], so we need to use [ and ] instead.
33482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33483  if test "x$has_forbidden_chars" != x; then
33484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33486  fi
33487
33488    # Output is in $new_path
33489
33490  windows_path="$new_path"
33491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33492    unix_path=`$CYGPATH -u "$windows_path"`
33493    new_path="$unix_path"
33494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33496    new_path="$unix_path"
33497  fi
33498
33499    # remove trailing .exe if any
33500    new_path="${new_path/%.exe/}"
33501
33502    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33503    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33504  fi
33505
33506    else
33507      # We're on a unix platform. Hooray! :)
33508      # First separate the path from the arguments. This will split at the first
33509      # space.
33510      complete="$CC"
33511      path="${complete%% *}"
33512      tmp="$complete EOL"
33513      arguments="${tmp#* }"
33514
33515      # Cannot rely on the command "which" here since it doesn't always work.
33516      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33517      if test -z "$is_absolute_path"; then
33518        # Path to executable is not absolute. Find it.
33519        IFS_save="$IFS"
33520        IFS=:
33521        for p in $PATH; do
33522          if test -f "$p/$path" && test -x "$p/$path"; then
33523            new_path="$p/$path"
33524            break
33525          fi
33526        done
33527        IFS="$IFS_save"
33528      else
33529        # This is an absolute path, we can use it without further modifications.
33530        new_path="$path"
33531      fi
33532
33533      if test "x$new_path" = x; then
33534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33535$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33536        has_space=`$ECHO "$complete" | $GREP " "`
33537        if test "x$has_space" != x; then
33538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33540        fi
33541        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33542      fi
33543    fi
33544
33545    # Now join together the path and the arguments once again
33546    if test "x$arguments" != xEOL; then
33547      new_complete="$new_path ${arguments% *}"
33548    else
33549      new_complete="$new_path"
33550    fi
33551
33552    if test "x$complete" != "x$new_complete"; then
33553      CC="$new_complete"
33554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33555$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33556    fi
33557  fi
33558
33559  TEST_COMPILER="$CC"
33560
33561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33562$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33563  SYMLINK_ORIGINAL="$TEST_COMPILER"
33564
33565  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33566    # Follow a chain of symbolic links. Use readlink
33567    # where it exists, else fall back to horribly
33568    # complicated shell code.
33569    if test "x$READLINK_TESTED" != yes; then
33570      # On MacOSX there is a readlink tool with a different
33571      # purpose than the GNU readlink tool. Check the found readlink.
33572      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33573      if test "x$ISGNU" = x; then
33574        # A readlink that we do not know how to use.
33575        # Are there other non-GNU readlinks out there?
33576        READLINK_TESTED=yes
33577        READLINK=
33578      fi
33579    fi
33580
33581    if test "x$READLINK" != x; then
33582      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33583    else
33584      # Save the current directory for restoring afterwards
33585      STARTDIR=$PWD
33586      COUNTER=0
33587      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33588      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33589      cd $sym_link_dir
33590      # Use -P flag to resolve symlinks in directories.
33591      cd `$THEPWDCMD -P`
33592      sym_link_dir=`$THEPWDCMD -P`
33593      # Resolve file symlinks
33594      while test $COUNTER -lt 20; do
33595        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33596        if test "x$ISLINK" == x; then
33597          # This is not a symbolic link! We are done!
33598          break
33599        fi
33600        # Again resolve directory symlinks since the target of the just found
33601        # link could be in a different directory
33602        cd `$DIRNAME $ISLINK`
33603        sym_link_dir=`$THEPWDCMD -P`
33604        sym_link_file=`$BASENAME $ISLINK`
33605        let COUNTER=COUNTER+1
33606      done
33607      cd $STARTDIR
33608      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33609    fi
33610  fi
33611
33612  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33614$as_echo "no symlink" >&6; }
33615  else
33616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33617$as_echo "$SYMLINK_ORIGINAL" >&6; }
33618
33619    # We can't handle ccache by gcc wrappers, since we need to know if we're
33620    # using ccache. Instead ccache usage must be controlled by a configure option.
33621    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33622    if test "x$COMPILER_BASENAME" = "xccache"; then
33623      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33624$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33625      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33626    fi
33627  fi
33628
33629
33630  COMPILER=$CC
33631  COMPILER_NAME=$COMPILER_NAME
33632
33633  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33634    # cc -V output typically looks like
33635    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33636    # or
33637    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33638    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33639    # Check that this is likely to be the Solaris Studio cc.
33640    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33641    if test $? -ne 0; then
33642      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33643      { $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
33644$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33645      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33646$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33648$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33649      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33650    fi
33651    # Remove usage instructions (if present), and
33652    # collapse compiler output into a single line
33653    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33654        $SED -e 's/ *[Uu]sage:.*//'`
33655    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33656        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33657  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33658    # xlc -qversion output typically looks like
33659    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33660    #     Version: 11.01.0000.0015
33661    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33662    # Check that this is likely to be the IBM XL C compiler.
33663    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33664    if test $? -ne 0; then
33665      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33666      { $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
33667$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33668      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33669$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33670      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33671$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33672      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33673    fi
33674    # Collapse compiler output into a single line
33675    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33676    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33677        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33678  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33679    # There is no specific version flag, but all output starts with a version string.
33680    # First line typically looks something like:
33681    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33682    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33683    # Check that this is likely to be Microsoft CL.EXE.
33684    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33685    if test $? -ne 0; then
33686      { $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
33687$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33688      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33689$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33690      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33691    fi
33692    # Collapse compiler output into a single line
33693    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33694    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33695        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33696  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33697    # gcc --version output typically looks like
33698    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33699    #     Copyright (C) 2013 Free Software Foundation, Inc.
33700    #     This is free software; see the source for copying conditions.  There is NO
33701    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33702    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33703    # Check that this is likely to be GCC.
33704    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33705    if test $? -ne 0; then
33706      { $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
33707$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33708      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33709$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33710      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33711    fi
33712    # Remove Copyright and legalese from version string, and
33713    # collapse into a single line
33714    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33715        $SED -e 's/ *Copyright .*//'`
33716    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33717        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33718  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33719    # clang --version output typically looks like
33720    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33721    #    clang version 3.3 (tags/RELEASE_33/final)
33722    # or
33723    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33724    #    Target: x86_64-pc-linux-gnu
33725    #    Thread model: posix
33726    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33727    # Check that this is likely to be clang
33728    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33729    if test $? -ne 0; then
33730      { $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
33731$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33732      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33733$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33734      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33735    fi
33736    # Collapse compiler output into a single line
33737    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33738    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33739        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33740  else
33741      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33742  fi
33743  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33744  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33745  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33746  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33747
33748  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33749$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33750
33751
33752  # Now that we have resolved CC ourself, let autoconf have its go at it
33753  ac_ext=c
33754ac_cpp='$CPP $CPPFLAGS'
33755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33757ac_compiler_gnu=$ac_cv_c_compiler_gnu
33758if test -n "$ac_tool_prefix"; then
33759  for ac_prog in $CC
33760  do
33761    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33762set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33764$as_echo_n "checking for $ac_word... " >&6; }
33765if ${ac_cv_prog_CC+:} false; then :
33766  $as_echo_n "(cached) " >&6
33767else
33768  if test -n "$CC"; then
33769  ac_cv_prog_CC="$CC" # Let the user override the test.
33770else
33771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33772for as_dir in $PATH
33773do
33774  IFS=$as_save_IFS
33775  test -z "$as_dir" && as_dir=.
33776    for ac_exec_ext in '' $ac_executable_extensions; do
33777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33778    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33780    break 2
33781  fi
33782done
33783  done
33784IFS=$as_save_IFS
33785
33786fi
33787fi
33788CC=$ac_cv_prog_CC
33789if test -n "$CC"; then
33790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33791$as_echo "$CC" >&6; }
33792else
33793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33794$as_echo "no" >&6; }
33795fi
33796
33797
33798    test -n "$CC" && break
33799  done
33800fi
33801if test -z "$CC"; then
33802  ac_ct_CC=$CC
33803  for ac_prog in $CC
33804do
33805  # Extract the first word of "$ac_prog", so it can be a program name with args.
33806set dummy $ac_prog; ac_word=$2
33807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33808$as_echo_n "checking for $ac_word... " >&6; }
33809if ${ac_cv_prog_ac_ct_CC+:} false; then :
33810  $as_echo_n "(cached) " >&6
33811else
33812  if test -n "$ac_ct_CC"; then
33813  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33814else
33815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33816for as_dir in $PATH
33817do
33818  IFS=$as_save_IFS
33819  test -z "$as_dir" && as_dir=.
33820    for ac_exec_ext in '' $ac_executable_extensions; do
33821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33822    ac_cv_prog_ac_ct_CC="$ac_prog"
33823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33824    break 2
33825  fi
33826done
33827  done
33828IFS=$as_save_IFS
33829
33830fi
33831fi
33832ac_ct_CC=$ac_cv_prog_ac_ct_CC
33833if test -n "$ac_ct_CC"; then
33834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33835$as_echo "$ac_ct_CC" >&6; }
33836else
33837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33838$as_echo "no" >&6; }
33839fi
33840
33841
33842  test -n "$ac_ct_CC" && break
33843done
33844
33845  if test "x$ac_ct_CC" = x; then
33846    CC=""
33847  else
33848    case $cross_compiling:$ac_tool_warned in
33849yes:)
33850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33852ac_tool_warned=yes ;;
33853esac
33854    CC=$ac_ct_CC
33855  fi
33856fi
33857
33858
33859test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33861as_fn_error $? "no acceptable C compiler found in \$PATH
33862See \`config.log' for more details" "$LINENO" 5; }
33863
33864# Provide some information about the compiler.
33865$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33866set X $ac_compile
33867ac_compiler=$2
33868for ac_option in --version -v -V -qversion; do
33869  { { ac_try="$ac_compiler $ac_option >&5"
33870case "(($ac_try" in
33871  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33872  *) ac_try_echo=$ac_try;;
33873esac
33874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33875$as_echo "$ac_try_echo"; } >&5
33876  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33877  ac_status=$?
33878  if test -s conftest.err; then
33879    sed '10a\
33880... rest of stderr output deleted ...
33881         10q' conftest.err >conftest.er1
33882    cat conftest.er1 >&5
33883  fi
33884  rm -f conftest.er1 conftest.err
33885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33886  test $ac_status = 0; }
33887done
33888
33889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33890/* end confdefs.h.  */
33891
33892int
33893main ()
33894{
33895
33896  ;
33897  return 0;
33898}
33899_ACEOF
33900ac_clean_files_save=$ac_clean_files
33901ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33902# Try to create an executable without -o first, disregard a.out.
33903# It will help us diagnose broken compilers, and finding out an intuition
33904# of exeext.
33905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33906$as_echo_n "checking whether the C compiler works... " >&6; }
33907ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33908
33909# The possible output files:
33910ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33911
33912ac_rmfiles=
33913for ac_file in $ac_files
33914do
33915  case $ac_file in
33916    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33917    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33918  esac
33919done
33920rm -f $ac_rmfiles
33921
33922if { { ac_try="$ac_link_default"
33923case "(($ac_try" in
33924  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33925  *) ac_try_echo=$ac_try;;
33926esac
33927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33928$as_echo "$ac_try_echo"; } >&5
33929  (eval "$ac_link_default") 2>&5
33930  ac_status=$?
33931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33932  test $ac_status = 0; }; then :
33933  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33934# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33935# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33936# so that the user can short-circuit this test for compilers unknown to
33937# Autoconf.
33938for ac_file in $ac_files ''
33939do
33940  test -f "$ac_file" || continue
33941  case $ac_file in
33942    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33943	;;
33944    [ab].out )
33945	# We found the default executable, but exeext='' is most
33946	# certainly right.
33947	break;;
33948    *.* )
33949	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33950	then :; else
33951	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33952	fi
33953	# We set ac_cv_exeext here because the later test for it is not
33954	# safe: cross compilers may not add the suffix if given an `-o'
33955	# argument, so we may need to know it at that point already.
33956	# Even if this section looks crufty: it has the advantage of
33957	# actually working.
33958	break;;
33959    * )
33960	break;;
33961  esac
33962done
33963test "$ac_cv_exeext" = no && ac_cv_exeext=
33964
33965else
33966  ac_file=''
33967fi
33968if test -z "$ac_file"; then :
33969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33970$as_echo "no" >&6; }
33971$as_echo "$as_me: failed program was:" >&5
33972sed 's/^/| /' conftest.$ac_ext >&5
33973
33974{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33976as_fn_error 77 "C compiler cannot create executables
33977See \`config.log' for more details" "$LINENO" 5; }
33978else
33979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33980$as_echo "yes" >&6; }
33981fi
33982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33983$as_echo_n "checking for C compiler default output file name... " >&6; }
33984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33985$as_echo "$ac_file" >&6; }
33986ac_exeext=$ac_cv_exeext
33987
33988rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33989ac_clean_files=$ac_clean_files_save
33990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33991$as_echo_n "checking for suffix of executables... " >&6; }
33992if { { ac_try="$ac_link"
33993case "(($ac_try" in
33994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33995  *) ac_try_echo=$ac_try;;
33996esac
33997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33998$as_echo "$ac_try_echo"; } >&5
33999  (eval "$ac_link") 2>&5
34000  ac_status=$?
34001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34002  test $ac_status = 0; }; then :
34003  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34004# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34005# work properly (i.e., refer to `conftest.exe'), while it won't with
34006# `rm'.
34007for ac_file in conftest.exe conftest conftest.*; do
34008  test -f "$ac_file" || continue
34009  case $ac_file in
34010    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34011    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34012	  break;;
34013    * ) break;;
34014  esac
34015done
34016else
34017  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34019as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34020See \`config.log' for more details" "$LINENO" 5; }
34021fi
34022rm -f conftest conftest$ac_cv_exeext
34023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34024$as_echo "$ac_cv_exeext" >&6; }
34025
34026rm -f conftest.$ac_ext
34027EXEEXT=$ac_cv_exeext
34028ac_exeext=$EXEEXT
34029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34030/* end confdefs.h.  */
34031#include <stdio.h>
34032int
34033main ()
34034{
34035FILE *f = fopen ("conftest.out", "w");
34036 return ferror (f) || fclose (f) != 0;
34037
34038  ;
34039  return 0;
34040}
34041_ACEOF
34042ac_clean_files="$ac_clean_files conftest.out"
34043# Check that the compiler produces executables we can run.  If not, either
34044# the compiler is broken, or we cross compile.
34045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34046$as_echo_n "checking whether we are cross compiling... " >&6; }
34047if test "$cross_compiling" != yes; then
34048  { { ac_try="$ac_link"
34049case "(($ac_try" in
34050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34051  *) ac_try_echo=$ac_try;;
34052esac
34053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34054$as_echo "$ac_try_echo"; } >&5
34055  (eval "$ac_link") 2>&5
34056  ac_status=$?
34057  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34058  test $ac_status = 0; }
34059  if { ac_try='./conftest$ac_cv_exeext'
34060  { { case "(($ac_try" in
34061  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34062  *) ac_try_echo=$ac_try;;
34063esac
34064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34065$as_echo "$ac_try_echo"; } >&5
34066  (eval "$ac_try") 2>&5
34067  ac_status=$?
34068  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34069  test $ac_status = 0; }; }; then
34070    cross_compiling=no
34071  else
34072    if test "$cross_compiling" = maybe; then
34073	cross_compiling=yes
34074    else
34075	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34077as_fn_error $? "cannot run C compiled programs.
34078If you meant to cross compile, use \`--host'.
34079See \`config.log' for more details" "$LINENO" 5; }
34080    fi
34081  fi
34082fi
34083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34084$as_echo "$cross_compiling" >&6; }
34085
34086rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34087ac_clean_files=$ac_clean_files_save
34088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34089$as_echo_n "checking for suffix of object files... " >&6; }
34090if ${ac_cv_objext+:} false; then :
34091  $as_echo_n "(cached) " >&6
34092else
34093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34094/* end confdefs.h.  */
34095
34096int
34097main ()
34098{
34099
34100  ;
34101  return 0;
34102}
34103_ACEOF
34104rm -f conftest.o conftest.obj
34105if { { ac_try="$ac_compile"
34106case "(($ac_try" in
34107  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34108  *) ac_try_echo=$ac_try;;
34109esac
34110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34111$as_echo "$ac_try_echo"; } >&5
34112  (eval "$ac_compile") 2>&5
34113  ac_status=$?
34114  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34115  test $ac_status = 0; }; then :
34116  for ac_file in conftest.o conftest.obj conftest.*; do
34117  test -f "$ac_file" || continue;
34118  case $ac_file in
34119    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34120    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34121       break;;
34122  esac
34123done
34124else
34125  $as_echo "$as_me: failed program was:" >&5
34126sed 's/^/| /' conftest.$ac_ext >&5
34127
34128{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34130as_fn_error $? "cannot compute suffix of object files: cannot compile
34131See \`config.log' for more details" "$LINENO" 5; }
34132fi
34133rm -f conftest.$ac_cv_objext conftest.$ac_ext
34134fi
34135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34136$as_echo "$ac_cv_objext" >&6; }
34137OBJEXT=$ac_cv_objext
34138ac_objext=$OBJEXT
34139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34140$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34141if ${ac_cv_c_compiler_gnu+:} false; then :
34142  $as_echo_n "(cached) " >&6
34143else
34144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34145/* end confdefs.h.  */
34146
34147int
34148main ()
34149{
34150#ifndef __GNUC__
34151       choke me
34152#endif
34153
34154  ;
34155  return 0;
34156}
34157_ACEOF
34158if ac_fn_c_try_compile "$LINENO"; then :
34159  ac_compiler_gnu=yes
34160else
34161  ac_compiler_gnu=no
34162fi
34163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34164ac_cv_c_compiler_gnu=$ac_compiler_gnu
34165
34166fi
34167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34168$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34169if test $ac_compiler_gnu = yes; then
34170  GCC=yes
34171else
34172  GCC=
34173fi
34174ac_test_CFLAGS=${CFLAGS+set}
34175ac_save_CFLAGS=$CFLAGS
34176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34177$as_echo_n "checking whether $CC accepts -g... " >&6; }
34178if ${ac_cv_prog_cc_g+:} false; then :
34179  $as_echo_n "(cached) " >&6
34180else
34181  ac_save_c_werror_flag=$ac_c_werror_flag
34182   ac_c_werror_flag=yes
34183   ac_cv_prog_cc_g=no
34184   CFLAGS="-g"
34185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34186/* end confdefs.h.  */
34187
34188int
34189main ()
34190{
34191
34192  ;
34193  return 0;
34194}
34195_ACEOF
34196if ac_fn_c_try_compile "$LINENO"; then :
34197  ac_cv_prog_cc_g=yes
34198else
34199  CFLAGS=""
34200      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34201/* end confdefs.h.  */
34202
34203int
34204main ()
34205{
34206
34207  ;
34208  return 0;
34209}
34210_ACEOF
34211if ac_fn_c_try_compile "$LINENO"; then :
34212
34213else
34214  ac_c_werror_flag=$ac_save_c_werror_flag
34215	 CFLAGS="-g"
34216	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34217/* end confdefs.h.  */
34218
34219int
34220main ()
34221{
34222
34223  ;
34224  return 0;
34225}
34226_ACEOF
34227if ac_fn_c_try_compile "$LINENO"; then :
34228  ac_cv_prog_cc_g=yes
34229fi
34230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34231fi
34232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34233fi
34234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34235   ac_c_werror_flag=$ac_save_c_werror_flag
34236fi
34237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34238$as_echo "$ac_cv_prog_cc_g" >&6; }
34239if test "$ac_test_CFLAGS" = set; then
34240  CFLAGS=$ac_save_CFLAGS
34241elif test $ac_cv_prog_cc_g = yes; then
34242  if test "$GCC" = yes; then
34243    CFLAGS="-g -O2"
34244  else
34245    CFLAGS="-g"
34246  fi
34247else
34248  if test "$GCC" = yes; then
34249    CFLAGS="-O2"
34250  else
34251    CFLAGS=
34252  fi
34253fi
34254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34255$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34256if ${ac_cv_prog_cc_c89+:} false; then :
34257  $as_echo_n "(cached) " >&6
34258else
34259  ac_cv_prog_cc_c89=no
34260ac_save_CC=$CC
34261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34262/* end confdefs.h.  */
34263#include <stdarg.h>
34264#include <stdio.h>
34265struct stat;
34266/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34267struct buf { int x; };
34268FILE * (*rcsopen) (struct buf *, struct stat *, int);
34269static char *e (p, i)
34270     char **p;
34271     int i;
34272{
34273  return p[i];
34274}
34275static char *f (char * (*g) (char **, int), char **p, ...)
34276{
34277  char *s;
34278  va_list v;
34279  va_start (v,p);
34280  s = g (p, va_arg (v,int));
34281  va_end (v);
34282  return s;
34283}
34284
34285/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34286   function prototypes and stuff, but not '\xHH' hex character constants.
34287   These don't provoke an error unfortunately, instead are silently treated
34288   as 'x'.  The following induces an error, until -std is added to get
34289   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34290   array size at least.  It's necessary to write '\x00'==0 to get something
34291   that's true only with -std.  */
34292int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34293
34294/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34295   inside strings and character constants.  */
34296#define FOO(x) 'x'
34297int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34298
34299int test (int i, double x);
34300struct s1 {int (*f) (int a);};
34301struct s2 {int (*f) (double a);};
34302int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34303int argc;
34304char **argv;
34305int
34306main ()
34307{
34308return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34309  ;
34310  return 0;
34311}
34312_ACEOF
34313for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34314	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34315do
34316  CC="$ac_save_CC $ac_arg"
34317  if ac_fn_c_try_compile "$LINENO"; then :
34318  ac_cv_prog_cc_c89=$ac_arg
34319fi
34320rm -f core conftest.err conftest.$ac_objext
34321  test "x$ac_cv_prog_cc_c89" != "xno" && break
34322done
34323rm -f conftest.$ac_ext
34324CC=$ac_save_CC
34325
34326fi
34327# AC_CACHE_VAL
34328case "x$ac_cv_prog_cc_c89" in
34329  x)
34330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34331$as_echo "none needed" >&6; } ;;
34332  xno)
34333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34334$as_echo "unsupported" >&6; } ;;
34335  *)
34336    CC="$CC $ac_cv_prog_cc_c89"
34337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34338$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34339esac
34340if test "x$ac_cv_prog_cc_c89" != xno; then :
34341
34342fi
34343
34344ac_ext=cpp
34345ac_cpp='$CXXCPP $CPPFLAGS'
34346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34349
34350
34351
34352  COMPILER_NAME=C++
34353  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34354
34355  if test "x$CXX" != x; then
34356    # User has supplied compiler name already, always let that override.
34357    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34358$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34359    if test "x`basename $CXX`" = "x$CXX"; then
34360      # A command without a complete path is provided, search $PATH.
34361
34362      for ac_prog in $CXX
34363do
34364  # Extract the first word of "$ac_prog", so it can be a program name with args.
34365set dummy $ac_prog; ac_word=$2
34366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34367$as_echo_n "checking for $ac_word... " >&6; }
34368if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34369  $as_echo_n "(cached) " >&6
34370else
34371  case $POTENTIAL_CXX in
34372  [\\/]* | ?:[\\/]*)
34373  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34374  ;;
34375  *)
34376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34377for as_dir in $PATH
34378do
34379  IFS=$as_save_IFS
34380  test -z "$as_dir" && as_dir=.
34381    for ac_exec_ext in '' $ac_executable_extensions; do
34382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34383    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34385    break 2
34386  fi
34387done
34388  done
34389IFS=$as_save_IFS
34390
34391  ;;
34392esac
34393fi
34394POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34395if test -n "$POTENTIAL_CXX"; then
34396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34397$as_echo "$POTENTIAL_CXX" >&6; }
34398else
34399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34400$as_echo "no" >&6; }
34401fi
34402
34403
34404  test -n "$POTENTIAL_CXX" && break
34405done
34406
34407      if test "x$POTENTIAL_CXX" != x; then
34408        CXX=$POTENTIAL_CXX
34409      else
34410        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34411      fi
34412    else
34413      # Otherwise it might already be a complete path
34414      if test ! -x "$CXX"; then
34415        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34416      fi
34417    fi
34418  else
34419    # No user supplied value. Locate compiler ourselves.
34420
34421    # If we are cross compiling, assume cross compilation tools follows the
34422    # cross compilation standard where they are prefixed with the autoconf
34423    # standard name for the target. For example the binary
34424    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34425    # If we are not cross compiling, then the default compiler name will be
34426    # used.
34427
34428    CXX=
34429    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34430    # before checking the rest of the PATH.
34431    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34432    # step, this should not be necessary.
34433    if test -n "$TOOLCHAIN_PATH"; then
34434      PATH_save="$PATH"
34435      PATH="$TOOLCHAIN_PATH"
34436      for ac_prog in $SEARCH_LIST
34437do
34438  # Extract the first word of "$ac_prog", so it can be a program name with args.
34439set dummy $ac_prog; ac_word=$2
34440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34441$as_echo_n "checking for $ac_word... " >&6; }
34442if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34443  $as_echo_n "(cached) " >&6
34444else
34445  case $TOOLCHAIN_PATH_CXX in
34446  [\\/]* | ?:[\\/]*)
34447  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34448  ;;
34449  *)
34450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34451for as_dir in $PATH
34452do
34453  IFS=$as_save_IFS
34454  test -z "$as_dir" && as_dir=.
34455    for ac_exec_ext in '' $ac_executable_extensions; do
34456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34457    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34459    break 2
34460  fi
34461done
34462  done
34463IFS=$as_save_IFS
34464
34465  ;;
34466esac
34467fi
34468TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34469if test -n "$TOOLCHAIN_PATH_CXX"; then
34470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34471$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34472else
34473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34474$as_echo "no" >&6; }
34475fi
34476
34477
34478  test -n "$TOOLCHAIN_PATH_CXX" && break
34479done
34480
34481      CXX=$TOOLCHAIN_PATH_CXX
34482      PATH="$PATH_save"
34483    fi
34484
34485    # AC_PATH_PROGS can't be run multiple times with the same variable,
34486    # so create a new name for this run.
34487    if test "x$CXX" = x; then
34488      for ac_prog in $SEARCH_LIST
34489do
34490  # Extract the first word of "$ac_prog", so it can be a program name with args.
34491set dummy $ac_prog; ac_word=$2
34492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34493$as_echo_n "checking for $ac_word... " >&6; }
34494if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34495  $as_echo_n "(cached) " >&6
34496else
34497  case $POTENTIAL_CXX in
34498  [\\/]* | ?:[\\/]*)
34499  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34500  ;;
34501  *)
34502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34503for as_dir in $PATH
34504do
34505  IFS=$as_save_IFS
34506  test -z "$as_dir" && as_dir=.
34507    for ac_exec_ext in '' $ac_executable_extensions; do
34508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34509    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34511    break 2
34512  fi
34513done
34514  done
34515IFS=$as_save_IFS
34516
34517  ;;
34518esac
34519fi
34520POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34521if test -n "$POTENTIAL_CXX"; then
34522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34523$as_echo "$POTENTIAL_CXX" >&6; }
34524else
34525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34526$as_echo "no" >&6; }
34527fi
34528
34529
34530  test -n "$POTENTIAL_CXX" && break
34531done
34532
34533      CXX=$POTENTIAL_CXX
34534    fi
34535
34536    if test "x$CXX" = x; then
34537
34538  # Print a helpful message on how to acquire the necessary build dependency.
34539  # devkit is the help tag: freetype, cups, alsa etc
34540  MISSING_DEPENDENCY=devkit
34541
34542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34543    cygwin_help $MISSING_DEPENDENCY
34544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34545    msys_help $MISSING_DEPENDENCY
34546  else
34547    PKGHANDLER_COMMAND=
34548
34549    case $PKGHANDLER in
34550      apt-get)
34551        apt_help     $MISSING_DEPENDENCY ;;
34552      yum)
34553        yum_help     $MISSING_DEPENDENCY ;;
34554      brew)
34555        brew_help    $MISSING_DEPENDENCY ;;
34556      port)
34557        port_help    $MISSING_DEPENDENCY ;;
34558      pkgutil)
34559        pkgutil_help $MISSING_DEPENDENCY ;;
34560      pkgadd)
34561        pkgadd_help  $MISSING_DEPENDENCY ;;
34562    esac
34563
34564    if test "x$PKGHANDLER_COMMAND" != x; then
34565      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34566    fi
34567  fi
34568
34569      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34570    fi
34571  fi
34572
34573  # Now we have a compiler binary in CXX. Make sure it's okay.
34574
34575  # Only process if variable expands to non-empty
34576
34577  if test "x$CXX" != x; then
34578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34579
34580  # First separate the path from the arguments. This will split at the first
34581  # space.
34582  complete="$CXX"
34583  path="${complete%% *}"
34584  tmp="$complete EOL"
34585  arguments="${tmp#* }"
34586
34587  # Input might be given as Windows format, start by converting to
34588  # unix format.
34589  new_path=`$CYGPATH -u "$path"`
34590
34591  # Now try to locate executable using which
34592  new_path=`$WHICH "$new_path" 2> /dev/null`
34593  # bat and cmd files are not always considered executable in cygwin causing which
34594  # to not find them
34595  if test "x$new_path" = x \
34596      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34597      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34598    new_path=`$CYGPATH -u "$path"`
34599  fi
34600  if test "x$new_path" = x; then
34601    # Oops. Which didn't find the executable.
34602    # The splitting of arguments from the executable at a space might have been incorrect,
34603    # since paths with space are more likely in Windows. Give it another try with the whole
34604    # argument.
34605    path="$complete"
34606    arguments="EOL"
34607    new_path=`$CYGPATH -u "$path"`
34608    new_path=`$WHICH "$new_path" 2> /dev/null`
34609    # bat and cmd files are not always considered executable in cygwin causing which
34610    # to not find them
34611    if test "x$new_path" = x \
34612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34614      new_path=`$CYGPATH -u "$path"`
34615    fi
34616    if test "x$new_path" = x; then
34617      # It's still not found. Now this is an unrecoverable error.
34618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34619$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34620      has_space=`$ECHO "$complete" | $GREP " "`
34621      if test "x$has_space" != x; then
34622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34624      fi
34625      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34626    fi
34627  fi
34628
34629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34632  # "foo.exe" is OK but "foo" is an error.
34633  #
34634  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34635  # It is also a way to make sure we got the proper file name for the real test later on.
34636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34637  if test "x$test_shortpath" = x; then
34638    # Short path failed, file does not exist as specified.
34639    # Try adding .exe or .cmd
34640    if test -f "${new_path}.exe"; then
34641      input_to_shortpath="${new_path}.exe"
34642    elif test -f "${new_path}.cmd"; then
34643      input_to_shortpath="${new_path}.cmd"
34644    else
34645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34646$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34649      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34650    fi
34651  else
34652    input_to_shortpath="$new_path"
34653  fi
34654
34655  # Call helper function which possibly converts this using DOS-style short mode.
34656  # If so, the updated path is stored in $new_path.
34657  new_path="$input_to_shortpath"
34658
34659  input_path="$input_to_shortpath"
34660  # Check if we need to convert this using DOS-style short mode. If the path
34661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34662  # take no chances and rewrite it.
34663  # Note: m4 eats our [], so we need to use [ and ] instead.
34664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34665  if test "x$has_forbidden_chars" != x; then
34666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34670      # Going to short mode and back again did indeed matter. Since short mode is
34671      # case insensitive, let's make it lowercase to improve readability.
34672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34673      # Now convert it back to Unix-style (cygpath)
34674      input_path=`$CYGPATH -u "$shortmode_path"`
34675      new_path="$input_path"
34676    fi
34677  fi
34678
34679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34680  if test "x$test_cygdrive_prefix" = x; then
34681    # As a simple fix, exclude /usr/bin since it's not a real path.
34682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34684      # a path prefixed by /cygdrive for fixpath to work.
34685      new_path="$CYGWIN_ROOT_PATH$input_path"
34686    fi
34687  fi
34688
34689  # remove trailing .exe if any
34690  new_path="${new_path/%.exe/}"
34691
34692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34693
34694  # First separate the path from the arguments. This will split at the first
34695  # space.
34696  complete="$CXX"
34697  path="${complete%% *}"
34698  tmp="$complete EOL"
34699  arguments="${tmp#* }"
34700
34701  # Input might be given as Windows format, start by converting to
34702  # unix format.
34703  new_path="$path"
34704
34705  windows_path="$new_path"
34706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34707    unix_path=`$CYGPATH -u "$windows_path"`
34708    new_path="$unix_path"
34709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34711    new_path="$unix_path"
34712  fi
34713
34714
34715  # Now try to locate executable using which
34716  new_path=`$WHICH "$new_path" 2> /dev/null`
34717
34718  if test "x$new_path" = x; then
34719    # Oops. Which didn't find the executable.
34720    # The splitting of arguments from the executable at a space might have been incorrect,
34721    # since paths with space are more likely in Windows. Give it another try with the whole
34722    # argument.
34723    path="$complete"
34724    arguments="EOL"
34725    new_path="$path"
34726
34727  windows_path="$new_path"
34728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34729    unix_path=`$CYGPATH -u "$windows_path"`
34730    new_path="$unix_path"
34731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34733    new_path="$unix_path"
34734  fi
34735
34736
34737    new_path=`$WHICH "$new_path" 2> /dev/null`
34738    # bat and cmd files are not always considered executable in MSYS causing which
34739    # to not find them
34740    if test "x$new_path" = x \
34741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34743      new_path="$path"
34744
34745  windows_path="$new_path"
34746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34747    unix_path=`$CYGPATH -u "$windows_path"`
34748    new_path="$unix_path"
34749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34751    new_path="$unix_path"
34752  fi
34753
34754    fi
34755
34756    if test "x$new_path" = x; then
34757      # It's still not found. Now this is an unrecoverable error.
34758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34759$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34760      has_space=`$ECHO "$complete" | $GREP " "`
34761      if test "x$has_space" != x; then
34762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34764      fi
34765      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34766    fi
34767  fi
34768
34769  # Now new_path has a complete unix path to the binary
34770  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34771    # Keep paths in /bin as-is, but remove trailing .exe if any
34772    new_path="${new_path/%.exe/}"
34773    # Do not save /bin paths to all_fixpath_prefixes!
34774  else
34775    # Not in mixed or Windows style, start by that.
34776    new_path=`cmd //c echo $new_path`
34777
34778  input_path="$new_path"
34779  # Check if we need to convert this using DOS-style short mode. If the path
34780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34781  # take no chances and rewrite it.
34782  # Note: m4 eats our [], so we need to use [ and ] instead.
34783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34784  if test "x$has_forbidden_chars" != x; then
34785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34787  fi
34788
34789    # Output is in $new_path
34790
34791  windows_path="$new_path"
34792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34793    unix_path=`$CYGPATH -u "$windows_path"`
34794    new_path="$unix_path"
34795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34797    new_path="$unix_path"
34798  fi
34799
34800    # remove trailing .exe if any
34801    new_path="${new_path/%.exe/}"
34802
34803    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34804    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34805  fi
34806
34807    else
34808      # We're on a unix platform. Hooray! :)
34809      # First separate the path from the arguments. This will split at the first
34810      # space.
34811      complete="$CXX"
34812      path="${complete%% *}"
34813      tmp="$complete EOL"
34814      arguments="${tmp#* }"
34815
34816      # Cannot rely on the command "which" here since it doesn't always work.
34817      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34818      if test -z "$is_absolute_path"; then
34819        # Path to executable is not absolute. Find it.
34820        IFS_save="$IFS"
34821        IFS=:
34822        for p in $PATH; do
34823          if test -f "$p/$path" && test -x "$p/$path"; then
34824            new_path="$p/$path"
34825            break
34826          fi
34827        done
34828        IFS="$IFS_save"
34829      else
34830        # This is an absolute path, we can use it without further modifications.
34831        new_path="$path"
34832      fi
34833
34834      if test "x$new_path" = x; then
34835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34836$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34837        has_space=`$ECHO "$complete" | $GREP " "`
34838        if test "x$has_space" != x; then
34839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34841        fi
34842        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34843      fi
34844    fi
34845
34846    # Now join together the path and the arguments once again
34847    if test "x$arguments" != xEOL; then
34848      new_complete="$new_path ${arguments% *}"
34849    else
34850      new_complete="$new_path"
34851    fi
34852
34853    if test "x$complete" != "x$new_complete"; then
34854      CXX="$new_complete"
34855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34856$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34857    fi
34858  fi
34859
34860  TEST_COMPILER="$CXX"
34861
34862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34863$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34864  SYMLINK_ORIGINAL="$TEST_COMPILER"
34865
34866  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34867    # Follow a chain of symbolic links. Use readlink
34868    # where it exists, else fall back to horribly
34869    # complicated shell code.
34870    if test "x$READLINK_TESTED" != yes; then
34871      # On MacOSX there is a readlink tool with a different
34872      # purpose than the GNU readlink tool. Check the found readlink.
34873      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34874      if test "x$ISGNU" = x; then
34875        # A readlink that we do not know how to use.
34876        # Are there other non-GNU readlinks out there?
34877        READLINK_TESTED=yes
34878        READLINK=
34879      fi
34880    fi
34881
34882    if test "x$READLINK" != x; then
34883      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34884    else
34885      # Save the current directory for restoring afterwards
34886      STARTDIR=$PWD
34887      COUNTER=0
34888      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34889      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34890      cd $sym_link_dir
34891      # Use -P flag to resolve symlinks in directories.
34892      cd `$THEPWDCMD -P`
34893      sym_link_dir=`$THEPWDCMD -P`
34894      # Resolve file symlinks
34895      while test $COUNTER -lt 20; do
34896        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34897        if test "x$ISLINK" == x; then
34898          # This is not a symbolic link! We are done!
34899          break
34900        fi
34901        # Again resolve directory symlinks since the target of the just found
34902        # link could be in a different directory
34903        cd `$DIRNAME $ISLINK`
34904        sym_link_dir=`$THEPWDCMD -P`
34905        sym_link_file=`$BASENAME $ISLINK`
34906        let COUNTER=COUNTER+1
34907      done
34908      cd $STARTDIR
34909      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34910    fi
34911  fi
34912
34913  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34915$as_echo "no symlink" >&6; }
34916  else
34917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34918$as_echo "$SYMLINK_ORIGINAL" >&6; }
34919
34920    # We can't handle ccache by gcc wrappers, since we need to know if we're
34921    # using ccache. Instead ccache usage must be controlled by a configure option.
34922    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34923    if test "x$COMPILER_BASENAME" = "xccache"; then
34924      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34925$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34926      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34927    fi
34928  fi
34929
34930
34931  COMPILER=$CXX
34932  COMPILER_NAME=$COMPILER_NAME
34933
34934  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34935    # cc -V output typically looks like
34936    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34937    # or
34938    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34939    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34940    # Check that this is likely to be the Solaris Studio cc.
34941    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34942    if test $? -ne 0; then
34943      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34944      { $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
34945$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34946      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34947$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34948      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34949$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34950      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34951    fi
34952    # Remove usage instructions (if present), and
34953    # collapse compiler output into a single line
34954    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34955        $SED -e 's/ *[Uu]sage:.*//'`
34956    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34957        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34958  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34959    # xlc -qversion output typically looks like
34960    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34961    #     Version: 11.01.0000.0015
34962    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34963    # Check that this is likely to be the IBM XL C compiler.
34964    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34965    if test $? -ne 0; then
34966      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34967      { $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
34968$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34969      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34970$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34972$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34973      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34974    fi
34975    # Collapse compiler output into a single line
34976    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34977    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34978        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34979  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34980    # There is no specific version flag, but all output starts with a version string.
34981    # First line typically looks something like:
34982    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34983    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34984    # Check that this is likely to be Microsoft CL.EXE.
34985    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34986    if test $? -ne 0; then
34987      { $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
34988$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34989      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34990$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34991      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34992    fi
34993    # Collapse compiler output into a single line
34994    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34995    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34996        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34997  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34998    # gcc --version output typically looks like
34999    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35000    #     Copyright (C) 2013 Free Software Foundation, Inc.
35001    #     This is free software; see the source for copying conditions.  There is NO
35002    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35003    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35004    # Check that this is likely to be GCC.
35005    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35006    if test $? -ne 0; then
35007      { $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
35008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35010$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35012    fi
35013    # Remove Copyright and legalese from version string, and
35014    # collapse into a single line
35015    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35016        $SED -e 's/ *Copyright .*//'`
35017    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35018        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35019  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35020    # clang --version output typically looks like
35021    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35022    #    clang version 3.3 (tags/RELEASE_33/final)
35023    # or
35024    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35025    #    Target: x86_64-pc-linux-gnu
35026    #    Thread model: posix
35027    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35028    # Check that this is likely to be clang
35029    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35030    if test $? -ne 0; then
35031      { $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
35032$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35033      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35034$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35035      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35036    fi
35037    # Collapse compiler output into a single line
35038    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35039    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35040        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35041  else
35042      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35043  fi
35044  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35045  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35046  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35047  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35048
35049  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35050$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35051
35052
35053  # Now that we have resolved CXX ourself, let autoconf have its go at it
35054  ac_ext=cpp
35055ac_cpp='$CXXCPP $CPPFLAGS'
35056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35059if test -z "$CXX"; then
35060  if test -n "$CCC"; then
35061    CXX=$CCC
35062  else
35063    if test -n "$ac_tool_prefix"; then
35064  for ac_prog in $CXX
35065  do
35066    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35067set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35069$as_echo_n "checking for $ac_word... " >&6; }
35070if ${ac_cv_prog_CXX+:} false; then :
35071  $as_echo_n "(cached) " >&6
35072else
35073  if test -n "$CXX"; then
35074  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35075else
35076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35077for as_dir in $PATH
35078do
35079  IFS=$as_save_IFS
35080  test -z "$as_dir" && as_dir=.
35081    for ac_exec_ext in '' $ac_executable_extensions; do
35082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35083    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35085    break 2
35086  fi
35087done
35088  done
35089IFS=$as_save_IFS
35090
35091fi
35092fi
35093CXX=$ac_cv_prog_CXX
35094if test -n "$CXX"; then
35095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35096$as_echo "$CXX" >&6; }
35097else
35098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35099$as_echo "no" >&6; }
35100fi
35101
35102
35103    test -n "$CXX" && break
35104  done
35105fi
35106if test -z "$CXX"; then
35107  ac_ct_CXX=$CXX
35108  for ac_prog in $CXX
35109do
35110  # Extract the first word of "$ac_prog", so it can be a program name with args.
35111set dummy $ac_prog; ac_word=$2
35112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35113$as_echo_n "checking for $ac_word... " >&6; }
35114if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35115  $as_echo_n "(cached) " >&6
35116else
35117  if test -n "$ac_ct_CXX"; then
35118  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35119else
35120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35121for as_dir in $PATH
35122do
35123  IFS=$as_save_IFS
35124  test -z "$as_dir" && as_dir=.
35125    for ac_exec_ext in '' $ac_executable_extensions; do
35126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35127    ac_cv_prog_ac_ct_CXX="$ac_prog"
35128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35129    break 2
35130  fi
35131done
35132  done
35133IFS=$as_save_IFS
35134
35135fi
35136fi
35137ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35138if test -n "$ac_ct_CXX"; then
35139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35140$as_echo "$ac_ct_CXX" >&6; }
35141else
35142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35143$as_echo "no" >&6; }
35144fi
35145
35146
35147  test -n "$ac_ct_CXX" && break
35148done
35149
35150  if test "x$ac_ct_CXX" = x; then
35151    CXX="g++"
35152  else
35153    case $cross_compiling:$ac_tool_warned in
35154yes:)
35155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35157ac_tool_warned=yes ;;
35158esac
35159    CXX=$ac_ct_CXX
35160  fi
35161fi
35162
35163  fi
35164fi
35165# Provide some information about the compiler.
35166$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35167set X $ac_compile
35168ac_compiler=$2
35169for ac_option in --version -v -V -qversion; do
35170  { { ac_try="$ac_compiler $ac_option >&5"
35171case "(($ac_try" in
35172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35173  *) ac_try_echo=$ac_try;;
35174esac
35175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35176$as_echo "$ac_try_echo"; } >&5
35177  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35178  ac_status=$?
35179  if test -s conftest.err; then
35180    sed '10a\
35181... rest of stderr output deleted ...
35182         10q' conftest.err >conftest.er1
35183    cat conftest.er1 >&5
35184  fi
35185  rm -f conftest.er1 conftest.err
35186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35187  test $ac_status = 0; }
35188done
35189
35190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35191$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35192if ${ac_cv_cxx_compiler_gnu+:} false; then :
35193  $as_echo_n "(cached) " >&6
35194else
35195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35196/* end confdefs.h.  */
35197
35198int
35199main ()
35200{
35201#ifndef __GNUC__
35202       choke me
35203#endif
35204
35205  ;
35206  return 0;
35207}
35208_ACEOF
35209if ac_fn_cxx_try_compile "$LINENO"; then :
35210  ac_compiler_gnu=yes
35211else
35212  ac_compiler_gnu=no
35213fi
35214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35215ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35216
35217fi
35218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35219$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35220if test $ac_compiler_gnu = yes; then
35221  GXX=yes
35222else
35223  GXX=
35224fi
35225ac_test_CXXFLAGS=${CXXFLAGS+set}
35226ac_save_CXXFLAGS=$CXXFLAGS
35227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35228$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35229if ${ac_cv_prog_cxx_g+:} false; then :
35230  $as_echo_n "(cached) " >&6
35231else
35232  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35233   ac_cxx_werror_flag=yes
35234   ac_cv_prog_cxx_g=no
35235   CXXFLAGS="-g"
35236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35237/* end confdefs.h.  */
35238
35239int
35240main ()
35241{
35242
35243  ;
35244  return 0;
35245}
35246_ACEOF
35247if ac_fn_cxx_try_compile "$LINENO"; then :
35248  ac_cv_prog_cxx_g=yes
35249else
35250  CXXFLAGS=""
35251      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35252/* end confdefs.h.  */
35253
35254int
35255main ()
35256{
35257
35258  ;
35259  return 0;
35260}
35261_ACEOF
35262if ac_fn_cxx_try_compile "$LINENO"; then :
35263
35264else
35265  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35266	 CXXFLAGS="-g"
35267	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35268/* end confdefs.h.  */
35269
35270int
35271main ()
35272{
35273
35274  ;
35275  return 0;
35276}
35277_ACEOF
35278if ac_fn_cxx_try_compile "$LINENO"; then :
35279  ac_cv_prog_cxx_g=yes
35280fi
35281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35282fi
35283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35284fi
35285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35286   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35287fi
35288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35289$as_echo "$ac_cv_prog_cxx_g" >&6; }
35290if test "$ac_test_CXXFLAGS" = set; then
35291  CXXFLAGS=$ac_save_CXXFLAGS
35292elif test $ac_cv_prog_cxx_g = yes; then
35293  if test "$GXX" = yes; then
35294    CXXFLAGS="-g -O2"
35295  else
35296    CXXFLAGS="-g"
35297  fi
35298else
35299  if test "$GXX" = yes; then
35300    CXXFLAGS="-O2"
35301  else
35302    CXXFLAGS=
35303  fi
35304fi
35305ac_ext=cpp
35306ac_cpp='$CXXCPP $CPPFLAGS'
35307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35310
35311
35312  # This is the compiler version number on the form X.Y[.Z]
35313
35314
35315
35316
35317  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35318    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35319$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35320    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35321$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35322  fi
35323
35324  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35325  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35326    { $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
35327$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;}
35328  fi
35329
35330  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35331    { $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
35332$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35333  fi
35334
35335  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35336
35337
35338  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388    # Execute function body
35389
35390  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35391  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35392
35393  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35394    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35395  fi
35396
35397  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35398    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35399  fi
35400
35401  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35402  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35403
35404  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35405    :
35406
35407  else
35408    :
35409
35410          { $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
35411$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35412
35413
35414  fi
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428
35429  fi
35430
35431  #
35432  # Setup the preprocessor (CPP and CXXCPP)
35433  #
35434  ac_ext=c
35435ac_cpp='$CPP $CPPFLAGS'
35436ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35437ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35438ac_compiler_gnu=$ac_cv_c_compiler_gnu
35439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35440$as_echo_n "checking how to run the C preprocessor... " >&6; }
35441# On Suns, sometimes $CPP names a directory.
35442if test -n "$CPP" && test -d "$CPP"; then
35443  CPP=
35444fi
35445if test -z "$CPP"; then
35446  if ${ac_cv_prog_CPP+:} false; then :
35447  $as_echo_n "(cached) " >&6
35448else
35449      # Double quotes because CPP needs to be expanded
35450    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35451    do
35452      ac_preproc_ok=false
35453for ac_c_preproc_warn_flag in '' yes
35454do
35455  # Use a header file that comes with gcc, so configuring glibc
35456  # with a fresh cross-compiler works.
35457  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35458  # <limits.h> exists even on freestanding compilers.
35459  # On the NeXT, cc -E runs the code through the compiler's parser,
35460  # not just through cpp. "Syntax error" is here to catch this case.
35461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35462/* end confdefs.h.  */
35463#ifdef __STDC__
35464# include <limits.h>
35465#else
35466# include <assert.h>
35467#endif
35468		     Syntax error
35469_ACEOF
35470if ac_fn_c_try_cpp "$LINENO"; then :
35471
35472else
35473  # Broken: fails on valid input.
35474continue
35475fi
35476rm -f conftest.err conftest.i conftest.$ac_ext
35477
35478  # OK, works on sane cases.  Now check whether nonexistent headers
35479  # can be detected and how.
35480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35481/* end confdefs.h.  */
35482#include <ac_nonexistent.h>
35483_ACEOF
35484if ac_fn_c_try_cpp "$LINENO"; then :
35485  # Broken: success on invalid input.
35486continue
35487else
35488  # Passes both tests.
35489ac_preproc_ok=:
35490break
35491fi
35492rm -f conftest.err conftest.i conftest.$ac_ext
35493
35494done
35495# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35496rm -f conftest.i conftest.err conftest.$ac_ext
35497if $ac_preproc_ok; then :
35498  break
35499fi
35500
35501    done
35502    ac_cv_prog_CPP=$CPP
35503
35504fi
35505  CPP=$ac_cv_prog_CPP
35506else
35507  ac_cv_prog_CPP=$CPP
35508fi
35509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35510$as_echo "$CPP" >&6; }
35511ac_preproc_ok=false
35512for ac_c_preproc_warn_flag in '' yes
35513do
35514  # Use a header file that comes with gcc, so configuring glibc
35515  # with a fresh cross-compiler works.
35516  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35517  # <limits.h> exists even on freestanding compilers.
35518  # On the NeXT, cc -E runs the code through the compiler's parser,
35519  # not just through cpp. "Syntax error" is here to catch this case.
35520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35521/* end confdefs.h.  */
35522#ifdef __STDC__
35523# include <limits.h>
35524#else
35525# include <assert.h>
35526#endif
35527		     Syntax error
35528_ACEOF
35529if ac_fn_c_try_cpp "$LINENO"; then :
35530
35531else
35532  # Broken: fails on valid input.
35533continue
35534fi
35535rm -f conftest.err conftest.i conftest.$ac_ext
35536
35537  # OK, works on sane cases.  Now check whether nonexistent headers
35538  # can be detected and how.
35539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35540/* end confdefs.h.  */
35541#include <ac_nonexistent.h>
35542_ACEOF
35543if ac_fn_c_try_cpp "$LINENO"; then :
35544  # Broken: success on invalid input.
35545continue
35546else
35547  # Passes both tests.
35548ac_preproc_ok=:
35549break
35550fi
35551rm -f conftest.err conftest.i conftest.$ac_ext
35552
35553done
35554# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35555rm -f conftest.i conftest.err conftest.$ac_ext
35556if $ac_preproc_ok; then :
35557
35558else
35559  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35561as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35562See \`config.log' for more details" "$LINENO" 5; }
35563fi
35564
35565ac_ext=cpp
35566ac_cpp='$CXXCPP $CPPFLAGS'
35567ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35568ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35569ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35570
35571
35572  # Only process if variable expands to non-empty
35573
35574  if test "x$CPP" != x; then
35575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35576
35577  # First separate the path from the arguments. This will split at the first
35578  # space.
35579  complete="$CPP"
35580  path="${complete%% *}"
35581  tmp="$complete EOL"
35582  arguments="${tmp#* }"
35583
35584  # Input might be given as Windows format, start by converting to
35585  # unix format.
35586  new_path=`$CYGPATH -u "$path"`
35587
35588  # Now try to locate executable using which
35589  new_path=`$WHICH "$new_path" 2> /dev/null`
35590  # bat and cmd files are not always considered executable in cygwin causing which
35591  # to not find them
35592  if test "x$new_path" = x \
35593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35595    new_path=`$CYGPATH -u "$path"`
35596  fi
35597  if test "x$new_path" = x; then
35598    # Oops. Which didn't find the executable.
35599    # The splitting of arguments from the executable at a space might have been incorrect,
35600    # since paths with space are more likely in Windows. Give it another try with the whole
35601    # argument.
35602    path="$complete"
35603    arguments="EOL"
35604    new_path=`$CYGPATH -u "$path"`
35605    new_path=`$WHICH "$new_path" 2> /dev/null`
35606    # bat and cmd files are not always considered executable in cygwin causing which
35607    # to not find them
35608    if test "x$new_path" = x \
35609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35611      new_path=`$CYGPATH -u "$path"`
35612    fi
35613    if test "x$new_path" = x; then
35614      # It's still not found. Now this is an unrecoverable error.
35615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35616$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35617      has_space=`$ECHO "$complete" | $GREP " "`
35618      if test "x$has_space" != x; then
35619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35621      fi
35622      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35623    fi
35624  fi
35625
35626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35629  # "foo.exe" is OK but "foo" is an error.
35630  #
35631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35632  # It is also a way to make sure we got the proper file name for the real test later on.
35633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35634  if test "x$test_shortpath" = x; then
35635    # Short path failed, file does not exist as specified.
35636    # Try adding .exe or .cmd
35637    if test -f "${new_path}.exe"; then
35638      input_to_shortpath="${new_path}.exe"
35639    elif test -f "${new_path}.cmd"; then
35640      input_to_shortpath="${new_path}.cmd"
35641    else
35642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35643$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35646      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35647    fi
35648  else
35649    input_to_shortpath="$new_path"
35650  fi
35651
35652  # Call helper function which possibly converts this using DOS-style short mode.
35653  # If so, the updated path is stored in $new_path.
35654  new_path="$input_to_shortpath"
35655
35656  input_path="$input_to_shortpath"
35657  # Check if we need to convert this using DOS-style short mode. If the path
35658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35659  # take no chances and rewrite it.
35660  # Note: m4 eats our [], so we need to use [ and ] instead.
35661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35662  if test "x$has_forbidden_chars" != x; then
35663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35667      # Going to short mode and back again did indeed matter. Since short mode is
35668      # case insensitive, let's make it lowercase to improve readability.
35669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35670      # Now convert it back to Unix-style (cygpath)
35671      input_path=`$CYGPATH -u "$shortmode_path"`
35672      new_path="$input_path"
35673    fi
35674  fi
35675
35676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35677  if test "x$test_cygdrive_prefix" = x; then
35678    # As a simple fix, exclude /usr/bin since it's not a real path.
35679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35681      # a path prefixed by /cygdrive for fixpath to work.
35682      new_path="$CYGWIN_ROOT_PATH$input_path"
35683    fi
35684  fi
35685
35686  # remove trailing .exe if any
35687  new_path="${new_path/%.exe/}"
35688
35689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35690
35691  # First separate the path from the arguments. This will split at the first
35692  # space.
35693  complete="$CPP"
35694  path="${complete%% *}"
35695  tmp="$complete EOL"
35696  arguments="${tmp#* }"
35697
35698  # Input might be given as Windows format, start by converting to
35699  # unix format.
35700  new_path="$path"
35701
35702  windows_path="$new_path"
35703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35704    unix_path=`$CYGPATH -u "$windows_path"`
35705    new_path="$unix_path"
35706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35708    new_path="$unix_path"
35709  fi
35710
35711
35712  # Now try to locate executable using which
35713  new_path=`$WHICH "$new_path" 2> /dev/null`
35714
35715  if test "x$new_path" = x; then
35716    # Oops. Which didn't find the executable.
35717    # The splitting of arguments from the executable at a space might have been incorrect,
35718    # since paths with space are more likely in Windows. Give it another try with the whole
35719    # argument.
35720    path="$complete"
35721    arguments="EOL"
35722    new_path="$path"
35723
35724  windows_path="$new_path"
35725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35726    unix_path=`$CYGPATH -u "$windows_path"`
35727    new_path="$unix_path"
35728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35730    new_path="$unix_path"
35731  fi
35732
35733
35734    new_path=`$WHICH "$new_path" 2> /dev/null`
35735    # bat and cmd files are not always considered executable in MSYS causing which
35736    # to not find them
35737    if test "x$new_path" = x \
35738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35740      new_path="$path"
35741
35742  windows_path="$new_path"
35743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35744    unix_path=`$CYGPATH -u "$windows_path"`
35745    new_path="$unix_path"
35746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35748    new_path="$unix_path"
35749  fi
35750
35751    fi
35752
35753    if test "x$new_path" = x; then
35754      # It's still not found. Now this is an unrecoverable error.
35755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35756$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35757      has_space=`$ECHO "$complete" | $GREP " "`
35758      if test "x$has_space" != x; then
35759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35761      fi
35762      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35763    fi
35764  fi
35765
35766  # Now new_path has a complete unix path to the binary
35767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35768    # Keep paths in /bin as-is, but remove trailing .exe if any
35769    new_path="${new_path/%.exe/}"
35770    # Do not save /bin paths to all_fixpath_prefixes!
35771  else
35772    # Not in mixed or Windows style, start by that.
35773    new_path=`cmd //c echo $new_path`
35774
35775  input_path="$new_path"
35776  # Check if we need to convert this using DOS-style short mode. If the path
35777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35778  # take no chances and rewrite it.
35779  # Note: m4 eats our [], so we need to use [ and ] instead.
35780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35781  if test "x$has_forbidden_chars" != x; then
35782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35784  fi
35785
35786    # Output is in $new_path
35787
35788  windows_path="$new_path"
35789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35790    unix_path=`$CYGPATH -u "$windows_path"`
35791    new_path="$unix_path"
35792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35794    new_path="$unix_path"
35795  fi
35796
35797    # remove trailing .exe if any
35798    new_path="${new_path/%.exe/}"
35799
35800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35802  fi
35803
35804    else
35805      # We're on a unix platform. Hooray! :)
35806      # First separate the path from the arguments. This will split at the first
35807      # space.
35808      complete="$CPP"
35809      path="${complete%% *}"
35810      tmp="$complete EOL"
35811      arguments="${tmp#* }"
35812
35813      # Cannot rely on the command "which" here since it doesn't always work.
35814      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35815      if test -z "$is_absolute_path"; then
35816        # Path to executable is not absolute. Find it.
35817        IFS_save="$IFS"
35818        IFS=:
35819        for p in $PATH; do
35820          if test -f "$p/$path" && test -x "$p/$path"; then
35821            new_path="$p/$path"
35822            break
35823          fi
35824        done
35825        IFS="$IFS_save"
35826      else
35827        # This is an absolute path, we can use it without further modifications.
35828        new_path="$path"
35829      fi
35830
35831      if test "x$new_path" = x; then
35832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35833$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35834        has_space=`$ECHO "$complete" | $GREP " "`
35835        if test "x$has_space" != x; then
35836          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35838        fi
35839        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35840      fi
35841    fi
35842
35843    # Now join together the path and the arguments once again
35844    if test "x$arguments" != xEOL; then
35845      new_complete="$new_path ${arguments% *}"
35846    else
35847      new_complete="$new_path"
35848    fi
35849
35850    if test "x$complete" != "x$new_complete"; then
35851      CPP="$new_complete"
35852      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35853$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35854    fi
35855  fi
35856
35857  ac_ext=cpp
35858ac_cpp='$CXXCPP $CPPFLAGS'
35859ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35860ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35861ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35863$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35864if test -z "$CXXCPP"; then
35865  if ${ac_cv_prog_CXXCPP+:} false; then :
35866  $as_echo_n "(cached) " >&6
35867else
35868      # Double quotes because CXXCPP needs to be expanded
35869    for CXXCPP in "$CXX -E" "/lib/cpp"
35870    do
35871      ac_preproc_ok=false
35872for ac_cxx_preproc_warn_flag in '' yes
35873do
35874  # Use a header file that comes with gcc, so configuring glibc
35875  # with a fresh cross-compiler works.
35876  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35877  # <limits.h> exists even on freestanding compilers.
35878  # On the NeXT, cc -E runs the code through the compiler's parser,
35879  # not just through cpp. "Syntax error" is here to catch this case.
35880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35881/* end confdefs.h.  */
35882#ifdef __STDC__
35883# include <limits.h>
35884#else
35885# include <assert.h>
35886#endif
35887		     Syntax error
35888_ACEOF
35889if ac_fn_cxx_try_cpp "$LINENO"; then :
35890
35891else
35892  # Broken: fails on valid input.
35893continue
35894fi
35895rm -f conftest.err conftest.i conftest.$ac_ext
35896
35897  # OK, works on sane cases.  Now check whether nonexistent headers
35898  # can be detected and how.
35899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35900/* end confdefs.h.  */
35901#include <ac_nonexistent.h>
35902_ACEOF
35903if ac_fn_cxx_try_cpp "$LINENO"; then :
35904  # Broken: success on invalid input.
35905continue
35906else
35907  # Passes both tests.
35908ac_preproc_ok=:
35909break
35910fi
35911rm -f conftest.err conftest.i conftest.$ac_ext
35912
35913done
35914# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35915rm -f conftest.i conftest.err conftest.$ac_ext
35916if $ac_preproc_ok; then :
35917  break
35918fi
35919
35920    done
35921    ac_cv_prog_CXXCPP=$CXXCPP
35922
35923fi
35924  CXXCPP=$ac_cv_prog_CXXCPP
35925else
35926  ac_cv_prog_CXXCPP=$CXXCPP
35927fi
35928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35929$as_echo "$CXXCPP" >&6; }
35930ac_preproc_ok=false
35931for ac_cxx_preproc_warn_flag in '' yes
35932do
35933  # Use a header file that comes with gcc, so configuring glibc
35934  # with a fresh cross-compiler works.
35935  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35936  # <limits.h> exists even on freestanding compilers.
35937  # On the NeXT, cc -E runs the code through the compiler's parser,
35938  # not just through cpp. "Syntax error" is here to catch this case.
35939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35940/* end confdefs.h.  */
35941#ifdef __STDC__
35942# include <limits.h>
35943#else
35944# include <assert.h>
35945#endif
35946		     Syntax error
35947_ACEOF
35948if ac_fn_cxx_try_cpp "$LINENO"; then :
35949
35950else
35951  # Broken: fails on valid input.
35952continue
35953fi
35954rm -f conftest.err conftest.i conftest.$ac_ext
35955
35956  # OK, works on sane cases.  Now check whether nonexistent headers
35957  # can be detected and how.
35958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35959/* end confdefs.h.  */
35960#include <ac_nonexistent.h>
35961_ACEOF
35962if ac_fn_cxx_try_cpp "$LINENO"; then :
35963  # Broken: success on invalid input.
35964continue
35965else
35966  # Passes both tests.
35967ac_preproc_ok=:
35968break
35969fi
35970rm -f conftest.err conftest.i conftest.$ac_ext
35971
35972done
35973# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35974rm -f conftest.i conftest.err conftest.$ac_ext
35975if $ac_preproc_ok; then :
35976
35977else
35978  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35980as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35981See \`config.log' for more details" "$LINENO" 5; }
35982fi
35983
35984ac_ext=cpp
35985ac_cpp='$CXXCPP $CPPFLAGS'
35986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35989
35990
35991  # Only process if variable expands to non-empty
35992
35993  if test "x$CXXCPP" != x; then
35994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35995
35996  # First separate the path from the arguments. This will split at the first
35997  # space.
35998  complete="$CXXCPP"
35999  path="${complete%% *}"
36000  tmp="$complete EOL"
36001  arguments="${tmp#* }"
36002
36003  # Input might be given as Windows format, start by converting to
36004  # unix format.
36005  new_path=`$CYGPATH -u "$path"`
36006
36007  # Now try to locate executable using which
36008  new_path=`$WHICH "$new_path" 2> /dev/null`
36009  # bat and cmd files are not always considered executable in cygwin causing which
36010  # to not find them
36011  if test "x$new_path" = x \
36012      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36013      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36014    new_path=`$CYGPATH -u "$path"`
36015  fi
36016  if test "x$new_path" = x; then
36017    # Oops. Which didn't find the executable.
36018    # The splitting of arguments from the executable at a space might have been incorrect,
36019    # since paths with space are more likely in Windows. Give it another try with the whole
36020    # argument.
36021    path="$complete"
36022    arguments="EOL"
36023    new_path=`$CYGPATH -u "$path"`
36024    new_path=`$WHICH "$new_path" 2> /dev/null`
36025    # bat and cmd files are not always considered executable in cygwin causing which
36026    # to not find them
36027    if test "x$new_path" = x \
36028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36030      new_path=`$CYGPATH -u "$path"`
36031    fi
36032    if test "x$new_path" = x; then
36033      # It's still not found. Now this is an unrecoverable error.
36034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36035$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36036      has_space=`$ECHO "$complete" | $GREP " "`
36037      if test "x$has_space" != x; then
36038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36040      fi
36041      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36042    fi
36043  fi
36044
36045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36048  # "foo.exe" is OK but "foo" is an error.
36049  #
36050  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36051  # It is also a way to make sure we got the proper file name for the real test later on.
36052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36053  if test "x$test_shortpath" = x; then
36054    # Short path failed, file does not exist as specified.
36055    # Try adding .exe or .cmd
36056    if test -f "${new_path}.exe"; then
36057      input_to_shortpath="${new_path}.exe"
36058    elif test -f "${new_path}.cmd"; then
36059      input_to_shortpath="${new_path}.cmd"
36060    else
36061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36062$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36063      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36065      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36066    fi
36067  else
36068    input_to_shortpath="$new_path"
36069  fi
36070
36071  # Call helper function which possibly converts this using DOS-style short mode.
36072  # If so, the updated path is stored in $new_path.
36073  new_path="$input_to_shortpath"
36074
36075  input_path="$input_to_shortpath"
36076  # Check if we need to convert this using DOS-style short mode. If the path
36077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36078  # take no chances and rewrite it.
36079  # Note: m4 eats our [], so we need to use [ and ] instead.
36080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36081  if test "x$has_forbidden_chars" != x; then
36082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36086      # Going to short mode and back again did indeed matter. Since short mode is
36087      # case insensitive, let's make it lowercase to improve readability.
36088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36089      # Now convert it back to Unix-style (cygpath)
36090      input_path=`$CYGPATH -u "$shortmode_path"`
36091      new_path="$input_path"
36092    fi
36093  fi
36094
36095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36096  if test "x$test_cygdrive_prefix" = x; then
36097    # As a simple fix, exclude /usr/bin since it's not a real path.
36098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36100      # a path prefixed by /cygdrive for fixpath to work.
36101      new_path="$CYGWIN_ROOT_PATH$input_path"
36102    fi
36103  fi
36104
36105  # remove trailing .exe if any
36106  new_path="${new_path/%.exe/}"
36107
36108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36109
36110  # First separate the path from the arguments. This will split at the first
36111  # space.
36112  complete="$CXXCPP"
36113  path="${complete%% *}"
36114  tmp="$complete EOL"
36115  arguments="${tmp#* }"
36116
36117  # Input might be given as Windows format, start by converting to
36118  # unix format.
36119  new_path="$path"
36120
36121  windows_path="$new_path"
36122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36123    unix_path=`$CYGPATH -u "$windows_path"`
36124    new_path="$unix_path"
36125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36127    new_path="$unix_path"
36128  fi
36129
36130
36131  # Now try to locate executable using which
36132  new_path=`$WHICH "$new_path" 2> /dev/null`
36133
36134  if test "x$new_path" = x; then
36135    # Oops. Which didn't find the executable.
36136    # The splitting of arguments from the executable at a space might have been incorrect,
36137    # since paths with space are more likely in Windows. Give it another try with the whole
36138    # argument.
36139    path="$complete"
36140    arguments="EOL"
36141    new_path="$path"
36142
36143  windows_path="$new_path"
36144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36145    unix_path=`$CYGPATH -u "$windows_path"`
36146    new_path="$unix_path"
36147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36149    new_path="$unix_path"
36150  fi
36151
36152
36153    new_path=`$WHICH "$new_path" 2> /dev/null`
36154    # bat and cmd files are not always considered executable in MSYS causing which
36155    # to not find them
36156    if test "x$new_path" = x \
36157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36159      new_path="$path"
36160
36161  windows_path="$new_path"
36162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36163    unix_path=`$CYGPATH -u "$windows_path"`
36164    new_path="$unix_path"
36165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36167    new_path="$unix_path"
36168  fi
36169
36170    fi
36171
36172    if test "x$new_path" = x; then
36173      # It's still not found. Now this is an unrecoverable error.
36174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36175$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36176      has_space=`$ECHO "$complete" | $GREP " "`
36177      if test "x$has_space" != x; then
36178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36180      fi
36181      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36182    fi
36183  fi
36184
36185  # Now new_path has a complete unix path to the binary
36186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36187    # Keep paths in /bin as-is, but remove trailing .exe if any
36188    new_path="${new_path/%.exe/}"
36189    # Do not save /bin paths to all_fixpath_prefixes!
36190  else
36191    # Not in mixed or Windows style, start by that.
36192    new_path=`cmd //c echo $new_path`
36193
36194  input_path="$new_path"
36195  # Check if we need to convert this using DOS-style short mode. If the path
36196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36197  # take no chances and rewrite it.
36198  # Note: m4 eats our [], so we need to use [ and ] instead.
36199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36200  if test "x$has_forbidden_chars" != x; then
36201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36203  fi
36204
36205    # Output is in $new_path
36206
36207  windows_path="$new_path"
36208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36209    unix_path=`$CYGPATH -u "$windows_path"`
36210    new_path="$unix_path"
36211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36213    new_path="$unix_path"
36214  fi
36215
36216    # remove trailing .exe if any
36217    new_path="${new_path/%.exe/}"
36218
36219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36221  fi
36222
36223    else
36224      # We're on a unix platform. Hooray! :)
36225      # First separate the path from the arguments. This will split at the first
36226      # space.
36227      complete="$CXXCPP"
36228      path="${complete%% *}"
36229      tmp="$complete EOL"
36230      arguments="${tmp#* }"
36231
36232      # Cannot rely on the command "which" here since it doesn't always work.
36233      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36234      if test -z "$is_absolute_path"; then
36235        # Path to executable is not absolute. Find it.
36236        IFS_save="$IFS"
36237        IFS=:
36238        for p in $PATH; do
36239          if test -f "$p/$path" && test -x "$p/$path"; then
36240            new_path="$p/$path"
36241            break
36242          fi
36243        done
36244        IFS="$IFS_save"
36245      else
36246        # This is an absolute path, we can use it without further modifications.
36247        new_path="$path"
36248      fi
36249
36250      if test "x$new_path" = x; then
36251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36252$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36253        has_space=`$ECHO "$complete" | $GREP " "`
36254        if test "x$has_space" != x; then
36255          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36257        fi
36258        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36259      fi
36260    fi
36261
36262    # Now join together the path and the arguments once again
36263    if test "x$arguments" != xEOL; then
36264      new_complete="$new_path ${arguments% *}"
36265    else
36266      new_complete="$new_path"
36267    fi
36268
36269    if test "x$complete" != "x$new_complete"; then
36270      CXXCPP="$new_complete"
36271      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36272$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36273    fi
36274  fi
36275
36276
36277  #
36278  # Setup the linker (LD)
36279  #
36280  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36281    # In the Microsoft toolchain we have a separate LD command "link".
36282    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36283    # a cygwin program for something completely different.
36284    # Extract the first word of "link", so it can be a program name with args.
36285set dummy link; ac_word=$2
36286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36287$as_echo_n "checking for $ac_word... " >&6; }
36288if ${ac_cv_prog_LD+:} false; then :
36289  $as_echo_n "(cached) " >&6
36290else
36291  if test -n "$LD"; then
36292  ac_cv_prog_LD="$LD" # Let the user override the test.
36293else
36294  ac_prog_rejected=no
36295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36296for as_dir in $PATH
36297do
36298  IFS=$as_save_IFS
36299  test -z "$as_dir" && as_dir=.
36300    for ac_exec_ext in '' $ac_executable_extensions; do
36301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36302    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36303       ac_prog_rejected=yes
36304       continue
36305     fi
36306    ac_cv_prog_LD="link"
36307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36308    break 2
36309  fi
36310done
36311  done
36312IFS=$as_save_IFS
36313
36314if test $ac_prog_rejected = yes; then
36315  # We found a bogon in the path, so make sure we never use it.
36316  set dummy $ac_cv_prog_LD
36317  shift
36318  if test $# != 0; then
36319    # We chose a different compiler from the bogus one.
36320    # However, it has the same basename, so the bogon will be chosen
36321    # first if we set LD to just the basename; use the full file name.
36322    shift
36323    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36324  fi
36325fi
36326fi
36327fi
36328LD=$ac_cv_prog_LD
36329if test -n "$LD"; then
36330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36331$as_echo "$LD" >&6; }
36332else
36333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36334$as_echo "no" >&6; }
36335fi
36336
36337
36338
36339  # Only process if variable expands to non-empty
36340
36341  if test "x$LD" != x; then
36342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36343
36344  # First separate the path from the arguments. This will split at the first
36345  # space.
36346  complete="$LD"
36347  path="${complete%% *}"
36348  tmp="$complete EOL"
36349  arguments="${tmp#* }"
36350
36351  # Input might be given as Windows format, start by converting to
36352  # unix format.
36353  new_path=`$CYGPATH -u "$path"`
36354
36355  # Now try to locate executable using which
36356  new_path=`$WHICH "$new_path" 2> /dev/null`
36357  # bat and cmd files are not always considered executable in cygwin causing which
36358  # to not find them
36359  if test "x$new_path" = x \
36360      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36361      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36362    new_path=`$CYGPATH -u "$path"`
36363  fi
36364  if test "x$new_path" = x; then
36365    # Oops. Which didn't find the executable.
36366    # The splitting of arguments from the executable at a space might have been incorrect,
36367    # since paths with space are more likely in Windows. Give it another try with the whole
36368    # argument.
36369    path="$complete"
36370    arguments="EOL"
36371    new_path=`$CYGPATH -u "$path"`
36372    new_path=`$WHICH "$new_path" 2> /dev/null`
36373    # bat and cmd files are not always considered executable in cygwin causing which
36374    # to not find them
36375    if test "x$new_path" = x \
36376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36378      new_path=`$CYGPATH -u "$path"`
36379    fi
36380    if test "x$new_path" = x; then
36381      # It's still not found. Now this is an unrecoverable error.
36382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36383$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36384      has_space=`$ECHO "$complete" | $GREP " "`
36385      if test "x$has_space" != x; then
36386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36388      fi
36389      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36390    fi
36391  fi
36392
36393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36396  # "foo.exe" is OK but "foo" is an error.
36397  #
36398  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36399  # It is also a way to make sure we got the proper file name for the real test later on.
36400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36401  if test "x$test_shortpath" = x; then
36402    # Short path failed, file does not exist as specified.
36403    # Try adding .exe or .cmd
36404    if test -f "${new_path}.exe"; then
36405      input_to_shortpath="${new_path}.exe"
36406    elif test -f "${new_path}.cmd"; then
36407      input_to_shortpath="${new_path}.cmd"
36408    else
36409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36410$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36413      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36414    fi
36415  else
36416    input_to_shortpath="$new_path"
36417  fi
36418
36419  # Call helper function which possibly converts this using DOS-style short mode.
36420  # If so, the updated path is stored in $new_path.
36421  new_path="$input_to_shortpath"
36422
36423  input_path="$input_to_shortpath"
36424  # Check if we need to convert this using DOS-style short mode. If the path
36425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36426  # take no chances and rewrite it.
36427  # Note: m4 eats our [], so we need to use [ and ] instead.
36428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36429  if test "x$has_forbidden_chars" != x; then
36430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36434      # Going to short mode and back again did indeed matter. Since short mode is
36435      # case insensitive, let's make it lowercase to improve readability.
36436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36437      # Now convert it back to Unix-style (cygpath)
36438      input_path=`$CYGPATH -u "$shortmode_path"`
36439      new_path="$input_path"
36440    fi
36441  fi
36442
36443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36444  if test "x$test_cygdrive_prefix" = x; then
36445    # As a simple fix, exclude /usr/bin since it's not a real path.
36446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36448      # a path prefixed by /cygdrive for fixpath to work.
36449      new_path="$CYGWIN_ROOT_PATH$input_path"
36450    fi
36451  fi
36452
36453  # remove trailing .exe if any
36454  new_path="${new_path/%.exe/}"
36455
36456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36457
36458  # First separate the path from the arguments. This will split at the first
36459  # space.
36460  complete="$LD"
36461  path="${complete%% *}"
36462  tmp="$complete EOL"
36463  arguments="${tmp#* }"
36464
36465  # Input might be given as Windows format, start by converting to
36466  # unix format.
36467  new_path="$path"
36468
36469  windows_path="$new_path"
36470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36471    unix_path=`$CYGPATH -u "$windows_path"`
36472    new_path="$unix_path"
36473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36475    new_path="$unix_path"
36476  fi
36477
36478
36479  # Now try to locate executable using which
36480  new_path=`$WHICH "$new_path" 2> /dev/null`
36481
36482  if test "x$new_path" = x; then
36483    # Oops. Which didn't find the executable.
36484    # The splitting of arguments from the executable at a space might have been incorrect,
36485    # since paths with space are more likely in Windows. Give it another try with the whole
36486    # argument.
36487    path="$complete"
36488    arguments="EOL"
36489    new_path="$path"
36490
36491  windows_path="$new_path"
36492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36493    unix_path=`$CYGPATH -u "$windows_path"`
36494    new_path="$unix_path"
36495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36497    new_path="$unix_path"
36498  fi
36499
36500
36501    new_path=`$WHICH "$new_path" 2> /dev/null`
36502    # bat and cmd files are not always considered executable in MSYS causing which
36503    # to not find them
36504    if test "x$new_path" = x \
36505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36507      new_path="$path"
36508
36509  windows_path="$new_path"
36510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36511    unix_path=`$CYGPATH -u "$windows_path"`
36512    new_path="$unix_path"
36513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36515    new_path="$unix_path"
36516  fi
36517
36518    fi
36519
36520    if test "x$new_path" = x; then
36521      # It's still not found. Now this is an unrecoverable error.
36522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36523$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36524      has_space=`$ECHO "$complete" | $GREP " "`
36525      if test "x$has_space" != x; then
36526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36528      fi
36529      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36530    fi
36531  fi
36532
36533  # Now new_path has a complete unix path to the binary
36534  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36535    # Keep paths in /bin as-is, but remove trailing .exe if any
36536    new_path="${new_path/%.exe/}"
36537    # Do not save /bin paths to all_fixpath_prefixes!
36538  else
36539    # Not in mixed or Windows style, start by that.
36540    new_path=`cmd //c echo $new_path`
36541
36542  input_path="$new_path"
36543  # Check if we need to convert this using DOS-style short mode. If the path
36544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36545  # take no chances and rewrite it.
36546  # Note: m4 eats our [], so we need to use [ and ] instead.
36547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36548  if test "x$has_forbidden_chars" != x; then
36549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36551  fi
36552
36553    # Output is in $new_path
36554
36555  windows_path="$new_path"
36556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36557    unix_path=`$CYGPATH -u "$windows_path"`
36558    new_path="$unix_path"
36559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36561    new_path="$unix_path"
36562  fi
36563
36564    # remove trailing .exe if any
36565    new_path="${new_path/%.exe/}"
36566
36567    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36568    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36569  fi
36570
36571    else
36572      # We're on a unix platform. Hooray! :)
36573      # First separate the path from the arguments. This will split at the first
36574      # space.
36575      complete="$LD"
36576      path="${complete%% *}"
36577      tmp="$complete EOL"
36578      arguments="${tmp#* }"
36579
36580      # Cannot rely on the command "which" here since it doesn't always work.
36581      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36582      if test -z "$is_absolute_path"; then
36583        # Path to executable is not absolute. Find it.
36584        IFS_save="$IFS"
36585        IFS=:
36586        for p in $PATH; do
36587          if test -f "$p/$path" && test -x "$p/$path"; then
36588            new_path="$p/$path"
36589            break
36590          fi
36591        done
36592        IFS="$IFS_save"
36593      else
36594        # This is an absolute path, we can use it without further modifications.
36595        new_path="$path"
36596      fi
36597
36598      if test "x$new_path" = x; then
36599        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36600$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36601        has_space=`$ECHO "$complete" | $GREP " "`
36602        if test "x$has_space" != x; then
36603          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36604$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36605        fi
36606        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36607      fi
36608    fi
36609
36610    # Now join together the path and the arguments once again
36611    if test "x$arguments" != xEOL; then
36612      new_complete="$new_path ${arguments% *}"
36613    else
36614      new_complete="$new_path"
36615    fi
36616
36617    if test "x$complete" != "x$new_complete"; then
36618      LD="$new_complete"
36619      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36620$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36621    fi
36622  fi
36623
36624    # Verify that we indeed succeeded with this trick.
36625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36626$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36627    "$LD" --version > /dev/null
36628    if test $? -eq 0 ; then
36629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36630$as_echo "no" >&6; }
36631      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36632    else
36633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36634$as_echo "yes" >&6; }
36635    fi
36636    LDCXX="$LD"
36637  else
36638    # All other toolchains use the compiler to link.
36639    LD="$CC"
36640    LDCXX="$CXX"
36641  fi
36642
36643  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36644
36645
36646  #
36647  # Setup the assembler (AS)
36648  #
36649  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36650
36651
36652  # Publish this variable in the help.
36653
36654
36655  if [ -z "${AS+x}" ]; then
36656    # The variable is not set by user, try to locate tool using the code snippet
36657    for ac_prog in as
36658do
36659  # Extract the first word of "$ac_prog", so it can be a program name with args.
36660set dummy $ac_prog; ac_word=$2
36661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36662$as_echo_n "checking for $ac_word... " >&6; }
36663if ${ac_cv_path_AS+:} false; then :
36664  $as_echo_n "(cached) " >&6
36665else
36666  case $AS in
36667  [\\/]* | ?:[\\/]*)
36668  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36669  ;;
36670  *)
36671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36672for as_dir in $PATH
36673do
36674  IFS=$as_save_IFS
36675  test -z "$as_dir" && as_dir=.
36676    for ac_exec_ext in '' $ac_executable_extensions; do
36677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36678    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36680    break 2
36681  fi
36682done
36683  done
36684IFS=$as_save_IFS
36685
36686  ;;
36687esac
36688fi
36689AS=$ac_cv_path_AS
36690if test -n "$AS"; then
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36692$as_echo "$AS" >&6; }
36693else
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36695$as_echo "no" >&6; }
36696fi
36697
36698
36699  test -n "$AS" && break
36700done
36701
36702  else
36703    # The variable is set, but is it from the command line or the environment?
36704
36705    # Try to remove the string !AS! from our list.
36706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36708      # If it failed, the variable was not from the command line. Ignore it,
36709      # but warn the user (except for BASH, which is always set by the calling BASH).
36710      if test "xAS" != xBASH; then
36711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36712$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36713      fi
36714      # Try to locate tool using the code snippet
36715      for ac_prog in as
36716do
36717  # Extract the first word of "$ac_prog", so it can be a program name with args.
36718set dummy $ac_prog; ac_word=$2
36719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36720$as_echo_n "checking for $ac_word... " >&6; }
36721if ${ac_cv_path_AS+:} false; then :
36722  $as_echo_n "(cached) " >&6
36723else
36724  case $AS in
36725  [\\/]* | ?:[\\/]*)
36726  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36727  ;;
36728  *)
36729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36730for as_dir in $PATH
36731do
36732  IFS=$as_save_IFS
36733  test -z "$as_dir" && as_dir=.
36734    for ac_exec_ext in '' $ac_executable_extensions; do
36735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36736    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36738    break 2
36739  fi
36740done
36741  done
36742IFS=$as_save_IFS
36743
36744  ;;
36745esac
36746fi
36747AS=$ac_cv_path_AS
36748if test -n "$AS"; then
36749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36750$as_echo "$AS" >&6; }
36751else
36752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36753$as_echo "no" >&6; }
36754fi
36755
36756
36757  test -n "$AS" && break
36758done
36759
36760    else
36761      # If it succeeded, then it was overridden by the user. We will use it
36762      # for the tool.
36763
36764      # First remove it from the list of overridden variables, so we can test
36765      # for unknown variables in the end.
36766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36767
36768      # Check if we try to supply an empty value
36769      if test "x$AS" = x; then
36770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36771$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36773$as_echo_n "checking for AS... " >&6; }
36774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36775$as_echo "disabled" >&6; }
36776      else
36777        # Check if the provided tool contains a complete path.
36778        tool_specified="$AS"
36779        tool_basename="${tool_specified##*/}"
36780        if test "x$tool_basename" = "x$tool_specified"; then
36781          # A command without a complete path is provided, search $PATH.
36782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36783$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36784          # Extract the first word of "$tool_basename", so it can be a program name with args.
36785set dummy $tool_basename; ac_word=$2
36786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36787$as_echo_n "checking for $ac_word... " >&6; }
36788if ${ac_cv_path_AS+:} false; then :
36789  $as_echo_n "(cached) " >&6
36790else
36791  case $AS in
36792  [\\/]* | ?:[\\/]*)
36793  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36794  ;;
36795  *)
36796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36797for as_dir in $PATH
36798do
36799  IFS=$as_save_IFS
36800  test -z "$as_dir" && as_dir=.
36801    for ac_exec_ext in '' $ac_executable_extensions; do
36802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36803    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36805    break 2
36806  fi
36807done
36808  done
36809IFS=$as_save_IFS
36810
36811  ;;
36812esac
36813fi
36814AS=$ac_cv_path_AS
36815if test -n "$AS"; then
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36817$as_echo "$AS" >&6; }
36818else
36819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36820$as_echo "no" >&6; }
36821fi
36822
36823
36824          if test "x$AS" = x; then
36825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36826          fi
36827        else
36828          # Otherwise we believe it is a complete path. Use it as it is.
36829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36830$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36832$as_echo_n "checking for AS... " >&6; }
36833          if test ! -x "$tool_specified"; then
36834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36835$as_echo "not found" >&6; }
36836            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36837          fi
36838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36839$as_echo "$tool_specified" >&6; }
36840        fi
36841      fi
36842    fi
36843
36844  fi
36845
36846
36847
36848  # Only process if variable expands to non-empty
36849
36850  if test "x$AS" != x; then
36851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36852
36853  # First separate the path from the arguments. This will split at the first
36854  # space.
36855  complete="$AS"
36856  path="${complete%% *}"
36857  tmp="$complete EOL"
36858  arguments="${tmp#* }"
36859
36860  # Input might be given as Windows format, start by converting to
36861  # unix format.
36862  new_path=`$CYGPATH -u "$path"`
36863
36864  # Now try to locate executable using which
36865  new_path=`$WHICH "$new_path" 2> /dev/null`
36866  # bat and cmd files are not always considered executable in cygwin causing which
36867  # to not find them
36868  if test "x$new_path" = x \
36869      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36870      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36871    new_path=`$CYGPATH -u "$path"`
36872  fi
36873  if test "x$new_path" = x; then
36874    # Oops. Which didn't find the executable.
36875    # The splitting of arguments from the executable at a space might have been incorrect,
36876    # since paths with space are more likely in Windows. Give it another try with the whole
36877    # argument.
36878    path="$complete"
36879    arguments="EOL"
36880    new_path=`$CYGPATH -u "$path"`
36881    new_path=`$WHICH "$new_path" 2> /dev/null`
36882    # bat and cmd files are not always considered executable in cygwin causing which
36883    # to not find them
36884    if test "x$new_path" = x \
36885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36887      new_path=`$CYGPATH -u "$path"`
36888    fi
36889    if test "x$new_path" = x; then
36890      # It's still not found. Now this is an unrecoverable error.
36891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36892$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36893      has_space=`$ECHO "$complete" | $GREP " "`
36894      if test "x$has_space" != x; then
36895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36897      fi
36898      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36899    fi
36900  fi
36901
36902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36905  # "foo.exe" is OK but "foo" is an error.
36906  #
36907  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36908  # It is also a way to make sure we got the proper file name for the real test later on.
36909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36910  if test "x$test_shortpath" = x; then
36911    # Short path failed, file does not exist as specified.
36912    # Try adding .exe or .cmd
36913    if test -f "${new_path}.exe"; then
36914      input_to_shortpath="${new_path}.exe"
36915    elif test -f "${new_path}.cmd"; then
36916      input_to_shortpath="${new_path}.cmd"
36917    else
36918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36919$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36920      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36921$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36922      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36923    fi
36924  else
36925    input_to_shortpath="$new_path"
36926  fi
36927
36928  # Call helper function which possibly converts this using DOS-style short mode.
36929  # If so, the updated path is stored in $new_path.
36930  new_path="$input_to_shortpath"
36931
36932  input_path="$input_to_shortpath"
36933  # Check if we need to convert this using DOS-style short mode. If the path
36934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36935  # take no chances and rewrite it.
36936  # Note: m4 eats our [], so we need to use [ and ] instead.
36937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36938  if test "x$has_forbidden_chars" != x; then
36939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36943      # Going to short mode and back again did indeed matter. Since short mode is
36944      # case insensitive, let's make it lowercase to improve readability.
36945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36946      # Now convert it back to Unix-style (cygpath)
36947      input_path=`$CYGPATH -u "$shortmode_path"`
36948      new_path="$input_path"
36949    fi
36950  fi
36951
36952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36953  if test "x$test_cygdrive_prefix" = x; then
36954    # As a simple fix, exclude /usr/bin since it's not a real path.
36955    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36957      # a path prefixed by /cygdrive for fixpath to work.
36958      new_path="$CYGWIN_ROOT_PATH$input_path"
36959    fi
36960  fi
36961
36962  # remove trailing .exe if any
36963  new_path="${new_path/%.exe/}"
36964
36965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36966
36967  # First separate the path from the arguments. This will split at the first
36968  # space.
36969  complete="$AS"
36970  path="${complete%% *}"
36971  tmp="$complete EOL"
36972  arguments="${tmp#* }"
36973
36974  # Input might be given as Windows format, start by converting to
36975  # unix format.
36976  new_path="$path"
36977
36978  windows_path="$new_path"
36979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36980    unix_path=`$CYGPATH -u "$windows_path"`
36981    new_path="$unix_path"
36982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36984    new_path="$unix_path"
36985  fi
36986
36987
36988  # Now try to locate executable using which
36989  new_path=`$WHICH "$new_path" 2> /dev/null`
36990
36991  if test "x$new_path" = x; then
36992    # Oops. Which didn't find the executable.
36993    # The splitting of arguments from the executable at a space might have been incorrect,
36994    # since paths with space are more likely in Windows. Give it another try with the whole
36995    # argument.
36996    path="$complete"
36997    arguments="EOL"
36998    new_path="$path"
36999
37000  windows_path="$new_path"
37001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37002    unix_path=`$CYGPATH -u "$windows_path"`
37003    new_path="$unix_path"
37004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37006    new_path="$unix_path"
37007  fi
37008
37009
37010    new_path=`$WHICH "$new_path" 2> /dev/null`
37011    # bat and cmd files are not always considered executable in MSYS causing which
37012    # to not find them
37013    if test "x$new_path" = x \
37014        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37015        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37016      new_path="$path"
37017
37018  windows_path="$new_path"
37019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37020    unix_path=`$CYGPATH -u "$windows_path"`
37021    new_path="$unix_path"
37022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37024    new_path="$unix_path"
37025  fi
37026
37027    fi
37028
37029    if test "x$new_path" = x; then
37030      # It's still not found. Now this is an unrecoverable error.
37031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37032$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37033      has_space=`$ECHO "$complete" | $GREP " "`
37034      if test "x$has_space" != x; then
37035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37037      fi
37038      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37039    fi
37040  fi
37041
37042  # Now new_path has a complete unix path to the binary
37043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37044    # Keep paths in /bin as-is, but remove trailing .exe if any
37045    new_path="${new_path/%.exe/}"
37046    # Do not save /bin paths to all_fixpath_prefixes!
37047  else
37048    # Not in mixed or Windows style, start by that.
37049    new_path=`cmd //c echo $new_path`
37050
37051  input_path="$new_path"
37052  # Check if we need to convert this using DOS-style short mode. If the path
37053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37054  # take no chances and rewrite it.
37055  # Note: m4 eats our [], so we need to use [ and ] instead.
37056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37057  if test "x$has_forbidden_chars" != x; then
37058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37060  fi
37061
37062    # Output is in $new_path
37063
37064  windows_path="$new_path"
37065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37066    unix_path=`$CYGPATH -u "$windows_path"`
37067    new_path="$unix_path"
37068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37070    new_path="$unix_path"
37071  fi
37072
37073    # remove trailing .exe if any
37074    new_path="${new_path/%.exe/}"
37075
37076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37078  fi
37079
37080    else
37081      # We're on a unix platform. Hooray! :)
37082      # First separate the path from the arguments. This will split at the first
37083      # space.
37084      complete="$AS"
37085      path="${complete%% *}"
37086      tmp="$complete EOL"
37087      arguments="${tmp#* }"
37088
37089      # Cannot rely on the command "which" here since it doesn't always work.
37090      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37091      if test -z "$is_absolute_path"; then
37092        # Path to executable is not absolute. Find it.
37093        IFS_save="$IFS"
37094        IFS=:
37095        for p in $PATH; do
37096          if test -f "$p/$path" && test -x "$p/$path"; then
37097            new_path="$p/$path"
37098            break
37099          fi
37100        done
37101        IFS="$IFS_save"
37102      else
37103        # This is an absolute path, we can use it without further modifications.
37104        new_path="$path"
37105      fi
37106
37107      if test "x$new_path" = x; then
37108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37109$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37110        has_space=`$ECHO "$complete" | $GREP " "`
37111        if test "x$has_space" != x; then
37112          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37113$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37114        fi
37115        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37116      fi
37117    fi
37118
37119    # Now join together the path and the arguments once again
37120    if test "x$arguments" != xEOL; then
37121      new_complete="$new_path ${arguments% *}"
37122    else
37123      new_complete="$new_path"
37124    fi
37125
37126    if test "x$complete" != "x$new_complete"; then
37127      AS="$new_complete"
37128      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37129$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37130    fi
37131  fi
37132
37133    if test "x$AS" = x; then
37134      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37135    fi
37136  else
37137    # FIXME: is this correct for microsoft?
37138    AS="$CC -c"
37139  fi
37140
37141
37142  #
37143  # Setup the archiver (AR)
37144  #
37145  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37146    # The corresponding ar tool is lib.exe (used to create static libraries)
37147    # Extract the first word of "lib", so it can be a program name with args.
37148set dummy lib; ac_word=$2
37149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37150$as_echo_n "checking for $ac_word... " >&6; }
37151if ${ac_cv_prog_AR+:} false; then :
37152  $as_echo_n "(cached) " >&6
37153else
37154  if test -n "$AR"; then
37155  ac_cv_prog_AR="$AR" # Let the user override the test.
37156else
37157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37158for as_dir in $PATH
37159do
37160  IFS=$as_save_IFS
37161  test -z "$as_dir" && as_dir=.
37162    for ac_exec_ext in '' $ac_executable_extensions; do
37163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37164    ac_cv_prog_AR="lib"
37165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37166    break 2
37167  fi
37168done
37169  done
37170IFS=$as_save_IFS
37171
37172fi
37173fi
37174AR=$ac_cv_prog_AR
37175if test -n "$AR"; then
37176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37177$as_echo "$AR" >&6; }
37178else
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37180$as_echo "no" >&6; }
37181fi
37182
37183
37184  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37185
37186
37187  # Publish this variable in the help.
37188
37189
37190  if [ -z "${AR+x}" ]; then
37191    # The variable is not set by user, try to locate tool using the code snippet
37192    if test -n "$ac_tool_prefix"; then
37193  for ac_prog in ar gcc-ar
37194  do
37195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37198$as_echo_n "checking for $ac_word... " >&6; }
37199if ${ac_cv_prog_AR+:} false; then :
37200  $as_echo_n "(cached) " >&6
37201else
37202  if test -n "$AR"; then
37203  ac_cv_prog_AR="$AR" # Let the user override the test.
37204else
37205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37206for as_dir in $PATH
37207do
37208  IFS=$as_save_IFS
37209  test -z "$as_dir" && as_dir=.
37210    for ac_exec_ext in '' $ac_executable_extensions; do
37211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37212    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37214    break 2
37215  fi
37216done
37217  done
37218IFS=$as_save_IFS
37219
37220fi
37221fi
37222AR=$ac_cv_prog_AR
37223if test -n "$AR"; then
37224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37225$as_echo "$AR" >&6; }
37226else
37227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37228$as_echo "no" >&6; }
37229fi
37230
37231
37232    test -n "$AR" && break
37233  done
37234fi
37235if test -z "$AR"; then
37236  ac_ct_AR=$AR
37237  for ac_prog in ar gcc-ar
37238do
37239  # Extract the first word of "$ac_prog", so it can be a program name with args.
37240set dummy $ac_prog; ac_word=$2
37241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37242$as_echo_n "checking for $ac_word... " >&6; }
37243if ${ac_cv_prog_ac_ct_AR+:} false; then :
37244  $as_echo_n "(cached) " >&6
37245else
37246  if test -n "$ac_ct_AR"; then
37247  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37248else
37249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37250for as_dir in $PATH
37251do
37252  IFS=$as_save_IFS
37253  test -z "$as_dir" && as_dir=.
37254    for ac_exec_ext in '' $ac_executable_extensions; do
37255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37256    ac_cv_prog_ac_ct_AR="$ac_prog"
37257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37258    break 2
37259  fi
37260done
37261  done
37262IFS=$as_save_IFS
37263
37264fi
37265fi
37266ac_ct_AR=$ac_cv_prog_ac_ct_AR
37267if test -n "$ac_ct_AR"; then
37268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37269$as_echo "$ac_ct_AR" >&6; }
37270else
37271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37272$as_echo "no" >&6; }
37273fi
37274
37275
37276  test -n "$ac_ct_AR" && break
37277done
37278
37279  if test "x$ac_ct_AR" = x; then
37280    AR=""
37281  else
37282    case $cross_compiling:$ac_tool_warned in
37283yes:)
37284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37286ac_tool_warned=yes ;;
37287esac
37288    AR=$ac_ct_AR
37289  fi
37290fi
37291
37292  else
37293    # The variable is set, but is it from the command line or the environment?
37294
37295    # Try to remove the string !AR! from our list.
37296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37298      # If it failed, the variable was not from the command line. Ignore it,
37299      # but warn the user (except for BASH, which is always set by the calling BASH).
37300      if test "xAR" != xBASH; then
37301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37302$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37303      fi
37304      # Try to locate tool using the code snippet
37305      if test -n "$ac_tool_prefix"; then
37306  for ac_prog in ar gcc-ar
37307  do
37308    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37309set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37311$as_echo_n "checking for $ac_word... " >&6; }
37312if ${ac_cv_prog_AR+:} false; then :
37313  $as_echo_n "(cached) " >&6
37314else
37315  if test -n "$AR"; then
37316  ac_cv_prog_AR="$AR" # Let the user override the test.
37317else
37318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37319for as_dir in $PATH
37320do
37321  IFS=$as_save_IFS
37322  test -z "$as_dir" && as_dir=.
37323    for ac_exec_ext in '' $ac_executable_extensions; do
37324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37325    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37327    break 2
37328  fi
37329done
37330  done
37331IFS=$as_save_IFS
37332
37333fi
37334fi
37335AR=$ac_cv_prog_AR
37336if test -n "$AR"; then
37337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37338$as_echo "$AR" >&6; }
37339else
37340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37341$as_echo "no" >&6; }
37342fi
37343
37344
37345    test -n "$AR" && break
37346  done
37347fi
37348if test -z "$AR"; then
37349  ac_ct_AR=$AR
37350  for ac_prog in ar gcc-ar
37351do
37352  # Extract the first word of "$ac_prog", so it can be a program name with args.
37353set dummy $ac_prog; ac_word=$2
37354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37355$as_echo_n "checking for $ac_word... " >&6; }
37356if ${ac_cv_prog_ac_ct_AR+:} false; then :
37357  $as_echo_n "(cached) " >&6
37358else
37359  if test -n "$ac_ct_AR"; then
37360  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37361else
37362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37363for as_dir in $PATH
37364do
37365  IFS=$as_save_IFS
37366  test -z "$as_dir" && as_dir=.
37367    for ac_exec_ext in '' $ac_executable_extensions; do
37368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37369    ac_cv_prog_ac_ct_AR="$ac_prog"
37370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37371    break 2
37372  fi
37373done
37374  done
37375IFS=$as_save_IFS
37376
37377fi
37378fi
37379ac_ct_AR=$ac_cv_prog_ac_ct_AR
37380if test -n "$ac_ct_AR"; then
37381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37382$as_echo "$ac_ct_AR" >&6; }
37383else
37384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37385$as_echo "no" >&6; }
37386fi
37387
37388
37389  test -n "$ac_ct_AR" && break
37390done
37391
37392  if test "x$ac_ct_AR" = x; then
37393    AR=""
37394  else
37395    case $cross_compiling:$ac_tool_warned in
37396yes:)
37397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37399ac_tool_warned=yes ;;
37400esac
37401    AR=$ac_ct_AR
37402  fi
37403fi
37404
37405    else
37406      # If it succeeded, then it was overridden by the user. We will use it
37407      # for the tool.
37408
37409      # First remove it from the list of overridden variables, so we can test
37410      # for unknown variables in the end.
37411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37412
37413      # Check if we try to supply an empty value
37414      if test "x$AR" = x; then
37415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37416$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37418$as_echo_n "checking for AR... " >&6; }
37419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37420$as_echo "disabled" >&6; }
37421      else
37422        # Check if the provided tool contains a complete path.
37423        tool_specified="$AR"
37424        tool_basename="${tool_specified##*/}"
37425        if test "x$tool_basename" = "x$tool_specified"; then
37426          # A command without a complete path is provided, search $PATH.
37427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37428$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37429          # Extract the first word of "$tool_basename", so it can be a program name with args.
37430set dummy $tool_basename; ac_word=$2
37431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37432$as_echo_n "checking for $ac_word... " >&6; }
37433if ${ac_cv_path_AR+:} false; then :
37434  $as_echo_n "(cached) " >&6
37435else
37436  case $AR in
37437  [\\/]* | ?:[\\/]*)
37438  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37439  ;;
37440  *)
37441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37442for as_dir in $PATH
37443do
37444  IFS=$as_save_IFS
37445  test -z "$as_dir" && as_dir=.
37446    for ac_exec_ext in '' $ac_executable_extensions; do
37447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37448    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37450    break 2
37451  fi
37452done
37453  done
37454IFS=$as_save_IFS
37455
37456  ;;
37457esac
37458fi
37459AR=$ac_cv_path_AR
37460if test -n "$AR"; then
37461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37462$as_echo "$AR" >&6; }
37463else
37464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37465$as_echo "no" >&6; }
37466fi
37467
37468
37469          if test "x$AR" = x; then
37470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37471          fi
37472        else
37473          # Otherwise we believe it is a complete path. Use it as it is.
37474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37475$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37477$as_echo_n "checking for AR... " >&6; }
37478          if test ! -x "$tool_specified"; then
37479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37480$as_echo "not found" >&6; }
37481            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37482          fi
37483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37484$as_echo "$tool_specified" >&6; }
37485        fi
37486      fi
37487    fi
37488
37489  fi
37490
37491
37492  else
37493
37494
37495  # Publish this variable in the help.
37496
37497
37498  if [ -z "${AR+x}" ]; then
37499    # The variable is not set by user, try to locate tool using the code snippet
37500    if test -n "$ac_tool_prefix"; then
37501  for ac_prog in ar
37502  do
37503    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37504set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37506$as_echo_n "checking for $ac_word... " >&6; }
37507if ${ac_cv_prog_AR+:} false; then :
37508  $as_echo_n "(cached) " >&6
37509else
37510  if test -n "$AR"; then
37511  ac_cv_prog_AR="$AR" # Let the user override the test.
37512else
37513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37514for as_dir in $PATH
37515do
37516  IFS=$as_save_IFS
37517  test -z "$as_dir" && as_dir=.
37518    for ac_exec_ext in '' $ac_executable_extensions; do
37519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37520    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37522    break 2
37523  fi
37524done
37525  done
37526IFS=$as_save_IFS
37527
37528fi
37529fi
37530AR=$ac_cv_prog_AR
37531if test -n "$AR"; then
37532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37533$as_echo "$AR" >&6; }
37534else
37535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37536$as_echo "no" >&6; }
37537fi
37538
37539
37540    test -n "$AR" && break
37541  done
37542fi
37543if test -z "$AR"; then
37544  ac_ct_AR=$AR
37545  for ac_prog in ar
37546do
37547  # Extract the first word of "$ac_prog", so it can be a program name with args.
37548set dummy $ac_prog; ac_word=$2
37549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37550$as_echo_n "checking for $ac_word... " >&6; }
37551if ${ac_cv_prog_ac_ct_AR+:} false; then :
37552  $as_echo_n "(cached) " >&6
37553else
37554  if test -n "$ac_ct_AR"; then
37555  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37556else
37557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37558for as_dir in $PATH
37559do
37560  IFS=$as_save_IFS
37561  test -z "$as_dir" && as_dir=.
37562    for ac_exec_ext in '' $ac_executable_extensions; do
37563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37564    ac_cv_prog_ac_ct_AR="$ac_prog"
37565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37566    break 2
37567  fi
37568done
37569  done
37570IFS=$as_save_IFS
37571
37572fi
37573fi
37574ac_ct_AR=$ac_cv_prog_ac_ct_AR
37575if test -n "$ac_ct_AR"; then
37576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37577$as_echo "$ac_ct_AR" >&6; }
37578else
37579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37580$as_echo "no" >&6; }
37581fi
37582
37583
37584  test -n "$ac_ct_AR" && break
37585done
37586
37587  if test "x$ac_ct_AR" = x; then
37588    AR=""
37589  else
37590    case $cross_compiling:$ac_tool_warned in
37591yes:)
37592{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37593$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37594ac_tool_warned=yes ;;
37595esac
37596    AR=$ac_ct_AR
37597  fi
37598fi
37599
37600  else
37601    # The variable is set, but is it from the command line or the environment?
37602
37603    # Try to remove the string !AR! from our list.
37604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37606      # If it failed, the variable was not from the command line. Ignore it,
37607      # but warn the user (except for BASH, which is always set by the calling BASH).
37608      if test "xAR" != xBASH; then
37609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37610$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37611      fi
37612      # Try to locate tool using the code snippet
37613      if test -n "$ac_tool_prefix"; then
37614  for ac_prog in ar
37615  do
37616    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37617set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37619$as_echo_n "checking for $ac_word... " >&6; }
37620if ${ac_cv_prog_AR+:} false; then :
37621  $as_echo_n "(cached) " >&6
37622else
37623  if test -n "$AR"; then
37624  ac_cv_prog_AR="$AR" # Let the user override the test.
37625else
37626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37627for as_dir in $PATH
37628do
37629  IFS=$as_save_IFS
37630  test -z "$as_dir" && as_dir=.
37631    for ac_exec_ext in '' $ac_executable_extensions; do
37632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37633    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37635    break 2
37636  fi
37637done
37638  done
37639IFS=$as_save_IFS
37640
37641fi
37642fi
37643AR=$ac_cv_prog_AR
37644if test -n "$AR"; then
37645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37646$as_echo "$AR" >&6; }
37647else
37648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37649$as_echo "no" >&6; }
37650fi
37651
37652
37653    test -n "$AR" && break
37654  done
37655fi
37656if test -z "$AR"; then
37657  ac_ct_AR=$AR
37658  for ac_prog in ar
37659do
37660  # Extract the first word of "$ac_prog", so it can be a program name with args.
37661set dummy $ac_prog; ac_word=$2
37662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37663$as_echo_n "checking for $ac_word... " >&6; }
37664if ${ac_cv_prog_ac_ct_AR+:} false; then :
37665  $as_echo_n "(cached) " >&6
37666else
37667  if test -n "$ac_ct_AR"; then
37668  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37669else
37670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37671for as_dir in $PATH
37672do
37673  IFS=$as_save_IFS
37674  test -z "$as_dir" && as_dir=.
37675    for ac_exec_ext in '' $ac_executable_extensions; do
37676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37677    ac_cv_prog_ac_ct_AR="$ac_prog"
37678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37679    break 2
37680  fi
37681done
37682  done
37683IFS=$as_save_IFS
37684
37685fi
37686fi
37687ac_ct_AR=$ac_cv_prog_ac_ct_AR
37688if test -n "$ac_ct_AR"; then
37689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37690$as_echo "$ac_ct_AR" >&6; }
37691else
37692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37693$as_echo "no" >&6; }
37694fi
37695
37696
37697  test -n "$ac_ct_AR" && break
37698done
37699
37700  if test "x$ac_ct_AR" = x; then
37701    AR=""
37702  else
37703    case $cross_compiling:$ac_tool_warned in
37704yes:)
37705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37707ac_tool_warned=yes ;;
37708esac
37709    AR=$ac_ct_AR
37710  fi
37711fi
37712
37713    else
37714      # If it succeeded, then it was overridden by the user. We will use it
37715      # for the tool.
37716
37717      # First remove it from the list of overridden variables, so we can test
37718      # for unknown variables in the end.
37719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37720
37721      # Check if we try to supply an empty value
37722      if test "x$AR" = x; then
37723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37724$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37726$as_echo_n "checking for AR... " >&6; }
37727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37728$as_echo "disabled" >&6; }
37729      else
37730        # Check if the provided tool contains a complete path.
37731        tool_specified="$AR"
37732        tool_basename="${tool_specified##*/}"
37733        if test "x$tool_basename" = "x$tool_specified"; then
37734          # A command without a complete path is provided, search $PATH.
37735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37736$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37737          # Extract the first word of "$tool_basename", so it can be a program name with args.
37738set dummy $tool_basename; ac_word=$2
37739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37740$as_echo_n "checking for $ac_word... " >&6; }
37741if ${ac_cv_path_AR+:} false; then :
37742  $as_echo_n "(cached) " >&6
37743else
37744  case $AR in
37745  [\\/]* | ?:[\\/]*)
37746  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37747  ;;
37748  *)
37749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37750for as_dir in $PATH
37751do
37752  IFS=$as_save_IFS
37753  test -z "$as_dir" && as_dir=.
37754    for ac_exec_ext in '' $ac_executable_extensions; do
37755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37756    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37758    break 2
37759  fi
37760done
37761  done
37762IFS=$as_save_IFS
37763
37764  ;;
37765esac
37766fi
37767AR=$ac_cv_path_AR
37768if test -n "$AR"; then
37769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37770$as_echo "$AR" >&6; }
37771else
37772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37773$as_echo "no" >&6; }
37774fi
37775
37776
37777          if test "x$AR" = x; then
37778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37779          fi
37780        else
37781          # Otherwise we believe it is a complete path. Use it as it is.
37782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37783$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37785$as_echo_n "checking for AR... " >&6; }
37786          if test ! -x "$tool_specified"; then
37787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37788$as_echo "not found" >&6; }
37789            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37790          fi
37791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37792$as_echo "$tool_specified" >&6; }
37793        fi
37794      fi
37795    fi
37796
37797  fi
37798
37799
37800  fi
37801
37802  # Only process if variable expands to non-empty
37803
37804  if test "x$AR" != x; then
37805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37806
37807  # First separate the path from the arguments. This will split at the first
37808  # space.
37809  complete="$AR"
37810  path="${complete%% *}"
37811  tmp="$complete EOL"
37812  arguments="${tmp#* }"
37813
37814  # Input might be given as Windows format, start by converting to
37815  # unix format.
37816  new_path=`$CYGPATH -u "$path"`
37817
37818  # Now try to locate executable using which
37819  new_path=`$WHICH "$new_path" 2> /dev/null`
37820  # bat and cmd files are not always considered executable in cygwin causing which
37821  # to not find them
37822  if test "x$new_path" = x \
37823      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37824      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37825    new_path=`$CYGPATH -u "$path"`
37826  fi
37827  if test "x$new_path" = x; then
37828    # Oops. Which didn't find the executable.
37829    # The splitting of arguments from the executable at a space might have been incorrect,
37830    # since paths with space are more likely in Windows. Give it another try with the whole
37831    # argument.
37832    path="$complete"
37833    arguments="EOL"
37834    new_path=`$CYGPATH -u "$path"`
37835    new_path=`$WHICH "$new_path" 2> /dev/null`
37836    # bat and cmd files are not always considered executable in cygwin causing which
37837    # to not find them
37838    if test "x$new_path" = x \
37839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37841      new_path=`$CYGPATH -u "$path"`
37842    fi
37843    if test "x$new_path" = x; then
37844      # It's still not found. Now this is an unrecoverable error.
37845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37846$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37847      has_space=`$ECHO "$complete" | $GREP " "`
37848      if test "x$has_space" != x; then
37849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37851      fi
37852      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37853    fi
37854  fi
37855
37856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37859  # "foo.exe" is OK but "foo" is an error.
37860  #
37861  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37862  # It is also a way to make sure we got the proper file name for the real test later on.
37863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37864  if test "x$test_shortpath" = x; then
37865    # Short path failed, file does not exist as specified.
37866    # Try adding .exe or .cmd
37867    if test -f "${new_path}.exe"; then
37868      input_to_shortpath="${new_path}.exe"
37869    elif test -f "${new_path}.cmd"; then
37870      input_to_shortpath="${new_path}.cmd"
37871    else
37872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37873$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37874      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37875$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37876      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37877    fi
37878  else
37879    input_to_shortpath="$new_path"
37880  fi
37881
37882  # Call helper function which possibly converts this using DOS-style short mode.
37883  # If so, the updated path is stored in $new_path.
37884  new_path="$input_to_shortpath"
37885
37886  input_path="$input_to_shortpath"
37887  # Check if we need to convert this using DOS-style short mode. If the path
37888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37889  # take no chances and rewrite it.
37890  # Note: m4 eats our [], so we need to use [ and ] instead.
37891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37892  if test "x$has_forbidden_chars" != x; then
37893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37897      # Going to short mode and back again did indeed matter. Since short mode is
37898      # case insensitive, let's make it lowercase to improve readability.
37899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37900      # Now convert it back to Unix-style (cygpath)
37901      input_path=`$CYGPATH -u "$shortmode_path"`
37902      new_path="$input_path"
37903    fi
37904  fi
37905
37906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37907  if test "x$test_cygdrive_prefix" = x; then
37908    # As a simple fix, exclude /usr/bin since it's not a real path.
37909    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37911      # a path prefixed by /cygdrive for fixpath to work.
37912      new_path="$CYGWIN_ROOT_PATH$input_path"
37913    fi
37914  fi
37915
37916  # remove trailing .exe if any
37917  new_path="${new_path/%.exe/}"
37918
37919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37920
37921  # First separate the path from the arguments. This will split at the first
37922  # space.
37923  complete="$AR"
37924  path="${complete%% *}"
37925  tmp="$complete EOL"
37926  arguments="${tmp#* }"
37927
37928  # Input might be given as Windows format, start by converting to
37929  # unix format.
37930  new_path="$path"
37931
37932  windows_path="$new_path"
37933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37934    unix_path=`$CYGPATH -u "$windows_path"`
37935    new_path="$unix_path"
37936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37938    new_path="$unix_path"
37939  fi
37940
37941
37942  # Now try to locate executable using which
37943  new_path=`$WHICH "$new_path" 2> /dev/null`
37944
37945  if test "x$new_path" = x; then
37946    # Oops. Which didn't find the executable.
37947    # The splitting of arguments from the executable at a space might have been incorrect,
37948    # since paths with space are more likely in Windows. Give it another try with the whole
37949    # argument.
37950    path="$complete"
37951    arguments="EOL"
37952    new_path="$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
37964    new_path=`$WHICH "$new_path" 2> /dev/null`
37965    # bat and cmd files are not always considered executable in MSYS causing which
37966    # to not find them
37967    if test "x$new_path" = x \
37968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37970      new_path="$path"
37971
37972  windows_path="$new_path"
37973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37974    unix_path=`$CYGPATH -u "$windows_path"`
37975    new_path="$unix_path"
37976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37978    new_path="$unix_path"
37979  fi
37980
37981    fi
37982
37983    if test "x$new_path" = x; then
37984      # It's still not found. Now this is an unrecoverable error.
37985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37986$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37987      has_space=`$ECHO "$complete" | $GREP " "`
37988      if test "x$has_space" != x; then
37989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37991      fi
37992      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37993    fi
37994  fi
37995
37996  # Now new_path has a complete unix path to the binary
37997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37998    # Keep paths in /bin as-is, but remove trailing .exe if any
37999    new_path="${new_path/%.exe/}"
38000    # Do not save /bin paths to all_fixpath_prefixes!
38001  else
38002    # Not in mixed or Windows style, start by that.
38003    new_path=`cmd //c echo $new_path`
38004
38005  input_path="$new_path"
38006  # Check if we need to convert this using DOS-style short mode. If the path
38007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38008  # take no chances and rewrite it.
38009  # Note: m4 eats our [], so we need to use [ and ] instead.
38010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38011  if test "x$has_forbidden_chars" != x; then
38012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38014  fi
38015
38016    # Output is in $new_path
38017
38018  windows_path="$new_path"
38019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38020    unix_path=`$CYGPATH -u "$windows_path"`
38021    new_path="$unix_path"
38022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38024    new_path="$unix_path"
38025  fi
38026
38027    # remove trailing .exe if any
38028    new_path="${new_path/%.exe/}"
38029
38030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38032  fi
38033
38034    else
38035      # We're on a unix platform. Hooray! :)
38036      # First separate the path from the arguments. This will split at the first
38037      # space.
38038      complete="$AR"
38039      path="${complete%% *}"
38040      tmp="$complete EOL"
38041      arguments="${tmp#* }"
38042
38043      # Cannot rely on the command "which" here since it doesn't always work.
38044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38045      if test -z "$is_absolute_path"; then
38046        # Path to executable is not absolute. Find it.
38047        IFS_save="$IFS"
38048        IFS=:
38049        for p in $PATH; do
38050          if test -f "$p/$path" && test -x "$p/$path"; then
38051            new_path="$p/$path"
38052            break
38053          fi
38054        done
38055        IFS="$IFS_save"
38056      else
38057        # This is an absolute path, we can use it without further modifications.
38058        new_path="$path"
38059      fi
38060
38061      if test "x$new_path" = x; then
38062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38063$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38064        has_space=`$ECHO "$complete" | $GREP " "`
38065        if test "x$has_space" != x; then
38066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38068        fi
38069        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38070      fi
38071    fi
38072
38073    # Now join together the path and the arguments once again
38074    if test "x$arguments" != xEOL; then
38075      new_complete="$new_path ${arguments% *}"
38076    else
38077      new_complete="$new_path"
38078    fi
38079
38080    if test "x$complete" != "x$new_complete"; then
38081      AR="$new_complete"
38082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38083$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38084    fi
38085  fi
38086
38087
38088
38089  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38090
38091
38092  # Publish this variable in the help.
38093
38094
38095  if [ -z "${LIPO+x}" ]; then
38096    # The variable is not set by user, try to locate tool using the code snippet
38097    for ac_prog in lipo
38098do
38099  # Extract the first word of "$ac_prog", so it can be a program name with args.
38100set dummy $ac_prog; ac_word=$2
38101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38102$as_echo_n "checking for $ac_word... " >&6; }
38103if ${ac_cv_path_LIPO+:} false; then :
38104  $as_echo_n "(cached) " >&6
38105else
38106  case $LIPO in
38107  [\\/]* | ?:[\\/]*)
38108  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38109  ;;
38110  *)
38111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38112for as_dir in $PATH
38113do
38114  IFS=$as_save_IFS
38115  test -z "$as_dir" && as_dir=.
38116    for ac_exec_ext in '' $ac_executable_extensions; do
38117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38118    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38120    break 2
38121  fi
38122done
38123  done
38124IFS=$as_save_IFS
38125
38126  ;;
38127esac
38128fi
38129LIPO=$ac_cv_path_LIPO
38130if test -n "$LIPO"; then
38131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38132$as_echo "$LIPO" >&6; }
38133else
38134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38135$as_echo "no" >&6; }
38136fi
38137
38138
38139  test -n "$LIPO" && break
38140done
38141
38142  else
38143    # The variable is set, but is it from the command line or the environment?
38144
38145    # Try to remove the string !LIPO! from our list.
38146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38148      # If it failed, the variable was not from the command line. Ignore it,
38149      # but warn the user (except for BASH, which is always set by the calling BASH).
38150      if test "xLIPO" != xBASH; then
38151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38152$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38153      fi
38154      # Try to locate tool using the code snippet
38155      for ac_prog in lipo
38156do
38157  # Extract the first word of "$ac_prog", so it can be a program name with args.
38158set dummy $ac_prog; ac_word=$2
38159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38160$as_echo_n "checking for $ac_word... " >&6; }
38161if ${ac_cv_path_LIPO+:} false; then :
38162  $as_echo_n "(cached) " >&6
38163else
38164  case $LIPO in
38165  [\\/]* | ?:[\\/]*)
38166  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38167  ;;
38168  *)
38169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38170for as_dir in $PATH
38171do
38172  IFS=$as_save_IFS
38173  test -z "$as_dir" && as_dir=.
38174    for ac_exec_ext in '' $ac_executable_extensions; do
38175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38176    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38178    break 2
38179  fi
38180done
38181  done
38182IFS=$as_save_IFS
38183
38184  ;;
38185esac
38186fi
38187LIPO=$ac_cv_path_LIPO
38188if test -n "$LIPO"; then
38189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38190$as_echo "$LIPO" >&6; }
38191else
38192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38193$as_echo "no" >&6; }
38194fi
38195
38196
38197  test -n "$LIPO" && break
38198done
38199
38200    else
38201      # If it succeeded, then it was overridden by the user. We will use it
38202      # for the tool.
38203
38204      # First remove it from the list of overridden variables, so we can test
38205      # for unknown variables in the end.
38206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38207
38208      # Check if we try to supply an empty value
38209      if test "x$LIPO" = x; then
38210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38211$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38213$as_echo_n "checking for LIPO... " >&6; }
38214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38215$as_echo "disabled" >&6; }
38216      else
38217        # Check if the provided tool contains a complete path.
38218        tool_specified="$LIPO"
38219        tool_basename="${tool_specified##*/}"
38220        if test "x$tool_basename" = "x$tool_specified"; then
38221          # A command without a complete path is provided, search $PATH.
38222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38223$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38224          # Extract the first word of "$tool_basename", so it can be a program name with args.
38225set dummy $tool_basename; ac_word=$2
38226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38227$as_echo_n "checking for $ac_word... " >&6; }
38228if ${ac_cv_path_LIPO+:} false; then :
38229  $as_echo_n "(cached) " >&6
38230else
38231  case $LIPO in
38232  [\\/]* | ?:[\\/]*)
38233  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38234  ;;
38235  *)
38236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38237for as_dir in $PATH
38238do
38239  IFS=$as_save_IFS
38240  test -z "$as_dir" && as_dir=.
38241    for ac_exec_ext in '' $ac_executable_extensions; do
38242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38243    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38245    break 2
38246  fi
38247done
38248  done
38249IFS=$as_save_IFS
38250
38251  ;;
38252esac
38253fi
38254LIPO=$ac_cv_path_LIPO
38255if test -n "$LIPO"; then
38256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38257$as_echo "$LIPO" >&6; }
38258else
38259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38260$as_echo "no" >&6; }
38261fi
38262
38263
38264          if test "x$LIPO" = x; then
38265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38266          fi
38267        else
38268          # Otherwise we believe it is a complete path. Use it as it is.
38269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38270$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38272$as_echo_n "checking for LIPO... " >&6; }
38273          if test ! -x "$tool_specified"; then
38274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38275$as_echo "not found" >&6; }
38276            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38277          fi
38278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38279$as_echo "$tool_specified" >&6; }
38280        fi
38281      fi
38282    fi
38283
38284  fi
38285
38286
38287
38288  # Only process if variable expands to non-empty
38289
38290  if test "x$LIPO" != x; then
38291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38292
38293  # First separate the path from the arguments. This will split at the first
38294  # space.
38295  complete="$LIPO"
38296  path="${complete%% *}"
38297  tmp="$complete EOL"
38298  arguments="${tmp#* }"
38299
38300  # Input might be given as Windows format, start by converting to
38301  # unix format.
38302  new_path=`$CYGPATH -u "$path"`
38303
38304  # Now try to locate executable using which
38305  new_path=`$WHICH "$new_path" 2> /dev/null`
38306  # bat and cmd files are not always considered executable in cygwin causing which
38307  # to not find them
38308  if test "x$new_path" = x \
38309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38311    new_path=`$CYGPATH -u "$path"`
38312  fi
38313  if test "x$new_path" = x; then
38314    # Oops. Which didn't find the executable.
38315    # The splitting of arguments from the executable at a space might have been incorrect,
38316    # since paths with space are more likely in Windows. Give it another try with the whole
38317    # argument.
38318    path="$complete"
38319    arguments="EOL"
38320    new_path=`$CYGPATH -u "$path"`
38321    new_path=`$WHICH "$new_path" 2> /dev/null`
38322    # bat and cmd files are not always considered executable in cygwin causing which
38323    # to not find them
38324    if test "x$new_path" = x \
38325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38327      new_path=`$CYGPATH -u "$path"`
38328    fi
38329    if test "x$new_path" = x; then
38330      # It's still not found. Now this is an unrecoverable error.
38331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38332$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38333      has_space=`$ECHO "$complete" | $GREP " "`
38334      if test "x$has_space" != x; then
38335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38337      fi
38338      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38339    fi
38340  fi
38341
38342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38345  # "foo.exe" is OK but "foo" is an error.
38346  #
38347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38348  # It is also a way to make sure we got the proper file name for the real test later on.
38349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38350  if test "x$test_shortpath" = x; then
38351    # Short path failed, file does not exist as specified.
38352    # Try adding .exe or .cmd
38353    if test -f "${new_path}.exe"; then
38354      input_to_shortpath="${new_path}.exe"
38355    elif test -f "${new_path}.cmd"; then
38356      input_to_shortpath="${new_path}.cmd"
38357    else
38358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38359$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38362      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38363    fi
38364  else
38365    input_to_shortpath="$new_path"
38366  fi
38367
38368  # Call helper function which possibly converts this using DOS-style short mode.
38369  # If so, the updated path is stored in $new_path.
38370  new_path="$input_to_shortpath"
38371
38372  input_path="$input_to_shortpath"
38373  # Check if we need to convert this using DOS-style short mode. If the path
38374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38375  # take no chances and rewrite it.
38376  # Note: m4 eats our [], so we need to use [ and ] instead.
38377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38378  if test "x$has_forbidden_chars" != x; then
38379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38383      # Going to short mode and back again did indeed matter. Since short mode is
38384      # case insensitive, let's make it lowercase to improve readability.
38385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38386      # Now convert it back to Unix-style (cygpath)
38387      input_path=`$CYGPATH -u "$shortmode_path"`
38388      new_path="$input_path"
38389    fi
38390  fi
38391
38392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38393  if test "x$test_cygdrive_prefix" = x; then
38394    # As a simple fix, exclude /usr/bin since it's not a real path.
38395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38397      # a path prefixed by /cygdrive for fixpath to work.
38398      new_path="$CYGWIN_ROOT_PATH$input_path"
38399    fi
38400  fi
38401
38402  # remove trailing .exe if any
38403  new_path="${new_path/%.exe/}"
38404
38405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38406
38407  # First separate the path from the arguments. This will split at the first
38408  # space.
38409  complete="$LIPO"
38410  path="${complete%% *}"
38411  tmp="$complete EOL"
38412  arguments="${tmp#* }"
38413
38414  # Input might be given as Windows format, start by converting to
38415  # unix format.
38416  new_path="$path"
38417
38418  windows_path="$new_path"
38419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38420    unix_path=`$CYGPATH -u "$windows_path"`
38421    new_path="$unix_path"
38422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38424    new_path="$unix_path"
38425  fi
38426
38427
38428  # Now try to locate executable using which
38429  new_path=`$WHICH "$new_path" 2> /dev/null`
38430
38431  if test "x$new_path" = x; then
38432    # Oops. Which didn't find the executable.
38433    # The splitting of arguments from the executable at a space might have been incorrect,
38434    # since paths with space are more likely in Windows. Give it another try with the whole
38435    # argument.
38436    path="$complete"
38437    arguments="EOL"
38438    new_path="$path"
38439
38440  windows_path="$new_path"
38441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38442    unix_path=`$CYGPATH -u "$windows_path"`
38443    new_path="$unix_path"
38444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38446    new_path="$unix_path"
38447  fi
38448
38449
38450    new_path=`$WHICH "$new_path" 2> /dev/null`
38451    # bat and cmd files are not always considered executable in MSYS causing which
38452    # to not find them
38453    if test "x$new_path" = x \
38454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38456      new_path="$path"
38457
38458  windows_path="$new_path"
38459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38460    unix_path=`$CYGPATH -u "$windows_path"`
38461    new_path="$unix_path"
38462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38464    new_path="$unix_path"
38465  fi
38466
38467    fi
38468
38469    if test "x$new_path" = x; then
38470      # It's still not found. Now this is an unrecoverable error.
38471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38472$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38473      has_space=`$ECHO "$complete" | $GREP " "`
38474      if test "x$has_space" != x; then
38475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38477      fi
38478      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38479    fi
38480  fi
38481
38482  # Now new_path has a complete unix path to the binary
38483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38484    # Keep paths in /bin as-is, but remove trailing .exe if any
38485    new_path="${new_path/%.exe/}"
38486    # Do not save /bin paths to all_fixpath_prefixes!
38487  else
38488    # Not in mixed or Windows style, start by that.
38489    new_path=`cmd //c echo $new_path`
38490
38491  input_path="$new_path"
38492  # Check if we need to convert this using DOS-style short mode. If the path
38493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38494  # take no chances and rewrite it.
38495  # Note: m4 eats our [], so we need to use [ and ] instead.
38496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38497  if test "x$has_forbidden_chars" != x; then
38498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38500  fi
38501
38502    # Output is in $new_path
38503
38504  windows_path="$new_path"
38505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38506    unix_path=`$CYGPATH -u "$windows_path"`
38507    new_path="$unix_path"
38508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38510    new_path="$unix_path"
38511  fi
38512
38513    # remove trailing .exe if any
38514    new_path="${new_path/%.exe/}"
38515
38516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38518  fi
38519
38520    else
38521      # We're on a unix platform. Hooray! :)
38522      # First separate the path from the arguments. This will split at the first
38523      # space.
38524      complete="$LIPO"
38525      path="${complete%% *}"
38526      tmp="$complete EOL"
38527      arguments="${tmp#* }"
38528
38529      # Cannot rely on the command "which" here since it doesn't always work.
38530      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38531      if test -z "$is_absolute_path"; then
38532        # Path to executable is not absolute. Find it.
38533        IFS_save="$IFS"
38534        IFS=:
38535        for p in $PATH; do
38536          if test -f "$p/$path" && test -x "$p/$path"; then
38537            new_path="$p/$path"
38538            break
38539          fi
38540        done
38541        IFS="$IFS_save"
38542      else
38543        # This is an absolute path, we can use it without further modifications.
38544        new_path="$path"
38545      fi
38546
38547      if test "x$new_path" = x; then
38548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38549$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38550        has_space=`$ECHO "$complete" | $GREP " "`
38551        if test "x$has_space" != x; then
38552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38554        fi
38555        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38556      fi
38557    fi
38558
38559    # Now join together the path and the arguments once again
38560    if test "x$arguments" != xEOL; then
38561      new_complete="$new_path ${arguments% *}"
38562    else
38563      new_complete="$new_path"
38564    fi
38565
38566    if test "x$complete" != "x$new_complete"; then
38567      LIPO="$new_complete"
38568      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38569$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38570    fi
38571  fi
38572
38573  fi
38574
38575  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38576    # Extract the first word of "mt", so it can be a program name with args.
38577set dummy mt; ac_word=$2
38578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38579$as_echo_n "checking for $ac_word... " >&6; }
38580if ${ac_cv_prog_MT+:} false; then :
38581  $as_echo_n "(cached) " >&6
38582else
38583  if test -n "$MT"; then
38584  ac_cv_prog_MT="$MT" # Let the user override the test.
38585else
38586  ac_prog_rejected=no
38587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38588for as_dir in $PATH
38589do
38590  IFS=$as_save_IFS
38591  test -z "$as_dir" && as_dir=.
38592    for ac_exec_ext in '' $ac_executable_extensions; do
38593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38594    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38595       ac_prog_rejected=yes
38596       continue
38597     fi
38598    ac_cv_prog_MT="mt"
38599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38600    break 2
38601  fi
38602done
38603  done
38604IFS=$as_save_IFS
38605
38606if test $ac_prog_rejected = yes; then
38607  # We found a bogon in the path, so make sure we never use it.
38608  set dummy $ac_cv_prog_MT
38609  shift
38610  if test $# != 0; then
38611    # We chose a different compiler from the bogus one.
38612    # However, it has the same basename, so the bogon will be chosen
38613    # first if we set MT to just the basename; use the full file name.
38614    shift
38615    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38616  fi
38617fi
38618fi
38619fi
38620MT=$ac_cv_prog_MT
38621if test -n "$MT"; then
38622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38623$as_echo "$MT" >&6; }
38624else
38625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38626$as_echo "no" >&6; }
38627fi
38628
38629
38630
38631  # Only process if variable expands to non-empty
38632
38633  if test "x$MT" != x; then
38634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38635
38636  # First separate the path from the arguments. This will split at the first
38637  # space.
38638  complete="$MT"
38639  path="${complete%% *}"
38640  tmp="$complete EOL"
38641  arguments="${tmp#* }"
38642
38643  # Input might be given as Windows format, start by converting to
38644  # unix format.
38645  new_path=`$CYGPATH -u "$path"`
38646
38647  # Now try to locate executable using which
38648  new_path=`$WHICH "$new_path" 2> /dev/null`
38649  # bat and cmd files are not always considered executable in cygwin causing which
38650  # to not find them
38651  if test "x$new_path" = x \
38652      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38653      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38654    new_path=`$CYGPATH -u "$path"`
38655  fi
38656  if test "x$new_path" = x; then
38657    # Oops. Which didn't find the executable.
38658    # The splitting of arguments from the executable at a space might have been incorrect,
38659    # since paths with space are more likely in Windows. Give it another try with the whole
38660    # argument.
38661    path="$complete"
38662    arguments="EOL"
38663    new_path=`$CYGPATH -u "$path"`
38664    new_path=`$WHICH "$new_path" 2> /dev/null`
38665    # bat and cmd files are not always considered executable in cygwin causing which
38666    # to not find them
38667    if test "x$new_path" = x \
38668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38670      new_path=`$CYGPATH -u "$path"`
38671    fi
38672    if test "x$new_path" = x; then
38673      # It's still not found. Now this is an unrecoverable error.
38674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38675$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38676      has_space=`$ECHO "$complete" | $GREP " "`
38677      if test "x$has_space" != x; then
38678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38680      fi
38681      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38682    fi
38683  fi
38684
38685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38688  # "foo.exe" is OK but "foo" is an error.
38689  #
38690  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38691  # It is also a way to make sure we got the proper file name for the real test later on.
38692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38693  if test "x$test_shortpath" = x; then
38694    # Short path failed, file does not exist as specified.
38695    # Try adding .exe or .cmd
38696    if test -f "${new_path}.exe"; then
38697      input_to_shortpath="${new_path}.exe"
38698    elif test -f "${new_path}.cmd"; then
38699      input_to_shortpath="${new_path}.cmd"
38700    else
38701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38702$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38703      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38705      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38706    fi
38707  else
38708    input_to_shortpath="$new_path"
38709  fi
38710
38711  # Call helper function which possibly converts this using DOS-style short mode.
38712  # If so, the updated path is stored in $new_path.
38713  new_path="$input_to_shortpath"
38714
38715  input_path="$input_to_shortpath"
38716  # Check if we need to convert this using DOS-style short mode. If the path
38717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38718  # take no chances and rewrite it.
38719  # Note: m4 eats our [], so we need to use [ and ] instead.
38720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38721  if test "x$has_forbidden_chars" != x; then
38722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38726      # Going to short mode and back again did indeed matter. Since short mode is
38727      # case insensitive, let's make it lowercase to improve readability.
38728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38729      # Now convert it back to Unix-style (cygpath)
38730      input_path=`$CYGPATH -u "$shortmode_path"`
38731      new_path="$input_path"
38732    fi
38733  fi
38734
38735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38736  if test "x$test_cygdrive_prefix" = x; then
38737    # As a simple fix, exclude /usr/bin since it's not a real path.
38738    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38740      # a path prefixed by /cygdrive for fixpath to work.
38741      new_path="$CYGWIN_ROOT_PATH$input_path"
38742    fi
38743  fi
38744
38745  # remove trailing .exe if any
38746  new_path="${new_path/%.exe/}"
38747
38748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38749
38750  # First separate the path from the arguments. This will split at the first
38751  # space.
38752  complete="$MT"
38753  path="${complete%% *}"
38754  tmp="$complete EOL"
38755  arguments="${tmp#* }"
38756
38757  # Input might be given as Windows format, start by converting to
38758  # unix format.
38759  new_path="$path"
38760
38761  windows_path="$new_path"
38762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38763    unix_path=`$CYGPATH -u "$windows_path"`
38764    new_path="$unix_path"
38765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38767    new_path="$unix_path"
38768  fi
38769
38770
38771  # Now try to locate executable using which
38772  new_path=`$WHICH "$new_path" 2> /dev/null`
38773
38774  if test "x$new_path" = x; then
38775    # Oops. Which didn't find the executable.
38776    # The splitting of arguments from the executable at a space might have been incorrect,
38777    # since paths with space are more likely in Windows. Give it another try with the whole
38778    # argument.
38779    path="$complete"
38780    arguments="EOL"
38781    new_path="$path"
38782
38783  windows_path="$new_path"
38784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38785    unix_path=`$CYGPATH -u "$windows_path"`
38786    new_path="$unix_path"
38787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38789    new_path="$unix_path"
38790  fi
38791
38792
38793    new_path=`$WHICH "$new_path" 2> /dev/null`
38794    # bat and cmd files are not always considered executable in MSYS causing which
38795    # to not find them
38796    if test "x$new_path" = x \
38797        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38798        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38799      new_path="$path"
38800
38801  windows_path="$new_path"
38802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38803    unix_path=`$CYGPATH -u "$windows_path"`
38804    new_path="$unix_path"
38805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38807    new_path="$unix_path"
38808  fi
38809
38810    fi
38811
38812    if test "x$new_path" = x; then
38813      # It's still not found. Now this is an unrecoverable error.
38814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38815$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38816      has_space=`$ECHO "$complete" | $GREP " "`
38817      if test "x$has_space" != x; then
38818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38820      fi
38821      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38822    fi
38823  fi
38824
38825  # Now new_path has a complete unix path to the binary
38826  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38827    # Keep paths in /bin as-is, but remove trailing .exe if any
38828    new_path="${new_path/%.exe/}"
38829    # Do not save /bin paths to all_fixpath_prefixes!
38830  else
38831    # Not in mixed or Windows style, start by that.
38832    new_path=`cmd //c echo $new_path`
38833
38834  input_path="$new_path"
38835  # Check if we need to convert this using DOS-style short mode. If the path
38836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38837  # take no chances and rewrite it.
38838  # Note: m4 eats our [], so we need to use [ and ] instead.
38839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38840  if test "x$has_forbidden_chars" != x; then
38841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38843  fi
38844
38845    # Output is in $new_path
38846
38847  windows_path="$new_path"
38848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38849    unix_path=`$CYGPATH -u "$windows_path"`
38850    new_path="$unix_path"
38851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38853    new_path="$unix_path"
38854  fi
38855
38856    # remove trailing .exe if any
38857    new_path="${new_path/%.exe/}"
38858
38859    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38860    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38861  fi
38862
38863    else
38864      # We're on a unix platform. Hooray! :)
38865      # First separate the path from the arguments. This will split at the first
38866      # space.
38867      complete="$MT"
38868      path="${complete%% *}"
38869      tmp="$complete EOL"
38870      arguments="${tmp#* }"
38871
38872      # Cannot rely on the command "which" here since it doesn't always work.
38873      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38874      if test -z "$is_absolute_path"; then
38875        # Path to executable is not absolute. Find it.
38876        IFS_save="$IFS"
38877        IFS=:
38878        for p in $PATH; do
38879          if test -f "$p/$path" && test -x "$p/$path"; then
38880            new_path="$p/$path"
38881            break
38882          fi
38883        done
38884        IFS="$IFS_save"
38885      else
38886        # This is an absolute path, we can use it without further modifications.
38887        new_path="$path"
38888      fi
38889
38890      if test "x$new_path" = x; then
38891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38892$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38893        has_space=`$ECHO "$complete" | $GREP " "`
38894        if test "x$has_space" != x; then
38895          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38897        fi
38898        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38899      fi
38900    fi
38901
38902    # Now join together the path and the arguments once again
38903    if test "x$arguments" != xEOL; then
38904      new_complete="$new_path ${arguments% *}"
38905    else
38906      new_complete="$new_path"
38907    fi
38908
38909    if test "x$complete" != "x$new_complete"; then
38910      MT="$new_complete"
38911      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38912$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38913    fi
38914  fi
38915
38916    # Setup the resource compiler (RC)
38917    # Extract the first word of "rc", so it can be a program name with args.
38918set dummy rc; ac_word=$2
38919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38920$as_echo_n "checking for $ac_word... " >&6; }
38921if ${ac_cv_prog_RC+:} false; then :
38922  $as_echo_n "(cached) " >&6
38923else
38924  if test -n "$RC"; then
38925  ac_cv_prog_RC="$RC" # Let the user override the test.
38926else
38927  ac_prog_rejected=no
38928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38929for as_dir in $PATH
38930do
38931  IFS=$as_save_IFS
38932  test -z "$as_dir" && as_dir=.
38933    for ac_exec_ext in '' $ac_executable_extensions; do
38934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38935    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38936       ac_prog_rejected=yes
38937       continue
38938     fi
38939    ac_cv_prog_RC="rc"
38940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38941    break 2
38942  fi
38943done
38944  done
38945IFS=$as_save_IFS
38946
38947if test $ac_prog_rejected = yes; then
38948  # We found a bogon in the path, so make sure we never use it.
38949  set dummy $ac_cv_prog_RC
38950  shift
38951  if test $# != 0; then
38952    # We chose a different compiler from the bogus one.
38953    # However, it has the same basename, so the bogon will be chosen
38954    # first if we set RC to just the basename; use the full file name.
38955    shift
38956    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38957  fi
38958fi
38959fi
38960fi
38961RC=$ac_cv_prog_RC
38962if test -n "$RC"; then
38963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38964$as_echo "$RC" >&6; }
38965else
38966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38967$as_echo "no" >&6; }
38968fi
38969
38970
38971
38972  # Only process if variable expands to non-empty
38973
38974  if test "x$RC" != x; then
38975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38976
38977  # First separate the path from the arguments. This will split at the first
38978  # space.
38979  complete="$RC"
38980  path="${complete%% *}"
38981  tmp="$complete EOL"
38982  arguments="${tmp#* }"
38983
38984  # Input might be given as Windows format, start by converting to
38985  # unix format.
38986  new_path=`$CYGPATH -u "$path"`
38987
38988  # Now try to locate executable using which
38989  new_path=`$WHICH "$new_path" 2> /dev/null`
38990  # bat and cmd files are not always considered executable in cygwin causing which
38991  # to not find them
38992  if test "x$new_path" = x \
38993      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38994      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38995    new_path=`$CYGPATH -u "$path"`
38996  fi
38997  if test "x$new_path" = x; then
38998    # Oops. Which didn't find the executable.
38999    # The splitting of arguments from the executable at a space might have been incorrect,
39000    # since paths with space are more likely in Windows. Give it another try with the whole
39001    # argument.
39002    path="$complete"
39003    arguments="EOL"
39004    new_path=`$CYGPATH -u "$path"`
39005    new_path=`$WHICH "$new_path" 2> /dev/null`
39006    # bat and cmd files are not always considered executable in cygwin causing which
39007    # to not find them
39008    if test "x$new_path" = x \
39009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39011      new_path=`$CYGPATH -u "$path"`
39012    fi
39013    if test "x$new_path" = x; then
39014      # It's still not found. Now this is an unrecoverable error.
39015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39016$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39017      has_space=`$ECHO "$complete" | $GREP " "`
39018      if test "x$has_space" != x; then
39019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39021      fi
39022      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39023    fi
39024  fi
39025
39026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39029  # "foo.exe" is OK but "foo" is an error.
39030  #
39031  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39032  # It is also a way to make sure we got the proper file name for the real test later on.
39033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39034  if test "x$test_shortpath" = x; then
39035    # Short path failed, file does not exist as specified.
39036    # Try adding .exe or .cmd
39037    if test -f "${new_path}.exe"; then
39038      input_to_shortpath="${new_path}.exe"
39039    elif test -f "${new_path}.cmd"; then
39040      input_to_shortpath="${new_path}.cmd"
39041    else
39042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39043$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39046      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39047    fi
39048  else
39049    input_to_shortpath="$new_path"
39050  fi
39051
39052  # Call helper function which possibly converts this using DOS-style short mode.
39053  # If so, the updated path is stored in $new_path.
39054  new_path="$input_to_shortpath"
39055
39056  input_path="$input_to_shortpath"
39057  # Check if we need to convert this using DOS-style short mode. If the path
39058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39059  # take no chances and rewrite it.
39060  # Note: m4 eats our [], so we need to use [ and ] instead.
39061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39062  if test "x$has_forbidden_chars" != x; then
39063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39067      # Going to short mode and back again did indeed matter. Since short mode is
39068      # case insensitive, let's make it lowercase to improve readability.
39069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39070      # Now convert it back to Unix-style (cygpath)
39071      input_path=`$CYGPATH -u "$shortmode_path"`
39072      new_path="$input_path"
39073    fi
39074  fi
39075
39076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39077  if test "x$test_cygdrive_prefix" = x; then
39078    # As a simple fix, exclude /usr/bin since it's not a real path.
39079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39081      # a path prefixed by /cygdrive for fixpath to work.
39082      new_path="$CYGWIN_ROOT_PATH$input_path"
39083    fi
39084  fi
39085
39086  # remove trailing .exe if any
39087  new_path="${new_path/%.exe/}"
39088
39089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39090
39091  # First separate the path from the arguments. This will split at the first
39092  # space.
39093  complete="$RC"
39094  path="${complete%% *}"
39095  tmp="$complete EOL"
39096  arguments="${tmp#* }"
39097
39098  # Input might be given as Windows format, start by converting to
39099  # unix format.
39100  new_path="$path"
39101
39102  windows_path="$new_path"
39103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39104    unix_path=`$CYGPATH -u "$windows_path"`
39105    new_path="$unix_path"
39106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39108    new_path="$unix_path"
39109  fi
39110
39111
39112  # Now try to locate executable using which
39113  new_path=`$WHICH "$new_path" 2> /dev/null`
39114
39115  if test "x$new_path" = x; then
39116    # Oops. Which didn't find the executable.
39117    # The splitting of arguments from the executable at a space might have been incorrect,
39118    # since paths with space are more likely in Windows. Give it another try with the whole
39119    # argument.
39120    path="$complete"
39121    arguments="EOL"
39122    new_path="$path"
39123
39124  windows_path="$new_path"
39125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39126    unix_path=`$CYGPATH -u "$windows_path"`
39127    new_path="$unix_path"
39128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39130    new_path="$unix_path"
39131  fi
39132
39133
39134    new_path=`$WHICH "$new_path" 2> /dev/null`
39135    # bat and cmd files are not always considered executable in MSYS causing which
39136    # to not find them
39137    if test "x$new_path" = x \
39138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39140      new_path="$path"
39141
39142  windows_path="$new_path"
39143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39144    unix_path=`$CYGPATH -u "$windows_path"`
39145    new_path="$unix_path"
39146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39148    new_path="$unix_path"
39149  fi
39150
39151    fi
39152
39153    if test "x$new_path" = x; then
39154      # It's still not found. Now this is an unrecoverable error.
39155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39156$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39157      has_space=`$ECHO "$complete" | $GREP " "`
39158      if test "x$has_space" != x; then
39159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39161      fi
39162      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39163    fi
39164  fi
39165
39166  # Now new_path has a complete unix path to the binary
39167  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39168    # Keep paths in /bin as-is, but remove trailing .exe if any
39169    new_path="${new_path/%.exe/}"
39170    # Do not save /bin paths to all_fixpath_prefixes!
39171  else
39172    # Not in mixed or Windows style, start by that.
39173    new_path=`cmd //c echo $new_path`
39174
39175  input_path="$new_path"
39176  # Check if we need to convert this using DOS-style short mode. If the path
39177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39178  # take no chances and rewrite it.
39179  # Note: m4 eats our [], so we need to use [ and ] instead.
39180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39181  if test "x$has_forbidden_chars" != x; then
39182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39184  fi
39185
39186    # Output is in $new_path
39187
39188  windows_path="$new_path"
39189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39190    unix_path=`$CYGPATH -u "$windows_path"`
39191    new_path="$unix_path"
39192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39194    new_path="$unix_path"
39195  fi
39196
39197    # remove trailing .exe if any
39198    new_path="${new_path/%.exe/}"
39199
39200    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39201    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39202  fi
39203
39204    else
39205      # We're on a unix platform. Hooray! :)
39206      # First separate the path from the arguments. This will split at the first
39207      # space.
39208      complete="$RC"
39209      path="${complete%% *}"
39210      tmp="$complete EOL"
39211      arguments="${tmp#* }"
39212
39213      # Cannot rely on the command "which" here since it doesn't always work.
39214      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39215      if test -z "$is_absolute_path"; then
39216        # Path to executable is not absolute. Find it.
39217        IFS_save="$IFS"
39218        IFS=:
39219        for p in $PATH; do
39220          if test -f "$p/$path" && test -x "$p/$path"; then
39221            new_path="$p/$path"
39222            break
39223          fi
39224        done
39225        IFS="$IFS_save"
39226      else
39227        # This is an absolute path, we can use it without further modifications.
39228        new_path="$path"
39229      fi
39230
39231      if test "x$new_path" = x; then
39232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39233$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39234        has_space=`$ECHO "$complete" | $GREP " "`
39235        if test "x$has_space" != x; then
39236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39238        fi
39239        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39240      fi
39241    fi
39242
39243    # Now join together the path and the arguments once again
39244    if test "x$arguments" != xEOL; then
39245      new_complete="$new_path ${arguments% *}"
39246    else
39247      new_complete="$new_path"
39248    fi
39249
39250    if test "x$complete" != "x$new_complete"; then
39251      RC="$new_complete"
39252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39253$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39254    fi
39255  fi
39256
39257    # Extract the first word of "dumpbin", so it can be a program name with args.
39258set dummy dumpbin; ac_word=$2
39259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39260$as_echo_n "checking for $ac_word... " >&6; }
39261if ${ac_cv_prog_DUMPBIN+:} false; then :
39262  $as_echo_n "(cached) " >&6
39263else
39264  if test -n "$DUMPBIN"; then
39265  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39266else
39267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39268for as_dir in $PATH
39269do
39270  IFS=$as_save_IFS
39271  test -z "$as_dir" && as_dir=.
39272    for ac_exec_ext in '' $ac_executable_extensions; do
39273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39274    ac_cv_prog_DUMPBIN="dumpbin"
39275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39276    break 2
39277  fi
39278done
39279  done
39280IFS=$as_save_IFS
39281
39282fi
39283fi
39284DUMPBIN=$ac_cv_prog_DUMPBIN
39285if test -n "$DUMPBIN"; then
39286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39287$as_echo "$DUMPBIN" >&6; }
39288else
39289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39290$as_echo "no" >&6; }
39291fi
39292
39293
39294
39295  # Only process if variable expands to non-empty
39296
39297  if test "x$DUMPBIN" != x; then
39298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39299
39300  # First separate the path from the arguments. This will split at the first
39301  # space.
39302  complete="$DUMPBIN"
39303  path="${complete%% *}"
39304  tmp="$complete EOL"
39305  arguments="${tmp#* }"
39306
39307  # Input might be given as Windows format, start by converting to
39308  # unix format.
39309  new_path=`$CYGPATH -u "$path"`
39310
39311  # Now try to locate executable using which
39312  new_path=`$WHICH "$new_path" 2> /dev/null`
39313  # bat and cmd files are not always considered executable in cygwin causing which
39314  # to not find them
39315  if test "x$new_path" = x \
39316      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39317      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39318    new_path=`$CYGPATH -u "$path"`
39319  fi
39320  if test "x$new_path" = x; then
39321    # Oops. Which didn't find the executable.
39322    # The splitting of arguments from the executable at a space might have been incorrect,
39323    # since paths with space are more likely in Windows. Give it another try with the whole
39324    # argument.
39325    path="$complete"
39326    arguments="EOL"
39327    new_path=`$CYGPATH -u "$path"`
39328    new_path=`$WHICH "$new_path" 2> /dev/null`
39329    # bat and cmd files are not always considered executable in cygwin causing which
39330    # to not find them
39331    if test "x$new_path" = x \
39332        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39333        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39334      new_path=`$CYGPATH -u "$path"`
39335    fi
39336    if test "x$new_path" = x; then
39337      # It's still not found. Now this is an unrecoverable error.
39338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39339$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39340      has_space=`$ECHO "$complete" | $GREP " "`
39341      if test "x$has_space" != x; then
39342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39344      fi
39345      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39346    fi
39347  fi
39348
39349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39352  # "foo.exe" is OK but "foo" is an error.
39353  #
39354  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39355  # It is also a way to make sure we got the proper file name for the real test later on.
39356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39357  if test "x$test_shortpath" = x; then
39358    # Short path failed, file does not exist as specified.
39359    # Try adding .exe or .cmd
39360    if test -f "${new_path}.exe"; then
39361      input_to_shortpath="${new_path}.exe"
39362    elif test -f "${new_path}.cmd"; then
39363      input_to_shortpath="${new_path}.cmd"
39364    else
39365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39366$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39369      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39370    fi
39371  else
39372    input_to_shortpath="$new_path"
39373  fi
39374
39375  # Call helper function which possibly converts this using DOS-style short mode.
39376  # If so, the updated path is stored in $new_path.
39377  new_path="$input_to_shortpath"
39378
39379  input_path="$input_to_shortpath"
39380  # Check if we need to convert this using DOS-style short mode. If the path
39381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39382  # take no chances and rewrite it.
39383  # Note: m4 eats our [], so we need to use [ and ] instead.
39384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39385  if test "x$has_forbidden_chars" != x; then
39386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39390      # Going to short mode and back again did indeed matter. Since short mode is
39391      # case insensitive, let's make it lowercase to improve readability.
39392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39393      # Now convert it back to Unix-style (cygpath)
39394      input_path=`$CYGPATH -u "$shortmode_path"`
39395      new_path="$input_path"
39396    fi
39397  fi
39398
39399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39400  if test "x$test_cygdrive_prefix" = x; then
39401    # As a simple fix, exclude /usr/bin since it's not a real path.
39402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39404      # a path prefixed by /cygdrive for fixpath to work.
39405      new_path="$CYGWIN_ROOT_PATH$input_path"
39406    fi
39407  fi
39408
39409  # remove trailing .exe if any
39410  new_path="${new_path/%.exe/}"
39411
39412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39413
39414  # First separate the path from the arguments. This will split at the first
39415  # space.
39416  complete="$DUMPBIN"
39417  path="${complete%% *}"
39418  tmp="$complete EOL"
39419  arguments="${tmp#* }"
39420
39421  # Input might be given as Windows format, start by converting to
39422  # unix format.
39423  new_path="$path"
39424
39425  windows_path="$new_path"
39426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39427    unix_path=`$CYGPATH -u "$windows_path"`
39428    new_path="$unix_path"
39429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39431    new_path="$unix_path"
39432  fi
39433
39434
39435  # Now try to locate executable using which
39436  new_path=`$WHICH "$new_path" 2> /dev/null`
39437
39438  if test "x$new_path" = x; then
39439    # Oops. Which didn't find the executable.
39440    # The splitting of arguments from the executable at a space might have been incorrect,
39441    # since paths with space are more likely in Windows. Give it another try with the whole
39442    # argument.
39443    path="$complete"
39444    arguments="EOL"
39445    new_path="$path"
39446
39447  windows_path="$new_path"
39448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39449    unix_path=`$CYGPATH -u "$windows_path"`
39450    new_path="$unix_path"
39451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39453    new_path="$unix_path"
39454  fi
39455
39456
39457    new_path=`$WHICH "$new_path" 2> /dev/null`
39458    # bat and cmd files are not always considered executable in MSYS causing which
39459    # to not find them
39460    if test "x$new_path" = x \
39461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39463      new_path="$path"
39464
39465  windows_path="$new_path"
39466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39467    unix_path=`$CYGPATH -u "$windows_path"`
39468    new_path="$unix_path"
39469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39471    new_path="$unix_path"
39472  fi
39473
39474    fi
39475
39476    if test "x$new_path" = x; then
39477      # It's still not found. Now this is an unrecoverable error.
39478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39479$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39480      has_space=`$ECHO "$complete" | $GREP " "`
39481      if test "x$has_space" != x; then
39482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39484      fi
39485      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39486    fi
39487  fi
39488
39489  # Now new_path has a complete unix path to the binary
39490  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39491    # Keep paths in /bin as-is, but remove trailing .exe if any
39492    new_path="${new_path/%.exe/}"
39493    # Do not save /bin paths to all_fixpath_prefixes!
39494  else
39495    # Not in mixed or Windows style, start by that.
39496    new_path=`cmd //c echo $new_path`
39497
39498  input_path="$new_path"
39499  # Check if we need to convert this using DOS-style short mode. If the path
39500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39501  # take no chances and rewrite it.
39502  # Note: m4 eats our [], so we need to use [ and ] instead.
39503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39504  if test "x$has_forbidden_chars" != x; then
39505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39507  fi
39508
39509    # Output is in $new_path
39510
39511  windows_path="$new_path"
39512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39513    unix_path=`$CYGPATH -u "$windows_path"`
39514    new_path="$unix_path"
39515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39517    new_path="$unix_path"
39518  fi
39519
39520    # remove trailing .exe if any
39521    new_path="${new_path/%.exe/}"
39522
39523    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39524    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39525  fi
39526
39527    else
39528      # We're on a unix platform. Hooray! :)
39529      # First separate the path from the arguments. This will split at the first
39530      # space.
39531      complete="$DUMPBIN"
39532      path="${complete%% *}"
39533      tmp="$complete EOL"
39534      arguments="${tmp#* }"
39535
39536      # Cannot rely on the command "which" here since it doesn't always work.
39537      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39538      if test -z "$is_absolute_path"; then
39539        # Path to executable is not absolute. Find it.
39540        IFS_save="$IFS"
39541        IFS=:
39542        for p in $PATH; do
39543          if test -f "$p/$path" && test -x "$p/$path"; then
39544            new_path="$p/$path"
39545            break
39546          fi
39547        done
39548        IFS="$IFS_save"
39549      else
39550        # This is an absolute path, we can use it without further modifications.
39551        new_path="$path"
39552      fi
39553
39554      if test "x$new_path" = x; then
39555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39556$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39557        has_space=`$ECHO "$complete" | $GREP " "`
39558        if test "x$has_space" != x; then
39559          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39560$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39561        fi
39562        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39563      fi
39564    fi
39565
39566    # Now join together the path and the arguments once again
39567    if test "x$arguments" != xEOL; then
39568      new_complete="$new_path ${arguments% *}"
39569    else
39570      new_complete="$new_path"
39571    fi
39572
39573    if test "x$complete" != "x$new_complete"; then
39574      DUMPBIN="$new_complete"
39575      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39576$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39577    fi
39578  fi
39579
39580    # We need to check for 'msbuild.exe' because at the place where we expect to
39581    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39582    # won't find the 'msbuild.exe' executable in that case (and the
39583    # 'ac_executable_extensions' is unusable due to performance reasons).
39584    # Notice that we intentionally don't fix up the path to MSBUILD because we
39585    # will call it in a DOS shell during freetype detection on Windows (see
39586    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39587    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39588set dummy msbuild.exe; ac_word=$2
39589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39590$as_echo_n "checking for $ac_word... " >&6; }
39591if ${ac_cv_prog_MSBUILD+:} false; then :
39592  $as_echo_n "(cached) " >&6
39593else
39594  if test -n "$MSBUILD"; then
39595  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39596else
39597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39598for as_dir in $PATH
39599do
39600  IFS=$as_save_IFS
39601  test -z "$as_dir" && as_dir=.
39602    for ac_exec_ext in '' $ac_executable_extensions; do
39603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39604    ac_cv_prog_MSBUILD="msbuild.exe"
39605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39606    break 2
39607  fi
39608done
39609  done
39610IFS=$as_save_IFS
39611
39612fi
39613fi
39614MSBUILD=$ac_cv_prog_MSBUILD
39615if test -n "$MSBUILD"; then
39616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39617$as_echo "$MSBUILD" >&6; }
39618else
39619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39620$as_echo "no" >&6; }
39621fi
39622
39623
39624  fi
39625
39626  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39627
39628
39629  # Publish this variable in the help.
39630
39631
39632  if [ -z "${STRIP+x}" ]; then
39633    # The variable is not set by user, try to locate tool using the code snippet
39634    for ac_prog in strip
39635do
39636  # Extract the first word of "$ac_prog", so it can be a program name with args.
39637set dummy $ac_prog; ac_word=$2
39638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39639$as_echo_n "checking for $ac_word... " >&6; }
39640if ${ac_cv_path_STRIP+:} false; then :
39641  $as_echo_n "(cached) " >&6
39642else
39643  case $STRIP in
39644  [\\/]* | ?:[\\/]*)
39645  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39646  ;;
39647  *)
39648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39649for as_dir in $PATH
39650do
39651  IFS=$as_save_IFS
39652  test -z "$as_dir" && as_dir=.
39653    for ac_exec_ext in '' $ac_executable_extensions; do
39654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39655    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39657    break 2
39658  fi
39659done
39660  done
39661IFS=$as_save_IFS
39662
39663  ;;
39664esac
39665fi
39666STRIP=$ac_cv_path_STRIP
39667if test -n "$STRIP"; then
39668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39669$as_echo "$STRIP" >&6; }
39670else
39671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39672$as_echo "no" >&6; }
39673fi
39674
39675
39676  test -n "$STRIP" && break
39677done
39678
39679  else
39680    # The variable is set, but is it from the command line or the environment?
39681
39682    # Try to remove the string !STRIP! from our list.
39683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39685      # If it failed, the variable was not from the command line. Ignore it,
39686      # but warn the user (except for BASH, which is always set by the calling BASH).
39687      if test "xSTRIP" != xBASH; then
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39689$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39690      fi
39691      # Try to locate tool using the code snippet
39692      for ac_prog in strip
39693do
39694  # Extract the first word of "$ac_prog", so it can be a program name with args.
39695set dummy $ac_prog; ac_word=$2
39696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39697$as_echo_n "checking for $ac_word... " >&6; }
39698if ${ac_cv_path_STRIP+:} false; then :
39699  $as_echo_n "(cached) " >&6
39700else
39701  case $STRIP in
39702  [\\/]* | ?:[\\/]*)
39703  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39704  ;;
39705  *)
39706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39707for as_dir in $PATH
39708do
39709  IFS=$as_save_IFS
39710  test -z "$as_dir" && as_dir=.
39711    for ac_exec_ext in '' $ac_executable_extensions; do
39712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39713    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39715    break 2
39716  fi
39717done
39718  done
39719IFS=$as_save_IFS
39720
39721  ;;
39722esac
39723fi
39724STRIP=$ac_cv_path_STRIP
39725if test -n "$STRIP"; then
39726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39727$as_echo "$STRIP" >&6; }
39728else
39729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39730$as_echo "no" >&6; }
39731fi
39732
39733
39734  test -n "$STRIP" && break
39735done
39736
39737    else
39738      # If it succeeded, then it was overridden by the user. We will use it
39739      # for the tool.
39740
39741      # First remove it from the list of overridden variables, so we can test
39742      # for unknown variables in the end.
39743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39744
39745      # Check if we try to supply an empty value
39746      if test "x$STRIP" = x; then
39747        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39748$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39750$as_echo_n "checking for STRIP... " >&6; }
39751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39752$as_echo "disabled" >&6; }
39753      else
39754        # Check if the provided tool contains a complete path.
39755        tool_specified="$STRIP"
39756        tool_basename="${tool_specified##*/}"
39757        if test "x$tool_basename" = "x$tool_specified"; then
39758          # A command without a complete path is provided, search $PATH.
39759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39760$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39761          # Extract the first word of "$tool_basename", so it can be a program name with args.
39762set dummy $tool_basename; ac_word=$2
39763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39764$as_echo_n "checking for $ac_word... " >&6; }
39765if ${ac_cv_path_STRIP+:} false; then :
39766  $as_echo_n "(cached) " >&6
39767else
39768  case $STRIP in
39769  [\\/]* | ?:[\\/]*)
39770  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39771  ;;
39772  *)
39773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39774for as_dir in $PATH
39775do
39776  IFS=$as_save_IFS
39777  test -z "$as_dir" && as_dir=.
39778    for ac_exec_ext in '' $ac_executable_extensions; do
39779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39780    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39782    break 2
39783  fi
39784done
39785  done
39786IFS=$as_save_IFS
39787
39788  ;;
39789esac
39790fi
39791STRIP=$ac_cv_path_STRIP
39792if test -n "$STRIP"; then
39793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39794$as_echo "$STRIP" >&6; }
39795else
39796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39797$as_echo "no" >&6; }
39798fi
39799
39800
39801          if test "x$STRIP" = x; then
39802            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39803          fi
39804        else
39805          # Otherwise we believe it is a complete path. Use it as it is.
39806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39807$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39808          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39809$as_echo_n "checking for STRIP... " >&6; }
39810          if test ! -x "$tool_specified"; then
39811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39812$as_echo "not found" >&6; }
39813            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39814          fi
39815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39816$as_echo "$tool_specified" >&6; }
39817        fi
39818      fi
39819    fi
39820
39821  fi
39822
39823
39824
39825  # Only process if variable expands to non-empty
39826
39827  if test "x$STRIP" != x; then
39828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39829
39830  # First separate the path from the arguments. This will split at the first
39831  # space.
39832  complete="$STRIP"
39833  path="${complete%% *}"
39834  tmp="$complete EOL"
39835  arguments="${tmp#* }"
39836
39837  # Input might be given as Windows format, start by converting to
39838  # unix format.
39839  new_path=`$CYGPATH -u "$path"`
39840
39841  # Now try to locate executable using which
39842  new_path=`$WHICH "$new_path" 2> /dev/null`
39843  # bat and cmd files are not always considered executable in cygwin causing which
39844  # to not find them
39845  if test "x$new_path" = x \
39846      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39847      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39848    new_path=`$CYGPATH -u "$path"`
39849  fi
39850  if test "x$new_path" = x; then
39851    # Oops. Which didn't find the executable.
39852    # The splitting of arguments from the executable at a space might have been incorrect,
39853    # since paths with space are more likely in Windows. Give it another try with the whole
39854    # argument.
39855    path="$complete"
39856    arguments="EOL"
39857    new_path=`$CYGPATH -u "$path"`
39858    new_path=`$WHICH "$new_path" 2> /dev/null`
39859    # bat and cmd files are not always considered executable in cygwin causing which
39860    # to not find them
39861    if test "x$new_path" = x \
39862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39864      new_path=`$CYGPATH -u "$path"`
39865    fi
39866    if test "x$new_path" = x; then
39867      # It's still not found. Now this is an unrecoverable error.
39868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39869$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39870      has_space=`$ECHO "$complete" | $GREP " "`
39871      if test "x$has_space" != x; then
39872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39874      fi
39875      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39876    fi
39877  fi
39878
39879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39882  # "foo.exe" is OK but "foo" is an error.
39883  #
39884  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39885  # It is also a way to make sure we got the proper file name for the real test later on.
39886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39887  if test "x$test_shortpath" = x; then
39888    # Short path failed, file does not exist as specified.
39889    # Try adding .exe or .cmd
39890    if test -f "${new_path}.exe"; then
39891      input_to_shortpath="${new_path}.exe"
39892    elif test -f "${new_path}.cmd"; then
39893      input_to_shortpath="${new_path}.cmd"
39894    else
39895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39896$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39897      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39898$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39899      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39900    fi
39901  else
39902    input_to_shortpath="$new_path"
39903  fi
39904
39905  # Call helper function which possibly converts this using DOS-style short mode.
39906  # If so, the updated path is stored in $new_path.
39907  new_path="$input_to_shortpath"
39908
39909  input_path="$input_to_shortpath"
39910  # Check if we need to convert this using DOS-style short mode. If the path
39911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39912  # take no chances and rewrite it.
39913  # Note: m4 eats our [], so we need to use [ and ] instead.
39914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39915  if test "x$has_forbidden_chars" != x; then
39916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39920      # Going to short mode and back again did indeed matter. Since short mode is
39921      # case insensitive, let's make it lowercase to improve readability.
39922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39923      # Now convert it back to Unix-style (cygpath)
39924      input_path=`$CYGPATH -u "$shortmode_path"`
39925      new_path="$input_path"
39926    fi
39927  fi
39928
39929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39930  if test "x$test_cygdrive_prefix" = x; then
39931    # As a simple fix, exclude /usr/bin since it's not a real path.
39932    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39934      # a path prefixed by /cygdrive for fixpath to work.
39935      new_path="$CYGWIN_ROOT_PATH$input_path"
39936    fi
39937  fi
39938
39939  # remove trailing .exe if any
39940  new_path="${new_path/%.exe/}"
39941
39942    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39943
39944  # First separate the path from the arguments. This will split at the first
39945  # space.
39946  complete="$STRIP"
39947  path="${complete%% *}"
39948  tmp="$complete EOL"
39949  arguments="${tmp#* }"
39950
39951  # Input might be given as Windows format, start by converting to
39952  # unix format.
39953  new_path="$path"
39954
39955  windows_path="$new_path"
39956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39957    unix_path=`$CYGPATH -u "$windows_path"`
39958    new_path="$unix_path"
39959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39961    new_path="$unix_path"
39962  fi
39963
39964
39965  # Now try to locate executable using which
39966  new_path=`$WHICH "$new_path" 2> /dev/null`
39967
39968  if test "x$new_path" = x; then
39969    # Oops. Which didn't find the executable.
39970    # The splitting of arguments from the executable at a space might have been incorrect,
39971    # since paths with space are more likely in Windows. Give it another try with the whole
39972    # argument.
39973    path="$complete"
39974    arguments="EOL"
39975    new_path="$path"
39976
39977  windows_path="$new_path"
39978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39979    unix_path=`$CYGPATH -u "$windows_path"`
39980    new_path="$unix_path"
39981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39983    new_path="$unix_path"
39984  fi
39985
39986
39987    new_path=`$WHICH "$new_path" 2> /dev/null`
39988    # bat and cmd files are not always considered executable in MSYS causing which
39989    # to not find them
39990    if test "x$new_path" = x \
39991        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39992        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39993      new_path="$path"
39994
39995  windows_path="$new_path"
39996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39997    unix_path=`$CYGPATH -u "$windows_path"`
39998    new_path="$unix_path"
39999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40001    new_path="$unix_path"
40002  fi
40003
40004    fi
40005
40006    if test "x$new_path" = x; then
40007      # It's still not found. Now this is an unrecoverable error.
40008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40009$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40010      has_space=`$ECHO "$complete" | $GREP " "`
40011      if test "x$has_space" != x; then
40012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40014      fi
40015      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40016    fi
40017  fi
40018
40019  # Now new_path has a complete unix path to the binary
40020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40021    # Keep paths in /bin as-is, but remove trailing .exe if any
40022    new_path="${new_path/%.exe/}"
40023    # Do not save /bin paths to all_fixpath_prefixes!
40024  else
40025    # Not in mixed or Windows style, start by that.
40026    new_path=`cmd //c echo $new_path`
40027
40028  input_path="$new_path"
40029  # Check if we need to convert this using DOS-style short mode. If the path
40030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40031  # take no chances and rewrite it.
40032  # Note: m4 eats our [], so we need to use [ and ] instead.
40033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40034  if test "x$has_forbidden_chars" != x; then
40035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40037  fi
40038
40039    # Output is in $new_path
40040
40041  windows_path="$new_path"
40042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40043    unix_path=`$CYGPATH -u "$windows_path"`
40044    new_path="$unix_path"
40045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40047    new_path="$unix_path"
40048  fi
40049
40050    # remove trailing .exe if any
40051    new_path="${new_path/%.exe/}"
40052
40053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40055  fi
40056
40057    else
40058      # We're on a unix platform. Hooray! :)
40059      # First separate the path from the arguments. This will split at the first
40060      # space.
40061      complete="$STRIP"
40062      path="${complete%% *}"
40063      tmp="$complete EOL"
40064      arguments="${tmp#* }"
40065
40066      # Cannot rely on the command "which" here since it doesn't always work.
40067      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40068      if test -z "$is_absolute_path"; then
40069        # Path to executable is not absolute. Find it.
40070        IFS_save="$IFS"
40071        IFS=:
40072        for p in $PATH; do
40073          if test -f "$p/$path" && test -x "$p/$path"; then
40074            new_path="$p/$path"
40075            break
40076          fi
40077        done
40078        IFS="$IFS_save"
40079      else
40080        # This is an absolute path, we can use it without further modifications.
40081        new_path="$path"
40082      fi
40083
40084      if test "x$new_path" = x; then
40085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40086$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40087        has_space=`$ECHO "$complete" | $GREP " "`
40088        if test "x$has_space" != x; then
40089          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40090$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40091        fi
40092        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40093      fi
40094    fi
40095
40096    # Now join together the path and the arguments once again
40097    if test "x$arguments" != xEOL; then
40098      new_complete="$new_path ${arguments% *}"
40099    else
40100      new_complete="$new_path"
40101    fi
40102
40103    if test "x$complete" != "x$new_complete"; then
40104      STRIP="$new_complete"
40105      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40106$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40107    fi
40108  fi
40109
40110
40111
40112  # Publish this variable in the help.
40113
40114
40115  if [ -z "${NM+x}" ]; then
40116    # The variable is not set by user, try to locate tool using the code snippet
40117    for ac_prog in nm
40118do
40119  # Extract the first word of "$ac_prog", so it can be a program name with args.
40120set dummy $ac_prog; ac_word=$2
40121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40122$as_echo_n "checking for $ac_word... " >&6; }
40123if ${ac_cv_path_NM+:} false; then :
40124  $as_echo_n "(cached) " >&6
40125else
40126  case $NM in
40127  [\\/]* | ?:[\\/]*)
40128  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40129  ;;
40130  *)
40131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40132for as_dir in $PATH
40133do
40134  IFS=$as_save_IFS
40135  test -z "$as_dir" && as_dir=.
40136    for ac_exec_ext in '' $ac_executable_extensions; do
40137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40138    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40140    break 2
40141  fi
40142done
40143  done
40144IFS=$as_save_IFS
40145
40146  ;;
40147esac
40148fi
40149NM=$ac_cv_path_NM
40150if test -n "$NM"; then
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40152$as_echo "$NM" >&6; }
40153else
40154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40155$as_echo "no" >&6; }
40156fi
40157
40158
40159  test -n "$NM" && break
40160done
40161
40162  else
40163    # The variable is set, but is it from the command line or the environment?
40164
40165    # Try to remove the string !NM! from our list.
40166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40168      # If it failed, the variable was not from the command line. Ignore it,
40169      # but warn the user (except for BASH, which is always set by the calling BASH).
40170      if test "xNM" != xBASH; then
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40172$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40173      fi
40174      # Try to locate tool using the code snippet
40175      for ac_prog in nm
40176do
40177  # Extract the first word of "$ac_prog", so it can be a program name with args.
40178set dummy $ac_prog; ac_word=$2
40179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40180$as_echo_n "checking for $ac_word... " >&6; }
40181if ${ac_cv_path_NM+:} false; then :
40182  $as_echo_n "(cached) " >&6
40183else
40184  case $NM in
40185  [\\/]* | ?:[\\/]*)
40186  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40187  ;;
40188  *)
40189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40190for as_dir in $PATH
40191do
40192  IFS=$as_save_IFS
40193  test -z "$as_dir" && as_dir=.
40194    for ac_exec_ext in '' $ac_executable_extensions; do
40195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40196    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40198    break 2
40199  fi
40200done
40201  done
40202IFS=$as_save_IFS
40203
40204  ;;
40205esac
40206fi
40207NM=$ac_cv_path_NM
40208if test -n "$NM"; then
40209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40210$as_echo "$NM" >&6; }
40211else
40212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40213$as_echo "no" >&6; }
40214fi
40215
40216
40217  test -n "$NM" && break
40218done
40219
40220    else
40221      # If it succeeded, then it was overridden by the user. We will use it
40222      # for the tool.
40223
40224      # First remove it from the list of overridden variables, so we can test
40225      # for unknown variables in the end.
40226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40227
40228      # Check if we try to supply an empty value
40229      if test "x$NM" = x; then
40230        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40231$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40233$as_echo_n "checking for NM... " >&6; }
40234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40235$as_echo "disabled" >&6; }
40236      else
40237        # Check if the provided tool contains a complete path.
40238        tool_specified="$NM"
40239        tool_basename="${tool_specified##*/}"
40240        if test "x$tool_basename" = "x$tool_specified"; then
40241          # A command without a complete path is provided, search $PATH.
40242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40243$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40244          # Extract the first word of "$tool_basename", so it can be a program name with args.
40245set dummy $tool_basename; ac_word=$2
40246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40247$as_echo_n "checking for $ac_word... " >&6; }
40248if ${ac_cv_path_NM+:} false; then :
40249  $as_echo_n "(cached) " >&6
40250else
40251  case $NM in
40252  [\\/]* | ?:[\\/]*)
40253  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40254  ;;
40255  *)
40256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40257for as_dir in $PATH
40258do
40259  IFS=$as_save_IFS
40260  test -z "$as_dir" && as_dir=.
40261    for ac_exec_ext in '' $ac_executable_extensions; do
40262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40263    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40265    break 2
40266  fi
40267done
40268  done
40269IFS=$as_save_IFS
40270
40271  ;;
40272esac
40273fi
40274NM=$ac_cv_path_NM
40275if test -n "$NM"; then
40276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40277$as_echo "$NM" >&6; }
40278else
40279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40280$as_echo "no" >&6; }
40281fi
40282
40283
40284          if test "x$NM" = x; then
40285            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40286          fi
40287        else
40288          # Otherwise we believe it is a complete path. Use it as it is.
40289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40290$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40291          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40292$as_echo_n "checking for NM... " >&6; }
40293          if test ! -x "$tool_specified"; then
40294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40295$as_echo "not found" >&6; }
40296            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40297          fi
40298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40299$as_echo "$tool_specified" >&6; }
40300        fi
40301      fi
40302    fi
40303
40304  fi
40305
40306
40307
40308  # Only process if variable expands to non-empty
40309
40310  if test "x$NM" != x; then
40311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40312
40313  # First separate the path from the arguments. This will split at the first
40314  # space.
40315  complete="$NM"
40316  path="${complete%% *}"
40317  tmp="$complete EOL"
40318  arguments="${tmp#* }"
40319
40320  # Input might be given as Windows format, start by converting to
40321  # unix format.
40322  new_path=`$CYGPATH -u "$path"`
40323
40324  # Now try to locate executable using which
40325  new_path=`$WHICH "$new_path" 2> /dev/null`
40326  # bat and cmd files are not always considered executable in cygwin causing which
40327  # to not find them
40328  if test "x$new_path" = x \
40329      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40330      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40331    new_path=`$CYGPATH -u "$path"`
40332  fi
40333  if test "x$new_path" = x; then
40334    # Oops. Which didn't find the executable.
40335    # The splitting of arguments from the executable at a space might have been incorrect,
40336    # since paths with space are more likely in Windows. Give it another try with the whole
40337    # argument.
40338    path="$complete"
40339    arguments="EOL"
40340    new_path=`$CYGPATH -u "$path"`
40341    new_path=`$WHICH "$new_path" 2> /dev/null`
40342    # bat and cmd files are not always considered executable in cygwin causing which
40343    # to not find them
40344    if test "x$new_path" = x \
40345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40347      new_path=`$CYGPATH -u "$path"`
40348    fi
40349    if test "x$new_path" = x; then
40350      # It's still not found. Now this is an unrecoverable error.
40351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40352$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40353      has_space=`$ECHO "$complete" | $GREP " "`
40354      if test "x$has_space" != x; then
40355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40357      fi
40358      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40359    fi
40360  fi
40361
40362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40365  # "foo.exe" is OK but "foo" is an error.
40366  #
40367  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40368  # It is also a way to make sure we got the proper file name for the real test later on.
40369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40370  if test "x$test_shortpath" = x; then
40371    # Short path failed, file does not exist as specified.
40372    # Try adding .exe or .cmd
40373    if test -f "${new_path}.exe"; then
40374      input_to_shortpath="${new_path}.exe"
40375    elif test -f "${new_path}.cmd"; then
40376      input_to_shortpath="${new_path}.cmd"
40377    else
40378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40379$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40380      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40381$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40382      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40383    fi
40384  else
40385    input_to_shortpath="$new_path"
40386  fi
40387
40388  # Call helper function which possibly converts this using DOS-style short mode.
40389  # If so, the updated path is stored in $new_path.
40390  new_path="$input_to_shortpath"
40391
40392  input_path="$input_to_shortpath"
40393  # Check if we need to convert this using DOS-style short mode. If the path
40394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40395  # take no chances and rewrite it.
40396  # Note: m4 eats our [], so we need to use [ and ] instead.
40397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40398  if test "x$has_forbidden_chars" != x; then
40399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40403      # Going to short mode and back again did indeed matter. Since short mode is
40404      # case insensitive, let's make it lowercase to improve readability.
40405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40406      # Now convert it back to Unix-style (cygpath)
40407      input_path=`$CYGPATH -u "$shortmode_path"`
40408      new_path="$input_path"
40409    fi
40410  fi
40411
40412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40413  if test "x$test_cygdrive_prefix" = x; then
40414    # As a simple fix, exclude /usr/bin since it's not a real path.
40415    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40417      # a path prefixed by /cygdrive for fixpath to work.
40418      new_path="$CYGWIN_ROOT_PATH$input_path"
40419    fi
40420  fi
40421
40422  # remove trailing .exe if any
40423  new_path="${new_path/%.exe/}"
40424
40425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426
40427  # First separate the path from the arguments. This will split at the first
40428  # space.
40429  complete="$NM"
40430  path="${complete%% *}"
40431  tmp="$complete EOL"
40432  arguments="${tmp#* }"
40433
40434  # Input might be given as Windows format, start by converting to
40435  # unix format.
40436  new_path="$path"
40437
40438  windows_path="$new_path"
40439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40440    unix_path=`$CYGPATH -u "$windows_path"`
40441    new_path="$unix_path"
40442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40444    new_path="$unix_path"
40445  fi
40446
40447
40448  # Now try to locate executable using which
40449  new_path=`$WHICH "$new_path" 2> /dev/null`
40450
40451  if test "x$new_path" = x; then
40452    # Oops. Which didn't find the executable.
40453    # The splitting of arguments from the executable at a space might have been incorrect,
40454    # since paths with space are more likely in Windows. Give it another try with the whole
40455    # argument.
40456    path="$complete"
40457    arguments="EOL"
40458    new_path="$path"
40459
40460  windows_path="$new_path"
40461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40462    unix_path=`$CYGPATH -u "$windows_path"`
40463    new_path="$unix_path"
40464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40466    new_path="$unix_path"
40467  fi
40468
40469
40470    new_path=`$WHICH "$new_path" 2> /dev/null`
40471    # bat and cmd files are not always considered executable in MSYS causing which
40472    # to not find them
40473    if test "x$new_path" = x \
40474        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40475        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40476      new_path="$path"
40477
40478  windows_path="$new_path"
40479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40480    unix_path=`$CYGPATH -u "$windows_path"`
40481    new_path="$unix_path"
40482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40484    new_path="$unix_path"
40485  fi
40486
40487    fi
40488
40489    if test "x$new_path" = x; then
40490      # It's still not found. Now this is an unrecoverable error.
40491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40492$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40493      has_space=`$ECHO "$complete" | $GREP " "`
40494      if test "x$has_space" != x; then
40495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40497      fi
40498      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40499    fi
40500  fi
40501
40502  # Now new_path has a complete unix path to the binary
40503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40504    # Keep paths in /bin as-is, but remove trailing .exe if any
40505    new_path="${new_path/%.exe/}"
40506    # Do not save /bin paths to all_fixpath_prefixes!
40507  else
40508    # Not in mixed or Windows style, start by that.
40509    new_path=`cmd //c echo $new_path`
40510
40511  input_path="$new_path"
40512  # Check if we need to convert this using DOS-style short mode. If the path
40513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40514  # take no chances and rewrite it.
40515  # Note: m4 eats our [], so we need to use [ and ] instead.
40516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40517  if test "x$has_forbidden_chars" != x; then
40518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40520  fi
40521
40522    # Output is in $new_path
40523
40524  windows_path="$new_path"
40525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40526    unix_path=`$CYGPATH -u "$windows_path"`
40527    new_path="$unix_path"
40528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40530    new_path="$unix_path"
40531  fi
40532
40533    # remove trailing .exe if any
40534    new_path="${new_path/%.exe/}"
40535
40536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40538  fi
40539
40540    else
40541      # We're on a unix platform. Hooray! :)
40542      # First separate the path from the arguments. This will split at the first
40543      # space.
40544      complete="$NM"
40545      path="${complete%% *}"
40546      tmp="$complete EOL"
40547      arguments="${tmp#* }"
40548
40549      # Cannot rely on the command "which" here since it doesn't always work.
40550      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40551      if test -z "$is_absolute_path"; then
40552        # Path to executable is not absolute. Find it.
40553        IFS_save="$IFS"
40554        IFS=:
40555        for p in $PATH; do
40556          if test -f "$p/$path" && test -x "$p/$path"; then
40557            new_path="$p/$path"
40558            break
40559          fi
40560        done
40561        IFS="$IFS_save"
40562      else
40563        # This is an absolute path, we can use it without further modifications.
40564        new_path="$path"
40565      fi
40566
40567      if test "x$new_path" = x; then
40568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40569$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40570        has_space=`$ECHO "$complete" | $GREP " "`
40571        if test "x$has_space" != x; then
40572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40574        fi
40575        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40576      fi
40577    fi
40578
40579    # Now join together the path and the arguments once again
40580    if test "x$arguments" != xEOL; then
40581      new_complete="$new_path ${arguments% *}"
40582    else
40583      new_complete="$new_path"
40584    fi
40585
40586    if test "x$complete" != "x$new_complete"; then
40587      NM="$new_complete"
40588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40589$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40590    fi
40591  fi
40592
40593
40594
40595  # Publish this variable in the help.
40596
40597
40598  if [ -z "${GNM+x}" ]; then
40599    # The variable is not set by user, try to locate tool using the code snippet
40600    for ac_prog in gnm
40601do
40602  # Extract the first word of "$ac_prog", so it can be a program name with args.
40603set dummy $ac_prog; ac_word=$2
40604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40605$as_echo_n "checking for $ac_word... " >&6; }
40606if ${ac_cv_path_GNM+:} false; then :
40607  $as_echo_n "(cached) " >&6
40608else
40609  case $GNM in
40610  [\\/]* | ?:[\\/]*)
40611  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40612  ;;
40613  *)
40614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40615for as_dir in $PATH
40616do
40617  IFS=$as_save_IFS
40618  test -z "$as_dir" && as_dir=.
40619    for ac_exec_ext in '' $ac_executable_extensions; do
40620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40621    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40623    break 2
40624  fi
40625done
40626  done
40627IFS=$as_save_IFS
40628
40629  ;;
40630esac
40631fi
40632GNM=$ac_cv_path_GNM
40633if test -n "$GNM"; then
40634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40635$as_echo "$GNM" >&6; }
40636else
40637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40638$as_echo "no" >&6; }
40639fi
40640
40641
40642  test -n "$GNM" && break
40643done
40644
40645  else
40646    # The variable is set, but is it from the command line or the environment?
40647
40648    # Try to remove the string !GNM! from our list.
40649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40651      # If it failed, the variable was not from the command line. Ignore it,
40652      # but warn the user (except for BASH, which is always set by the calling BASH).
40653      if test "xGNM" != xBASH; then
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40655$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40656      fi
40657      # Try to locate tool using the code snippet
40658      for ac_prog in gnm
40659do
40660  # Extract the first word of "$ac_prog", so it can be a program name with args.
40661set dummy $ac_prog; ac_word=$2
40662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40663$as_echo_n "checking for $ac_word... " >&6; }
40664if ${ac_cv_path_GNM+:} false; then :
40665  $as_echo_n "(cached) " >&6
40666else
40667  case $GNM in
40668  [\\/]* | ?:[\\/]*)
40669  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40670  ;;
40671  *)
40672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40673for as_dir in $PATH
40674do
40675  IFS=$as_save_IFS
40676  test -z "$as_dir" && as_dir=.
40677    for ac_exec_ext in '' $ac_executable_extensions; do
40678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40679    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40681    break 2
40682  fi
40683done
40684  done
40685IFS=$as_save_IFS
40686
40687  ;;
40688esac
40689fi
40690GNM=$ac_cv_path_GNM
40691if test -n "$GNM"; then
40692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40693$as_echo "$GNM" >&6; }
40694else
40695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40696$as_echo "no" >&6; }
40697fi
40698
40699
40700  test -n "$GNM" && break
40701done
40702
40703    else
40704      # If it succeeded, then it was overridden by the user. We will use it
40705      # for the tool.
40706
40707      # First remove it from the list of overridden variables, so we can test
40708      # for unknown variables in the end.
40709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40710
40711      # Check if we try to supply an empty value
40712      if test "x$GNM" = x; then
40713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40714$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40716$as_echo_n "checking for GNM... " >&6; }
40717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40718$as_echo "disabled" >&6; }
40719      else
40720        # Check if the provided tool contains a complete path.
40721        tool_specified="$GNM"
40722        tool_basename="${tool_specified##*/}"
40723        if test "x$tool_basename" = "x$tool_specified"; then
40724          # A command without a complete path is provided, search $PATH.
40725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40726$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40727          # Extract the first word of "$tool_basename", so it can be a program name with args.
40728set dummy $tool_basename; ac_word=$2
40729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40730$as_echo_n "checking for $ac_word... " >&6; }
40731if ${ac_cv_path_GNM+:} false; then :
40732  $as_echo_n "(cached) " >&6
40733else
40734  case $GNM in
40735  [\\/]* | ?:[\\/]*)
40736  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40737  ;;
40738  *)
40739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40740for as_dir in $PATH
40741do
40742  IFS=$as_save_IFS
40743  test -z "$as_dir" && as_dir=.
40744    for ac_exec_ext in '' $ac_executable_extensions; do
40745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40746    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40748    break 2
40749  fi
40750done
40751  done
40752IFS=$as_save_IFS
40753
40754  ;;
40755esac
40756fi
40757GNM=$ac_cv_path_GNM
40758if test -n "$GNM"; then
40759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40760$as_echo "$GNM" >&6; }
40761else
40762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40763$as_echo "no" >&6; }
40764fi
40765
40766
40767          if test "x$GNM" = x; then
40768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40769          fi
40770        else
40771          # Otherwise we believe it is a complete path. Use it as it is.
40772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40773$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40775$as_echo_n "checking for GNM... " >&6; }
40776          if test ! -x "$tool_specified"; then
40777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40778$as_echo "not found" >&6; }
40779            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40780          fi
40781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40782$as_echo "$tool_specified" >&6; }
40783        fi
40784      fi
40785    fi
40786
40787  fi
40788
40789
40790
40791  # Only process if variable expands to non-empty
40792
40793  if test "x$GNM" != x; then
40794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40795
40796  # First separate the path from the arguments. This will split at the first
40797  # space.
40798  complete="$GNM"
40799  path="${complete%% *}"
40800  tmp="$complete EOL"
40801  arguments="${tmp#* }"
40802
40803  # Input might be given as Windows format, start by converting to
40804  # unix format.
40805  new_path=`$CYGPATH -u "$path"`
40806
40807  # Now try to locate executable using which
40808  new_path=`$WHICH "$new_path" 2> /dev/null`
40809  # bat and cmd files are not always considered executable in cygwin causing which
40810  # to not find them
40811  if test "x$new_path" = x \
40812      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40813      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40814    new_path=`$CYGPATH -u "$path"`
40815  fi
40816  if test "x$new_path" = x; then
40817    # Oops. Which didn't find the executable.
40818    # The splitting of arguments from the executable at a space might have been incorrect,
40819    # since paths with space are more likely in Windows. Give it another try with the whole
40820    # argument.
40821    path="$complete"
40822    arguments="EOL"
40823    new_path=`$CYGPATH -u "$path"`
40824    new_path=`$WHICH "$new_path" 2> /dev/null`
40825    # bat and cmd files are not always considered executable in cygwin causing which
40826    # to not find them
40827    if test "x$new_path" = x \
40828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40830      new_path=`$CYGPATH -u "$path"`
40831    fi
40832    if test "x$new_path" = x; then
40833      # It's still not found. Now this is an unrecoverable error.
40834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40835$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40836      has_space=`$ECHO "$complete" | $GREP " "`
40837      if test "x$has_space" != x; then
40838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40840      fi
40841      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40842    fi
40843  fi
40844
40845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40848  # "foo.exe" is OK but "foo" is an error.
40849  #
40850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40851  # It is also a way to make sure we got the proper file name for the real test later on.
40852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40853  if test "x$test_shortpath" = x; then
40854    # Short path failed, file does not exist as specified.
40855    # Try adding .exe or .cmd
40856    if test -f "${new_path}.exe"; then
40857      input_to_shortpath="${new_path}.exe"
40858    elif test -f "${new_path}.cmd"; then
40859      input_to_shortpath="${new_path}.cmd"
40860    else
40861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40862$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40865      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40866    fi
40867  else
40868    input_to_shortpath="$new_path"
40869  fi
40870
40871  # Call helper function which possibly converts this using DOS-style short mode.
40872  # If so, the updated path is stored in $new_path.
40873  new_path="$input_to_shortpath"
40874
40875  input_path="$input_to_shortpath"
40876  # Check if we need to convert this using DOS-style short mode. If the path
40877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40878  # take no chances and rewrite it.
40879  # Note: m4 eats our [], so we need to use [ and ] instead.
40880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40881  if test "x$has_forbidden_chars" != x; then
40882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40886      # Going to short mode and back again did indeed matter. Since short mode is
40887      # case insensitive, let's make it lowercase to improve readability.
40888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40889      # Now convert it back to Unix-style (cygpath)
40890      input_path=`$CYGPATH -u "$shortmode_path"`
40891      new_path="$input_path"
40892    fi
40893  fi
40894
40895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40896  if test "x$test_cygdrive_prefix" = x; then
40897    # As a simple fix, exclude /usr/bin since it's not a real path.
40898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40900      # a path prefixed by /cygdrive for fixpath to work.
40901      new_path="$CYGWIN_ROOT_PATH$input_path"
40902    fi
40903  fi
40904
40905  # remove trailing .exe if any
40906  new_path="${new_path/%.exe/}"
40907
40908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40909
40910  # First separate the path from the arguments. This will split at the first
40911  # space.
40912  complete="$GNM"
40913  path="${complete%% *}"
40914  tmp="$complete EOL"
40915  arguments="${tmp#* }"
40916
40917  # Input might be given as Windows format, start by converting to
40918  # unix format.
40919  new_path="$path"
40920
40921  windows_path="$new_path"
40922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40923    unix_path=`$CYGPATH -u "$windows_path"`
40924    new_path="$unix_path"
40925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40927    new_path="$unix_path"
40928  fi
40929
40930
40931  # Now try to locate executable using which
40932  new_path=`$WHICH "$new_path" 2> /dev/null`
40933
40934  if test "x$new_path" = x; then
40935    # Oops. Which didn't find the executable.
40936    # The splitting of arguments from the executable at a space might have been incorrect,
40937    # since paths with space are more likely in Windows. Give it another try with the whole
40938    # argument.
40939    path="$complete"
40940    arguments="EOL"
40941    new_path="$path"
40942
40943  windows_path="$new_path"
40944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40945    unix_path=`$CYGPATH -u "$windows_path"`
40946    new_path="$unix_path"
40947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40949    new_path="$unix_path"
40950  fi
40951
40952
40953    new_path=`$WHICH "$new_path" 2> /dev/null`
40954    # bat and cmd files are not always considered executable in MSYS causing which
40955    # to not find them
40956    if test "x$new_path" = x \
40957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40959      new_path="$path"
40960
40961  windows_path="$new_path"
40962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40963    unix_path=`$CYGPATH -u "$windows_path"`
40964    new_path="$unix_path"
40965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40967    new_path="$unix_path"
40968  fi
40969
40970    fi
40971
40972    if test "x$new_path" = x; then
40973      # It's still not found. Now this is an unrecoverable error.
40974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40975$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40976      has_space=`$ECHO "$complete" | $GREP " "`
40977      if test "x$has_space" != x; then
40978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40980      fi
40981      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40982    fi
40983  fi
40984
40985  # Now new_path has a complete unix path to the binary
40986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40987    # Keep paths in /bin as-is, but remove trailing .exe if any
40988    new_path="${new_path/%.exe/}"
40989    # Do not save /bin paths to all_fixpath_prefixes!
40990  else
40991    # Not in mixed or Windows style, start by that.
40992    new_path=`cmd //c echo $new_path`
40993
40994  input_path="$new_path"
40995  # Check if we need to convert this using DOS-style short mode. If the path
40996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40997  # take no chances and rewrite it.
40998  # Note: m4 eats our [], so we need to use [ and ] instead.
40999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41000  if test "x$has_forbidden_chars" != x; then
41001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41003  fi
41004
41005    # Output is in $new_path
41006
41007  windows_path="$new_path"
41008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41009    unix_path=`$CYGPATH -u "$windows_path"`
41010    new_path="$unix_path"
41011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41013    new_path="$unix_path"
41014  fi
41015
41016    # remove trailing .exe if any
41017    new_path="${new_path/%.exe/}"
41018
41019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41021  fi
41022
41023    else
41024      # We're on a unix platform. Hooray! :)
41025      # First separate the path from the arguments. This will split at the first
41026      # space.
41027      complete="$GNM"
41028      path="${complete%% *}"
41029      tmp="$complete EOL"
41030      arguments="${tmp#* }"
41031
41032      # Cannot rely on the command "which" here since it doesn't always work.
41033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41034      if test -z "$is_absolute_path"; then
41035        # Path to executable is not absolute. Find it.
41036        IFS_save="$IFS"
41037        IFS=:
41038        for p in $PATH; do
41039          if test -f "$p/$path" && test -x "$p/$path"; then
41040            new_path="$p/$path"
41041            break
41042          fi
41043        done
41044        IFS="$IFS_save"
41045      else
41046        # This is an absolute path, we can use it without further modifications.
41047        new_path="$path"
41048      fi
41049
41050      if test "x$new_path" = x; then
41051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41052$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41053        has_space=`$ECHO "$complete" | $GREP " "`
41054        if test "x$has_space" != x; then
41055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41057        fi
41058        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41059      fi
41060    fi
41061
41062    # Now join together the path and the arguments once again
41063    if test "x$arguments" != xEOL; then
41064      new_complete="$new_path ${arguments% *}"
41065    else
41066      new_complete="$new_path"
41067    fi
41068
41069    if test "x$complete" != "x$new_complete"; then
41070      GNM="$new_complete"
41071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41072$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41073    fi
41074  fi
41075
41076  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41077    # FIXME: we should unify this with the solaris case above.
41078
41079
41080  # Publish this variable in the help.
41081
41082
41083  if [ -z "${STRIP+x}" ]; then
41084    # The variable is not set by user, try to locate tool using the code snippet
41085    if test -n "$ac_tool_prefix"; then
41086  for ac_prog in strip
41087  do
41088    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41091$as_echo_n "checking for $ac_word... " >&6; }
41092if ${ac_cv_prog_STRIP+:} false; then :
41093  $as_echo_n "(cached) " >&6
41094else
41095  if test -n "$STRIP"; then
41096  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41097else
41098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41099for as_dir in $PATH
41100do
41101  IFS=$as_save_IFS
41102  test -z "$as_dir" && as_dir=.
41103    for ac_exec_ext in '' $ac_executable_extensions; do
41104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41105    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41107    break 2
41108  fi
41109done
41110  done
41111IFS=$as_save_IFS
41112
41113fi
41114fi
41115STRIP=$ac_cv_prog_STRIP
41116if test -n "$STRIP"; then
41117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41118$as_echo "$STRIP" >&6; }
41119else
41120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41121$as_echo "no" >&6; }
41122fi
41123
41124
41125    test -n "$STRIP" && break
41126  done
41127fi
41128if test -z "$STRIP"; then
41129  ac_ct_STRIP=$STRIP
41130  for ac_prog in strip
41131do
41132  # Extract the first word of "$ac_prog", so it can be a program name with args.
41133set dummy $ac_prog; ac_word=$2
41134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41135$as_echo_n "checking for $ac_word... " >&6; }
41136if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41137  $as_echo_n "(cached) " >&6
41138else
41139  if test -n "$ac_ct_STRIP"; then
41140  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41141else
41142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41143for as_dir in $PATH
41144do
41145  IFS=$as_save_IFS
41146  test -z "$as_dir" && as_dir=.
41147    for ac_exec_ext in '' $ac_executable_extensions; do
41148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41149    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41151    break 2
41152  fi
41153done
41154  done
41155IFS=$as_save_IFS
41156
41157fi
41158fi
41159ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41160if test -n "$ac_ct_STRIP"; then
41161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41162$as_echo "$ac_ct_STRIP" >&6; }
41163else
41164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41165$as_echo "no" >&6; }
41166fi
41167
41168
41169  test -n "$ac_ct_STRIP" && break
41170done
41171
41172  if test "x$ac_ct_STRIP" = x; then
41173    STRIP=""
41174  else
41175    case $cross_compiling:$ac_tool_warned in
41176yes:)
41177{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41178$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41179ac_tool_warned=yes ;;
41180esac
41181    STRIP=$ac_ct_STRIP
41182  fi
41183fi
41184
41185  else
41186    # The variable is set, but is it from the command line or the environment?
41187
41188    # Try to remove the string !STRIP! from our list.
41189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41191      # If it failed, the variable was not from the command line. Ignore it,
41192      # but warn the user (except for BASH, which is always set by the calling BASH).
41193      if test "xSTRIP" != xBASH; then
41194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41195$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41196      fi
41197      # Try to locate tool using the code snippet
41198      if test -n "$ac_tool_prefix"; then
41199  for ac_prog in strip
41200  do
41201    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41202set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41204$as_echo_n "checking for $ac_word... " >&6; }
41205if ${ac_cv_prog_STRIP+:} false; then :
41206  $as_echo_n "(cached) " >&6
41207else
41208  if test -n "$STRIP"; then
41209  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41210else
41211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41212for as_dir in $PATH
41213do
41214  IFS=$as_save_IFS
41215  test -z "$as_dir" && as_dir=.
41216    for ac_exec_ext in '' $ac_executable_extensions; do
41217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41218    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41220    break 2
41221  fi
41222done
41223  done
41224IFS=$as_save_IFS
41225
41226fi
41227fi
41228STRIP=$ac_cv_prog_STRIP
41229if test -n "$STRIP"; then
41230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41231$as_echo "$STRIP" >&6; }
41232else
41233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41234$as_echo "no" >&6; }
41235fi
41236
41237
41238    test -n "$STRIP" && break
41239  done
41240fi
41241if test -z "$STRIP"; then
41242  ac_ct_STRIP=$STRIP
41243  for ac_prog in strip
41244do
41245  # Extract the first word of "$ac_prog", so it can be a program name with args.
41246set dummy $ac_prog; ac_word=$2
41247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41248$as_echo_n "checking for $ac_word... " >&6; }
41249if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41250  $as_echo_n "(cached) " >&6
41251else
41252  if test -n "$ac_ct_STRIP"; then
41253  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41254else
41255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41256for as_dir in $PATH
41257do
41258  IFS=$as_save_IFS
41259  test -z "$as_dir" && as_dir=.
41260    for ac_exec_ext in '' $ac_executable_extensions; do
41261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41262    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41264    break 2
41265  fi
41266done
41267  done
41268IFS=$as_save_IFS
41269
41270fi
41271fi
41272ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41273if test -n "$ac_ct_STRIP"; then
41274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41275$as_echo "$ac_ct_STRIP" >&6; }
41276else
41277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41278$as_echo "no" >&6; }
41279fi
41280
41281
41282  test -n "$ac_ct_STRIP" && break
41283done
41284
41285  if test "x$ac_ct_STRIP" = x; then
41286    STRIP=""
41287  else
41288    case $cross_compiling:$ac_tool_warned in
41289yes:)
41290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41292ac_tool_warned=yes ;;
41293esac
41294    STRIP=$ac_ct_STRIP
41295  fi
41296fi
41297
41298    else
41299      # If it succeeded, then it was overridden by the user. We will use it
41300      # for the tool.
41301
41302      # First remove it from the list of overridden variables, so we can test
41303      # for unknown variables in the end.
41304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41305
41306      # Check if we try to supply an empty value
41307      if test "x$STRIP" = x; then
41308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41309$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41311$as_echo_n "checking for STRIP... " >&6; }
41312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41313$as_echo "disabled" >&6; }
41314      else
41315        # Check if the provided tool contains a complete path.
41316        tool_specified="$STRIP"
41317        tool_basename="${tool_specified##*/}"
41318        if test "x$tool_basename" = "x$tool_specified"; then
41319          # A command without a complete path is provided, search $PATH.
41320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41321$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41322          # Extract the first word of "$tool_basename", so it can be a program name with args.
41323set dummy $tool_basename; ac_word=$2
41324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41325$as_echo_n "checking for $ac_word... " >&6; }
41326if ${ac_cv_path_STRIP+:} false; then :
41327  $as_echo_n "(cached) " >&6
41328else
41329  case $STRIP in
41330  [\\/]* | ?:[\\/]*)
41331  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41332  ;;
41333  *)
41334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41335for as_dir in $PATH
41336do
41337  IFS=$as_save_IFS
41338  test -z "$as_dir" && as_dir=.
41339    for ac_exec_ext in '' $ac_executable_extensions; do
41340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41341    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41343    break 2
41344  fi
41345done
41346  done
41347IFS=$as_save_IFS
41348
41349  ;;
41350esac
41351fi
41352STRIP=$ac_cv_path_STRIP
41353if test -n "$STRIP"; then
41354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41355$as_echo "$STRIP" >&6; }
41356else
41357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41358$as_echo "no" >&6; }
41359fi
41360
41361
41362          if test "x$STRIP" = x; then
41363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41364          fi
41365        else
41366          # Otherwise we believe it is a complete path. Use it as it is.
41367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41368$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41370$as_echo_n "checking for STRIP... " >&6; }
41371          if test ! -x "$tool_specified"; then
41372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41373$as_echo "not found" >&6; }
41374            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41375          fi
41376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41377$as_echo "$tool_specified" >&6; }
41378        fi
41379      fi
41380    fi
41381
41382  fi
41383
41384
41385
41386  # Only process if variable expands to non-empty
41387
41388  if test "x$STRIP" != x; then
41389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41390
41391  # First separate the path from the arguments. This will split at the first
41392  # space.
41393  complete="$STRIP"
41394  path="${complete%% *}"
41395  tmp="$complete EOL"
41396  arguments="${tmp#* }"
41397
41398  # Input might be given as Windows format, start by converting to
41399  # unix format.
41400  new_path=`$CYGPATH -u "$path"`
41401
41402  # Now try to locate executable using which
41403  new_path=`$WHICH "$new_path" 2> /dev/null`
41404  # bat and cmd files are not always considered executable in cygwin causing which
41405  # to not find them
41406  if test "x$new_path" = x \
41407      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41408      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41409    new_path=`$CYGPATH -u "$path"`
41410  fi
41411  if test "x$new_path" = x; then
41412    # Oops. Which didn't find the executable.
41413    # The splitting of arguments from the executable at a space might have been incorrect,
41414    # since paths with space are more likely in Windows. Give it another try with the whole
41415    # argument.
41416    path="$complete"
41417    arguments="EOL"
41418    new_path=`$CYGPATH -u "$path"`
41419    new_path=`$WHICH "$new_path" 2> /dev/null`
41420    # bat and cmd files are not always considered executable in cygwin causing which
41421    # to not find them
41422    if test "x$new_path" = x \
41423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41425      new_path=`$CYGPATH -u "$path"`
41426    fi
41427    if test "x$new_path" = x; then
41428      # It's still not found. Now this is an unrecoverable error.
41429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41430$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41431      has_space=`$ECHO "$complete" | $GREP " "`
41432      if test "x$has_space" != x; then
41433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41435      fi
41436      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41437    fi
41438  fi
41439
41440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41443  # "foo.exe" is OK but "foo" is an error.
41444  #
41445  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41446  # It is also a way to make sure we got the proper file name for the real test later on.
41447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41448  if test "x$test_shortpath" = x; then
41449    # Short path failed, file does not exist as specified.
41450    # Try adding .exe or .cmd
41451    if test -f "${new_path}.exe"; then
41452      input_to_shortpath="${new_path}.exe"
41453    elif test -f "${new_path}.cmd"; then
41454      input_to_shortpath="${new_path}.cmd"
41455    else
41456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41457$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41460      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41461    fi
41462  else
41463    input_to_shortpath="$new_path"
41464  fi
41465
41466  # Call helper function which possibly converts this using DOS-style short mode.
41467  # If so, the updated path is stored in $new_path.
41468  new_path="$input_to_shortpath"
41469
41470  input_path="$input_to_shortpath"
41471  # Check if we need to convert this using DOS-style short mode. If the path
41472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41473  # take no chances and rewrite it.
41474  # Note: m4 eats our [], so we need to use [ and ] instead.
41475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41476  if test "x$has_forbidden_chars" != x; then
41477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41481      # Going to short mode and back again did indeed matter. Since short mode is
41482      # case insensitive, let's make it lowercase to improve readability.
41483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41484      # Now convert it back to Unix-style (cygpath)
41485      input_path=`$CYGPATH -u "$shortmode_path"`
41486      new_path="$input_path"
41487    fi
41488  fi
41489
41490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41491  if test "x$test_cygdrive_prefix" = x; then
41492    # As a simple fix, exclude /usr/bin since it's not a real path.
41493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41495      # a path prefixed by /cygdrive for fixpath to work.
41496      new_path="$CYGWIN_ROOT_PATH$input_path"
41497    fi
41498  fi
41499
41500  # remove trailing .exe if any
41501  new_path="${new_path/%.exe/}"
41502
41503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41504
41505  # First separate the path from the arguments. This will split at the first
41506  # space.
41507  complete="$STRIP"
41508  path="${complete%% *}"
41509  tmp="$complete EOL"
41510  arguments="${tmp#* }"
41511
41512  # Input might be given as Windows format, start by converting to
41513  # unix format.
41514  new_path="$path"
41515
41516  windows_path="$new_path"
41517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41518    unix_path=`$CYGPATH -u "$windows_path"`
41519    new_path="$unix_path"
41520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41522    new_path="$unix_path"
41523  fi
41524
41525
41526  # Now try to locate executable using which
41527  new_path=`$WHICH "$new_path" 2> /dev/null`
41528
41529  if test "x$new_path" = x; then
41530    # Oops. Which didn't find the executable.
41531    # The splitting of arguments from the executable at a space might have been incorrect,
41532    # since paths with space are more likely in Windows. Give it another try with the whole
41533    # argument.
41534    path="$complete"
41535    arguments="EOL"
41536    new_path="$path"
41537
41538  windows_path="$new_path"
41539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41540    unix_path=`$CYGPATH -u "$windows_path"`
41541    new_path="$unix_path"
41542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41544    new_path="$unix_path"
41545  fi
41546
41547
41548    new_path=`$WHICH "$new_path" 2> /dev/null`
41549    # bat and cmd files are not always considered executable in MSYS causing which
41550    # to not find them
41551    if test "x$new_path" = x \
41552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41554      new_path="$path"
41555
41556  windows_path="$new_path"
41557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41558    unix_path=`$CYGPATH -u "$windows_path"`
41559    new_path="$unix_path"
41560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41562    new_path="$unix_path"
41563  fi
41564
41565    fi
41566
41567    if test "x$new_path" = x; then
41568      # It's still not found. Now this is an unrecoverable error.
41569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41570$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41571      has_space=`$ECHO "$complete" | $GREP " "`
41572      if test "x$has_space" != x; then
41573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41575      fi
41576      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41577    fi
41578  fi
41579
41580  # Now new_path has a complete unix path to the binary
41581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41582    # Keep paths in /bin as-is, but remove trailing .exe if any
41583    new_path="${new_path/%.exe/}"
41584    # Do not save /bin paths to all_fixpath_prefixes!
41585  else
41586    # Not in mixed or Windows style, start by that.
41587    new_path=`cmd //c echo $new_path`
41588
41589  input_path="$new_path"
41590  # Check if we need to convert this using DOS-style short mode. If the path
41591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41592  # take no chances and rewrite it.
41593  # Note: m4 eats our [], so we need to use [ and ] instead.
41594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41595  if test "x$has_forbidden_chars" != x; then
41596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41598  fi
41599
41600    # Output is in $new_path
41601
41602  windows_path="$new_path"
41603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41604    unix_path=`$CYGPATH -u "$windows_path"`
41605    new_path="$unix_path"
41606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41608    new_path="$unix_path"
41609  fi
41610
41611    # remove trailing .exe if any
41612    new_path="${new_path/%.exe/}"
41613
41614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41616  fi
41617
41618    else
41619      # We're on a unix platform. Hooray! :)
41620      # First separate the path from the arguments. This will split at the first
41621      # space.
41622      complete="$STRIP"
41623      path="${complete%% *}"
41624      tmp="$complete EOL"
41625      arguments="${tmp#* }"
41626
41627      # Cannot rely on the command "which" here since it doesn't always work.
41628      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41629      if test -z "$is_absolute_path"; then
41630        # Path to executable is not absolute. Find it.
41631        IFS_save="$IFS"
41632        IFS=:
41633        for p in $PATH; do
41634          if test -f "$p/$path" && test -x "$p/$path"; then
41635            new_path="$p/$path"
41636            break
41637          fi
41638        done
41639        IFS="$IFS_save"
41640      else
41641        # This is an absolute path, we can use it without further modifications.
41642        new_path="$path"
41643      fi
41644
41645      if test "x$new_path" = x; then
41646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41647$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41648        has_space=`$ECHO "$complete" | $GREP " "`
41649        if test "x$has_space" != x; then
41650          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41652        fi
41653        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41654      fi
41655    fi
41656
41657    # Now join together the path and the arguments once again
41658    if test "x$arguments" != xEOL; then
41659      new_complete="$new_path ${arguments% *}"
41660    else
41661      new_complete="$new_path"
41662    fi
41663
41664    if test "x$complete" != "x$new_complete"; then
41665      STRIP="$new_complete"
41666      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41667$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41668    fi
41669  fi
41670
41671    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41672
41673
41674  # Publish this variable in the help.
41675
41676
41677  if [ -z "${NM+x}" ]; then
41678    # The variable is not set by user, try to locate tool using the code snippet
41679    if test -n "$ac_tool_prefix"; then
41680  for ac_prog in nm gcc-nm
41681  do
41682    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41683set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41685$as_echo_n "checking for $ac_word... " >&6; }
41686if ${ac_cv_prog_NM+:} false; then :
41687  $as_echo_n "(cached) " >&6
41688else
41689  if test -n "$NM"; then
41690  ac_cv_prog_NM="$NM" # Let the user override the test.
41691else
41692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41693for as_dir in $PATH
41694do
41695  IFS=$as_save_IFS
41696  test -z "$as_dir" && as_dir=.
41697    for ac_exec_ext in '' $ac_executable_extensions; do
41698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41699    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41701    break 2
41702  fi
41703done
41704  done
41705IFS=$as_save_IFS
41706
41707fi
41708fi
41709NM=$ac_cv_prog_NM
41710if test -n "$NM"; then
41711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41712$as_echo "$NM" >&6; }
41713else
41714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41715$as_echo "no" >&6; }
41716fi
41717
41718
41719    test -n "$NM" && break
41720  done
41721fi
41722if test -z "$NM"; then
41723  ac_ct_NM=$NM
41724  for ac_prog in nm gcc-nm
41725do
41726  # Extract the first word of "$ac_prog", so it can be a program name with args.
41727set dummy $ac_prog; ac_word=$2
41728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41729$as_echo_n "checking for $ac_word... " >&6; }
41730if ${ac_cv_prog_ac_ct_NM+:} false; then :
41731  $as_echo_n "(cached) " >&6
41732else
41733  if test -n "$ac_ct_NM"; then
41734  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41735else
41736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41737for as_dir in $PATH
41738do
41739  IFS=$as_save_IFS
41740  test -z "$as_dir" && as_dir=.
41741    for ac_exec_ext in '' $ac_executable_extensions; do
41742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41743    ac_cv_prog_ac_ct_NM="$ac_prog"
41744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41745    break 2
41746  fi
41747done
41748  done
41749IFS=$as_save_IFS
41750
41751fi
41752fi
41753ac_ct_NM=$ac_cv_prog_ac_ct_NM
41754if test -n "$ac_ct_NM"; then
41755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41756$as_echo "$ac_ct_NM" >&6; }
41757else
41758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41759$as_echo "no" >&6; }
41760fi
41761
41762
41763  test -n "$ac_ct_NM" && break
41764done
41765
41766  if test "x$ac_ct_NM" = x; then
41767    NM=""
41768  else
41769    case $cross_compiling:$ac_tool_warned in
41770yes:)
41771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41773ac_tool_warned=yes ;;
41774esac
41775    NM=$ac_ct_NM
41776  fi
41777fi
41778
41779  else
41780    # The variable is set, but is it from the command line or the environment?
41781
41782    # Try to remove the string !NM! from our list.
41783    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41784    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41785      # If it failed, the variable was not from the command line. Ignore it,
41786      # but warn the user (except for BASH, which is always set by the calling BASH).
41787      if test "xNM" != xBASH; then
41788        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41789$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41790      fi
41791      # Try to locate tool using the code snippet
41792      if test -n "$ac_tool_prefix"; then
41793  for ac_prog in nm gcc-nm
41794  do
41795    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41796set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41798$as_echo_n "checking for $ac_word... " >&6; }
41799if ${ac_cv_prog_NM+:} false; then :
41800  $as_echo_n "(cached) " >&6
41801else
41802  if test -n "$NM"; then
41803  ac_cv_prog_NM="$NM" # Let the user override the test.
41804else
41805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41806for as_dir in $PATH
41807do
41808  IFS=$as_save_IFS
41809  test -z "$as_dir" && as_dir=.
41810    for ac_exec_ext in '' $ac_executable_extensions; do
41811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41812    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41814    break 2
41815  fi
41816done
41817  done
41818IFS=$as_save_IFS
41819
41820fi
41821fi
41822NM=$ac_cv_prog_NM
41823if test -n "$NM"; then
41824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41825$as_echo "$NM" >&6; }
41826else
41827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41828$as_echo "no" >&6; }
41829fi
41830
41831
41832    test -n "$NM" && break
41833  done
41834fi
41835if test -z "$NM"; then
41836  ac_ct_NM=$NM
41837  for ac_prog in nm gcc-nm
41838do
41839  # Extract the first word of "$ac_prog", so it can be a program name with args.
41840set dummy $ac_prog; ac_word=$2
41841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41842$as_echo_n "checking for $ac_word... " >&6; }
41843if ${ac_cv_prog_ac_ct_NM+:} false; then :
41844  $as_echo_n "(cached) " >&6
41845else
41846  if test -n "$ac_ct_NM"; then
41847  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41848else
41849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41850for as_dir in $PATH
41851do
41852  IFS=$as_save_IFS
41853  test -z "$as_dir" && as_dir=.
41854    for ac_exec_ext in '' $ac_executable_extensions; do
41855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41856    ac_cv_prog_ac_ct_NM="$ac_prog"
41857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41858    break 2
41859  fi
41860done
41861  done
41862IFS=$as_save_IFS
41863
41864fi
41865fi
41866ac_ct_NM=$ac_cv_prog_ac_ct_NM
41867if test -n "$ac_ct_NM"; then
41868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41869$as_echo "$ac_ct_NM" >&6; }
41870else
41871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41872$as_echo "no" >&6; }
41873fi
41874
41875
41876  test -n "$ac_ct_NM" && break
41877done
41878
41879  if test "x$ac_ct_NM" = x; then
41880    NM=""
41881  else
41882    case $cross_compiling:$ac_tool_warned in
41883yes:)
41884{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41885$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41886ac_tool_warned=yes ;;
41887esac
41888    NM=$ac_ct_NM
41889  fi
41890fi
41891
41892    else
41893      # If it succeeded, then it was overridden by the user. We will use it
41894      # for the tool.
41895
41896      # First remove it from the list of overridden variables, so we can test
41897      # for unknown variables in the end.
41898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41899
41900      # Check if we try to supply an empty value
41901      if test "x$NM" = x; then
41902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41903$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41905$as_echo_n "checking for NM... " >&6; }
41906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41907$as_echo "disabled" >&6; }
41908      else
41909        # Check if the provided tool contains a complete path.
41910        tool_specified="$NM"
41911        tool_basename="${tool_specified##*/}"
41912        if test "x$tool_basename" = "x$tool_specified"; then
41913          # A command without a complete path is provided, search $PATH.
41914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41915$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41916          # Extract the first word of "$tool_basename", so it can be a program name with args.
41917set dummy $tool_basename; ac_word=$2
41918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41919$as_echo_n "checking for $ac_word... " >&6; }
41920if ${ac_cv_path_NM+:} false; then :
41921  $as_echo_n "(cached) " >&6
41922else
41923  case $NM in
41924  [\\/]* | ?:[\\/]*)
41925  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41926  ;;
41927  *)
41928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41929for as_dir in $PATH
41930do
41931  IFS=$as_save_IFS
41932  test -z "$as_dir" && as_dir=.
41933    for ac_exec_ext in '' $ac_executable_extensions; do
41934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41935    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41937    break 2
41938  fi
41939done
41940  done
41941IFS=$as_save_IFS
41942
41943  ;;
41944esac
41945fi
41946NM=$ac_cv_path_NM
41947if test -n "$NM"; then
41948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41949$as_echo "$NM" >&6; }
41950else
41951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41952$as_echo "no" >&6; }
41953fi
41954
41955
41956          if test "x$NM" = x; then
41957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41958          fi
41959        else
41960          # Otherwise we believe it is a complete path. Use it as it is.
41961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41962$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41964$as_echo_n "checking for NM... " >&6; }
41965          if test ! -x "$tool_specified"; then
41966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41967$as_echo "not found" >&6; }
41968            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41969          fi
41970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41971$as_echo "$tool_specified" >&6; }
41972        fi
41973      fi
41974    fi
41975
41976  fi
41977
41978
41979    else
41980
41981
41982  # Publish this variable in the help.
41983
41984
41985  if [ -z "${NM+x}" ]; then
41986    # The variable is not set by user, try to locate tool using the code snippet
41987    if test -n "$ac_tool_prefix"; then
41988  for ac_prog in nm
41989  do
41990    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41991set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41993$as_echo_n "checking for $ac_word... " >&6; }
41994if ${ac_cv_prog_NM+:} false; then :
41995  $as_echo_n "(cached) " >&6
41996else
41997  if test -n "$NM"; then
41998  ac_cv_prog_NM="$NM" # Let the user override the test.
41999else
42000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42001for as_dir in $PATH
42002do
42003  IFS=$as_save_IFS
42004  test -z "$as_dir" && as_dir=.
42005    for ac_exec_ext in '' $ac_executable_extensions; do
42006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42007    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42009    break 2
42010  fi
42011done
42012  done
42013IFS=$as_save_IFS
42014
42015fi
42016fi
42017NM=$ac_cv_prog_NM
42018if test -n "$NM"; then
42019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42020$as_echo "$NM" >&6; }
42021else
42022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42023$as_echo "no" >&6; }
42024fi
42025
42026
42027    test -n "$NM" && break
42028  done
42029fi
42030if test -z "$NM"; then
42031  ac_ct_NM=$NM
42032  for ac_prog in nm
42033do
42034  # Extract the first word of "$ac_prog", so it can be a program name with args.
42035set dummy $ac_prog; ac_word=$2
42036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42037$as_echo_n "checking for $ac_word... " >&6; }
42038if ${ac_cv_prog_ac_ct_NM+:} false; then :
42039  $as_echo_n "(cached) " >&6
42040else
42041  if test -n "$ac_ct_NM"; then
42042  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42043else
42044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42045for as_dir in $PATH
42046do
42047  IFS=$as_save_IFS
42048  test -z "$as_dir" && as_dir=.
42049    for ac_exec_ext in '' $ac_executable_extensions; do
42050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42051    ac_cv_prog_ac_ct_NM="$ac_prog"
42052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42053    break 2
42054  fi
42055done
42056  done
42057IFS=$as_save_IFS
42058
42059fi
42060fi
42061ac_ct_NM=$ac_cv_prog_ac_ct_NM
42062if test -n "$ac_ct_NM"; then
42063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42064$as_echo "$ac_ct_NM" >&6; }
42065else
42066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42067$as_echo "no" >&6; }
42068fi
42069
42070
42071  test -n "$ac_ct_NM" && break
42072done
42073
42074  if test "x$ac_ct_NM" = x; then
42075    NM=""
42076  else
42077    case $cross_compiling:$ac_tool_warned in
42078yes:)
42079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42081ac_tool_warned=yes ;;
42082esac
42083    NM=$ac_ct_NM
42084  fi
42085fi
42086
42087  else
42088    # The variable is set, but is it from the command line or the environment?
42089
42090    # Try to remove the string !NM! from our list.
42091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42093      # If it failed, the variable was not from the command line. Ignore it,
42094      # but warn the user (except for BASH, which is always set by the calling BASH).
42095      if test "xNM" != xBASH; then
42096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42097$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42098      fi
42099      # Try to locate tool using the code snippet
42100      if test -n "$ac_tool_prefix"; then
42101  for ac_prog in nm
42102  do
42103    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42104set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42106$as_echo_n "checking for $ac_word... " >&6; }
42107if ${ac_cv_prog_NM+:} false; then :
42108  $as_echo_n "(cached) " >&6
42109else
42110  if test -n "$NM"; then
42111  ac_cv_prog_NM="$NM" # Let the user override the test.
42112else
42113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42114for as_dir in $PATH
42115do
42116  IFS=$as_save_IFS
42117  test -z "$as_dir" && as_dir=.
42118    for ac_exec_ext in '' $ac_executable_extensions; do
42119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42120    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42122    break 2
42123  fi
42124done
42125  done
42126IFS=$as_save_IFS
42127
42128fi
42129fi
42130NM=$ac_cv_prog_NM
42131if test -n "$NM"; then
42132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42133$as_echo "$NM" >&6; }
42134else
42135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42136$as_echo "no" >&6; }
42137fi
42138
42139
42140    test -n "$NM" && break
42141  done
42142fi
42143if test -z "$NM"; then
42144  ac_ct_NM=$NM
42145  for ac_prog in nm
42146do
42147  # Extract the first word of "$ac_prog", so it can be a program name with args.
42148set dummy $ac_prog; ac_word=$2
42149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42150$as_echo_n "checking for $ac_word... " >&6; }
42151if ${ac_cv_prog_ac_ct_NM+:} false; then :
42152  $as_echo_n "(cached) " >&6
42153else
42154  if test -n "$ac_ct_NM"; then
42155  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42156else
42157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42158for as_dir in $PATH
42159do
42160  IFS=$as_save_IFS
42161  test -z "$as_dir" && as_dir=.
42162    for ac_exec_ext in '' $ac_executable_extensions; do
42163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42164    ac_cv_prog_ac_ct_NM="$ac_prog"
42165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42166    break 2
42167  fi
42168done
42169  done
42170IFS=$as_save_IFS
42171
42172fi
42173fi
42174ac_ct_NM=$ac_cv_prog_ac_ct_NM
42175if test -n "$ac_ct_NM"; then
42176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42177$as_echo "$ac_ct_NM" >&6; }
42178else
42179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42180$as_echo "no" >&6; }
42181fi
42182
42183
42184  test -n "$ac_ct_NM" && break
42185done
42186
42187  if test "x$ac_ct_NM" = x; then
42188    NM=""
42189  else
42190    case $cross_compiling:$ac_tool_warned in
42191yes:)
42192{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42193$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42194ac_tool_warned=yes ;;
42195esac
42196    NM=$ac_ct_NM
42197  fi
42198fi
42199
42200    else
42201      # If it succeeded, then it was overridden by the user. We will use it
42202      # for the tool.
42203
42204      # First remove it from the list of overridden variables, so we can test
42205      # for unknown variables in the end.
42206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42207
42208      # Check if we try to supply an empty value
42209      if test "x$NM" = x; then
42210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42211$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42213$as_echo_n "checking for NM... " >&6; }
42214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42215$as_echo "disabled" >&6; }
42216      else
42217        # Check if the provided tool contains a complete path.
42218        tool_specified="$NM"
42219        tool_basename="${tool_specified##*/}"
42220        if test "x$tool_basename" = "x$tool_specified"; then
42221          # A command without a complete path is provided, search $PATH.
42222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42223$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42224          # Extract the first word of "$tool_basename", so it can be a program name with args.
42225set dummy $tool_basename; ac_word=$2
42226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42227$as_echo_n "checking for $ac_word... " >&6; }
42228if ${ac_cv_path_NM+:} false; then :
42229  $as_echo_n "(cached) " >&6
42230else
42231  case $NM in
42232  [\\/]* | ?:[\\/]*)
42233  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42234  ;;
42235  *)
42236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42237for as_dir in $PATH
42238do
42239  IFS=$as_save_IFS
42240  test -z "$as_dir" && as_dir=.
42241    for ac_exec_ext in '' $ac_executable_extensions; do
42242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42243    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42245    break 2
42246  fi
42247done
42248  done
42249IFS=$as_save_IFS
42250
42251  ;;
42252esac
42253fi
42254NM=$ac_cv_path_NM
42255if test -n "$NM"; then
42256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42257$as_echo "$NM" >&6; }
42258else
42259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42260$as_echo "no" >&6; }
42261fi
42262
42263
42264          if test "x$NM" = x; then
42265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42266          fi
42267        else
42268          # Otherwise we believe it is a complete path. Use it as it is.
42269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42270$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42272$as_echo_n "checking for NM... " >&6; }
42273          if test ! -x "$tool_specified"; then
42274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42275$as_echo "not found" >&6; }
42276            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42277          fi
42278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42279$as_echo "$tool_specified" >&6; }
42280        fi
42281      fi
42282    fi
42283
42284  fi
42285
42286
42287    fi
42288
42289  # Only process if variable expands to non-empty
42290
42291  if test "x$NM" != x; then
42292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42293
42294  # First separate the path from the arguments. This will split at the first
42295  # space.
42296  complete="$NM"
42297  path="${complete%% *}"
42298  tmp="$complete EOL"
42299  arguments="${tmp#* }"
42300
42301  # Input might be given as Windows format, start by converting to
42302  # unix format.
42303  new_path=`$CYGPATH -u "$path"`
42304
42305  # Now try to locate executable using which
42306  new_path=`$WHICH "$new_path" 2> /dev/null`
42307  # bat and cmd files are not always considered executable in cygwin causing which
42308  # to not find them
42309  if test "x$new_path" = x \
42310      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42311      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42312    new_path=`$CYGPATH -u "$path"`
42313  fi
42314  if test "x$new_path" = x; then
42315    # Oops. Which didn't find the executable.
42316    # The splitting of arguments from the executable at a space might have been incorrect,
42317    # since paths with space are more likely in Windows. Give it another try with the whole
42318    # argument.
42319    path="$complete"
42320    arguments="EOL"
42321    new_path=`$CYGPATH -u "$path"`
42322    new_path=`$WHICH "$new_path" 2> /dev/null`
42323    # bat and cmd files are not always considered executable in cygwin causing which
42324    # to not find them
42325    if test "x$new_path" = x \
42326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42328      new_path=`$CYGPATH -u "$path"`
42329    fi
42330    if test "x$new_path" = x; then
42331      # It's still not found. Now this is an unrecoverable error.
42332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42333$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42334      has_space=`$ECHO "$complete" | $GREP " "`
42335      if test "x$has_space" != x; then
42336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42338      fi
42339      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42340    fi
42341  fi
42342
42343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42346  # "foo.exe" is OK but "foo" is an error.
42347  #
42348  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42349  # It is also a way to make sure we got the proper file name for the real test later on.
42350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42351  if test "x$test_shortpath" = x; then
42352    # Short path failed, file does not exist as specified.
42353    # Try adding .exe or .cmd
42354    if test -f "${new_path}.exe"; then
42355      input_to_shortpath="${new_path}.exe"
42356    elif test -f "${new_path}.cmd"; then
42357      input_to_shortpath="${new_path}.cmd"
42358    else
42359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42360$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42363      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42364    fi
42365  else
42366    input_to_shortpath="$new_path"
42367  fi
42368
42369  # Call helper function which possibly converts this using DOS-style short mode.
42370  # If so, the updated path is stored in $new_path.
42371  new_path="$input_to_shortpath"
42372
42373  input_path="$input_to_shortpath"
42374  # Check if we need to convert this using DOS-style short mode. If the path
42375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42376  # take no chances and rewrite it.
42377  # Note: m4 eats our [], so we need to use [ and ] instead.
42378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42379  if test "x$has_forbidden_chars" != x; then
42380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42384      # Going to short mode and back again did indeed matter. Since short mode is
42385      # case insensitive, let's make it lowercase to improve readability.
42386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42387      # Now convert it back to Unix-style (cygpath)
42388      input_path=`$CYGPATH -u "$shortmode_path"`
42389      new_path="$input_path"
42390    fi
42391  fi
42392
42393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42394  if test "x$test_cygdrive_prefix" = x; then
42395    # As a simple fix, exclude /usr/bin since it's not a real path.
42396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42398      # a path prefixed by /cygdrive for fixpath to work.
42399      new_path="$CYGWIN_ROOT_PATH$input_path"
42400    fi
42401  fi
42402
42403  # remove trailing .exe if any
42404  new_path="${new_path/%.exe/}"
42405
42406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42407
42408  # First separate the path from the arguments. This will split at the first
42409  # space.
42410  complete="$NM"
42411  path="${complete%% *}"
42412  tmp="$complete EOL"
42413  arguments="${tmp#* }"
42414
42415  # Input might be given as Windows format, start by converting to
42416  # unix format.
42417  new_path="$path"
42418
42419  windows_path="$new_path"
42420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42421    unix_path=`$CYGPATH -u "$windows_path"`
42422    new_path="$unix_path"
42423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42425    new_path="$unix_path"
42426  fi
42427
42428
42429  # Now try to locate executable using which
42430  new_path=`$WHICH "$new_path" 2> /dev/null`
42431
42432  if test "x$new_path" = x; then
42433    # Oops. Which didn't find the executable.
42434    # The splitting of arguments from the executable at a space might have been incorrect,
42435    # since paths with space are more likely in Windows. Give it another try with the whole
42436    # argument.
42437    path="$complete"
42438    arguments="EOL"
42439    new_path="$path"
42440
42441  windows_path="$new_path"
42442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42443    unix_path=`$CYGPATH -u "$windows_path"`
42444    new_path="$unix_path"
42445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42447    new_path="$unix_path"
42448  fi
42449
42450
42451    new_path=`$WHICH "$new_path" 2> /dev/null`
42452    # bat and cmd files are not always considered executable in MSYS causing which
42453    # to not find them
42454    if test "x$new_path" = x \
42455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42457      new_path="$path"
42458
42459  windows_path="$new_path"
42460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42461    unix_path=`$CYGPATH -u "$windows_path"`
42462    new_path="$unix_path"
42463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42465    new_path="$unix_path"
42466  fi
42467
42468    fi
42469
42470    if test "x$new_path" = x; then
42471      # It's still not found. Now this is an unrecoverable error.
42472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42473$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42474      has_space=`$ECHO "$complete" | $GREP " "`
42475      if test "x$has_space" != x; then
42476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42478      fi
42479      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42480    fi
42481  fi
42482
42483  # Now new_path has a complete unix path to the binary
42484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42485    # Keep paths in /bin as-is, but remove trailing .exe if any
42486    new_path="${new_path/%.exe/}"
42487    # Do not save /bin paths to all_fixpath_prefixes!
42488  else
42489    # Not in mixed or Windows style, start by that.
42490    new_path=`cmd //c echo $new_path`
42491
42492  input_path="$new_path"
42493  # Check if we need to convert this using DOS-style short mode. If the path
42494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42495  # take no chances and rewrite it.
42496  # Note: m4 eats our [], so we need to use [ and ] instead.
42497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42498  if test "x$has_forbidden_chars" != x; then
42499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42501  fi
42502
42503    # Output is in $new_path
42504
42505  windows_path="$new_path"
42506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42507    unix_path=`$CYGPATH -u "$windows_path"`
42508    new_path="$unix_path"
42509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42511    new_path="$unix_path"
42512  fi
42513
42514    # remove trailing .exe if any
42515    new_path="${new_path/%.exe/}"
42516
42517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42519  fi
42520
42521    else
42522      # We're on a unix platform. Hooray! :)
42523      # First separate the path from the arguments. This will split at the first
42524      # space.
42525      complete="$NM"
42526      path="${complete%% *}"
42527      tmp="$complete EOL"
42528      arguments="${tmp#* }"
42529
42530      # Cannot rely on the command "which" here since it doesn't always work.
42531      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42532      if test -z "$is_absolute_path"; then
42533        # Path to executable is not absolute. Find it.
42534        IFS_save="$IFS"
42535        IFS=:
42536        for p in $PATH; do
42537          if test -f "$p/$path" && test -x "$p/$path"; then
42538            new_path="$p/$path"
42539            break
42540          fi
42541        done
42542        IFS="$IFS_save"
42543      else
42544        # This is an absolute path, we can use it without further modifications.
42545        new_path="$path"
42546      fi
42547
42548      if test "x$new_path" = x; then
42549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42550$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42551        has_space=`$ECHO "$complete" | $GREP " "`
42552        if test "x$has_space" != x; then
42553          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42555        fi
42556        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42557      fi
42558    fi
42559
42560    # Now join together the path and the arguments once again
42561    if test "x$arguments" != xEOL; then
42562      new_complete="$new_path ${arguments% *}"
42563    else
42564      new_complete="$new_path"
42565    fi
42566
42567    if test "x$complete" != "x$new_complete"; then
42568      NM="$new_complete"
42569      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42570$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42571    fi
42572  fi
42573
42574    GNM="$NM"
42575
42576  fi
42577
42578  # objcopy is used for moving debug symbols to separate files when
42579  # full debug symbols are enabled.
42580  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42581
42582
42583  # Publish this variable in the help.
42584
42585
42586  if [ -z "${OBJCOPY+x}" ]; then
42587    # The variable is not set by user, try to locate tool using the code snippet
42588    if test -n "$ac_tool_prefix"; then
42589  for ac_prog in gobjcopy objcopy
42590  do
42591    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42592set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42594$as_echo_n "checking for $ac_word... " >&6; }
42595if ${ac_cv_prog_OBJCOPY+:} false; then :
42596  $as_echo_n "(cached) " >&6
42597else
42598  if test -n "$OBJCOPY"; then
42599  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42600else
42601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42602for as_dir in $PATH
42603do
42604  IFS=$as_save_IFS
42605  test -z "$as_dir" && as_dir=.
42606    for ac_exec_ext in '' $ac_executable_extensions; do
42607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42608    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42610    break 2
42611  fi
42612done
42613  done
42614IFS=$as_save_IFS
42615
42616fi
42617fi
42618OBJCOPY=$ac_cv_prog_OBJCOPY
42619if test -n "$OBJCOPY"; then
42620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42621$as_echo "$OBJCOPY" >&6; }
42622else
42623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42624$as_echo "no" >&6; }
42625fi
42626
42627
42628    test -n "$OBJCOPY" && break
42629  done
42630fi
42631if test -z "$OBJCOPY"; then
42632  ac_ct_OBJCOPY=$OBJCOPY
42633  for ac_prog in gobjcopy objcopy
42634do
42635  # Extract the first word of "$ac_prog", so it can be a program name with args.
42636set dummy $ac_prog; ac_word=$2
42637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42638$as_echo_n "checking for $ac_word... " >&6; }
42639if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42640  $as_echo_n "(cached) " >&6
42641else
42642  if test -n "$ac_ct_OBJCOPY"; then
42643  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42644else
42645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42646for as_dir in $PATH
42647do
42648  IFS=$as_save_IFS
42649  test -z "$as_dir" && as_dir=.
42650    for ac_exec_ext in '' $ac_executable_extensions; do
42651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42652    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42654    break 2
42655  fi
42656done
42657  done
42658IFS=$as_save_IFS
42659
42660fi
42661fi
42662ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42663if test -n "$ac_ct_OBJCOPY"; then
42664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42665$as_echo "$ac_ct_OBJCOPY" >&6; }
42666else
42667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42668$as_echo "no" >&6; }
42669fi
42670
42671
42672  test -n "$ac_ct_OBJCOPY" && break
42673done
42674
42675  if test "x$ac_ct_OBJCOPY" = x; then
42676    OBJCOPY=""
42677  else
42678    case $cross_compiling:$ac_tool_warned in
42679yes:)
42680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42682ac_tool_warned=yes ;;
42683esac
42684    OBJCOPY=$ac_ct_OBJCOPY
42685  fi
42686fi
42687
42688  else
42689    # The variable is set, but is it from the command line or the environment?
42690
42691    # Try to remove the string !OBJCOPY! from our list.
42692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42694      # If it failed, the variable was not from the command line. Ignore it,
42695      # but warn the user (except for BASH, which is always set by the calling BASH).
42696      if test "xOBJCOPY" != xBASH; then
42697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42698$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42699      fi
42700      # Try to locate tool using the code snippet
42701      if test -n "$ac_tool_prefix"; then
42702  for ac_prog in gobjcopy objcopy
42703  do
42704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42707$as_echo_n "checking for $ac_word... " >&6; }
42708if ${ac_cv_prog_OBJCOPY+:} false; then :
42709  $as_echo_n "(cached) " >&6
42710else
42711  if test -n "$OBJCOPY"; then
42712  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42713else
42714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42715for as_dir in $PATH
42716do
42717  IFS=$as_save_IFS
42718  test -z "$as_dir" && as_dir=.
42719    for ac_exec_ext in '' $ac_executable_extensions; do
42720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42721    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42723    break 2
42724  fi
42725done
42726  done
42727IFS=$as_save_IFS
42728
42729fi
42730fi
42731OBJCOPY=$ac_cv_prog_OBJCOPY
42732if test -n "$OBJCOPY"; then
42733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42734$as_echo "$OBJCOPY" >&6; }
42735else
42736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42737$as_echo "no" >&6; }
42738fi
42739
42740
42741    test -n "$OBJCOPY" && break
42742  done
42743fi
42744if test -z "$OBJCOPY"; then
42745  ac_ct_OBJCOPY=$OBJCOPY
42746  for ac_prog in gobjcopy objcopy
42747do
42748  # Extract the first word of "$ac_prog", so it can be a program name with args.
42749set dummy $ac_prog; ac_word=$2
42750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42751$as_echo_n "checking for $ac_word... " >&6; }
42752if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42753  $as_echo_n "(cached) " >&6
42754else
42755  if test -n "$ac_ct_OBJCOPY"; then
42756  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42757else
42758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42759for as_dir in $PATH
42760do
42761  IFS=$as_save_IFS
42762  test -z "$as_dir" && as_dir=.
42763    for ac_exec_ext in '' $ac_executable_extensions; do
42764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42765    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42767    break 2
42768  fi
42769done
42770  done
42771IFS=$as_save_IFS
42772
42773fi
42774fi
42775ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42776if test -n "$ac_ct_OBJCOPY"; then
42777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42778$as_echo "$ac_ct_OBJCOPY" >&6; }
42779else
42780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42781$as_echo "no" >&6; }
42782fi
42783
42784
42785  test -n "$ac_ct_OBJCOPY" && break
42786done
42787
42788  if test "x$ac_ct_OBJCOPY" = x; then
42789    OBJCOPY=""
42790  else
42791    case $cross_compiling:$ac_tool_warned in
42792yes:)
42793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42795ac_tool_warned=yes ;;
42796esac
42797    OBJCOPY=$ac_ct_OBJCOPY
42798  fi
42799fi
42800
42801    else
42802      # If it succeeded, then it was overridden by the user. We will use it
42803      # for the tool.
42804
42805      # First remove it from the list of overridden variables, so we can test
42806      # for unknown variables in the end.
42807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42808
42809      # Check if we try to supply an empty value
42810      if test "x$OBJCOPY" = x; then
42811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42812$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42814$as_echo_n "checking for OBJCOPY... " >&6; }
42815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42816$as_echo "disabled" >&6; }
42817      else
42818        # Check if the provided tool contains a complete path.
42819        tool_specified="$OBJCOPY"
42820        tool_basename="${tool_specified##*/}"
42821        if test "x$tool_basename" = "x$tool_specified"; then
42822          # A command without a complete path is provided, search $PATH.
42823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42824$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42825          # Extract the first word of "$tool_basename", so it can be a program name with args.
42826set dummy $tool_basename; ac_word=$2
42827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42828$as_echo_n "checking for $ac_word... " >&6; }
42829if ${ac_cv_path_OBJCOPY+:} false; then :
42830  $as_echo_n "(cached) " >&6
42831else
42832  case $OBJCOPY in
42833  [\\/]* | ?:[\\/]*)
42834  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42835  ;;
42836  *)
42837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42838for as_dir in $PATH
42839do
42840  IFS=$as_save_IFS
42841  test -z "$as_dir" && as_dir=.
42842    for ac_exec_ext in '' $ac_executable_extensions; do
42843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42844    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42846    break 2
42847  fi
42848done
42849  done
42850IFS=$as_save_IFS
42851
42852  ;;
42853esac
42854fi
42855OBJCOPY=$ac_cv_path_OBJCOPY
42856if test -n "$OBJCOPY"; then
42857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42858$as_echo "$OBJCOPY" >&6; }
42859else
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42861$as_echo "no" >&6; }
42862fi
42863
42864
42865          if test "x$OBJCOPY" = x; then
42866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42867          fi
42868        else
42869          # Otherwise we believe it is a complete path. Use it as it is.
42870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42871$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42873$as_echo_n "checking for OBJCOPY... " >&6; }
42874          if test ! -x "$tool_specified"; then
42875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42876$as_echo "not found" >&6; }
42877            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42878          fi
42879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42880$as_echo "$tool_specified" >&6; }
42881        fi
42882      fi
42883    fi
42884
42885  fi
42886
42887
42888    # Only call fixup if objcopy was found.
42889    if test -n "$OBJCOPY"; then
42890
42891  # Only process if variable expands to non-empty
42892
42893  if test "x$OBJCOPY" != x; then
42894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42895
42896  # First separate the path from the arguments. This will split at the first
42897  # space.
42898  complete="$OBJCOPY"
42899  path="${complete%% *}"
42900  tmp="$complete EOL"
42901  arguments="${tmp#* }"
42902
42903  # Input might be given as Windows format, start by converting to
42904  # unix format.
42905  new_path=`$CYGPATH -u "$path"`
42906
42907  # Now try to locate executable using which
42908  new_path=`$WHICH "$new_path" 2> /dev/null`
42909  # bat and cmd files are not always considered executable in cygwin causing which
42910  # to not find them
42911  if test "x$new_path" = x \
42912      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42913      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42914    new_path=`$CYGPATH -u "$path"`
42915  fi
42916  if test "x$new_path" = x; then
42917    # Oops. Which didn't find the executable.
42918    # The splitting of arguments from the executable at a space might have been incorrect,
42919    # since paths with space are more likely in Windows. Give it another try with the whole
42920    # argument.
42921    path="$complete"
42922    arguments="EOL"
42923    new_path=`$CYGPATH -u "$path"`
42924    new_path=`$WHICH "$new_path" 2> /dev/null`
42925    # bat and cmd files are not always considered executable in cygwin causing which
42926    # to not find them
42927    if test "x$new_path" = x \
42928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42930      new_path=`$CYGPATH -u "$path"`
42931    fi
42932    if test "x$new_path" = x; then
42933      # It's still not found. Now this is an unrecoverable error.
42934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42935$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42936      has_space=`$ECHO "$complete" | $GREP " "`
42937      if test "x$has_space" != x; then
42938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42940      fi
42941      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42942    fi
42943  fi
42944
42945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42948  # "foo.exe" is OK but "foo" is an error.
42949  #
42950  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42951  # It is also a way to make sure we got the proper file name for the real test later on.
42952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42953  if test "x$test_shortpath" = x; then
42954    # Short path failed, file does not exist as specified.
42955    # Try adding .exe or .cmd
42956    if test -f "${new_path}.exe"; then
42957      input_to_shortpath="${new_path}.exe"
42958    elif test -f "${new_path}.cmd"; then
42959      input_to_shortpath="${new_path}.cmd"
42960    else
42961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42962$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42963      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42964$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42965      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42966    fi
42967  else
42968    input_to_shortpath="$new_path"
42969  fi
42970
42971  # Call helper function which possibly converts this using DOS-style short mode.
42972  # If so, the updated path is stored in $new_path.
42973  new_path="$input_to_shortpath"
42974
42975  input_path="$input_to_shortpath"
42976  # Check if we need to convert this using DOS-style short mode. If the path
42977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42978  # take no chances and rewrite it.
42979  # Note: m4 eats our [], so we need to use [ and ] instead.
42980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42981  if test "x$has_forbidden_chars" != x; then
42982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42986      # Going to short mode and back again did indeed matter. Since short mode is
42987      # case insensitive, let's make it lowercase to improve readability.
42988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42989      # Now convert it back to Unix-style (cygpath)
42990      input_path=`$CYGPATH -u "$shortmode_path"`
42991      new_path="$input_path"
42992    fi
42993  fi
42994
42995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42996  if test "x$test_cygdrive_prefix" = x; then
42997    # As a simple fix, exclude /usr/bin since it's not a real path.
42998    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43000      # a path prefixed by /cygdrive for fixpath to work.
43001      new_path="$CYGWIN_ROOT_PATH$input_path"
43002    fi
43003  fi
43004
43005  # remove trailing .exe if any
43006  new_path="${new_path/%.exe/}"
43007
43008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43009
43010  # First separate the path from the arguments. This will split at the first
43011  # space.
43012  complete="$OBJCOPY"
43013  path="${complete%% *}"
43014  tmp="$complete EOL"
43015  arguments="${tmp#* }"
43016
43017  # Input might be given as Windows format, start by converting to
43018  # unix format.
43019  new_path="$path"
43020
43021  windows_path="$new_path"
43022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43023    unix_path=`$CYGPATH -u "$windows_path"`
43024    new_path="$unix_path"
43025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43027    new_path="$unix_path"
43028  fi
43029
43030
43031  # Now try to locate executable using which
43032  new_path=`$WHICH "$new_path" 2> /dev/null`
43033
43034  if test "x$new_path" = x; then
43035    # Oops. Which didn't find the executable.
43036    # The splitting of arguments from the executable at a space might have been incorrect,
43037    # since paths with space are more likely in Windows. Give it another try with the whole
43038    # argument.
43039    path="$complete"
43040    arguments="EOL"
43041    new_path="$path"
43042
43043  windows_path="$new_path"
43044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43045    unix_path=`$CYGPATH -u "$windows_path"`
43046    new_path="$unix_path"
43047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43049    new_path="$unix_path"
43050  fi
43051
43052
43053    new_path=`$WHICH "$new_path" 2> /dev/null`
43054    # bat and cmd files are not always considered executable in MSYS causing which
43055    # to not find them
43056    if test "x$new_path" = x \
43057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43059      new_path="$path"
43060
43061  windows_path="$new_path"
43062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43063    unix_path=`$CYGPATH -u "$windows_path"`
43064    new_path="$unix_path"
43065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43067    new_path="$unix_path"
43068  fi
43069
43070    fi
43071
43072    if test "x$new_path" = x; then
43073      # It's still not found. Now this is an unrecoverable error.
43074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43075$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43076      has_space=`$ECHO "$complete" | $GREP " "`
43077      if test "x$has_space" != x; then
43078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43080      fi
43081      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43082    fi
43083  fi
43084
43085  # Now new_path has a complete unix path to the binary
43086  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43087    # Keep paths in /bin as-is, but remove trailing .exe if any
43088    new_path="${new_path/%.exe/}"
43089    # Do not save /bin paths to all_fixpath_prefixes!
43090  else
43091    # Not in mixed or Windows style, start by that.
43092    new_path=`cmd //c echo $new_path`
43093
43094  input_path="$new_path"
43095  # Check if we need to convert this using DOS-style short mode. If the path
43096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43097  # take no chances and rewrite it.
43098  # Note: m4 eats our [], so we need to use [ and ] instead.
43099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43100  if test "x$has_forbidden_chars" != x; then
43101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43103  fi
43104
43105    # Output is in $new_path
43106
43107  windows_path="$new_path"
43108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43109    unix_path=`$CYGPATH -u "$windows_path"`
43110    new_path="$unix_path"
43111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43113    new_path="$unix_path"
43114  fi
43115
43116    # remove trailing .exe if any
43117    new_path="${new_path/%.exe/}"
43118
43119    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43120    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43121  fi
43122
43123    else
43124      # We're on a unix platform. Hooray! :)
43125      # First separate the path from the arguments. This will split at the first
43126      # space.
43127      complete="$OBJCOPY"
43128      path="${complete%% *}"
43129      tmp="$complete EOL"
43130      arguments="${tmp#* }"
43131
43132      # Cannot rely on the command "which" here since it doesn't always work.
43133      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43134      if test -z "$is_absolute_path"; then
43135        # Path to executable is not absolute. Find it.
43136        IFS_save="$IFS"
43137        IFS=:
43138        for p in $PATH; do
43139          if test -f "$p/$path" && test -x "$p/$path"; then
43140            new_path="$p/$path"
43141            break
43142          fi
43143        done
43144        IFS="$IFS_save"
43145      else
43146        # This is an absolute path, we can use it without further modifications.
43147        new_path="$path"
43148      fi
43149
43150      if test "x$new_path" = x; then
43151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43152$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43153        has_space=`$ECHO "$complete" | $GREP " "`
43154        if test "x$has_space" != x; then
43155          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43156$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43157        fi
43158        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43159      fi
43160    fi
43161
43162    # Now join together the path and the arguments once again
43163    if test "x$arguments" != xEOL; then
43164      new_complete="$new_path ${arguments% *}"
43165    else
43166      new_complete="$new_path"
43167    fi
43168
43169    if test "x$complete" != "x$new_complete"; then
43170      OBJCOPY="$new_complete"
43171      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43172$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43173    fi
43174  fi
43175
43176      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43177        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43178        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43179        # - version number is last blank separate word on first line
43180        # - version number formats that have been seen:
43181        #   - <major>.<minor>
43182        #   - <major>.<minor>.<micro>
43183        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43184        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43185         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43186              -e 's/.* //' \
43187              -e '/^[01]\./b bad' \
43188              -e '/^2\./{' \
43189              -e '  s/^2\.//' \
43190              -e '  /^[0-9]$/b bad' \
43191              -e '  /^[0-9]\./b bad' \
43192              -e '  /^1[0-9]$/b bad' \
43193              -e '  /^1[0-9]\./b bad' \
43194              -e '  /^20\./b bad' \
43195              -e '  /^21\.0$/b bad' \
43196              -e '  /^21\.0\./b bad' \
43197              -e '}' \
43198              -e ':good' \
43199              -e 's/.*/VALID_VERSION/p' \
43200              -e 'q' \
43201              -e ':bad' \
43202              -e 's/.*/BAD_VERSION/p' \
43203              -e 'q'`
43204        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43205          OBJCOPY=
43206          { $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
43207$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43208          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43209$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43210          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43211$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43212          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43213$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43214          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43215$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43216        fi
43217      fi
43218    fi
43219  fi
43220
43221
43222
43223  # Publish this variable in the help.
43224
43225
43226  if [ -z "${OBJDUMP+x}" ]; then
43227    # The variable is not set by user, try to locate tool using the code snippet
43228    if test -n "$ac_tool_prefix"; then
43229  for ac_prog in gobjdump objdump
43230  do
43231    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43234$as_echo_n "checking for $ac_word... " >&6; }
43235if ${ac_cv_prog_OBJDUMP+:} false; then :
43236  $as_echo_n "(cached) " >&6
43237else
43238  if test -n "$OBJDUMP"; then
43239  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43240else
43241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43242for as_dir in $PATH
43243do
43244  IFS=$as_save_IFS
43245  test -z "$as_dir" && as_dir=.
43246    for ac_exec_ext in '' $ac_executable_extensions; do
43247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43248    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43250    break 2
43251  fi
43252done
43253  done
43254IFS=$as_save_IFS
43255
43256fi
43257fi
43258OBJDUMP=$ac_cv_prog_OBJDUMP
43259if test -n "$OBJDUMP"; then
43260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43261$as_echo "$OBJDUMP" >&6; }
43262else
43263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43264$as_echo "no" >&6; }
43265fi
43266
43267
43268    test -n "$OBJDUMP" && break
43269  done
43270fi
43271if test -z "$OBJDUMP"; then
43272  ac_ct_OBJDUMP=$OBJDUMP
43273  for ac_prog in gobjdump objdump
43274do
43275  # Extract the first word of "$ac_prog", so it can be a program name with args.
43276set dummy $ac_prog; ac_word=$2
43277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43278$as_echo_n "checking for $ac_word... " >&6; }
43279if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43280  $as_echo_n "(cached) " >&6
43281else
43282  if test -n "$ac_ct_OBJDUMP"; then
43283  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43284else
43285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43286for as_dir in $PATH
43287do
43288  IFS=$as_save_IFS
43289  test -z "$as_dir" && as_dir=.
43290    for ac_exec_ext in '' $ac_executable_extensions; do
43291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43292    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43294    break 2
43295  fi
43296done
43297  done
43298IFS=$as_save_IFS
43299
43300fi
43301fi
43302ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43303if test -n "$ac_ct_OBJDUMP"; then
43304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43305$as_echo "$ac_ct_OBJDUMP" >&6; }
43306else
43307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43308$as_echo "no" >&6; }
43309fi
43310
43311
43312  test -n "$ac_ct_OBJDUMP" && break
43313done
43314
43315  if test "x$ac_ct_OBJDUMP" = x; then
43316    OBJDUMP=""
43317  else
43318    case $cross_compiling:$ac_tool_warned in
43319yes:)
43320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43322ac_tool_warned=yes ;;
43323esac
43324    OBJDUMP=$ac_ct_OBJDUMP
43325  fi
43326fi
43327
43328  else
43329    # The variable is set, but is it from the command line or the environment?
43330
43331    # Try to remove the string !OBJDUMP! from our list.
43332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43334      # If it failed, the variable was not from the command line. Ignore it,
43335      # but warn the user (except for BASH, which is always set by the calling BASH).
43336      if test "xOBJDUMP" != xBASH; then
43337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43338$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43339      fi
43340      # Try to locate tool using the code snippet
43341      if test -n "$ac_tool_prefix"; then
43342  for ac_prog in gobjdump objdump
43343  do
43344    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43345set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43347$as_echo_n "checking for $ac_word... " >&6; }
43348if ${ac_cv_prog_OBJDUMP+:} false; then :
43349  $as_echo_n "(cached) " >&6
43350else
43351  if test -n "$OBJDUMP"; then
43352  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43353else
43354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43355for as_dir in $PATH
43356do
43357  IFS=$as_save_IFS
43358  test -z "$as_dir" && as_dir=.
43359    for ac_exec_ext in '' $ac_executable_extensions; do
43360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43361    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43363    break 2
43364  fi
43365done
43366  done
43367IFS=$as_save_IFS
43368
43369fi
43370fi
43371OBJDUMP=$ac_cv_prog_OBJDUMP
43372if test -n "$OBJDUMP"; then
43373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43374$as_echo "$OBJDUMP" >&6; }
43375else
43376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43377$as_echo "no" >&6; }
43378fi
43379
43380
43381    test -n "$OBJDUMP" && break
43382  done
43383fi
43384if test -z "$OBJDUMP"; then
43385  ac_ct_OBJDUMP=$OBJDUMP
43386  for ac_prog in gobjdump objdump
43387do
43388  # Extract the first word of "$ac_prog", so it can be a program name with args.
43389set dummy $ac_prog; ac_word=$2
43390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43391$as_echo_n "checking for $ac_word... " >&6; }
43392if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43393  $as_echo_n "(cached) " >&6
43394else
43395  if test -n "$ac_ct_OBJDUMP"; then
43396  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43397else
43398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43399for as_dir in $PATH
43400do
43401  IFS=$as_save_IFS
43402  test -z "$as_dir" && as_dir=.
43403    for ac_exec_ext in '' $ac_executable_extensions; do
43404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43405    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43407    break 2
43408  fi
43409done
43410  done
43411IFS=$as_save_IFS
43412
43413fi
43414fi
43415ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43416if test -n "$ac_ct_OBJDUMP"; then
43417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43418$as_echo "$ac_ct_OBJDUMP" >&6; }
43419else
43420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43421$as_echo "no" >&6; }
43422fi
43423
43424
43425  test -n "$ac_ct_OBJDUMP" && break
43426done
43427
43428  if test "x$ac_ct_OBJDUMP" = x; then
43429    OBJDUMP=""
43430  else
43431    case $cross_compiling:$ac_tool_warned in
43432yes:)
43433{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43435ac_tool_warned=yes ;;
43436esac
43437    OBJDUMP=$ac_ct_OBJDUMP
43438  fi
43439fi
43440
43441    else
43442      # If it succeeded, then it was overridden by the user. We will use it
43443      # for the tool.
43444
43445      # First remove it from the list of overridden variables, so we can test
43446      # for unknown variables in the end.
43447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43448
43449      # Check if we try to supply an empty value
43450      if test "x$OBJDUMP" = x; then
43451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43452$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43454$as_echo_n "checking for OBJDUMP... " >&6; }
43455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43456$as_echo "disabled" >&6; }
43457      else
43458        # Check if the provided tool contains a complete path.
43459        tool_specified="$OBJDUMP"
43460        tool_basename="${tool_specified##*/}"
43461        if test "x$tool_basename" = "x$tool_specified"; then
43462          # A command without a complete path is provided, search $PATH.
43463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43464$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43465          # Extract the first word of "$tool_basename", so it can be a program name with args.
43466set dummy $tool_basename; ac_word=$2
43467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43468$as_echo_n "checking for $ac_word... " >&6; }
43469if ${ac_cv_path_OBJDUMP+:} false; then :
43470  $as_echo_n "(cached) " >&6
43471else
43472  case $OBJDUMP in
43473  [\\/]* | ?:[\\/]*)
43474  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43475  ;;
43476  *)
43477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43478for as_dir in $PATH
43479do
43480  IFS=$as_save_IFS
43481  test -z "$as_dir" && as_dir=.
43482    for ac_exec_ext in '' $ac_executable_extensions; do
43483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43484    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43486    break 2
43487  fi
43488done
43489  done
43490IFS=$as_save_IFS
43491
43492  ;;
43493esac
43494fi
43495OBJDUMP=$ac_cv_path_OBJDUMP
43496if test -n "$OBJDUMP"; then
43497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43498$as_echo "$OBJDUMP" >&6; }
43499else
43500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43501$as_echo "no" >&6; }
43502fi
43503
43504
43505          if test "x$OBJDUMP" = x; then
43506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43507          fi
43508        else
43509          # Otherwise we believe it is a complete path. Use it as it is.
43510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43511$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43513$as_echo_n "checking for OBJDUMP... " >&6; }
43514          if test ! -x "$tool_specified"; then
43515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43516$as_echo "not found" >&6; }
43517            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43518          fi
43519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43520$as_echo "$tool_specified" >&6; }
43521        fi
43522      fi
43523    fi
43524
43525  fi
43526
43527
43528  if test "x$OBJDUMP" != x; then
43529    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43530    # bails if argument is missing.
43531
43532  # Only process if variable expands to non-empty
43533
43534  if test "x$OBJDUMP" != x; then
43535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43536
43537  # First separate the path from the arguments. This will split at the first
43538  # space.
43539  complete="$OBJDUMP"
43540  path="${complete%% *}"
43541  tmp="$complete EOL"
43542  arguments="${tmp#* }"
43543
43544  # Input might be given as Windows format, start by converting to
43545  # unix format.
43546  new_path=`$CYGPATH -u "$path"`
43547
43548  # Now try to locate executable using which
43549  new_path=`$WHICH "$new_path" 2> /dev/null`
43550  # bat and cmd files are not always considered executable in cygwin causing which
43551  # to not find them
43552  if test "x$new_path" = x \
43553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43555    new_path=`$CYGPATH -u "$path"`
43556  fi
43557  if test "x$new_path" = x; then
43558    # Oops. Which didn't find the executable.
43559    # The splitting of arguments from the executable at a space might have been incorrect,
43560    # since paths with space are more likely in Windows. Give it another try with the whole
43561    # argument.
43562    path="$complete"
43563    arguments="EOL"
43564    new_path=`$CYGPATH -u "$path"`
43565    new_path=`$WHICH "$new_path" 2> /dev/null`
43566    # bat and cmd files are not always considered executable in cygwin causing which
43567    # to not find them
43568    if test "x$new_path" = x \
43569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43571      new_path=`$CYGPATH -u "$path"`
43572    fi
43573    if test "x$new_path" = x; then
43574      # It's still not found. Now this is an unrecoverable error.
43575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43576$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43577      has_space=`$ECHO "$complete" | $GREP " "`
43578      if test "x$has_space" != x; then
43579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43581      fi
43582      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43583    fi
43584  fi
43585
43586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43589  # "foo.exe" is OK but "foo" is an error.
43590  #
43591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43592  # It is also a way to make sure we got the proper file name for the real test later on.
43593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43594  if test "x$test_shortpath" = x; then
43595    # Short path failed, file does not exist as specified.
43596    # Try adding .exe or .cmd
43597    if test -f "${new_path}.exe"; then
43598      input_to_shortpath="${new_path}.exe"
43599    elif test -f "${new_path}.cmd"; then
43600      input_to_shortpath="${new_path}.cmd"
43601    else
43602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43603$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43606      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43607    fi
43608  else
43609    input_to_shortpath="$new_path"
43610  fi
43611
43612  # Call helper function which possibly converts this using DOS-style short mode.
43613  # If so, the updated path is stored in $new_path.
43614  new_path="$input_to_shortpath"
43615
43616  input_path="$input_to_shortpath"
43617  # Check if we need to convert this using DOS-style short mode. If the path
43618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43619  # take no chances and rewrite it.
43620  # Note: m4 eats our [], so we need to use [ and ] instead.
43621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43622  if test "x$has_forbidden_chars" != x; then
43623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43627      # Going to short mode and back again did indeed matter. Since short mode is
43628      # case insensitive, let's make it lowercase to improve readability.
43629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43630      # Now convert it back to Unix-style (cygpath)
43631      input_path=`$CYGPATH -u "$shortmode_path"`
43632      new_path="$input_path"
43633    fi
43634  fi
43635
43636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43637  if test "x$test_cygdrive_prefix" = x; then
43638    # As a simple fix, exclude /usr/bin since it's not a real path.
43639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43641      # a path prefixed by /cygdrive for fixpath to work.
43642      new_path="$CYGWIN_ROOT_PATH$input_path"
43643    fi
43644  fi
43645
43646  # remove trailing .exe if any
43647  new_path="${new_path/%.exe/}"
43648
43649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43650
43651  # First separate the path from the arguments. This will split at the first
43652  # space.
43653  complete="$OBJDUMP"
43654  path="${complete%% *}"
43655  tmp="$complete EOL"
43656  arguments="${tmp#* }"
43657
43658  # Input might be given as Windows format, start by converting to
43659  # unix format.
43660  new_path="$path"
43661
43662  windows_path="$new_path"
43663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43664    unix_path=`$CYGPATH -u "$windows_path"`
43665    new_path="$unix_path"
43666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43668    new_path="$unix_path"
43669  fi
43670
43671
43672  # Now try to locate executable using which
43673  new_path=`$WHICH "$new_path" 2> /dev/null`
43674
43675  if test "x$new_path" = x; then
43676    # Oops. Which didn't find the executable.
43677    # The splitting of arguments from the executable at a space might have been incorrect,
43678    # since paths with space are more likely in Windows. Give it another try with the whole
43679    # argument.
43680    path="$complete"
43681    arguments="EOL"
43682    new_path="$path"
43683
43684  windows_path="$new_path"
43685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43686    unix_path=`$CYGPATH -u "$windows_path"`
43687    new_path="$unix_path"
43688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43690    new_path="$unix_path"
43691  fi
43692
43693
43694    new_path=`$WHICH "$new_path" 2> /dev/null`
43695    # bat and cmd files are not always considered executable in MSYS causing which
43696    # to not find them
43697    if test "x$new_path" = x \
43698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43700      new_path="$path"
43701
43702  windows_path="$new_path"
43703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43704    unix_path=`$CYGPATH -u "$windows_path"`
43705    new_path="$unix_path"
43706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43708    new_path="$unix_path"
43709  fi
43710
43711    fi
43712
43713    if test "x$new_path" = x; then
43714      # It's still not found. Now this is an unrecoverable error.
43715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43716$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43717      has_space=`$ECHO "$complete" | $GREP " "`
43718      if test "x$has_space" != x; then
43719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43721      fi
43722      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43723    fi
43724  fi
43725
43726  # Now new_path has a complete unix path to the binary
43727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43728    # Keep paths in /bin as-is, but remove trailing .exe if any
43729    new_path="${new_path/%.exe/}"
43730    # Do not save /bin paths to all_fixpath_prefixes!
43731  else
43732    # Not in mixed or Windows style, start by that.
43733    new_path=`cmd //c echo $new_path`
43734
43735  input_path="$new_path"
43736  # Check if we need to convert this using DOS-style short mode. If the path
43737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43738  # take no chances and rewrite it.
43739  # Note: m4 eats our [], so we need to use [ and ] instead.
43740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43741  if test "x$has_forbidden_chars" != x; then
43742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43744  fi
43745
43746    # Output is in $new_path
43747
43748  windows_path="$new_path"
43749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43750    unix_path=`$CYGPATH -u "$windows_path"`
43751    new_path="$unix_path"
43752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43754    new_path="$unix_path"
43755  fi
43756
43757    # remove trailing .exe if any
43758    new_path="${new_path/%.exe/}"
43759
43760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43762  fi
43763
43764    else
43765      # We're on a unix platform. Hooray! :)
43766      # First separate the path from the arguments. This will split at the first
43767      # space.
43768      complete="$OBJDUMP"
43769      path="${complete%% *}"
43770      tmp="$complete EOL"
43771      arguments="${tmp#* }"
43772
43773      # Cannot rely on the command "which" here since it doesn't always work.
43774      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43775      if test -z "$is_absolute_path"; then
43776        # Path to executable is not absolute. Find it.
43777        IFS_save="$IFS"
43778        IFS=:
43779        for p in $PATH; do
43780          if test -f "$p/$path" && test -x "$p/$path"; then
43781            new_path="$p/$path"
43782            break
43783          fi
43784        done
43785        IFS="$IFS_save"
43786      else
43787        # This is an absolute path, we can use it without further modifications.
43788        new_path="$path"
43789      fi
43790
43791      if test "x$new_path" = x; then
43792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43793$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43794        has_space=`$ECHO "$complete" | $GREP " "`
43795        if test "x$has_space" != x; then
43796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43798        fi
43799        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43800      fi
43801    fi
43802
43803    # Now join together the path and the arguments once again
43804    if test "x$arguments" != xEOL; then
43805      new_complete="$new_path ${arguments% *}"
43806    else
43807      new_complete="$new_path"
43808    fi
43809
43810    if test "x$complete" != "x$new_complete"; then
43811      OBJDUMP="$new_complete"
43812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43813$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43814    fi
43815  fi
43816
43817  fi
43818
43819
43820  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43821  # to remain in place. Otherwise the compiler will not work in some siutations
43822  # in later configure checks.
43823  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43824    PATH="$OLD_PATH"
43825  fi
43826
43827  # Restore the flags to the user specified values.
43828  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43829  CFLAGS="$ORG_CFLAGS"
43830  CXXFLAGS="$ORG_CXXFLAGS"
43831
43832
43833# Finally do some processing after the detection phase
43834
43835  if test "x$COMPILE_TYPE" = "xcross"; then
43836    # Now we need to find a C/C++ compiler that can build executables for the
43837    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43838    # used once. Also, we need to do this without adding a tools dir to the
43839    # path, otherwise we might pick up cross-compilers which don't use standard
43840    # naming.
43841
43842    OLDPATH="$PATH"
43843
43844
43845# Check whether --with-build-devkit was given.
43846if test "${with_build_devkit+set}" = set; then :
43847  withval=$with_build_devkit;
43848fi
43849
43850    if test "x$with_build_devkit" = "xyes"; then
43851      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43852    elif test -n "$with_build_devkit"; then
43853      if test ! -d "$with_build_devkit"; then
43854        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43855      else
43856
43857  # Only process if variable expands to non-empty
43858
43859  if test "x$with_build_devkit" != x; then
43860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43861
43862  # Input might be given as Windows format, start by converting to
43863  # unix format.
43864  path="$with_build_devkit"
43865  new_path=`$CYGPATH -u "$path"`
43866
43867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43870  # "foo.exe" is OK but "foo" is an error.
43871  #
43872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43873  # It is also a way to make sure we got the proper file name for the real test later on.
43874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43875  if test "x$test_shortpath" = x; then
43876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43877$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43878    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43879  fi
43880
43881  # Call helper function which possibly converts this using DOS-style short mode.
43882  # If so, the updated path is stored in $new_path.
43883
43884  input_path="$new_path"
43885  # Check if we need to convert this using DOS-style short mode. If the path
43886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43887  # take no chances and rewrite it.
43888  # Note: m4 eats our [], so we need to use [ and ] instead.
43889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43890  if test "x$has_forbidden_chars" != x; then
43891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43895      # Going to short mode and back again did indeed matter. Since short mode is
43896      # case insensitive, let's make it lowercase to improve readability.
43897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43898      # Now convert it back to Unix-style (cygpath)
43899      input_path=`$CYGPATH -u "$shortmode_path"`
43900      new_path="$input_path"
43901    fi
43902  fi
43903
43904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43905  if test "x$test_cygdrive_prefix" = x; then
43906    # As a simple fix, exclude /usr/bin since it's not a real path.
43907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43909      # a path prefixed by /cygdrive for fixpath to work.
43910      new_path="$CYGWIN_ROOT_PATH$input_path"
43911    fi
43912  fi
43913
43914
43915  if test "x$path" != "x$new_path"; then
43916    with_build_devkit="$new_path"
43917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43918$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43919  fi
43920
43921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43922
43923  path="$with_build_devkit"
43924  has_colon=`$ECHO $path | $GREP ^.:`
43925  new_path="$path"
43926  if test "x$has_colon" = x; then
43927    # Not in mixed or Windows style, start by that.
43928    new_path=`cmd //c echo $path`
43929  fi
43930
43931
43932  input_path="$new_path"
43933  # Check if we need to convert this using DOS-style short mode. If the path
43934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43935  # take no chances and rewrite it.
43936  # Note: m4 eats our [], so we need to use [ and ] instead.
43937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43938  if test "x$has_forbidden_chars" != x; then
43939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43941  fi
43942
43943
43944  windows_path="$new_path"
43945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43946    unix_path=`$CYGPATH -u "$windows_path"`
43947    new_path="$unix_path"
43948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43950    new_path="$unix_path"
43951  fi
43952
43953  if test "x$path" != "x$new_path"; then
43954    with_build_devkit="$new_path"
43955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43956$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43957  fi
43958
43959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43961
43962    else
43963      # We're on a unix platform. Hooray! :)
43964      path="$with_build_devkit"
43965      has_space=`$ECHO "$path" | $GREP " "`
43966      if test "x$has_space" != x; then
43967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43968$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43970      fi
43971
43972      # Use eval to expand a potential ~
43973      eval path="$path"
43974      if test ! -f "$path" && test ! -d "$path"; then
43975        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43976      fi
43977
43978      if test -d "$path"; then
43979        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43980      else
43981        dir="`$DIRNAME "$path"`"
43982        base="`$BASENAME "$path"`"
43983        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43984      fi
43985    fi
43986  fi
43987
43988        BUILD_DEVKIT_ROOT="$with_build_devkit"
43989        # Check for a meta data info file in the root of the devkit
43990        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43991          # Process devkit.info so that existing devkit variables are not
43992          # modified by this
43993          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43994              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43995              -e "s/\$host/\$build/g" \
43996              $BUILD_DEVKIT_ROOT/devkit.info \
43997              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43998          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43999          # This potentially sets the following:
44000          # A descriptive name of the devkit
44001
44002  if test "x$BUILD_DEVKIT_NAME" = x; then
44003    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44004  fi
44005
44006          # Corresponds to --with-extra-path
44007
44008  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44009    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44010  fi
44011
44012          # Corresponds to --with-toolchain-path
44013
44014  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44015    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44016  fi
44017
44018          # Corresponds to --with-sysroot
44019
44020  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44021    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44022  fi
44023
44024          # Skip the Window specific parts
44025        fi
44026
44027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44028$as_echo_n "checking for build platform devkit... " >&6; }
44029        if test "x$BUILD_DEVKIT_NAME" != x; then
44030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44031$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44032        else
44033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44034$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44035        fi
44036
44037        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44038
44039  if test "x$BUILD_SYSROOT" != "x"; then
44040    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44041      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44042        # Solaris Studio does not have a concept of sysroot. Instead we must
44043        # make sure the default include and lib dirs are appended to each
44044        # compile and link command line. Must also add -I-xbuiltin to enable
44045        # inlining of system functions and intrinsics.
44046        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44047        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44048            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44049      fi
44050    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44051      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44052      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44053    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44054      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44055      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44056    fi
44057    # The global CFLAGS and LDFLAGS variables need these for configure to function
44058    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44059    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44060    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44061    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44062  fi
44063
44064  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44065    # We also need -iframework<path>/System/Library/Frameworks
44066    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44067    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44068    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44069    # set this here so it doesn't have to be peppered throughout the forest
44070    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44071    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44072  fi
44073
44074
44075
44076
44077
44078         # Fallback default of just /bin if DEVKIT_PATH is not defined
44079        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44080          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44081        fi
44082        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44083      fi
44084    fi
44085
44086    # FIXME: we should list the discovered compilers as an exclude pattern!
44087    # If we do that, we can do this detection before POST_DETECTION, and still
44088    # find the build compilers in the tools dir, if needed.
44089
44090
44091
44092  # Publish this variable in the help.
44093
44094
44095  if [ -z "${BUILD_CC+x}" ]; then
44096    # The variable is not set by user, try to locate tool using the code snippet
44097    for ac_prog in cl cc gcc
44098do
44099  # Extract the first word of "$ac_prog", so it can be a program name with args.
44100set dummy $ac_prog; ac_word=$2
44101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44102$as_echo_n "checking for $ac_word... " >&6; }
44103if ${ac_cv_path_BUILD_CC+:} false; then :
44104  $as_echo_n "(cached) " >&6
44105else
44106  case $BUILD_CC in
44107  [\\/]* | ?:[\\/]*)
44108  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44109  ;;
44110  *)
44111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44112for as_dir in $PATH
44113do
44114  IFS=$as_save_IFS
44115  test -z "$as_dir" && as_dir=.
44116    for ac_exec_ext in '' $ac_executable_extensions; do
44117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44118    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44120    break 2
44121  fi
44122done
44123  done
44124IFS=$as_save_IFS
44125
44126  ;;
44127esac
44128fi
44129BUILD_CC=$ac_cv_path_BUILD_CC
44130if test -n "$BUILD_CC"; then
44131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44132$as_echo "$BUILD_CC" >&6; }
44133else
44134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44135$as_echo "no" >&6; }
44136fi
44137
44138
44139  test -n "$BUILD_CC" && break
44140done
44141
44142  else
44143    # The variable is set, but is it from the command line or the environment?
44144
44145    # Try to remove the string !BUILD_CC! from our list.
44146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44148      # If it failed, the variable was not from the command line. Ignore it,
44149      # but warn the user (except for BASH, which is always set by the calling BASH).
44150      if test "xBUILD_CC" != xBASH; then
44151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44152$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44153      fi
44154      # Try to locate tool using the code snippet
44155      for ac_prog in cl cc gcc
44156do
44157  # Extract the first word of "$ac_prog", so it can be a program name with args.
44158set dummy $ac_prog; ac_word=$2
44159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44160$as_echo_n "checking for $ac_word... " >&6; }
44161if ${ac_cv_path_BUILD_CC+:} false; then :
44162  $as_echo_n "(cached) " >&6
44163else
44164  case $BUILD_CC in
44165  [\\/]* | ?:[\\/]*)
44166  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44167  ;;
44168  *)
44169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44170for as_dir in $PATH
44171do
44172  IFS=$as_save_IFS
44173  test -z "$as_dir" && as_dir=.
44174    for ac_exec_ext in '' $ac_executable_extensions; do
44175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44176    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44178    break 2
44179  fi
44180done
44181  done
44182IFS=$as_save_IFS
44183
44184  ;;
44185esac
44186fi
44187BUILD_CC=$ac_cv_path_BUILD_CC
44188if test -n "$BUILD_CC"; then
44189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44190$as_echo "$BUILD_CC" >&6; }
44191else
44192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44193$as_echo "no" >&6; }
44194fi
44195
44196
44197  test -n "$BUILD_CC" && break
44198done
44199
44200    else
44201      # If it succeeded, then it was overridden by the user. We will use it
44202      # for the tool.
44203
44204      # First remove it from the list of overridden variables, so we can test
44205      # for unknown variables in the end.
44206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44207
44208      # Check if we try to supply an empty value
44209      if test "x$BUILD_CC" = x; then
44210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44211$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44213$as_echo_n "checking for BUILD_CC... " >&6; }
44214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44215$as_echo "disabled" >&6; }
44216      else
44217        # Check if the provided tool contains a complete path.
44218        tool_specified="$BUILD_CC"
44219        tool_basename="${tool_specified##*/}"
44220        if test "x$tool_basename" = "x$tool_specified"; then
44221          # A command without a complete path is provided, search $PATH.
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44223$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44224          # Extract the first word of "$tool_basename", so it can be a program name with args.
44225set dummy $tool_basename; ac_word=$2
44226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44227$as_echo_n "checking for $ac_word... " >&6; }
44228if ${ac_cv_path_BUILD_CC+:} false; then :
44229  $as_echo_n "(cached) " >&6
44230else
44231  case $BUILD_CC in
44232  [\\/]* | ?:[\\/]*)
44233  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44234  ;;
44235  *)
44236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44237for as_dir in $PATH
44238do
44239  IFS=$as_save_IFS
44240  test -z "$as_dir" && as_dir=.
44241    for ac_exec_ext in '' $ac_executable_extensions; do
44242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44243    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44245    break 2
44246  fi
44247done
44248  done
44249IFS=$as_save_IFS
44250
44251  ;;
44252esac
44253fi
44254BUILD_CC=$ac_cv_path_BUILD_CC
44255if test -n "$BUILD_CC"; then
44256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44257$as_echo "$BUILD_CC" >&6; }
44258else
44259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44260$as_echo "no" >&6; }
44261fi
44262
44263
44264          if test "x$BUILD_CC" = x; then
44265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44266          fi
44267        else
44268          # Otherwise we believe it is a complete path. Use it as it is.
44269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44270$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44272$as_echo_n "checking for BUILD_CC... " >&6; }
44273          if test ! -x "$tool_specified"; then
44274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44275$as_echo "not found" >&6; }
44276            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44277          fi
44278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44279$as_echo "$tool_specified" >&6; }
44280        fi
44281      fi
44282    fi
44283
44284  fi
44285
44286
44287
44288  if test "x$BUILD_CC" = x; then
44289    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44290  fi
44291
44292
44293
44294  # Only process if variable expands to non-empty
44295
44296  if test "x$BUILD_CC" != x; then
44297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44298
44299  # First separate the path from the arguments. This will split at the first
44300  # space.
44301  complete="$BUILD_CC"
44302  path="${complete%% *}"
44303  tmp="$complete EOL"
44304  arguments="${tmp#* }"
44305
44306  # Input might be given as Windows format, start by converting to
44307  # unix format.
44308  new_path=`$CYGPATH -u "$path"`
44309
44310  # Now try to locate executable using which
44311  new_path=`$WHICH "$new_path" 2> /dev/null`
44312  # bat and cmd files are not always considered executable in cygwin causing which
44313  # to not find them
44314  if test "x$new_path" = x \
44315      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44316      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44317    new_path=`$CYGPATH -u "$path"`
44318  fi
44319  if test "x$new_path" = x; then
44320    # Oops. Which didn't find the executable.
44321    # The splitting of arguments from the executable at a space might have been incorrect,
44322    # since paths with space are more likely in Windows. Give it another try with the whole
44323    # argument.
44324    path="$complete"
44325    arguments="EOL"
44326    new_path=`$CYGPATH -u "$path"`
44327    new_path=`$WHICH "$new_path" 2> /dev/null`
44328    # bat and cmd files are not always considered executable in cygwin causing which
44329    # to not find them
44330    if test "x$new_path" = x \
44331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44333      new_path=`$CYGPATH -u "$path"`
44334    fi
44335    if test "x$new_path" = x; then
44336      # It's still not found. Now this is an unrecoverable error.
44337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44338$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44339      has_space=`$ECHO "$complete" | $GREP " "`
44340      if test "x$has_space" != x; then
44341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44343      fi
44344      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44345    fi
44346  fi
44347
44348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44351  # "foo.exe" is OK but "foo" is an error.
44352  #
44353  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44354  # It is also a way to make sure we got the proper file name for the real test later on.
44355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44356  if test "x$test_shortpath" = x; then
44357    # Short path failed, file does not exist as specified.
44358    # Try adding .exe or .cmd
44359    if test -f "${new_path}.exe"; then
44360      input_to_shortpath="${new_path}.exe"
44361    elif test -f "${new_path}.cmd"; then
44362      input_to_shortpath="${new_path}.cmd"
44363    else
44364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44365$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44368      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44369    fi
44370  else
44371    input_to_shortpath="$new_path"
44372  fi
44373
44374  # Call helper function which possibly converts this using DOS-style short mode.
44375  # If so, the updated path is stored in $new_path.
44376  new_path="$input_to_shortpath"
44377
44378  input_path="$input_to_shortpath"
44379  # Check if we need to convert this using DOS-style short mode. If the path
44380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44381  # take no chances and rewrite it.
44382  # Note: m4 eats our [], so we need to use [ and ] instead.
44383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44384  if test "x$has_forbidden_chars" != x; then
44385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44389      # Going to short mode and back again did indeed matter. Since short mode is
44390      # case insensitive, let's make it lowercase to improve readability.
44391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44392      # Now convert it back to Unix-style (cygpath)
44393      input_path=`$CYGPATH -u "$shortmode_path"`
44394      new_path="$input_path"
44395    fi
44396  fi
44397
44398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44399  if test "x$test_cygdrive_prefix" = x; then
44400    # As a simple fix, exclude /usr/bin since it's not a real path.
44401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44403      # a path prefixed by /cygdrive for fixpath to work.
44404      new_path="$CYGWIN_ROOT_PATH$input_path"
44405    fi
44406  fi
44407
44408  # remove trailing .exe if any
44409  new_path="${new_path/%.exe/}"
44410
44411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44412
44413  # First separate the path from the arguments. This will split at the first
44414  # space.
44415  complete="$BUILD_CC"
44416  path="${complete%% *}"
44417  tmp="$complete EOL"
44418  arguments="${tmp#* }"
44419
44420  # Input might be given as Windows format, start by converting to
44421  # unix format.
44422  new_path="$path"
44423
44424  windows_path="$new_path"
44425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44426    unix_path=`$CYGPATH -u "$windows_path"`
44427    new_path="$unix_path"
44428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44430    new_path="$unix_path"
44431  fi
44432
44433
44434  # Now try to locate executable using which
44435  new_path=`$WHICH "$new_path" 2> /dev/null`
44436
44437  if test "x$new_path" = x; then
44438    # Oops. Which didn't find the executable.
44439    # The splitting of arguments from the executable at a space might have been incorrect,
44440    # since paths with space are more likely in Windows. Give it another try with the whole
44441    # argument.
44442    path="$complete"
44443    arguments="EOL"
44444    new_path="$path"
44445
44446  windows_path="$new_path"
44447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44448    unix_path=`$CYGPATH -u "$windows_path"`
44449    new_path="$unix_path"
44450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44452    new_path="$unix_path"
44453  fi
44454
44455
44456    new_path=`$WHICH "$new_path" 2> /dev/null`
44457    # bat and cmd files are not always considered executable in MSYS causing which
44458    # to not find them
44459    if test "x$new_path" = x \
44460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44462      new_path="$path"
44463
44464  windows_path="$new_path"
44465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44466    unix_path=`$CYGPATH -u "$windows_path"`
44467    new_path="$unix_path"
44468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44470    new_path="$unix_path"
44471  fi
44472
44473    fi
44474
44475    if test "x$new_path" = x; then
44476      # It's still not found. Now this is an unrecoverable error.
44477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44478$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44479      has_space=`$ECHO "$complete" | $GREP " "`
44480      if test "x$has_space" != x; then
44481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44483      fi
44484      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44485    fi
44486  fi
44487
44488  # Now new_path has a complete unix path to the binary
44489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44490    # Keep paths in /bin as-is, but remove trailing .exe if any
44491    new_path="${new_path/%.exe/}"
44492    # Do not save /bin paths to all_fixpath_prefixes!
44493  else
44494    # Not in mixed or Windows style, start by that.
44495    new_path=`cmd //c echo $new_path`
44496
44497  input_path="$new_path"
44498  # Check if we need to convert this using DOS-style short mode. If the path
44499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44500  # take no chances and rewrite it.
44501  # Note: m4 eats our [], so we need to use [ and ] instead.
44502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44503  if test "x$has_forbidden_chars" != x; then
44504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44506  fi
44507
44508    # Output is in $new_path
44509
44510  windows_path="$new_path"
44511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44512    unix_path=`$CYGPATH -u "$windows_path"`
44513    new_path="$unix_path"
44514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44516    new_path="$unix_path"
44517  fi
44518
44519    # remove trailing .exe if any
44520    new_path="${new_path/%.exe/}"
44521
44522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44524  fi
44525
44526    else
44527      # We're on a unix platform. Hooray! :)
44528      # First separate the path from the arguments. This will split at the first
44529      # space.
44530      complete="$BUILD_CC"
44531      path="${complete%% *}"
44532      tmp="$complete EOL"
44533      arguments="${tmp#* }"
44534
44535      # Cannot rely on the command "which" here since it doesn't always work.
44536      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44537      if test -z "$is_absolute_path"; then
44538        # Path to executable is not absolute. Find it.
44539        IFS_save="$IFS"
44540        IFS=:
44541        for p in $PATH; do
44542          if test -f "$p/$path" && test -x "$p/$path"; then
44543            new_path="$p/$path"
44544            break
44545          fi
44546        done
44547        IFS="$IFS_save"
44548      else
44549        # This is an absolute path, we can use it without further modifications.
44550        new_path="$path"
44551      fi
44552
44553      if test "x$new_path" = x; then
44554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44555$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44556        has_space=`$ECHO "$complete" | $GREP " "`
44557        if test "x$has_space" != x; then
44558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44560        fi
44561        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44562      fi
44563    fi
44564
44565    # Now join together the path and the arguments once again
44566    if test "x$arguments" != xEOL; then
44567      new_complete="$new_path ${arguments% *}"
44568    else
44569      new_complete="$new_path"
44570    fi
44571
44572    if test "x$complete" != "x$new_complete"; then
44573      BUILD_CC="$new_complete"
44574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44575$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44576    fi
44577  fi
44578
44579
44580
44581
44582  # Publish this variable in the help.
44583
44584
44585  if [ -z "${BUILD_CXX+x}" ]; then
44586    # The variable is not set by user, try to locate tool using the code snippet
44587    for ac_prog in cl CC g++
44588do
44589  # Extract the first word of "$ac_prog", so it can be a program name with args.
44590set dummy $ac_prog; ac_word=$2
44591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44592$as_echo_n "checking for $ac_word... " >&6; }
44593if ${ac_cv_path_BUILD_CXX+:} false; then :
44594  $as_echo_n "(cached) " >&6
44595else
44596  case $BUILD_CXX in
44597  [\\/]* | ?:[\\/]*)
44598  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44599  ;;
44600  *)
44601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44602for as_dir in $PATH
44603do
44604  IFS=$as_save_IFS
44605  test -z "$as_dir" && as_dir=.
44606    for ac_exec_ext in '' $ac_executable_extensions; do
44607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44608    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44610    break 2
44611  fi
44612done
44613  done
44614IFS=$as_save_IFS
44615
44616  ;;
44617esac
44618fi
44619BUILD_CXX=$ac_cv_path_BUILD_CXX
44620if test -n "$BUILD_CXX"; then
44621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44622$as_echo "$BUILD_CXX" >&6; }
44623else
44624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44625$as_echo "no" >&6; }
44626fi
44627
44628
44629  test -n "$BUILD_CXX" && break
44630done
44631
44632  else
44633    # The variable is set, but is it from the command line or the environment?
44634
44635    # Try to remove the string !BUILD_CXX! from our list.
44636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44638      # If it failed, the variable was not from the command line. Ignore it,
44639      # but warn the user (except for BASH, which is always set by the calling BASH).
44640      if test "xBUILD_CXX" != xBASH; then
44641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44642$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44643      fi
44644      # Try to locate tool using the code snippet
44645      for ac_prog in cl CC g++
44646do
44647  # Extract the first word of "$ac_prog", so it can be a program name with args.
44648set dummy $ac_prog; ac_word=$2
44649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44650$as_echo_n "checking for $ac_word... " >&6; }
44651if ${ac_cv_path_BUILD_CXX+:} false; then :
44652  $as_echo_n "(cached) " >&6
44653else
44654  case $BUILD_CXX in
44655  [\\/]* | ?:[\\/]*)
44656  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44657  ;;
44658  *)
44659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44660for as_dir in $PATH
44661do
44662  IFS=$as_save_IFS
44663  test -z "$as_dir" && as_dir=.
44664    for ac_exec_ext in '' $ac_executable_extensions; do
44665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44666    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44668    break 2
44669  fi
44670done
44671  done
44672IFS=$as_save_IFS
44673
44674  ;;
44675esac
44676fi
44677BUILD_CXX=$ac_cv_path_BUILD_CXX
44678if test -n "$BUILD_CXX"; then
44679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44680$as_echo "$BUILD_CXX" >&6; }
44681else
44682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44683$as_echo "no" >&6; }
44684fi
44685
44686
44687  test -n "$BUILD_CXX" && break
44688done
44689
44690    else
44691      # If it succeeded, then it was overridden by the user. We will use it
44692      # for the tool.
44693
44694      # First remove it from the list of overridden variables, so we can test
44695      # for unknown variables in the end.
44696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44697
44698      # Check if we try to supply an empty value
44699      if test "x$BUILD_CXX" = x; then
44700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44701$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44703$as_echo_n "checking for BUILD_CXX... " >&6; }
44704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44705$as_echo "disabled" >&6; }
44706      else
44707        # Check if the provided tool contains a complete path.
44708        tool_specified="$BUILD_CXX"
44709        tool_basename="${tool_specified##*/}"
44710        if test "x$tool_basename" = "x$tool_specified"; then
44711          # A command without a complete path is provided, search $PATH.
44712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44713$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44714          # Extract the first word of "$tool_basename", so it can be a program name with args.
44715set dummy $tool_basename; ac_word=$2
44716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44717$as_echo_n "checking for $ac_word... " >&6; }
44718if ${ac_cv_path_BUILD_CXX+:} false; then :
44719  $as_echo_n "(cached) " >&6
44720else
44721  case $BUILD_CXX in
44722  [\\/]* | ?:[\\/]*)
44723  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44724  ;;
44725  *)
44726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44727for as_dir in $PATH
44728do
44729  IFS=$as_save_IFS
44730  test -z "$as_dir" && as_dir=.
44731    for ac_exec_ext in '' $ac_executable_extensions; do
44732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44733    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44735    break 2
44736  fi
44737done
44738  done
44739IFS=$as_save_IFS
44740
44741  ;;
44742esac
44743fi
44744BUILD_CXX=$ac_cv_path_BUILD_CXX
44745if test -n "$BUILD_CXX"; then
44746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44747$as_echo "$BUILD_CXX" >&6; }
44748else
44749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44750$as_echo "no" >&6; }
44751fi
44752
44753
44754          if test "x$BUILD_CXX" = x; then
44755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44756          fi
44757        else
44758          # Otherwise we believe it is a complete path. Use it as it is.
44759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44760$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44762$as_echo_n "checking for BUILD_CXX... " >&6; }
44763          if test ! -x "$tool_specified"; then
44764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44765$as_echo "not found" >&6; }
44766            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44767          fi
44768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44769$as_echo "$tool_specified" >&6; }
44770        fi
44771      fi
44772    fi
44773
44774  fi
44775
44776
44777
44778  if test "x$BUILD_CXX" = x; then
44779    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44780  fi
44781
44782
44783
44784  # Only process if variable expands to non-empty
44785
44786  if test "x$BUILD_CXX" != x; then
44787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44788
44789  # First separate the path from the arguments. This will split at the first
44790  # space.
44791  complete="$BUILD_CXX"
44792  path="${complete%% *}"
44793  tmp="$complete EOL"
44794  arguments="${tmp#* }"
44795
44796  # Input might be given as Windows format, start by converting to
44797  # unix format.
44798  new_path=`$CYGPATH -u "$path"`
44799
44800  # Now try to locate executable using which
44801  new_path=`$WHICH "$new_path" 2> /dev/null`
44802  # bat and cmd files are not always considered executable in cygwin causing which
44803  # to not find them
44804  if test "x$new_path" = x \
44805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44807    new_path=`$CYGPATH -u "$path"`
44808  fi
44809  if test "x$new_path" = x; then
44810    # Oops. Which didn't find the executable.
44811    # The splitting of arguments from the executable at a space might have been incorrect,
44812    # since paths with space are more likely in Windows. Give it another try with the whole
44813    # argument.
44814    path="$complete"
44815    arguments="EOL"
44816    new_path=`$CYGPATH -u "$path"`
44817    new_path=`$WHICH "$new_path" 2> /dev/null`
44818    # bat and cmd files are not always considered executable in cygwin causing which
44819    # to not find them
44820    if test "x$new_path" = x \
44821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44823      new_path=`$CYGPATH -u "$path"`
44824    fi
44825    if test "x$new_path" = x; then
44826      # It's still not found. Now this is an unrecoverable error.
44827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44828$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44829      has_space=`$ECHO "$complete" | $GREP " "`
44830      if test "x$has_space" != x; then
44831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44833      fi
44834      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44835    fi
44836  fi
44837
44838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44841  # "foo.exe" is OK but "foo" is an error.
44842  #
44843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44844  # It is also a way to make sure we got the proper file name for the real test later on.
44845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44846  if test "x$test_shortpath" = x; then
44847    # Short path failed, file does not exist as specified.
44848    # Try adding .exe or .cmd
44849    if test -f "${new_path}.exe"; then
44850      input_to_shortpath="${new_path}.exe"
44851    elif test -f "${new_path}.cmd"; then
44852      input_to_shortpath="${new_path}.cmd"
44853    else
44854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44855$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44858      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44859    fi
44860  else
44861    input_to_shortpath="$new_path"
44862  fi
44863
44864  # Call helper function which possibly converts this using DOS-style short mode.
44865  # If so, the updated path is stored in $new_path.
44866  new_path="$input_to_shortpath"
44867
44868  input_path="$input_to_shortpath"
44869  # Check if we need to convert this using DOS-style short mode. If the path
44870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44871  # take no chances and rewrite it.
44872  # Note: m4 eats our [], so we need to use [ and ] instead.
44873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44874  if test "x$has_forbidden_chars" != x; then
44875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44879      # Going to short mode and back again did indeed matter. Since short mode is
44880      # case insensitive, let's make it lowercase to improve readability.
44881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44882      # Now convert it back to Unix-style (cygpath)
44883      input_path=`$CYGPATH -u "$shortmode_path"`
44884      new_path="$input_path"
44885    fi
44886  fi
44887
44888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44889  if test "x$test_cygdrive_prefix" = x; then
44890    # As a simple fix, exclude /usr/bin since it's not a real path.
44891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44893      # a path prefixed by /cygdrive for fixpath to work.
44894      new_path="$CYGWIN_ROOT_PATH$input_path"
44895    fi
44896  fi
44897
44898  # remove trailing .exe if any
44899  new_path="${new_path/%.exe/}"
44900
44901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44902
44903  # First separate the path from the arguments. This will split at the first
44904  # space.
44905  complete="$BUILD_CXX"
44906  path="${complete%% *}"
44907  tmp="$complete EOL"
44908  arguments="${tmp#* }"
44909
44910  # Input might be given as Windows format, start by converting to
44911  # unix format.
44912  new_path="$path"
44913
44914  windows_path="$new_path"
44915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44916    unix_path=`$CYGPATH -u "$windows_path"`
44917    new_path="$unix_path"
44918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44920    new_path="$unix_path"
44921  fi
44922
44923
44924  # Now try to locate executable using which
44925  new_path=`$WHICH "$new_path" 2> /dev/null`
44926
44927  if test "x$new_path" = x; then
44928    # Oops. Which didn't find the executable.
44929    # The splitting of arguments from the executable at a space might have been incorrect,
44930    # since paths with space are more likely in Windows. Give it another try with the whole
44931    # argument.
44932    path="$complete"
44933    arguments="EOL"
44934    new_path="$path"
44935
44936  windows_path="$new_path"
44937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44938    unix_path=`$CYGPATH -u "$windows_path"`
44939    new_path="$unix_path"
44940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44942    new_path="$unix_path"
44943  fi
44944
44945
44946    new_path=`$WHICH "$new_path" 2> /dev/null`
44947    # bat and cmd files are not always considered executable in MSYS causing which
44948    # to not find them
44949    if test "x$new_path" = x \
44950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44952      new_path="$path"
44953
44954  windows_path="$new_path"
44955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44956    unix_path=`$CYGPATH -u "$windows_path"`
44957    new_path="$unix_path"
44958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44960    new_path="$unix_path"
44961  fi
44962
44963    fi
44964
44965    if test "x$new_path" = x; then
44966      # It's still not found. Now this is an unrecoverable error.
44967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44968$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44969      has_space=`$ECHO "$complete" | $GREP " "`
44970      if test "x$has_space" != x; then
44971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44973      fi
44974      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44975    fi
44976  fi
44977
44978  # Now new_path has a complete unix path to the binary
44979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44980    # Keep paths in /bin as-is, but remove trailing .exe if any
44981    new_path="${new_path/%.exe/}"
44982    # Do not save /bin paths to all_fixpath_prefixes!
44983  else
44984    # Not in mixed or Windows style, start by that.
44985    new_path=`cmd //c echo $new_path`
44986
44987  input_path="$new_path"
44988  # Check if we need to convert this using DOS-style short mode. If the path
44989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44990  # take no chances and rewrite it.
44991  # Note: m4 eats our [], so we need to use [ and ] instead.
44992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44993  if test "x$has_forbidden_chars" != x; then
44994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44996  fi
44997
44998    # Output is in $new_path
44999
45000  windows_path="$new_path"
45001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45002    unix_path=`$CYGPATH -u "$windows_path"`
45003    new_path="$unix_path"
45004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45006    new_path="$unix_path"
45007  fi
45008
45009    # remove trailing .exe if any
45010    new_path="${new_path/%.exe/}"
45011
45012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45014  fi
45015
45016    else
45017      # We're on a unix platform. Hooray! :)
45018      # First separate the path from the arguments. This will split at the first
45019      # space.
45020      complete="$BUILD_CXX"
45021      path="${complete%% *}"
45022      tmp="$complete EOL"
45023      arguments="${tmp#* }"
45024
45025      # Cannot rely on the command "which" here since it doesn't always work.
45026      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45027      if test -z "$is_absolute_path"; then
45028        # Path to executable is not absolute. Find it.
45029        IFS_save="$IFS"
45030        IFS=:
45031        for p in $PATH; do
45032          if test -f "$p/$path" && test -x "$p/$path"; then
45033            new_path="$p/$path"
45034            break
45035          fi
45036        done
45037        IFS="$IFS_save"
45038      else
45039        # This is an absolute path, we can use it without further modifications.
45040        new_path="$path"
45041      fi
45042
45043      if test "x$new_path" = x; then
45044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45045$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45046        has_space=`$ECHO "$complete" | $GREP " "`
45047        if test "x$has_space" != x; then
45048          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45050        fi
45051        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45052      fi
45053    fi
45054
45055    # Now join together the path and the arguments once again
45056    if test "x$arguments" != xEOL; then
45057      new_complete="$new_path ${arguments% *}"
45058    else
45059      new_complete="$new_path"
45060    fi
45061
45062    if test "x$complete" != "x$new_complete"; then
45063      BUILD_CXX="$new_complete"
45064      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45065$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45066    fi
45067  fi
45068
45069
45070
45071  # Publish this variable in the help.
45072
45073
45074  if [ -z "${BUILD_NM+x}" ]; then
45075    # The variable is not set by user, try to locate tool using the code snippet
45076    for ac_prog in nm gcc-nm
45077do
45078  # Extract the first word of "$ac_prog", so it can be a program name with args.
45079set dummy $ac_prog; ac_word=$2
45080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45081$as_echo_n "checking for $ac_word... " >&6; }
45082if ${ac_cv_path_BUILD_NM+:} false; then :
45083  $as_echo_n "(cached) " >&6
45084else
45085  case $BUILD_NM in
45086  [\\/]* | ?:[\\/]*)
45087  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45088  ;;
45089  *)
45090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45091for as_dir in $PATH
45092do
45093  IFS=$as_save_IFS
45094  test -z "$as_dir" && as_dir=.
45095    for ac_exec_ext in '' $ac_executable_extensions; do
45096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45097    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45099    break 2
45100  fi
45101done
45102  done
45103IFS=$as_save_IFS
45104
45105  ;;
45106esac
45107fi
45108BUILD_NM=$ac_cv_path_BUILD_NM
45109if test -n "$BUILD_NM"; then
45110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45111$as_echo "$BUILD_NM" >&6; }
45112else
45113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45114$as_echo "no" >&6; }
45115fi
45116
45117
45118  test -n "$BUILD_NM" && break
45119done
45120
45121  else
45122    # The variable is set, but is it from the command line or the environment?
45123
45124    # Try to remove the string !BUILD_NM! from our list.
45125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45127      # If it failed, the variable was not from the command line. Ignore it,
45128      # but warn the user (except for BASH, which is always set by the calling BASH).
45129      if test "xBUILD_NM" != xBASH; then
45130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45131$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45132      fi
45133      # Try to locate tool using the code snippet
45134      for ac_prog in nm gcc-nm
45135do
45136  # Extract the first word of "$ac_prog", so it can be a program name with args.
45137set dummy $ac_prog; ac_word=$2
45138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45139$as_echo_n "checking for $ac_word... " >&6; }
45140if ${ac_cv_path_BUILD_NM+:} false; then :
45141  $as_echo_n "(cached) " >&6
45142else
45143  case $BUILD_NM in
45144  [\\/]* | ?:[\\/]*)
45145  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45146  ;;
45147  *)
45148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45149for as_dir in $PATH
45150do
45151  IFS=$as_save_IFS
45152  test -z "$as_dir" && as_dir=.
45153    for ac_exec_ext in '' $ac_executable_extensions; do
45154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45155    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45157    break 2
45158  fi
45159done
45160  done
45161IFS=$as_save_IFS
45162
45163  ;;
45164esac
45165fi
45166BUILD_NM=$ac_cv_path_BUILD_NM
45167if test -n "$BUILD_NM"; then
45168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45169$as_echo "$BUILD_NM" >&6; }
45170else
45171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45172$as_echo "no" >&6; }
45173fi
45174
45175
45176  test -n "$BUILD_NM" && break
45177done
45178
45179    else
45180      # If it succeeded, then it was overridden by the user. We will use it
45181      # for the tool.
45182
45183      # First remove it from the list of overridden variables, so we can test
45184      # for unknown variables in the end.
45185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45186
45187      # Check if we try to supply an empty value
45188      if test "x$BUILD_NM" = x; then
45189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45190$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45192$as_echo_n "checking for BUILD_NM... " >&6; }
45193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45194$as_echo "disabled" >&6; }
45195      else
45196        # Check if the provided tool contains a complete path.
45197        tool_specified="$BUILD_NM"
45198        tool_basename="${tool_specified##*/}"
45199        if test "x$tool_basename" = "x$tool_specified"; then
45200          # A command without a complete path is provided, search $PATH.
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45202$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45203          # Extract the first word of "$tool_basename", so it can be a program name with args.
45204set dummy $tool_basename; ac_word=$2
45205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45206$as_echo_n "checking for $ac_word... " >&6; }
45207if ${ac_cv_path_BUILD_NM+:} false; then :
45208  $as_echo_n "(cached) " >&6
45209else
45210  case $BUILD_NM in
45211  [\\/]* | ?:[\\/]*)
45212  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45213  ;;
45214  *)
45215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45216for as_dir in $PATH
45217do
45218  IFS=$as_save_IFS
45219  test -z "$as_dir" && as_dir=.
45220    for ac_exec_ext in '' $ac_executable_extensions; do
45221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45222    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45224    break 2
45225  fi
45226done
45227  done
45228IFS=$as_save_IFS
45229
45230  ;;
45231esac
45232fi
45233BUILD_NM=$ac_cv_path_BUILD_NM
45234if test -n "$BUILD_NM"; then
45235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45236$as_echo "$BUILD_NM" >&6; }
45237else
45238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45239$as_echo "no" >&6; }
45240fi
45241
45242
45243          if test "x$BUILD_NM" = x; then
45244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45245          fi
45246        else
45247          # Otherwise we believe it is a complete path. Use it as it is.
45248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45249$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45251$as_echo_n "checking for BUILD_NM... " >&6; }
45252          if test ! -x "$tool_specified"; then
45253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45254$as_echo "not found" >&6; }
45255            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45256          fi
45257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45258$as_echo "$tool_specified" >&6; }
45259        fi
45260      fi
45261    fi
45262
45263  fi
45264
45265
45266
45267  # Only process if variable expands to non-empty
45268
45269  if test "x$BUILD_NM" != x; then
45270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45271
45272  # First separate the path from the arguments. This will split at the first
45273  # space.
45274  complete="$BUILD_NM"
45275  path="${complete%% *}"
45276  tmp="$complete EOL"
45277  arguments="${tmp#* }"
45278
45279  # Input might be given as Windows format, start by converting to
45280  # unix format.
45281  new_path=`$CYGPATH -u "$path"`
45282
45283  # Now try to locate executable using which
45284  new_path=`$WHICH "$new_path" 2> /dev/null`
45285  # bat and cmd files are not always considered executable in cygwin causing which
45286  # to not find them
45287  if test "x$new_path" = x \
45288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45290    new_path=`$CYGPATH -u "$path"`
45291  fi
45292  if test "x$new_path" = x; then
45293    # Oops. Which didn't find the executable.
45294    # The splitting of arguments from the executable at a space might have been incorrect,
45295    # since paths with space are more likely in Windows. Give it another try with the whole
45296    # argument.
45297    path="$complete"
45298    arguments="EOL"
45299    new_path=`$CYGPATH -u "$path"`
45300    new_path=`$WHICH "$new_path" 2> /dev/null`
45301    # bat and cmd files are not always considered executable in cygwin causing which
45302    # to not find them
45303    if test "x$new_path" = x \
45304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45306      new_path=`$CYGPATH -u "$path"`
45307    fi
45308    if test "x$new_path" = x; then
45309      # It's still not found. Now this is an unrecoverable error.
45310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45311$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45312      has_space=`$ECHO "$complete" | $GREP " "`
45313      if test "x$has_space" != x; then
45314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45316      fi
45317      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45318    fi
45319  fi
45320
45321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45324  # "foo.exe" is OK but "foo" is an error.
45325  #
45326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45327  # It is also a way to make sure we got the proper file name for the real test later on.
45328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45329  if test "x$test_shortpath" = x; then
45330    # Short path failed, file does not exist as specified.
45331    # Try adding .exe or .cmd
45332    if test -f "${new_path}.exe"; then
45333      input_to_shortpath="${new_path}.exe"
45334    elif test -f "${new_path}.cmd"; then
45335      input_to_shortpath="${new_path}.cmd"
45336    else
45337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45338$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45341      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45342    fi
45343  else
45344    input_to_shortpath="$new_path"
45345  fi
45346
45347  # Call helper function which possibly converts this using DOS-style short mode.
45348  # If so, the updated path is stored in $new_path.
45349  new_path="$input_to_shortpath"
45350
45351  input_path="$input_to_shortpath"
45352  # Check if we need to convert this using DOS-style short mode. If the path
45353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45354  # take no chances and rewrite it.
45355  # Note: m4 eats our [], so we need to use [ and ] instead.
45356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45357  if test "x$has_forbidden_chars" != x; then
45358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45362      # Going to short mode and back again did indeed matter. Since short mode is
45363      # case insensitive, let's make it lowercase to improve readability.
45364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45365      # Now convert it back to Unix-style (cygpath)
45366      input_path=`$CYGPATH -u "$shortmode_path"`
45367      new_path="$input_path"
45368    fi
45369  fi
45370
45371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45372  if test "x$test_cygdrive_prefix" = x; then
45373    # As a simple fix, exclude /usr/bin since it's not a real path.
45374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45376      # a path prefixed by /cygdrive for fixpath to work.
45377      new_path="$CYGWIN_ROOT_PATH$input_path"
45378    fi
45379  fi
45380
45381  # remove trailing .exe if any
45382  new_path="${new_path/%.exe/}"
45383
45384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385
45386  # First separate the path from the arguments. This will split at the first
45387  # space.
45388  complete="$BUILD_NM"
45389  path="${complete%% *}"
45390  tmp="$complete EOL"
45391  arguments="${tmp#* }"
45392
45393  # Input might be given as Windows format, start by converting to
45394  # unix format.
45395  new_path="$path"
45396
45397  windows_path="$new_path"
45398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45399    unix_path=`$CYGPATH -u "$windows_path"`
45400    new_path="$unix_path"
45401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45403    new_path="$unix_path"
45404  fi
45405
45406
45407  # Now try to locate executable using which
45408  new_path=`$WHICH "$new_path" 2> /dev/null`
45409
45410  if test "x$new_path" = x; then
45411    # Oops. Which didn't find the executable.
45412    # The splitting of arguments from the executable at a space might have been incorrect,
45413    # since paths with space are more likely in Windows. Give it another try with the whole
45414    # argument.
45415    path="$complete"
45416    arguments="EOL"
45417    new_path="$path"
45418
45419  windows_path="$new_path"
45420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45421    unix_path=`$CYGPATH -u "$windows_path"`
45422    new_path="$unix_path"
45423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45425    new_path="$unix_path"
45426  fi
45427
45428
45429    new_path=`$WHICH "$new_path" 2> /dev/null`
45430    # bat and cmd files are not always considered executable in MSYS causing which
45431    # to not find them
45432    if test "x$new_path" = x \
45433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45435      new_path="$path"
45436
45437  windows_path="$new_path"
45438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45439    unix_path=`$CYGPATH -u "$windows_path"`
45440    new_path="$unix_path"
45441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45443    new_path="$unix_path"
45444  fi
45445
45446    fi
45447
45448    if test "x$new_path" = x; then
45449      # It's still not found. Now this is an unrecoverable error.
45450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45451$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45452      has_space=`$ECHO "$complete" | $GREP " "`
45453      if test "x$has_space" != x; then
45454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45456      fi
45457      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45458    fi
45459  fi
45460
45461  # Now new_path has a complete unix path to the binary
45462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45463    # Keep paths in /bin as-is, but remove trailing .exe if any
45464    new_path="${new_path/%.exe/}"
45465    # Do not save /bin paths to all_fixpath_prefixes!
45466  else
45467    # Not in mixed or Windows style, start by that.
45468    new_path=`cmd //c echo $new_path`
45469
45470  input_path="$new_path"
45471  # Check if we need to convert this using DOS-style short mode. If the path
45472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45473  # take no chances and rewrite it.
45474  # Note: m4 eats our [], so we need to use [ and ] instead.
45475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45476  if test "x$has_forbidden_chars" != x; then
45477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45479  fi
45480
45481    # Output is in $new_path
45482
45483  windows_path="$new_path"
45484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45485    unix_path=`$CYGPATH -u "$windows_path"`
45486    new_path="$unix_path"
45487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45489    new_path="$unix_path"
45490  fi
45491
45492    # remove trailing .exe if any
45493    new_path="${new_path/%.exe/}"
45494
45495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45497  fi
45498
45499    else
45500      # We're on a unix platform. Hooray! :)
45501      # First separate the path from the arguments. This will split at the first
45502      # space.
45503      complete="$BUILD_NM"
45504      path="${complete%% *}"
45505      tmp="$complete EOL"
45506      arguments="${tmp#* }"
45507
45508      # Cannot rely on the command "which" here since it doesn't always work.
45509      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45510      if test -z "$is_absolute_path"; then
45511        # Path to executable is not absolute. Find it.
45512        IFS_save="$IFS"
45513        IFS=:
45514        for p in $PATH; do
45515          if test -f "$p/$path" && test -x "$p/$path"; then
45516            new_path="$p/$path"
45517            break
45518          fi
45519        done
45520        IFS="$IFS_save"
45521      else
45522        # This is an absolute path, we can use it without further modifications.
45523        new_path="$path"
45524      fi
45525
45526      if test "x$new_path" = x; then
45527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45528$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45529        has_space=`$ECHO "$complete" | $GREP " "`
45530        if test "x$has_space" != x; then
45531          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45532$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45533        fi
45534        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45535      fi
45536    fi
45537
45538    # Now join together the path and the arguments once again
45539    if test "x$arguments" != xEOL; then
45540      new_complete="$new_path ${arguments% *}"
45541    else
45542      new_complete="$new_path"
45543    fi
45544
45545    if test "x$complete" != "x$new_complete"; then
45546      BUILD_NM="$new_complete"
45547      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45548$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45549    fi
45550  fi
45551
45552
45553
45554  # Publish this variable in the help.
45555
45556
45557  if [ -z "${BUILD_AR+x}" ]; then
45558    # The variable is not set by user, try to locate tool using the code snippet
45559    for ac_prog in ar gcc-ar
45560do
45561  # Extract the first word of "$ac_prog", so it can be a program name with args.
45562set dummy $ac_prog; ac_word=$2
45563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45564$as_echo_n "checking for $ac_word... " >&6; }
45565if ${ac_cv_path_BUILD_AR+:} false; then :
45566  $as_echo_n "(cached) " >&6
45567else
45568  case $BUILD_AR in
45569  [\\/]* | ?:[\\/]*)
45570  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45571  ;;
45572  *)
45573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45574for as_dir in $PATH
45575do
45576  IFS=$as_save_IFS
45577  test -z "$as_dir" && as_dir=.
45578    for ac_exec_ext in '' $ac_executable_extensions; do
45579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45580    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45582    break 2
45583  fi
45584done
45585  done
45586IFS=$as_save_IFS
45587
45588  ;;
45589esac
45590fi
45591BUILD_AR=$ac_cv_path_BUILD_AR
45592if test -n "$BUILD_AR"; then
45593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45594$as_echo "$BUILD_AR" >&6; }
45595else
45596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45597$as_echo "no" >&6; }
45598fi
45599
45600
45601  test -n "$BUILD_AR" && break
45602done
45603
45604  else
45605    # The variable is set, but is it from the command line or the environment?
45606
45607    # Try to remove the string !BUILD_AR! from our list.
45608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45610      # If it failed, the variable was not from the command line. Ignore it,
45611      # but warn the user (except for BASH, which is always set by the calling BASH).
45612      if test "xBUILD_AR" != xBASH; then
45613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45614$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45615      fi
45616      # Try to locate tool using the code snippet
45617      for ac_prog in ar gcc-ar
45618do
45619  # Extract the first word of "$ac_prog", so it can be a program name with args.
45620set dummy $ac_prog; ac_word=$2
45621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45622$as_echo_n "checking for $ac_word... " >&6; }
45623if ${ac_cv_path_BUILD_AR+:} false; then :
45624  $as_echo_n "(cached) " >&6
45625else
45626  case $BUILD_AR in
45627  [\\/]* | ?:[\\/]*)
45628  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45629  ;;
45630  *)
45631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45632for as_dir in $PATH
45633do
45634  IFS=$as_save_IFS
45635  test -z "$as_dir" && as_dir=.
45636    for ac_exec_ext in '' $ac_executable_extensions; do
45637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45638    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45640    break 2
45641  fi
45642done
45643  done
45644IFS=$as_save_IFS
45645
45646  ;;
45647esac
45648fi
45649BUILD_AR=$ac_cv_path_BUILD_AR
45650if test -n "$BUILD_AR"; then
45651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45652$as_echo "$BUILD_AR" >&6; }
45653else
45654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45655$as_echo "no" >&6; }
45656fi
45657
45658
45659  test -n "$BUILD_AR" && break
45660done
45661
45662    else
45663      # If it succeeded, then it was overridden by the user. We will use it
45664      # for the tool.
45665
45666      # First remove it from the list of overridden variables, so we can test
45667      # for unknown variables in the end.
45668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45669
45670      # Check if we try to supply an empty value
45671      if test "x$BUILD_AR" = x; then
45672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45673$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45675$as_echo_n "checking for BUILD_AR... " >&6; }
45676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45677$as_echo "disabled" >&6; }
45678      else
45679        # Check if the provided tool contains a complete path.
45680        tool_specified="$BUILD_AR"
45681        tool_basename="${tool_specified##*/}"
45682        if test "x$tool_basename" = "x$tool_specified"; then
45683          # A command without a complete path is provided, search $PATH.
45684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45685$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45686          # Extract the first word of "$tool_basename", so it can be a program name with args.
45687set dummy $tool_basename; ac_word=$2
45688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45689$as_echo_n "checking for $ac_word... " >&6; }
45690if ${ac_cv_path_BUILD_AR+:} false; then :
45691  $as_echo_n "(cached) " >&6
45692else
45693  case $BUILD_AR in
45694  [\\/]* | ?:[\\/]*)
45695  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45696  ;;
45697  *)
45698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45699for as_dir in $PATH
45700do
45701  IFS=$as_save_IFS
45702  test -z "$as_dir" && as_dir=.
45703    for ac_exec_ext in '' $ac_executable_extensions; do
45704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45705    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45707    break 2
45708  fi
45709done
45710  done
45711IFS=$as_save_IFS
45712
45713  ;;
45714esac
45715fi
45716BUILD_AR=$ac_cv_path_BUILD_AR
45717if test -n "$BUILD_AR"; then
45718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45719$as_echo "$BUILD_AR" >&6; }
45720else
45721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45722$as_echo "no" >&6; }
45723fi
45724
45725
45726          if test "x$BUILD_AR" = x; then
45727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45728          fi
45729        else
45730          # Otherwise we believe it is a complete path. Use it as it is.
45731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45732$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45734$as_echo_n "checking for BUILD_AR... " >&6; }
45735          if test ! -x "$tool_specified"; then
45736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45737$as_echo "not found" >&6; }
45738            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45739          fi
45740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45741$as_echo "$tool_specified" >&6; }
45742        fi
45743      fi
45744    fi
45745
45746  fi
45747
45748
45749
45750  # Only process if variable expands to non-empty
45751
45752  if test "x$BUILD_AR" != x; then
45753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45754
45755  # First separate the path from the arguments. This will split at the first
45756  # space.
45757  complete="$BUILD_AR"
45758  path="${complete%% *}"
45759  tmp="$complete EOL"
45760  arguments="${tmp#* }"
45761
45762  # Input might be given as Windows format, start by converting to
45763  # unix format.
45764  new_path=`$CYGPATH -u "$path"`
45765
45766  # Now try to locate executable using which
45767  new_path=`$WHICH "$new_path" 2> /dev/null`
45768  # bat and cmd files are not always considered executable in cygwin causing which
45769  # to not find them
45770  if test "x$new_path" = x \
45771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45773    new_path=`$CYGPATH -u "$path"`
45774  fi
45775  if test "x$new_path" = x; then
45776    # Oops. Which didn't find the executable.
45777    # The splitting of arguments from the executable at a space might have been incorrect,
45778    # since paths with space are more likely in Windows. Give it another try with the whole
45779    # argument.
45780    path="$complete"
45781    arguments="EOL"
45782    new_path=`$CYGPATH -u "$path"`
45783    new_path=`$WHICH "$new_path" 2> /dev/null`
45784    # bat and cmd files are not always considered executable in cygwin causing which
45785    # to not find them
45786    if test "x$new_path" = x \
45787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45789      new_path=`$CYGPATH -u "$path"`
45790    fi
45791    if test "x$new_path" = x; then
45792      # It's still not found. Now this is an unrecoverable error.
45793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45794$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45795      has_space=`$ECHO "$complete" | $GREP " "`
45796      if test "x$has_space" != x; then
45797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45799      fi
45800      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45801    fi
45802  fi
45803
45804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45807  # "foo.exe" is OK but "foo" is an error.
45808  #
45809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45810  # It is also a way to make sure we got the proper file name for the real test later on.
45811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45812  if test "x$test_shortpath" = x; then
45813    # Short path failed, file does not exist as specified.
45814    # Try adding .exe or .cmd
45815    if test -f "${new_path}.exe"; then
45816      input_to_shortpath="${new_path}.exe"
45817    elif test -f "${new_path}.cmd"; then
45818      input_to_shortpath="${new_path}.cmd"
45819    else
45820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45821$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45824      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45825    fi
45826  else
45827    input_to_shortpath="$new_path"
45828  fi
45829
45830  # Call helper function which possibly converts this using DOS-style short mode.
45831  # If so, the updated path is stored in $new_path.
45832  new_path="$input_to_shortpath"
45833
45834  input_path="$input_to_shortpath"
45835  # Check if we need to convert this using DOS-style short mode. If the path
45836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45837  # take no chances and rewrite it.
45838  # Note: m4 eats our [], so we need to use [ and ] instead.
45839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45840  if test "x$has_forbidden_chars" != x; then
45841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45845      # Going to short mode and back again did indeed matter. Since short mode is
45846      # case insensitive, let's make it lowercase to improve readability.
45847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45848      # Now convert it back to Unix-style (cygpath)
45849      input_path=`$CYGPATH -u "$shortmode_path"`
45850      new_path="$input_path"
45851    fi
45852  fi
45853
45854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45855  if test "x$test_cygdrive_prefix" = x; then
45856    # As a simple fix, exclude /usr/bin since it's not a real path.
45857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45859      # a path prefixed by /cygdrive for fixpath to work.
45860      new_path="$CYGWIN_ROOT_PATH$input_path"
45861    fi
45862  fi
45863
45864  # remove trailing .exe if any
45865  new_path="${new_path/%.exe/}"
45866
45867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45868
45869  # First separate the path from the arguments. This will split at the first
45870  # space.
45871  complete="$BUILD_AR"
45872  path="${complete%% *}"
45873  tmp="$complete EOL"
45874  arguments="${tmp#* }"
45875
45876  # Input might be given as Windows format, start by converting to
45877  # unix format.
45878  new_path="$path"
45879
45880  windows_path="$new_path"
45881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45882    unix_path=`$CYGPATH -u "$windows_path"`
45883    new_path="$unix_path"
45884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45886    new_path="$unix_path"
45887  fi
45888
45889
45890  # Now try to locate executable using which
45891  new_path=`$WHICH "$new_path" 2> /dev/null`
45892
45893  if test "x$new_path" = x; then
45894    # Oops. Which didn't find the executable.
45895    # The splitting of arguments from the executable at a space might have been incorrect,
45896    # since paths with space are more likely in Windows. Give it another try with the whole
45897    # argument.
45898    path="$complete"
45899    arguments="EOL"
45900    new_path="$path"
45901
45902  windows_path="$new_path"
45903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45904    unix_path=`$CYGPATH -u "$windows_path"`
45905    new_path="$unix_path"
45906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45908    new_path="$unix_path"
45909  fi
45910
45911
45912    new_path=`$WHICH "$new_path" 2> /dev/null`
45913    # bat and cmd files are not always considered executable in MSYS causing which
45914    # to not find them
45915    if test "x$new_path" = x \
45916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45918      new_path="$path"
45919
45920  windows_path="$new_path"
45921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45922    unix_path=`$CYGPATH -u "$windows_path"`
45923    new_path="$unix_path"
45924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45926    new_path="$unix_path"
45927  fi
45928
45929    fi
45930
45931    if test "x$new_path" = x; then
45932      # It's still not found. Now this is an unrecoverable error.
45933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45934$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45935      has_space=`$ECHO "$complete" | $GREP " "`
45936      if test "x$has_space" != x; then
45937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45939      fi
45940      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45941    fi
45942  fi
45943
45944  # Now new_path has a complete unix path to the binary
45945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45946    # Keep paths in /bin as-is, but remove trailing .exe if any
45947    new_path="${new_path/%.exe/}"
45948    # Do not save /bin paths to all_fixpath_prefixes!
45949  else
45950    # Not in mixed or Windows style, start by that.
45951    new_path=`cmd //c echo $new_path`
45952
45953  input_path="$new_path"
45954  # Check if we need to convert this using DOS-style short mode. If the path
45955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45956  # take no chances and rewrite it.
45957  # Note: m4 eats our [], so we need to use [ and ] instead.
45958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45959  if test "x$has_forbidden_chars" != x; then
45960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45962  fi
45963
45964    # Output is in $new_path
45965
45966  windows_path="$new_path"
45967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45968    unix_path=`$CYGPATH -u "$windows_path"`
45969    new_path="$unix_path"
45970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45972    new_path="$unix_path"
45973  fi
45974
45975    # remove trailing .exe if any
45976    new_path="${new_path/%.exe/}"
45977
45978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45980  fi
45981
45982    else
45983      # We're on a unix platform. Hooray! :)
45984      # First separate the path from the arguments. This will split at the first
45985      # space.
45986      complete="$BUILD_AR"
45987      path="${complete%% *}"
45988      tmp="$complete EOL"
45989      arguments="${tmp#* }"
45990
45991      # Cannot rely on the command "which" here since it doesn't always work.
45992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45993      if test -z "$is_absolute_path"; then
45994        # Path to executable is not absolute. Find it.
45995        IFS_save="$IFS"
45996        IFS=:
45997        for p in $PATH; do
45998          if test -f "$p/$path" && test -x "$p/$path"; then
45999            new_path="$p/$path"
46000            break
46001          fi
46002        done
46003        IFS="$IFS_save"
46004      else
46005        # This is an absolute path, we can use it without further modifications.
46006        new_path="$path"
46007      fi
46008
46009      if test "x$new_path" = x; then
46010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46011$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46012        has_space=`$ECHO "$complete" | $GREP " "`
46013        if test "x$has_space" != x; then
46014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46016        fi
46017        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46018      fi
46019    fi
46020
46021    # Now join together the path and the arguments once again
46022    if test "x$arguments" != xEOL; then
46023      new_complete="$new_path ${arguments% *}"
46024    else
46025      new_complete="$new_path"
46026    fi
46027
46028    if test "x$complete" != "x$new_complete"; then
46029      BUILD_AR="$new_complete"
46030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46031$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46032    fi
46033  fi
46034
46035
46036
46037  # Publish this variable in the help.
46038
46039
46040  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46041    # The variable is not set by user, try to locate tool using the code snippet
46042    for ac_prog in objcopy
46043do
46044  # Extract the first word of "$ac_prog", so it can be a program name with args.
46045set dummy $ac_prog; ac_word=$2
46046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46047$as_echo_n "checking for $ac_word... " >&6; }
46048if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46049  $as_echo_n "(cached) " >&6
46050else
46051  case $BUILD_OBJCOPY in
46052  [\\/]* | ?:[\\/]*)
46053  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46054  ;;
46055  *)
46056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46057for as_dir in $PATH
46058do
46059  IFS=$as_save_IFS
46060  test -z "$as_dir" && as_dir=.
46061    for ac_exec_ext in '' $ac_executable_extensions; do
46062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46063    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46065    break 2
46066  fi
46067done
46068  done
46069IFS=$as_save_IFS
46070
46071  ;;
46072esac
46073fi
46074BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46075if test -n "$BUILD_OBJCOPY"; then
46076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46077$as_echo "$BUILD_OBJCOPY" >&6; }
46078else
46079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46080$as_echo "no" >&6; }
46081fi
46082
46083
46084  test -n "$BUILD_OBJCOPY" && break
46085done
46086
46087  else
46088    # The variable is set, but is it from the command line or the environment?
46089
46090    # Try to remove the string !BUILD_OBJCOPY! from our list.
46091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46093      # If it failed, the variable was not from the command line. Ignore it,
46094      # but warn the user (except for BASH, which is always set by the calling BASH).
46095      if test "xBUILD_OBJCOPY" != xBASH; then
46096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46097$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46098      fi
46099      # Try to locate tool using the code snippet
46100      for ac_prog in objcopy
46101do
46102  # Extract the first word of "$ac_prog", so it can be a program name with args.
46103set dummy $ac_prog; ac_word=$2
46104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46105$as_echo_n "checking for $ac_word... " >&6; }
46106if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46107  $as_echo_n "(cached) " >&6
46108else
46109  case $BUILD_OBJCOPY in
46110  [\\/]* | ?:[\\/]*)
46111  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46112  ;;
46113  *)
46114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46115for as_dir in $PATH
46116do
46117  IFS=$as_save_IFS
46118  test -z "$as_dir" && as_dir=.
46119    for ac_exec_ext in '' $ac_executable_extensions; do
46120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46121    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46123    break 2
46124  fi
46125done
46126  done
46127IFS=$as_save_IFS
46128
46129  ;;
46130esac
46131fi
46132BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46133if test -n "$BUILD_OBJCOPY"; then
46134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46135$as_echo "$BUILD_OBJCOPY" >&6; }
46136else
46137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46138$as_echo "no" >&6; }
46139fi
46140
46141
46142  test -n "$BUILD_OBJCOPY" && break
46143done
46144
46145    else
46146      # If it succeeded, then it was overridden by the user. We will use it
46147      # for the tool.
46148
46149      # First remove it from the list of overridden variables, so we can test
46150      # for unknown variables in the end.
46151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46152
46153      # Check if we try to supply an empty value
46154      if test "x$BUILD_OBJCOPY" = x; then
46155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46156$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46158$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46160$as_echo "disabled" >&6; }
46161      else
46162        # Check if the provided tool contains a complete path.
46163        tool_specified="$BUILD_OBJCOPY"
46164        tool_basename="${tool_specified##*/}"
46165        if test "x$tool_basename" = "x$tool_specified"; then
46166          # A command without a complete path is provided, search $PATH.
46167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46168$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46169          # Extract the first word of "$tool_basename", so it can be a program name with args.
46170set dummy $tool_basename; ac_word=$2
46171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46172$as_echo_n "checking for $ac_word... " >&6; }
46173if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46174  $as_echo_n "(cached) " >&6
46175else
46176  case $BUILD_OBJCOPY in
46177  [\\/]* | ?:[\\/]*)
46178  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46179  ;;
46180  *)
46181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46182for as_dir in $PATH
46183do
46184  IFS=$as_save_IFS
46185  test -z "$as_dir" && as_dir=.
46186    for ac_exec_ext in '' $ac_executable_extensions; do
46187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46188    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46190    break 2
46191  fi
46192done
46193  done
46194IFS=$as_save_IFS
46195
46196  ;;
46197esac
46198fi
46199BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46200if test -n "$BUILD_OBJCOPY"; then
46201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46202$as_echo "$BUILD_OBJCOPY" >&6; }
46203else
46204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46205$as_echo "no" >&6; }
46206fi
46207
46208
46209          if test "x$BUILD_OBJCOPY" = x; then
46210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46211          fi
46212        else
46213          # Otherwise we believe it is a complete path. Use it as it is.
46214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46215$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46217$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46218          if test ! -x "$tool_specified"; then
46219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46220$as_echo "not found" >&6; }
46221            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46222          fi
46223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46224$as_echo "$tool_specified" >&6; }
46225        fi
46226      fi
46227    fi
46228
46229  fi
46230
46231
46232
46233  # Only process if variable expands to non-empty
46234
46235  if test "x$BUILD_OBJCOPY" != x; then
46236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46237
46238  # First separate the path from the arguments. This will split at the first
46239  # space.
46240  complete="$BUILD_OBJCOPY"
46241  path="${complete%% *}"
46242  tmp="$complete EOL"
46243  arguments="${tmp#* }"
46244
46245  # Input might be given as Windows format, start by converting to
46246  # unix format.
46247  new_path=`$CYGPATH -u "$path"`
46248
46249  # Now try to locate executable using which
46250  new_path=`$WHICH "$new_path" 2> /dev/null`
46251  # bat and cmd files are not always considered executable in cygwin causing which
46252  # to not find them
46253  if test "x$new_path" = x \
46254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46256    new_path=`$CYGPATH -u "$path"`
46257  fi
46258  if test "x$new_path" = x; then
46259    # Oops. Which didn't find the executable.
46260    # The splitting of arguments from the executable at a space might have been incorrect,
46261    # since paths with space are more likely in Windows. Give it another try with the whole
46262    # argument.
46263    path="$complete"
46264    arguments="EOL"
46265    new_path=`$CYGPATH -u "$path"`
46266    new_path=`$WHICH "$new_path" 2> /dev/null`
46267    # bat and cmd files are not always considered executable in cygwin causing which
46268    # to not find them
46269    if test "x$new_path" = x \
46270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46272      new_path=`$CYGPATH -u "$path"`
46273    fi
46274    if test "x$new_path" = x; then
46275      # It's still not found. Now this is an unrecoverable error.
46276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46277$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46278      has_space=`$ECHO "$complete" | $GREP " "`
46279      if test "x$has_space" != x; then
46280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46282      fi
46283      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46284    fi
46285  fi
46286
46287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46290  # "foo.exe" is OK but "foo" is an error.
46291  #
46292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46293  # It is also a way to make sure we got the proper file name for the real test later on.
46294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46295  if test "x$test_shortpath" = x; then
46296    # Short path failed, file does not exist as specified.
46297    # Try adding .exe or .cmd
46298    if test -f "${new_path}.exe"; then
46299      input_to_shortpath="${new_path}.exe"
46300    elif test -f "${new_path}.cmd"; then
46301      input_to_shortpath="${new_path}.cmd"
46302    else
46303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46304$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46307      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46308    fi
46309  else
46310    input_to_shortpath="$new_path"
46311  fi
46312
46313  # Call helper function which possibly converts this using DOS-style short mode.
46314  # If so, the updated path is stored in $new_path.
46315  new_path="$input_to_shortpath"
46316
46317  input_path="$input_to_shortpath"
46318  # Check if we need to convert this using DOS-style short mode. If the path
46319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46320  # take no chances and rewrite it.
46321  # Note: m4 eats our [], so we need to use [ and ] instead.
46322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46323  if test "x$has_forbidden_chars" != x; then
46324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46328      # Going to short mode and back again did indeed matter. Since short mode is
46329      # case insensitive, let's make it lowercase to improve readability.
46330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46331      # Now convert it back to Unix-style (cygpath)
46332      input_path=`$CYGPATH -u "$shortmode_path"`
46333      new_path="$input_path"
46334    fi
46335  fi
46336
46337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46338  if test "x$test_cygdrive_prefix" = x; then
46339    # As a simple fix, exclude /usr/bin since it's not a real path.
46340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46342      # a path prefixed by /cygdrive for fixpath to work.
46343      new_path="$CYGWIN_ROOT_PATH$input_path"
46344    fi
46345  fi
46346
46347  # remove trailing .exe if any
46348  new_path="${new_path/%.exe/}"
46349
46350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351
46352  # First separate the path from the arguments. This will split at the first
46353  # space.
46354  complete="$BUILD_OBJCOPY"
46355  path="${complete%% *}"
46356  tmp="$complete EOL"
46357  arguments="${tmp#* }"
46358
46359  # Input might be given as Windows format, start by converting to
46360  # unix format.
46361  new_path="$path"
46362
46363  windows_path="$new_path"
46364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46365    unix_path=`$CYGPATH -u "$windows_path"`
46366    new_path="$unix_path"
46367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46369    new_path="$unix_path"
46370  fi
46371
46372
46373  # Now try to locate executable using which
46374  new_path=`$WHICH "$new_path" 2> /dev/null`
46375
46376  if test "x$new_path" = x; then
46377    # Oops. Which didn't find the executable.
46378    # The splitting of arguments from the executable at a space might have been incorrect,
46379    # since paths with space are more likely in Windows. Give it another try with the whole
46380    # argument.
46381    path="$complete"
46382    arguments="EOL"
46383    new_path="$path"
46384
46385  windows_path="$new_path"
46386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46387    unix_path=`$CYGPATH -u "$windows_path"`
46388    new_path="$unix_path"
46389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46391    new_path="$unix_path"
46392  fi
46393
46394
46395    new_path=`$WHICH "$new_path" 2> /dev/null`
46396    # bat and cmd files are not always considered executable in MSYS causing which
46397    # to not find them
46398    if test "x$new_path" = x \
46399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46401      new_path="$path"
46402
46403  windows_path="$new_path"
46404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46405    unix_path=`$CYGPATH -u "$windows_path"`
46406    new_path="$unix_path"
46407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46409    new_path="$unix_path"
46410  fi
46411
46412    fi
46413
46414    if test "x$new_path" = x; then
46415      # It's still not found. Now this is an unrecoverable error.
46416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46417$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46418      has_space=`$ECHO "$complete" | $GREP " "`
46419      if test "x$has_space" != x; then
46420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46422      fi
46423      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46424    fi
46425  fi
46426
46427  # Now new_path has a complete unix path to the binary
46428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46429    # Keep paths in /bin as-is, but remove trailing .exe if any
46430    new_path="${new_path/%.exe/}"
46431    # Do not save /bin paths to all_fixpath_prefixes!
46432  else
46433    # Not in mixed or Windows style, start by that.
46434    new_path=`cmd //c echo $new_path`
46435
46436  input_path="$new_path"
46437  # Check if we need to convert this using DOS-style short mode. If the path
46438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46439  # take no chances and rewrite it.
46440  # Note: m4 eats our [], so we need to use [ and ] instead.
46441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46442  if test "x$has_forbidden_chars" != x; then
46443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46445  fi
46446
46447    # Output is in $new_path
46448
46449  windows_path="$new_path"
46450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46451    unix_path=`$CYGPATH -u "$windows_path"`
46452    new_path="$unix_path"
46453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46455    new_path="$unix_path"
46456  fi
46457
46458    # remove trailing .exe if any
46459    new_path="${new_path/%.exe/}"
46460
46461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46463  fi
46464
46465    else
46466      # We're on a unix platform. Hooray! :)
46467      # First separate the path from the arguments. This will split at the first
46468      # space.
46469      complete="$BUILD_OBJCOPY"
46470      path="${complete%% *}"
46471      tmp="$complete EOL"
46472      arguments="${tmp#* }"
46473
46474      # Cannot rely on the command "which" here since it doesn't always work.
46475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46476      if test -z "$is_absolute_path"; then
46477        # Path to executable is not absolute. Find it.
46478        IFS_save="$IFS"
46479        IFS=:
46480        for p in $PATH; do
46481          if test -f "$p/$path" && test -x "$p/$path"; then
46482            new_path="$p/$path"
46483            break
46484          fi
46485        done
46486        IFS="$IFS_save"
46487      else
46488        # This is an absolute path, we can use it without further modifications.
46489        new_path="$path"
46490      fi
46491
46492      if test "x$new_path" = x; then
46493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46494$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46495        has_space=`$ECHO "$complete" | $GREP " "`
46496        if test "x$has_space" != x; then
46497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46499        fi
46500        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46501      fi
46502    fi
46503
46504    # Now join together the path and the arguments once again
46505    if test "x$arguments" != xEOL; then
46506      new_complete="$new_path ${arguments% *}"
46507    else
46508      new_complete="$new_path"
46509    fi
46510
46511    if test "x$complete" != "x$new_complete"; then
46512      BUILD_OBJCOPY="$new_complete"
46513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46514$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46515    fi
46516  fi
46517
46518
46519
46520  # Publish this variable in the help.
46521
46522
46523  if [ -z "${BUILD_STRIP+x}" ]; then
46524    # The variable is not set by user, try to locate tool using the code snippet
46525    for ac_prog in strip
46526do
46527  # Extract the first word of "$ac_prog", so it can be a program name with args.
46528set dummy $ac_prog; ac_word=$2
46529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46530$as_echo_n "checking for $ac_word... " >&6; }
46531if ${ac_cv_path_BUILD_STRIP+:} false; then :
46532  $as_echo_n "(cached) " >&6
46533else
46534  case $BUILD_STRIP in
46535  [\\/]* | ?:[\\/]*)
46536  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46537  ;;
46538  *)
46539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46540for as_dir in $PATH
46541do
46542  IFS=$as_save_IFS
46543  test -z "$as_dir" && as_dir=.
46544    for ac_exec_ext in '' $ac_executable_extensions; do
46545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46546    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46548    break 2
46549  fi
46550done
46551  done
46552IFS=$as_save_IFS
46553
46554  ;;
46555esac
46556fi
46557BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46558if test -n "$BUILD_STRIP"; then
46559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46560$as_echo "$BUILD_STRIP" >&6; }
46561else
46562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46563$as_echo "no" >&6; }
46564fi
46565
46566
46567  test -n "$BUILD_STRIP" && break
46568done
46569
46570  else
46571    # The variable is set, but is it from the command line or the environment?
46572
46573    # Try to remove the string !BUILD_STRIP! from our list.
46574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46576      # If it failed, the variable was not from the command line. Ignore it,
46577      # but warn the user (except for BASH, which is always set by the calling BASH).
46578      if test "xBUILD_STRIP" != xBASH; then
46579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46580$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46581      fi
46582      # Try to locate tool using the code snippet
46583      for ac_prog in strip
46584do
46585  # Extract the first word of "$ac_prog", so it can be a program name with args.
46586set dummy $ac_prog; ac_word=$2
46587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46588$as_echo_n "checking for $ac_word... " >&6; }
46589if ${ac_cv_path_BUILD_STRIP+:} false; then :
46590  $as_echo_n "(cached) " >&6
46591else
46592  case $BUILD_STRIP in
46593  [\\/]* | ?:[\\/]*)
46594  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46595  ;;
46596  *)
46597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46598for as_dir in $PATH
46599do
46600  IFS=$as_save_IFS
46601  test -z "$as_dir" && as_dir=.
46602    for ac_exec_ext in '' $ac_executable_extensions; do
46603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46604    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46606    break 2
46607  fi
46608done
46609  done
46610IFS=$as_save_IFS
46611
46612  ;;
46613esac
46614fi
46615BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46616if test -n "$BUILD_STRIP"; then
46617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46618$as_echo "$BUILD_STRIP" >&6; }
46619else
46620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46621$as_echo "no" >&6; }
46622fi
46623
46624
46625  test -n "$BUILD_STRIP" && break
46626done
46627
46628    else
46629      # If it succeeded, then it was overridden by the user. We will use it
46630      # for the tool.
46631
46632      # First remove it from the list of overridden variables, so we can test
46633      # for unknown variables in the end.
46634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46635
46636      # Check if we try to supply an empty value
46637      if test "x$BUILD_STRIP" = x; then
46638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46639$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46641$as_echo_n "checking for BUILD_STRIP... " >&6; }
46642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46643$as_echo "disabled" >&6; }
46644      else
46645        # Check if the provided tool contains a complete path.
46646        tool_specified="$BUILD_STRIP"
46647        tool_basename="${tool_specified##*/}"
46648        if test "x$tool_basename" = "x$tool_specified"; then
46649          # A command without a complete path is provided, search $PATH.
46650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46651$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46652          # Extract the first word of "$tool_basename", so it can be a program name with args.
46653set dummy $tool_basename; ac_word=$2
46654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46655$as_echo_n "checking for $ac_word... " >&6; }
46656if ${ac_cv_path_BUILD_STRIP+:} false; then :
46657  $as_echo_n "(cached) " >&6
46658else
46659  case $BUILD_STRIP in
46660  [\\/]* | ?:[\\/]*)
46661  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46662  ;;
46663  *)
46664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46665for as_dir in $PATH
46666do
46667  IFS=$as_save_IFS
46668  test -z "$as_dir" && as_dir=.
46669    for ac_exec_ext in '' $ac_executable_extensions; do
46670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46671    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46673    break 2
46674  fi
46675done
46676  done
46677IFS=$as_save_IFS
46678
46679  ;;
46680esac
46681fi
46682BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46683if test -n "$BUILD_STRIP"; then
46684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46685$as_echo "$BUILD_STRIP" >&6; }
46686else
46687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46688$as_echo "no" >&6; }
46689fi
46690
46691
46692          if test "x$BUILD_STRIP" = x; then
46693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46694          fi
46695        else
46696          # Otherwise we believe it is a complete path. Use it as it is.
46697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46698$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46700$as_echo_n "checking for BUILD_STRIP... " >&6; }
46701          if test ! -x "$tool_specified"; then
46702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46703$as_echo "not found" >&6; }
46704            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46705          fi
46706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46707$as_echo "$tool_specified" >&6; }
46708        fi
46709      fi
46710    fi
46711
46712  fi
46713
46714
46715
46716  # Only process if variable expands to non-empty
46717
46718  if test "x$BUILD_STRIP" != x; then
46719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46720
46721  # First separate the path from the arguments. This will split at the first
46722  # space.
46723  complete="$BUILD_STRIP"
46724  path="${complete%% *}"
46725  tmp="$complete EOL"
46726  arguments="${tmp#* }"
46727
46728  # Input might be given as Windows format, start by converting to
46729  # unix format.
46730  new_path=`$CYGPATH -u "$path"`
46731
46732  # Now try to locate executable using which
46733  new_path=`$WHICH "$new_path" 2> /dev/null`
46734  # bat and cmd files are not always considered executable in cygwin causing which
46735  # to not find them
46736  if test "x$new_path" = x \
46737      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46738      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46739    new_path=`$CYGPATH -u "$path"`
46740  fi
46741  if test "x$new_path" = x; then
46742    # Oops. Which didn't find the executable.
46743    # The splitting of arguments from the executable at a space might have been incorrect,
46744    # since paths with space are more likely in Windows. Give it another try with the whole
46745    # argument.
46746    path="$complete"
46747    arguments="EOL"
46748    new_path=`$CYGPATH -u "$path"`
46749    new_path=`$WHICH "$new_path" 2> /dev/null`
46750    # bat and cmd files are not always considered executable in cygwin causing which
46751    # to not find them
46752    if test "x$new_path" = x \
46753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46755      new_path=`$CYGPATH -u "$path"`
46756    fi
46757    if test "x$new_path" = x; then
46758      # It's still not found. Now this is an unrecoverable error.
46759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46760$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46761      has_space=`$ECHO "$complete" | $GREP " "`
46762      if test "x$has_space" != x; then
46763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46765      fi
46766      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46767    fi
46768  fi
46769
46770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46773  # "foo.exe" is OK but "foo" is an error.
46774  #
46775  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46776  # It is also a way to make sure we got the proper file name for the real test later on.
46777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46778  if test "x$test_shortpath" = x; then
46779    # Short path failed, file does not exist as specified.
46780    # Try adding .exe or .cmd
46781    if test -f "${new_path}.exe"; then
46782      input_to_shortpath="${new_path}.exe"
46783    elif test -f "${new_path}.cmd"; then
46784      input_to_shortpath="${new_path}.cmd"
46785    else
46786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46787$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46790      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46791    fi
46792  else
46793    input_to_shortpath="$new_path"
46794  fi
46795
46796  # Call helper function which possibly converts this using DOS-style short mode.
46797  # If so, the updated path is stored in $new_path.
46798  new_path="$input_to_shortpath"
46799
46800  input_path="$input_to_shortpath"
46801  # Check if we need to convert this using DOS-style short mode. If the path
46802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46803  # take no chances and rewrite it.
46804  # Note: m4 eats our [], so we need to use [ and ] instead.
46805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46806  if test "x$has_forbidden_chars" != x; then
46807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46811      # Going to short mode and back again did indeed matter. Since short mode is
46812      # case insensitive, let's make it lowercase to improve readability.
46813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46814      # Now convert it back to Unix-style (cygpath)
46815      input_path=`$CYGPATH -u "$shortmode_path"`
46816      new_path="$input_path"
46817    fi
46818  fi
46819
46820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46821  if test "x$test_cygdrive_prefix" = x; then
46822    # As a simple fix, exclude /usr/bin since it's not a real path.
46823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46825      # a path prefixed by /cygdrive for fixpath to work.
46826      new_path="$CYGWIN_ROOT_PATH$input_path"
46827    fi
46828  fi
46829
46830  # remove trailing .exe if any
46831  new_path="${new_path/%.exe/}"
46832
46833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46834
46835  # First separate the path from the arguments. This will split at the first
46836  # space.
46837  complete="$BUILD_STRIP"
46838  path="${complete%% *}"
46839  tmp="$complete EOL"
46840  arguments="${tmp#* }"
46841
46842  # Input might be given as Windows format, start by converting to
46843  # unix format.
46844  new_path="$path"
46845
46846  windows_path="$new_path"
46847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46848    unix_path=`$CYGPATH -u "$windows_path"`
46849    new_path="$unix_path"
46850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46852    new_path="$unix_path"
46853  fi
46854
46855
46856  # Now try to locate executable using which
46857  new_path=`$WHICH "$new_path" 2> /dev/null`
46858
46859  if test "x$new_path" = x; then
46860    # Oops. Which didn't find the executable.
46861    # The splitting of arguments from the executable at a space might have been incorrect,
46862    # since paths with space are more likely in Windows. Give it another try with the whole
46863    # argument.
46864    path="$complete"
46865    arguments="EOL"
46866    new_path="$path"
46867
46868  windows_path="$new_path"
46869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46870    unix_path=`$CYGPATH -u "$windows_path"`
46871    new_path="$unix_path"
46872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46874    new_path="$unix_path"
46875  fi
46876
46877
46878    new_path=`$WHICH "$new_path" 2> /dev/null`
46879    # bat and cmd files are not always considered executable in MSYS causing which
46880    # to not find them
46881    if test "x$new_path" = x \
46882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46884      new_path="$path"
46885
46886  windows_path="$new_path"
46887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46888    unix_path=`$CYGPATH -u "$windows_path"`
46889    new_path="$unix_path"
46890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46892    new_path="$unix_path"
46893  fi
46894
46895    fi
46896
46897    if test "x$new_path" = x; then
46898      # It's still not found. Now this is an unrecoverable error.
46899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46900$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46901      has_space=`$ECHO "$complete" | $GREP " "`
46902      if test "x$has_space" != x; then
46903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46905      fi
46906      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46907    fi
46908  fi
46909
46910  # Now new_path has a complete unix path to the binary
46911  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46912    # Keep paths in /bin as-is, but remove trailing .exe if any
46913    new_path="${new_path/%.exe/}"
46914    # Do not save /bin paths to all_fixpath_prefixes!
46915  else
46916    # Not in mixed or Windows style, start by that.
46917    new_path=`cmd //c echo $new_path`
46918
46919  input_path="$new_path"
46920  # Check if we need to convert this using DOS-style short mode. If the path
46921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46922  # take no chances and rewrite it.
46923  # Note: m4 eats our [], so we need to use [ and ] instead.
46924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46925  if test "x$has_forbidden_chars" != x; then
46926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46928  fi
46929
46930    # Output is in $new_path
46931
46932  windows_path="$new_path"
46933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46934    unix_path=`$CYGPATH -u "$windows_path"`
46935    new_path="$unix_path"
46936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46938    new_path="$unix_path"
46939  fi
46940
46941    # remove trailing .exe if any
46942    new_path="${new_path/%.exe/}"
46943
46944    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46945    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46946  fi
46947
46948    else
46949      # We're on a unix platform. Hooray! :)
46950      # First separate the path from the arguments. This will split at the first
46951      # space.
46952      complete="$BUILD_STRIP"
46953      path="${complete%% *}"
46954      tmp="$complete EOL"
46955      arguments="${tmp#* }"
46956
46957      # Cannot rely on the command "which" here since it doesn't always work.
46958      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46959      if test -z "$is_absolute_path"; then
46960        # Path to executable is not absolute. Find it.
46961        IFS_save="$IFS"
46962        IFS=:
46963        for p in $PATH; do
46964          if test -f "$p/$path" && test -x "$p/$path"; then
46965            new_path="$p/$path"
46966            break
46967          fi
46968        done
46969        IFS="$IFS_save"
46970      else
46971        # This is an absolute path, we can use it without further modifications.
46972        new_path="$path"
46973      fi
46974
46975      if test "x$new_path" = x; then
46976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46977$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46978        has_space=`$ECHO "$complete" | $GREP " "`
46979        if test "x$has_space" != x; then
46980          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46982        fi
46983        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46984      fi
46985    fi
46986
46987    # Now join together the path and the arguments once again
46988    if test "x$arguments" != xEOL; then
46989      new_complete="$new_path ${arguments% *}"
46990    else
46991      new_complete="$new_path"
46992    fi
46993
46994    if test "x$complete" != "x$new_complete"; then
46995      BUILD_STRIP="$new_complete"
46996      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46997$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46998    fi
46999  fi
47000
47001    # Assume the C compiler is the assembler
47002    BUILD_AS="$BUILD_CC -c"
47003    # Just like for the target compiler, use the compiler as linker
47004    BUILD_LD="$BUILD_CC"
47005    BUILD_LDCXX="$BUILD_CXX"
47006
47007    PATH="$OLDPATH"
47008
47009
47010  COMPILER=$BUILD_CC
47011  COMPILER_NAME=BuildC
47012
47013  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47014    # cc -V output typically looks like
47015    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47016    # or
47017    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47018    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47019    # Check that this is likely to be the Solaris Studio cc.
47020    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47021    if test $? -ne 0; then
47022      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47023      { $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
47024$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47025      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47026$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47027      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47028$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47029      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47030    fi
47031    # Remove usage instructions (if present), and
47032    # collapse compiler output into a single line
47033    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47034        $SED -e 's/ *[Uu]sage:.*//'`
47035    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47037  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47038    # xlc -qversion output typically looks like
47039    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47040    #     Version: 11.01.0000.0015
47041    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47042    # Check that this is likely to be the IBM XL C compiler.
47043    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47044    if test $? -ne 0; then
47045      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47046      { $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
47047$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47048      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47049$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47050      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47051$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47052      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47053    fi
47054    # Collapse compiler output into a single line
47055    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47056    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47057        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47058  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47059    # There is no specific version flag, but all output starts with a version string.
47060    # First line typically looks something like:
47061    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47062    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47063    # Check that this is likely to be Microsoft CL.EXE.
47064    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47065    if test $? -ne 0; then
47066      { $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
47067$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47068      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47069$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47070      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47071    fi
47072    # Collapse compiler output into a single line
47073    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47074    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47075        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47076  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47077    # gcc --version output typically looks like
47078    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47079    #     Copyright (C) 2013 Free Software Foundation, Inc.
47080    #     This is free software; see the source for copying conditions.  There is NO
47081    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47082    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47083    # Check that this is likely to be GCC.
47084    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47085    if test $? -ne 0; then
47086      { $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
47087$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47089$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47090      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47091    fi
47092    # Remove Copyright and legalese from version string, and
47093    # collapse into a single line
47094    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47095        $SED -e 's/ *Copyright .*//'`
47096    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47097        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47098  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47099    # clang --version output typically looks like
47100    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47101    #    clang version 3.3 (tags/RELEASE_33/final)
47102    # or
47103    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47104    #    Target: x86_64-pc-linux-gnu
47105    #    Thread model: posix
47106    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47107    # Check that this is likely to be clang
47108    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47109    if test $? -ne 0; then
47110      { $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
47111$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47112      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47113$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47114      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47115    fi
47116    # Collapse compiler output into a single line
47117    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47118    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47119        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47120  else
47121      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47122  fi
47123  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47124  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47125  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47126  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47127
47128  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47129$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47130
47131
47132  COMPILER=$BUILD_CXX
47133  COMPILER_NAME=BuildC++
47134
47135  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47136    # cc -V output typically looks like
47137    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47138    # or
47139    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47140    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47141    # Check that this is likely to be the Solaris Studio cc.
47142    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47143    if test $? -ne 0; then
47144      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47145      { $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
47146$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47147      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47148$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47150$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47152    fi
47153    # Remove usage instructions (if present), and
47154    # collapse compiler output into a single line
47155    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156        $SED -e 's/ *[Uu]sage:.*//'`
47157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47158        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47159  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47160    # xlc -qversion output typically looks like
47161    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47162    #     Version: 11.01.0000.0015
47163    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47164    # Check that this is likely to be the IBM XL C compiler.
47165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47166    if test $? -ne 0; then
47167      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47168      { $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
47169$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47170      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47171$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47172      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47173$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47174      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47175    fi
47176    # Collapse compiler output into a single line
47177    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47178    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47179        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47180  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47181    # There is no specific version flag, but all output starts with a version string.
47182    # First line typically looks something like:
47183    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47184    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47185    # Check that this is likely to be Microsoft CL.EXE.
47186    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47187    if test $? -ne 0; then
47188      { $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
47189$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47190      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47191$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47192      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47193    fi
47194    # Collapse compiler output into a single line
47195    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47196    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47197        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47198  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47199    # gcc --version output typically looks like
47200    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47201    #     Copyright (C) 2013 Free Software Foundation, Inc.
47202    #     This is free software; see the source for copying conditions.  There is NO
47203    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47204    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47205    # Check that this is likely to be GCC.
47206    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47207    if test $? -ne 0; then
47208      { $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
47209$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47210      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47211$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47212      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47213    fi
47214    # Remove Copyright and legalese from version string, and
47215    # collapse into a single line
47216    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47217        $SED -e 's/ *Copyright .*//'`
47218    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47219        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47220  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47221    # clang --version output typically looks like
47222    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47223    #    clang version 3.3 (tags/RELEASE_33/final)
47224    # or
47225    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47226    #    Target: x86_64-pc-linux-gnu
47227    #    Thread model: posix
47228    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47229    # Check that this is likely to be clang
47230    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47231    if test $? -ne 0; then
47232      { $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
47233$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47234      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47235$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47236      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47237    fi
47238    # Collapse compiler output into a single line
47239    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47240    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47241        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47242  else
47243      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47244  fi
47245  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47246  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47247  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47248  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47249
47250  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47251$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47252
47253
47254  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47255    { $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
47256$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47258$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47259  fi
47260
47261  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47262  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47263    { $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
47264$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;}
47265  fi
47266
47267  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47268    { $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
47269$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47270  fi
47271
47272  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47273
47274  else
47275    # If we are not cross compiling, use the normal target compilers for
47276    # building the build platform executables.
47277    BUILD_CC="$CC"
47278    BUILD_CXX="$CXX"
47279    BUILD_LD="$LD"
47280    BUILD_LDCXX="$LDCXX"
47281    BUILD_NM="$NM"
47282    BUILD_AS="$AS"
47283    BUILD_OBJCOPY="$OBJCOPY"
47284    BUILD_STRIP="$STRIP"
47285    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47286    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47287    BUILD_AR="$AR"
47288
47289
47290  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47291    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47292$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47293    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47294$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47295  fi
47296
47297  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47298  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47299    { $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
47300$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;}
47301  fi
47302
47303  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47304    { $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
47305$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47306  fi
47307
47308  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47309
47310  fi
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325  # The package path is used only on macosx?
47326  # FIXME: clean this up, and/or move it elsewhere.
47327  PACKAGE_PATH=/opt/local
47328
47329
47330  # Check for extra potential brokenness.
47331  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47332    # On Windows, double-check that we got the right compiler.
47333    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47334    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47335    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47336      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47337        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
47338      fi
47339    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47340      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47341        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47342      fi
47343    fi
47344  fi
47345
47346  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47347    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47348    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47349    # This is later checked when setting flags.
47350
47351    # "-Og" suppported for GCC 4.8 and later
47352    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400    # Execute function body
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449    # Execute function body
47450
47451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47452$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47453  supports=yes
47454
47455  saved_cflags="$CFLAGS"
47456  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47457  ac_ext=c
47458ac_cpp='$CPP $CPPFLAGS'
47459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47461ac_compiler_gnu=$ac_cv_c_compiler_gnu
47462
47463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47464/* end confdefs.h.  */
47465int i;
47466_ACEOF
47467if ac_fn_c_try_compile "$LINENO"; then :
47468
47469else
47470  supports=no
47471fi
47472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47473  ac_ext=cpp
47474ac_cpp='$CXXCPP $CPPFLAGS'
47475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47478
47479  CFLAGS="$saved_cflags"
47480
47481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47482$as_echo "$supports" >&6; }
47483  if test "x$supports" = "xyes" ; then
47484    :
47485    C_COMP_SUPPORTS="yes"
47486  else
47487    :
47488    C_COMP_SUPPORTS="no"
47489  fi
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549    # Execute function body
47550
47551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47552$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47553  supports=yes
47554
47555  saved_cxxflags="$CXXFLAGS"
47556  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47557  ac_ext=cpp
47558ac_cpp='$CXXCPP $CPPFLAGS'
47559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47562
47563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47564/* end confdefs.h.  */
47565int i;
47566_ACEOF
47567if ac_fn_cxx_try_compile "$LINENO"; then :
47568
47569else
47570  supports=no
47571fi
47572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47573  ac_ext=cpp
47574ac_cpp='$CXXCPP $CPPFLAGS'
47575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47578
47579  CXXFLAGS="$saved_cxxflags"
47580
47581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47582$as_echo "$supports" >&6; }
47583  if test "x$supports" = "xyes" ; then
47584    :
47585    CXX_COMP_SUPPORTS="yes"
47586  else
47587    :
47588    CXX_COMP_SUPPORTS="no"
47589  fi
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47604$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47605  supports=no
47606  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47607
47608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47609$as_echo "$supports" >&6; }
47610  if test "x$supports" = "xyes" ; then
47611    :
47612    HAS_CFLAG_OPTIMIZE_DEBUG=true
47613  else
47614    :
47615    HAS_CFLAG_OPTIMIZE_DEBUG=false
47616  fi
47617
47618
47619
47620
47621
47622
47623
47624    # "-z relro" supported in GNU binutils 2.17 and later
47625    LINKER_RELRO_FLAG="-Wl,-z,relro"
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673    # Execute function body
47674
47675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47676$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47677  supports=yes
47678
47679  saved_ldflags="$LDFLAGS"
47680  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47681  ac_ext=c
47682ac_cpp='$CPP $CPPFLAGS'
47683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47685ac_compiler_gnu=$ac_cv_c_compiler_gnu
47686
47687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47688/* end confdefs.h.  */
47689
47690int
47691main ()
47692{
47693
47694  ;
47695  return 0;
47696}
47697_ACEOF
47698if ac_fn_c_try_link "$LINENO"; then :
47699
47700else
47701  supports=no
47702fi
47703rm -f core conftest.err conftest.$ac_objext \
47704    conftest$ac_exeext conftest.$ac_ext
47705  ac_ext=cpp
47706ac_cpp='$CXXCPP $CPPFLAGS'
47707ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47708ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47709ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47710
47711  LDFLAGS="$saved_ldflags"
47712
47713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47714$as_echo "$supports" >&6; }
47715  if test "x$supports" = "xyes" ; then
47716    :
47717    HAS_LINKER_RELRO=true
47718  else
47719    :
47720    HAS_LINKER_RELRO=false
47721  fi
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735    # "-z now" supported in GNU binutils 2.11 and later
47736    LINKER_NOW_FLAG="-Wl,-z,now"
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784    # Execute function body
47785
47786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47787$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47788  supports=yes
47789
47790  saved_ldflags="$LDFLAGS"
47791  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47792  ac_ext=c
47793ac_cpp='$CPP $CPPFLAGS'
47794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47796ac_compiler_gnu=$ac_cv_c_compiler_gnu
47797
47798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47799/* end confdefs.h.  */
47800
47801int
47802main ()
47803{
47804
47805  ;
47806  return 0;
47807}
47808_ACEOF
47809if ac_fn_c_try_link "$LINENO"; then :
47810
47811else
47812  supports=no
47813fi
47814rm -f core conftest.err conftest.$ac_objext \
47815    conftest$ac_exeext conftest.$ac_ext
47816  ac_ext=cpp
47817ac_cpp='$CXXCPP $CPPFLAGS'
47818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47821
47822  LDFLAGS="$saved_ldflags"
47823
47824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47825$as_echo "$supports" >&6; }
47826  if test "x$supports" = "xyes" ; then
47827    :
47828    HAS_LINKER_NOW=true
47829  else
47830    :
47831    HAS_LINKER_NOW=false
47832  fi
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845  fi
47846
47847  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47848  # in executable.'
47849  USING_BROKEN_SUSE_LD=no
47850  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47852$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47853    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47854    $ECHO "int main() { }" > main.c
47855    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47857$as_echo "no" >&6; }
47858      USING_BROKEN_SUSE_LD=no
47859    else
47860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47861$as_echo "yes" >&6; }
47862      USING_BROKEN_SUSE_LD=yes
47863    fi
47864    $RM version-script.map main.c a.out
47865  fi
47866
47867
47868  # Setup hotspot lecagy names for toolchains
47869  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47870  if test "x$TOOLCHAIN_TYPE" = xclang; then
47871    HOTSPOT_TOOLCHAIN_TYPE=gcc
47872  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47873    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47874  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47875    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47876  fi
47877
47878
47879
47880# Setup the JTReg Regression Test Harness.
47881
47882
47883# Check whether --with-jtreg was given.
47884if test "${with_jtreg+set}" = set; then :
47885  withval=$with_jtreg;
47886else
47887  with_jtreg=no
47888fi
47889
47890
47891  if test "x$with_jtreg" = xno; then
47892    # jtreg disabled
47893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47894$as_echo_n "checking for jtreg... " >&6; }
47895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47896$as_echo "no" >&6; }
47897  else
47898    if test "x$with_jtreg" != xyes; then
47899      # with path specified.
47900      JT_HOME="$with_jtreg"
47901    fi
47902
47903    if test "x$JT_HOME" != x; then
47904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47905$as_echo_n "checking for jtreg... " >&6; }
47906
47907      # use JT_HOME enviroment var.
47908
47909  # Only process if variable expands to non-empty
47910
47911  if test "x$JT_HOME" != x; then
47912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47913
47914  # Input might be given as Windows format, start by converting to
47915  # unix format.
47916  path="$JT_HOME"
47917  new_path=`$CYGPATH -u "$path"`
47918
47919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47922  # "foo.exe" is OK but "foo" is an error.
47923  #
47924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47925  # It is also a way to make sure we got the proper file name for the real test later on.
47926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47927  if test "x$test_shortpath" = x; then
47928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47929$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47930    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47931  fi
47932
47933  # Call helper function which possibly converts this using DOS-style short mode.
47934  # If so, the updated path is stored in $new_path.
47935
47936  input_path="$new_path"
47937  # Check if we need to convert this using DOS-style short mode. If the path
47938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47939  # take no chances and rewrite it.
47940  # Note: m4 eats our [], so we need to use [ and ] instead.
47941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47942  if test "x$has_forbidden_chars" != x; then
47943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47947      # Going to short mode and back again did indeed matter. Since short mode is
47948      # case insensitive, let's make it lowercase to improve readability.
47949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47950      # Now convert it back to Unix-style (cygpath)
47951      input_path=`$CYGPATH -u "$shortmode_path"`
47952      new_path="$input_path"
47953    fi
47954  fi
47955
47956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47957  if test "x$test_cygdrive_prefix" = x; then
47958    # As a simple fix, exclude /usr/bin since it's not a real path.
47959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47961      # a path prefixed by /cygdrive for fixpath to work.
47962      new_path="$CYGWIN_ROOT_PATH$input_path"
47963    fi
47964  fi
47965
47966
47967  if test "x$path" != "x$new_path"; then
47968    JT_HOME="$new_path"
47969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47970$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47971  fi
47972
47973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47974
47975  path="$JT_HOME"
47976  has_colon=`$ECHO $path | $GREP ^.:`
47977  new_path="$path"
47978  if test "x$has_colon" = x; then
47979    # Not in mixed or Windows style, start by that.
47980    new_path=`cmd //c echo $path`
47981  fi
47982
47983
47984  input_path="$new_path"
47985  # Check if we need to convert this using DOS-style short mode. If the path
47986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47987  # take no chances and rewrite it.
47988  # Note: m4 eats our [], so we need to use [ and ] instead.
47989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47990  if test "x$has_forbidden_chars" != x; then
47991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47993  fi
47994
47995
47996  windows_path="$new_path"
47997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47998    unix_path=`$CYGPATH -u "$windows_path"`
47999    new_path="$unix_path"
48000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48002    new_path="$unix_path"
48003  fi
48004
48005  if test "x$path" != "x$new_path"; then
48006    JT_HOME="$new_path"
48007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48008$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48009  fi
48010
48011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48013
48014    else
48015      # We're on a unix platform. Hooray! :)
48016      path="$JT_HOME"
48017      has_space=`$ECHO "$path" | $GREP " "`
48018      if test "x$has_space" != x; then
48019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48020$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48022      fi
48023
48024      # Use eval to expand a potential ~
48025      eval path="$path"
48026      if test ! -f "$path" && test ! -d "$path"; then
48027        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48028      fi
48029
48030      if test -d "$path"; then
48031        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48032      else
48033        dir="`$DIRNAME "$path"`"
48034        base="`$BASENAME "$path"`"
48035        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48036      fi
48037    fi
48038  fi
48039
48040
48041      # jtreg win32 script works for everybody
48042      JTREGEXE="$JT_HOME/bin/jtreg"
48043
48044      if test ! -f "$JTREGEXE"; then
48045        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48046      fi
48047
48048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48049$as_echo "$JTREGEXE" >&6; }
48050    else
48051      # try to find jtreg on path
48052
48053
48054
48055  # Publish this variable in the help.
48056
48057
48058  if [ -z "${JTREGEXE+x}" ]; then
48059    # The variable is not set by user, try to locate tool using the code snippet
48060    for ac_prog in jtreg
48061do
48062  # Extract the first word of "$ac_prog", so it can be a program name with args.
48063set dummy $ac_prog; ac_word=$2
48064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48065$as_echo_n "checking for $ac_word... " >&6; }
48066if ${ac_cv_path_JTREGEXE+:} false; then :
48067  $as_echo_n "(cached) " >&6
48068else
48069  case $JTREGEXE in
48070  [\\/]* | ?:[\\/]*)
48071  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48072  ;;
48073  *)
48074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48075for as_dir in $PATH
48076do
48077  IFS=$as_save_IFS
48078  test -z "$as_dir" && as_dir=.
48079    for ac_exec_ext in '' $ac_executable_extensions; do
48080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48081    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48083    break 2
48084  fi
48085done
48086  done
48087IFS=$as_save_IFS
48088
48089  ;;
48090esac
48091fi
48092JTREGEXE=$ac_cv_path_JTREGEXE
48093if test -n "$JTREGEXE"; then
48094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48095$as_echo "$JTREGEXE" >&6; }
48096else
48097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48098$as_echo "no" >&6; }
48099fi
48100
48101
48102  test -n "$JTREGEXE" && break
48103done
48104
48105  else
48106    # The variable is set, but is it from the command line or the environment?
48107
48108    # Try to remove the string !JTREGEXE! from our list.
48109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48111      # If it failed, the variable was not from the command line. Ignore it,
48112      # but warn the user (except for BASH, which is always set by the calling BASH).
48113      if test "xJTREGEXE" != xBASH; then
48114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48115$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48116      fi
48117      # Try to locate tool using the code snippet
48118      for ac_prog in jtreg
48119do
48120  # Extract the first word of "$ac_prog", so it can be a program name with args.
48121set dummy $ac_prog; ac_word=$2
48122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48123$as_echo_n "checking for $ac_word... " >&6; }
48124if ${ac_cv_path_JTREGEXE+:} false; then :
48125  $as_echo_n "(cached) " >&6
48126else
48127  case $JTREGEXE in
48128  [\\/]* | ?:[\\/]*)
48129  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48130  ;;
48131  *)
48132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48133for as_dir in $PATH
48134do
48135  IFS=$as_save_IFS
48136  test -z "$as_dir" && as_dir=.
48137    for ac_exec_ext in '' $ac_executable_extensions; do
48138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48139    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48141    break 2
48142  fi
48143done
48144  done
48145IFS=$as_save_IFS
48146
48147  ;;
48148esac
48149fi
48150JTREGEXE=$ac_cv_path_JTREGEXE
48151if test -n "$JTREGEXE"; then
48152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48153$as_echo "$JTREGEXE" >&6; }
48154else
48155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48156$as_echo "no" >&6; }
48157fi
48158
48159
48160  test -n "$JTREGEXE" && break
48161done
48162
48163    else
48164      # If it succeeded, then it was overridden by the user. We will use it
48165      # for the tool.
48166
48167      # First remove it from the list of overridden variables, so we can test
48168      # for unknown variables in the end.
48169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48170
48171      # Check if we try to supply an empty value
48172      if test "x$JTREGEXE" = x; then
48173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48174$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48176$as_echo_n "checking for JTREGEXE... " >&6; }
48177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48178$as_echo "disabled" >&6; }
48179      else
48180        # Check if the provided tool contains a complete path.
48181        tool_specified="$JTREGEXE"
48182        tool_basename="${tool_specified##*/}"
48183        if test "x$tool_basename" = "x$tool_specified"; then
48184          # A command without a complete path is provided, search $PATH.
48185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48186$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48187          # Extract the first word of "$tool_basename", so it can be a program name with args.
48188set dummy $tool_basename; ac_word=$2
48189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48190$as_echo_n "checking for $ac_word... " >&6; }
48191if ${ac_cv_path_JTREGEXE+:} false; then :
48192  $as_echo_n "(cached) " >&6
48193else
48194  case $JTREGEXE in
48195  [\\/]* | ?:[\\/]*)
48196  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48197  ;;
48198  *)
48199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48200for as_dir in $PATH
48201do
48202  IFS=$as_save_IFS
48203  test -z "$as_dir" && as_dir=.
48204    for ac_exec_ext in '' $ac_executable_extensions; do
48205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48206    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48208    break 2
48209  fi
48210done
48211  done
48212IFS=$as_save_IFS
48213
48214  ;;
48215esac
48216fi
48217JTREGEXE=$ac_cv_path_JTREGEXE
48218if test -n "$JTREGEXE"; then
48219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48220$as_echo "$JTREGEXE" >&6; }
48221else
48222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48223$as_echo "no" >&6; }
48224fi
48225
48226
48227          if test "x$JTREGEXE" = x; then
48228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48229          fi
48230        else
48231          # Otherwise we believe it is a complete path. Use it as it is.
48232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48233$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48235$as_echo_n "checking for JTREGEXE... " >&6; }
48236          if test ! -x "$tool_specified"; then
48237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48238$as_echo "not found" >&6; }
48239            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48240          fi
48241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48242$as_echo "$tool_specified" >&6; }
48243        fi
48244      fi
48245    fi
48246
48247  fi
48248
48249
48250
48251  if test "x$JTREGEXE" = x; then
48252    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48253  fi
48254
48255
48256      JT_HOME="`$DIRNAME $JTREGEXE`"
48257    fi
48258  fi
48259
48260
48261
48262
48263
48264
48265  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48266  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48267  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48268  #                              commands produced by the link step (currently AIX only)
48269  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48270    COMPILER_TARGET_BITS_FLAG="-q"
48271    COMPILER_COMMAND_FILE_FLAG="-f"
48272    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48273  else
48274    COMPILER_TARGET_BITS_FLAG="-m"
48275    COMPILER_COMMAND_FILE_FLAG="@"
48276    COMPILER_BINDCMD_FILE_FLAG=""
48277
48278    # The solstudio linker does not support @-files.
48279    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48280      COMPILER_COMMAND_FILE_FLAG=
48281    fi
48282
48283    # Check if @file is supported by gcc
48284    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48286$as_echo_n "checking if @file is supported by gcc... " >&6; }
48287      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48288      $ECHO "" "--version" > command.file
48289      if $CXX @command.file 2>&5 >&5; then
48290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48291$as_echo "yes" >&6; }
48292        COMPILER_COMMAND_FILE_FLAG="@"
48293      else
48294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48295$as_echo "no" >&6; }
48296        COMPILER_COMMAND_FILE_FLAG=
48297      fi
48298      $RM command.file
48299    fi
48300  fi
48301
48302
48303
48304
48305  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48306  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48307    ARFLAGS="-r"
48308  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48309    ARFLAGS="-X64"
48310  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48311    # lib.exe is used as AR to create static libraries.
48312    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48313  else
48314    ARFLAGS=""
48315  fi
48316
48317
48318  ## Setup strip.
48319  # FIXME: should this really be per platform, or should it be per toolchain type?
48320  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48321  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48322  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48323    STRIPFLAGS="-g"
48324  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48325    STRIPFLAGS="-x"
48326  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48327    STRIPFLAGS="-S"
48328  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48329    STRIPFLAGS="-X32_64"
48330  fi
48331
48332
48333
48334  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48335    CC_OUT_OPTION=-Fo
48336    EXE_OUT_OPTION=-out:
48337    LD_OUT_OPTION=-out:
48338    AR_OUT_OPTION=-out:
48339  else
48340    # The option used to specify the target .o,.a or .so file.
48341    # When compiling, how to specify the to be created object file.
48342    CC_OUT_OPTION='-o$(SPACE)'
48343    # When linking, how to specify the to be created executable.
48344    EXE_OUT_OPTION='-o$(SPACE)'
48345    # When linking, how to specify the to be created dynamically linkable library.
48346    LD_OUT_OPTION='-o$(SPACE)'
48347    # When archiving, how to specify the to be create static archive for object files.
48348    AR_OUT_OPTION='rcs$(SPACE)'
48349  fi
48350
48351
48352
48353
48354
48355  # On Windows, we need to set RC flags.
48356  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48357    RC_FLAGS="-nologo -l0x409"
48358    JVM_RCFLAGS="-nologo"
48359    if test "x$DEBUG_LEVEL" = xrelease; then
48360      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48361      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48362    fi
48363
48364    # The version variables used to create RC_FLAGS may be overridden
48365    # in a custom configure script, or possibly the command line.
48366    # Let those variables be expanded at make time in spec.gmk.
48367    # The \$ are escaped to the shell, and the $(...) variables
48368    # are evaluated by make.
48369    RC_FLAGS="$RC_FLAGS \
48370        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48371        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48372        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48373        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48374        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48375        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48376        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48377
48378    JVM_RCFLAGS="$JVM_RCFLAGS \
48379        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48380        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48381        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48382        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48383        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48384        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48385        -D\"HS_FNAME=jvm.dll\" \
48386        -D\"HS_INTERNAL_NAME=jvm\""
48387  fi
48388
48389
48390
48391  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48392    # silence copyright notice and other headers.
48393    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48394  fi
48395
48396
48397# Now we can test some aspects on the target using configure macros.
48398
48399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48400$as_echo_n "checking for ANSI C header files... " >&6; }
48401if ${ac_cv_header_stdc+:} false; then :
48402  $as_echo_n "(cached) " >&6
48403else
48404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48405/* end confdefs.h.  */
48406#include <stdlib.h>
48407#include <stdarg.h>
48408#include <string.h>
48409#include <float.h>
48410
48411int
48412main ()
48413{
48414
48415  ;
48416  return 0;
48417}
48418_ACEOF
48419if ac_fn_cxx_try_compile "$LINENO"; then :
48420  ac_cv_header_stdc=yes
48421else
48422  ac_cv_header_stdc=no
48423fi
48424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48425
48426if test $ac_cv_header_stdc = yes; then
48427  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48429/* end confdefs.h.  */
48430#include <string.h>
48431
48432_ACEOF
48433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48434  $EGREP "memchr" >/dev/null 2>&1; then :
48435
48436else
48437  ac_cv_header_stdc=no
48438fi
48439rm -f conftest*
48440
48441fi
48442
48443if test $ac_cv_header_stdc = yes; then
48444  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48446/* end confdefs.h.  */
48447#include <stdlib.h>
48448
48449_ACEOF
48450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48451  $EGREP "free" >/dev/null 2>&1; then :
48452
48453else
48454  ac_cv_header_stdc=no
48455fi
48456rm -f conftest*
48457
48458fi
48459
48460if test $ac_cv_header_stdc = yes; then
48461  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48462  if test "$cross_compiling" = yes; then :
48463  :
48464else
48465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48466/* end confdefs.h.  */
48467#include <ctype.h>
48468#include <stdlib.h>
48469#if ((' ' & 0x0FF) == 0x020)
48470# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48471# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48472#else
48473# define ISLOWER(c) \
48474		   (('a' <= (c) && (c) <= 'i') \
48475		     || ('j' <= (c) && (c) <= 'r') \
48476		     || ('s' <= (c) && (c) <= 'z'))
48477# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48478#endif
48479
48480#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48481int
48482main ()
48483{
48484  int i;
48485  for (i = 0; i < 256; i++)
48486    if (XOR (islower (i), ISLOWER (i))
48487	|| toupper (i) != TOUPPER (i))
48488      return 2;
48489  return 0;
48490}
48491_ACEOF
48492if ac_fn_cxx_try_run "$LINENO"; then :
48493
48494else
48495  ac_cv_header_stdc=no
48496fi
48497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48498  conftest.$ac_objext conftest.beam conftest.$ac_ext
48499fi
48500
48501fi
48502fi
48503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48504$as_echo "$ac_cv_header_stdc" >&6; }
48505if test $ac_cv_header_stdc = yes; then
48506
48507$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48508
48509fi
48510
48511# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48512for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48513		  inttypes.h stdint.h unistd.h
48514do :
48515  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48516ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48517"
48518if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48519  cat >>confdefs.h <<_ACEOF
48520#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48521_ACEOF
48522
48523fi
48524
48525done
48526
48527
48528
48529  ###############################################################################
48530  #
48531  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48532  # (The JVM can use 32 or 64 bit Java pointers but that decision
48533  # is made at runtime.)
48534  #
48535
48536  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48537    # Always specify -m flag on Solaris
48538    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48539
48540  # When we add flags to the "official" CFLAGS etc, we need to
48541  # keep track of these additions in ADDED_CFLAGS etc. These
48542  # will later be checked to make sure only controlled additions
48543  # have been made to CFLAGS etc.
48544  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48545  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48546  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48547
48548  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48549  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48550  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48551
48552  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48553  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48554  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48555
48556  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48557  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48558  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48559
48560  elif test "x$COMPILE_TYPE" = xreduced; then
48561    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48562      # Specify -m if running reduced on unix platforms
48563
48564  # When we add flags to the "official" CFLAGS etc, we need to
48565  # keep track of these additions in ADDED_CFLAGS etc. These
48566  # will later be checked to make sure only controlled additions
48567  # have been made to CFLAGS etc.
48568  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571
48572  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48573  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48574  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48575
48576  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48577  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48578  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48579
48580  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48581  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48582  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48583
48584    fi
48585  fi
48586  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48587    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48590  fi
48591
48592  # Make compilation sanity check
48593  for ac_header in stdio.h
48594do :
48595  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48596if test "x$ac_cv_header_stdio_h" = xyes; then :
48597  cat >>confdefs.h <<_ACEOF
48598#define HAVE_STDIO_H 1
48599_ACEOF
48600
48601else
48602
48603    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48604$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48605    if test "x$COMPILE_TYPE" = xreduced; then
48606
48607  # Print a helpful message on how to acquire the necessary build dependency.
48608  # reduced is the help tag: freetype, cups, alsa etc
48609  MISSING_DEPENDENCY=reduced
48610
48611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48612    cygwin_help $MISSING_DEPENDENCY
48613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48614    msys_help $MISSING_DEPENDENCY
48615  else
48616    PKGHANDLER_COMMAND=
48617
48618    case $PKGHANDLER in
48619      apt-get)
48620        apt_help     $MISSING_DEPENDENCY ;;
48621      yum)
48622        yum_help     $MISSING_DEPENDENCY ;;
48623      brew)
48624        brew_help    $MISSING_DEPENDENCY ;;
48625      port)
48626        port_help    $MISSING_DEPENDENCY ;;
48627      pkgutil)
48628        pkgutil_help $MISSING_DEPENDENCY ;;
48629      pkgadd)
48630        pkgadd_help  $MISSING_DEPENDENCY ;;
48631    esac
48632
48633    if test "x$PKGHANDLER_COMMAND" != x; then
48634      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48635    fi
48636  fi
48637
48638      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48639$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48640    elif test "x$COMPILE_TYPE" = xcross; then
48641      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48642$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48643    fi
48644    as_fn_error $? "Cannot continue." "$LINENO" 5
48645
48646fi
48647
48648done
48649
48650
48651  # The cast to long int works around a bug in the HP C Compiler
48652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48654# This bug is HP SR number 8606223364.
48655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48656$as_echo_n "checking size of int *... " >&6; }
48657if ${ac_cv_sizeof_int_p+:} false; then :
48658  $as_echo_n "(cached) " >&6
48659else
48660  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48661
48662else
48663  if test "$ac_cv_type_int_p" = yes; then
48664     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48666as_fn_error 77 "cannot compute sizeof (int *)
48667See \`config.log' for more details" "$LINENO" 5; }
48668   else
48669     ac_cv_sizeof_int_p=0
48670   fi
48671fi
48672
48673fi
48674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48675$as_echo "$ac_cv_sizeof_int_p" >&6; }
48676
48677
48678
48679cat >>confdefs.h <<_ACEOF
48680#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48681_ACEOF
48682
48683
48684
48685  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48686  if test "x$ac_cv_sizeof_int_p" = x; then
48687    # The test failed, lets stick to the assumed value.
48688    { $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
48689$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48690  else
48691    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48692
48693    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48694      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48695      # Let's try to implicitely set the compilers target architecture and retry the test
48696      { $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
48697$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;}
48698      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48699$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48700
48701  # When we add flags to the "official" CFLAGS etc, we need to
48702  # keep track of these additions in ADDED_CFLAGS etc. These
48703  # will later be checked to make sure only controlled additions
48704  # have been made to CFLAGS etc.
48705  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48706  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48707  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48708
48709  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48710  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48711  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48712
48713  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48714  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48715  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48716
48717  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48718  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48719  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48720
48721
48722      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48723      unset ac_cv_sizeof_int_p
48724      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48725      cat >>confdefs.h <<_ACEOF
48726#undef SIZEOF_INT_P
48727_ACEOF
48728
48729      # The cast to long int works around a bug in the HP C Compiler
48730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48732# This bug is HP SR number 8606223364.
48733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48734$as_echo_n "checking size of int *... " >&6; }
48735if ${ac_cv_sizeof_int_p+:} false; then :
48736  $as_echo_n "(cached) " >&6
48737else
48738  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48739
48740else
48741  if test "$ac_cv_type_int_p" = yes; then
48742     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48744as_fn_error 77 "cannot compute sizeof (int *)
48745See \`config.log' for more details" "$LINENO" 5; }
48746   else
48747     ac_cv_sizeof_int_p=0
48748   fi
48749fi
48750
48751fi
48752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48753$as_echo "$ac_cv_sizeof_int_p" >&6; }
48754
48755
48756
48757cat >>confdefs.h <<_ACEOF
48758#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48759_ACEOF
48760
48761
48762
48763      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48764
48765      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48766        { $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
48767$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;}
48768        if test "x$COMPILE_TYPE" = xreduced; then
48769
48770  # Print a helpful message on how to acquire the necessary build dependency.
48771  # reduced is the help tag: freetype, cups, alsa etc
48772  MISSING_DEPENDENCY=reduced
48773
48774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48775    cygwin_help $MISSING_DEPENDENCY
48776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48777    msys_help $MISSING_DEPENDENCY
48778  else
48779    PKGHANDLER_COMMAND=
48780
48781    case $PKGHANDLER in
48782      apt-get)
48783        apt_help     $MISSING_DEPENDENCY ;;
48784      yum)
48785        yum_help     $MISSING_DEPENDENCY ;;
48786      brew)
48787        brew_help    $MISSING_DEPENDENCY ;;
48788      port)
48789        port_help    $MISSING_DEPENDENCY ;;
48790      pkgutil)
48791        pkgutil_help $MISSING_DEPENDENCY ;;
48792      pkgadd)
48793        pkgadd_help  $MISSING_DEPENDENCY ;;
48794    esac
48795
48796    if test "x$PKGHANDLER_COMMAND" != x; then
48797      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48798    fi
48799  fi
48800
48801          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48802$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48803        elif test "x$COMPILE_TYPE" = xcross; then
48804          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48805$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48806        fi
48807        as_fn_error $? "Cannot continue." "$LINENO" 5
48808      fi
48809    fi
48810  fi
48811
48812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48813$as_echo_n "checking for target address size... " >&6; }
48814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48815$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48816
48817
48818  ###############################################################################
48819  #
48820  # Is the target little of big endian?
48821  #
48822   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48823$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48824if ${ac_cv_c_bigendian+:} false; then :
48825  $as_echo_n "(cached) " >&6
48826else
48827  ac_cv_c_bigendian=unknown
48828    # See if we're dealing with a universal compiler.
48829    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48830/* end confdefs.h.  */
48831#ifndef __APPLE_CC__
48832	       not a universal capable compiler
48833	     #endif
48834	     typedef int dummy;
48835
48836_ACEOF
48837if ac_fn_cxx_try_compile "$LINENO"; then :
48838
48839	# Check for potential -arch flags.  It is not universal unless
48840	# there are at least two -arch flags with different values.
48841	ac_arch=
48842	ac_prev=
48843	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48844	 if test -n "$ac_prev"; then
48845	   case $ac_word in
48846	     i?86 | x86_64 | ppc | ppc64)
48847	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48848		 ac_arch=$ac_word
48849	       else
48850		 ac_cv_c_bigendian=universal
48851		 break
48852	       fi
48853	       ;;
48854	   esac
48855	   ac_prev=
48856	 elif test "x$ac_word" = "x-arch"; then
48857	   ac_prev=arch
48858	 fi
48859       done
48860fi
48861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48862    if test $ac_cv_c_bigendian = unknown; then
48863      # See if sys/param.h defines the BYTE_ORDER macro.
48864      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48865/* end confdefs.h.  */
48866#include <sys/types.h>
48867	     #include <sys/param.h>
48868
48869int
48870main ()
48871{
48872#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48873		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48874		     && LITTLE_ENDIAN)
48875	      bogus endian macros
48876	     #endif
48877
48878  ;
48879  return 0;
48880}
48881_ACEOF
48882if ac_fn_cxx_try_compile "$LINENO"; then :
48883  # It does; now see whether it defined to BIG_ENDIAN or not.
48884	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48885/* end confdefs.h.  */
48886#include <sys/types.h>
48887		#include <sys/param.h>
48888
48889int
48890main ()
48891{
48892#if BYTE_ORDER != BIG_ENDIAN
48893		 not big endian
48894		#endif
48895
48896  ;
48897  return 0;
48898}
48899_ACEOF
48900if ac_fn_cxx_try_compile "$LINENO"; then :
48901  ac_cv_c_bigendian=yes
48902else
48903  ac_cv_c_bigendian=no
48904fi
48905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48906fi
48907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48908    fi
48909    if test $ac_cv_c_bigendian = unknown; then
48910      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48911      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48912/* end confdefs.h.  */
48913#include <limits.h>
48914
48915int
48916main ()
48917{
48918#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48919	      bogus endian macros
48920	     #endif
48921
48922  ;
48923  return 0;
48924}
48925_ACEOF
48926if ac_fn_cxx_try_compile "$LINENO"; then :
48927  # It does; now see whether it defined to _BIG_ENDIAN or not.
48928	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48929/* end confdefs.h.  */
48930#include <limits.h>
48931
48932int
48933main ()
48934{
48935#ifndef _BIG_ENDIAN
48936		 not big endian
48937		#endif
48938
48939  ;
48940  return 0;
48941}
48942_ACEOF
48943if ac_fn_cxx_try_compile "$LINENO"; then :
48944  ac_cv_c_bigendian=yes
48945else
48946  ac_cv_c_bigendian=no
48947fi
48948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48949fi
48950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48951    fi
48952    if test $ac_cv_c_bigendian = unknown; then
48953      # Compile a test program.
48954      if test "$cross_compiling" = yes; then :
48955  # Try to guess by grepping values from an object file.
48956	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48957/* end confdefs.h.  */
48958short int ascii_mm[] =
48959		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48960		short int ascii_ii[] =
48961		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48962		int use_ascii (int i) {
48963		  return ascii_mm[i] + ascii_ii[i];
48964		}
48965		short int ebcdic_ii[] =
48966		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48967		short int ebcdic_mm[] =
48968		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48969		int use_ebcdic (int i) {
48970		  return ebcdic_mm[i] + ebcdic_ii[i];
48971		}
48972		extern int foo;
48973
48974int
48975main ()
48976{
48977return use_ascii (foo) == use_ebcdic (foo);
48978  ;
48979  return 0;
48980}
48981_ACEOF
48982if ac_fn_cxx_try_compile "$LINENO"; then :
48983  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48984	      ac_cv_c_bigendian=yes
48985	    fi
48986	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48987	      if test "$ac_cv_c_bigendian" = unknown; then
48988		ac_cv_c_bigendian=no
48989	      else
48990		# finding both strings is unlikely to happen, but who knows?
48991		ac_cv_c_bigendian=unknown
48992	      fi
48993	    fi
48994fi
48995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48996else
48997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48998/* end confdefs.h.  */
48999$ac_includes_default
49000int
49001main ()
49002{
49003
49004	     /* Are we little or big endian?  From Harbison&Steele.  */
49005	     union
49006	     {
49007	       long int l;
49008	       char c[sizeof (long int)];
49009	     } u;
49010	     u.l = 1;
49011	     return u.c[sizeof (long int) - 1] == 1;
49012
49013  ;
49014  return 0;
49015}
49016_ACEOF
49017if ac_fn_cxx_try_run "$LINENO"; then :
49018  ac_cv_c_bigendian=no
49019else
49020  ac_cv_c_bigendian=yes
49021fi
49022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49023  conftest.$ac_objext conftest.beam conftest.$ac_ext
49024fi
49025
49026    fi
49027fi
49028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49029$as_echo "$ac_cv_c_bigendian" >&6; }
49030 case $ac_cv_c_bigendian in #(
49031   yes)
49032     ENDIAN="big";; #(
49033   no)
49034     ENDIAN="little" ;; #(
49035   universal)
49036     ENDIAN="universal_endianness"
49037     ;; #(
49038   *)
49039     ENDIAN="unknown" ;;
49040 esac
49041
49042
49043  if test "x$ENDIAN" = xuniversal_endianness; then
49044    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49045  fi
49046  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49047    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
49048  fi
49049
49050
49051# Configure flags for the tools
49052
49053  ###############################################################################
49054  #
49055  # How to compile shared libraries.
49056  #
49057
49058  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49059    PICFLAG="-fPIC"
49060    C_FLAG_REORDER=''
49061    CXX_FLAG_REORDER=''
49062
49063    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49064      # Linking is different on MacOSX
49065      if test "x$STATIC_BUILD" = xtrue; then
49066        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49067      else
49068        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49069        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49070      fi
49071      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49072      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49073      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49074      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49075    else
49076      # Default works for linux, might work on other platforms as well.
49077      SHARED_LIBRARY_FLAGS='-shared'
49078      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49079      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49080      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49081      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49082    fi
49083  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49084    C_FLAG_REORDER=''
49085    CXX_FLAG_REORDER=''
49086
49087    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49088      # Linking is different on MacOSX
49089      PICFLAG=''
49090      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49091      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49092      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49093      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49094      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49095
49096      if test "x$STATIC_BUILD" = xfalse; then
49097        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49098      fi
49099    else
49100      # Default works for linux, might work on other platforms as well.
49101      PICFLAG='-fPIC'
49102      SHARED_LIBRARY_FLAGS='-shared'
49103      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49104      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49105      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49106
49107      # arm specific settings
49108      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49109        # '-Wl,-z,origin' isn't used on arm.
49110        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49111      else
49112        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49113      fi
49114
49115    fi
49116  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49117    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49118      PICFLAG="-xcode=pic32"
49119    else
49120      PICFLAG="-KPIC"
49121    fi
49122    C_FLAG_REORDER='-xF'
49123    CXX_FLAG_REORDER='-xF'
49124    SHARED_LIBRARY_FLAGS="-G"
49125    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49126    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49127    SET_SHARED_LIBRARY_NAME='-h $1'
49128    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49129  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49130    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49131    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49132    # will have to patch this single instruction with a call to some out-of-order code which
49133    # does the load from the TOC. This is of course slow. But in that case we also would have
49134    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49135    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49136    # can be patched directly by the linker and does not require a jump to out-of-order code.
49137    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49138    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49139    # loads for accessing a global variable). But there are rumors that this may be seen as a
49140    # 'performance feature' because of improved code locality of the symbols used in a
49141    # compilation unit.
49142    PICFLAG="-qpic"
49143    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49144    C_FLAG_REORDER=''
49145    CXX_FLAG_REORDER=''
49146    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49147    SET_EXECUTABLE_ORIGIN=""
49148    SET_SHARED_LIBRARY_ORIGIN=''
49149    SET_SHARED_LIBRARY_NAME=''
49150    SET_SHARED_LIBRARY_MAPFILE=''
49151  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49152    PICFLAG=""
49153    C_FLAG_REORDER=''
49154    CXX_FLAG_REORDER=''
49155    SHARED_LIBRARY_FLAGS="-dll"
49156    SET_EXECUTABLE_ORIGIN=''
49157    SET_SHARED_LIBRARY_ORIGIN=''
49158    SET_SHARED_LIBRARY_NAME=''
49159    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49160  fi
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170  # The (cross) compiler is now configured, we can now test capabilities
49171  # of the target platform.
49172
49173
49174
49175  ###############################################################################
49176  #
49177  # Setup the opt flags for different compilers
49178  # and different operating systems.
49179  #
49180
49181  # FIXME: this was indirectly the old default, but just inherited.
49182  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49183  #   C_FLAG_DEPS="-MMD -MF"
49184  # fi
49185
49186  # Generate make dependency files
49187  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49188    C_FLAG_DEPS="-MMD -MF"
49189  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49190    C_FLAG_DEPS="-MMD -MF"
49191  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49192    C_FLAG_DEPS="-xMMD -xMF"
49193  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49194    C_FLAG_DEPS="-qmakedep=gcc -MF"
49195  fi
49196  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49197
49198
49199
49200  # Debug symbols
49201  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49202    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49203      # reduce from default "-g2" option to save space
49204      CFLAGS_DEBUG_SYMBOLS="-g1"
49205      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49206    else
49207      CFLAGS_DEBUG_SYMBOLS="-g"
49208      CXXFLAGS_DEBUG_SYMBOLS="-g"
49209    fi
49210  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49211    CFLAGS_DEBUG_SYMBOLS="-g"
49212    CXXFLAGS_DEBUG_SYMBOLS="-g"
49213  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49214    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49215    # -g0 enables debug symbols without disabling inlining.
49216    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49217  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49218    CFLAGS_DEBUG_SYMBOLS="-g"
49219    CXXFLAGS_DEBUG_SYMBOLS="-g"
49220  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49221    CFLAGS_DEBUG_SYMBOLS="-Zi"
49222    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49223  fi
49224
49225
49226
49227  # Debug symbols for JVM_CFLAGS
49228  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49229    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49230    if test "x$DEBUG_LEVEL" = xslowdebug; then
49231      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49232    else
49233      # -g0 does not disable inlining, which -g does.
49234      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49235    fi
49236  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49237    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49238  else
49239    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49240  fi
49241
49242
49243  # bounds, memory and behavior checking options
49244  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49245    case $DEBUG_LEVEL in
49246    release )
49247      # no adjustment
49248      ;;
49249    fastdebug )
49250      # no adjustment
49251      ;;
49252    slowdebug )
49253      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49254      # get's added conditionally on whether we produce debug symbols or not.
49255      # This is most likely not really correct.
49256
49257      # Add runtime stack smashing and undefined behavior checks.
49258      # Not all versions of gcc support -fstack-protector
49259      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302    # Execute function body
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351    # Execute function body
49352
49353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49354$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49355  supports=yes
49356
49357  saved_cflags="$CFLAGS"
49358  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49359  ac_ext=c
49360ac_cpp='$CPP $CPPFLAGS'
49361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49363ac_compiler_gnu=$ac_cv_c_compiler_gnu
49364
49365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49366/* end confdefs.h.  */
49367int i;
49368_ACEOF
49369if ac_fn_c_try_compile "$LINENO"; then :
49370
49371else
49372  supports=no
49373fi
49374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49375  ac_ext=cpp
49376ac_cpp='$CXXCPP $CPPFLAGS'
49377ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49378ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49379ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49380
49381  CFLAGS="$saved_cflags"
49382
49383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49384$as_echo "$supports" >&6; }
49385  if test "x$supports" = "xyes" ; then
49386    :
49387    C_COMP_SUPPORTS="yes"
49388  else
49389    :
49390    C_COMP_SUPPORTS="no"
49391  fi
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451    # Execute function body
49452
49453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49454$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49455  supports=yes
49456
49457  saved_cxxflags="$CXXFLAGS"
49458  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49459  ac_ext=cpp
49460ac_cpp='$CXXCPP $CPPFLAGS'
49461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49464
49465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49466/* end confdefs.h.  */
49467int i;
49468_ACEOF
49469if ac_fn_cxx_try_compile "$LINENO"; then :
49470
49471else
49472  supports=no
49473fi
49474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49475  ac_ext=cpp
49476ac_cpp='$CXXCPP $CPPFLAGS'
49477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49480
49481  CXXFLAGS="$saved_cxxflags"
49482
49483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49484$as_echo "$supports" >&6; }
49485  if test "x$supports" = "xyes" ; then
49486    :
49487    CXX_COMP_SUPPORTS="yes"
49488  else
49489    :
49490    CXX_COMP_SUPPORTS="no"
49491  fi
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49506$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49507  supports=no
49508  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49509
49510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49511$as_echo "$supports" >&6; }
49512  if test "x$supports" = "xyes" ; then
49513    :
49514
49515  else
49516    :
49517    STACK_PROTECTOR_CFLAG=""
49518  fi
49519
49520
49521
49522
49523
49524
49525
49526      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49527      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49528      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49529        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49530      fi
49531      ;;
49532    esac
49533  fi
49534
49535  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49536    if test "x$DEBUG_LEVEL" != xrelease; then
49537      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49538        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49539      fi
49540    fi
49541  fi
49542
49543  # Optimization levels
49544  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49545    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49546
49547    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49548      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49549      C_O_FLAG_HIGHEST_JVM="-xO4"
49550      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49551      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49552      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49553      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49554      C_O_FLAG_DEBUG_JVM=""
49555      C_O_FLAG_NONE="-xregs=no%frameptr"
49556      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49557      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49558      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49559      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49560      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49561      CXX_O_FLAG_DEBUG_JVM=""
49562      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49563      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49564        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49565        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49566      fi
49567    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49568      C_O_FLAG_HIGHEST_JVM="-xO4"
49569      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49570      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49571      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49572      C_O_FLAG_DEBUG=""
49573      C_O_FLAG_DEBUG_JVM=""
49574      C_O_FLAG_NONE=""
49575      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49576      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49577      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49578      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49579      CXX_O_FLAG_DEBUG=""
49580      CXX_O_FLAG_DEBUG_JVM=""
49581      CXX_O_FLAG_NONE=""
49582    fi
49583  else
49584    # The remaining toolchains share opt flags between CC and CXX;
49585    # setup for C and duplicate afterwards.
49586    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49587      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49588        # On MacOSX we optimize for size, something
49589        # we should do for all platforms?
49590        C_O_FLAG_HIGHEST_JVM="-Os"
49591        C_O_FLAG_HIGHEST="-Os"
49592        C_O_FLAG_HI="-Os"
49593        C_O_FLAG_NORM="-Os"
49594        C_O_FLAG_SIZE="-Os"
49595      else
49596        C_O_FLAG_HIGHEST_JVM="-O3"
49597        C_O_FLAG_HIGHEST="-O3"
49598        C_O_FLAG_HI="-O3"
49599        C_O_FLAG_NORM="-O2"
49600        C_O_FLAG_SIZE="-Os"
49601      fi
49602      C_O_FLAG_DEBUG="-O0"
49603      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49604        C_O_FLAG_DEBUG_JVM=""
49605      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49606        C_O_FLAG_DEBUG_JVM="-O0"
49607      fi
49608      C_O_FLAG_NONE="-O0"
49609    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49610      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49611        # On MacOSX we optimize for size, something
49612        # we should do for all platforms?
49613        C_O_FLAG_HIGHEST_JVM="-Os"
49614        C_O_FLAG_HIGHEST="-Os"
49615        C_O_FLAG_HI="-Os"
49616        C_O_FLAG_NORM="-Os"
49617        C_O_FLAG_SIZE="-Os"
49618      else
49619        C_O_FLAG_HIGHEST_JVM="-O3"
49620        C_O_FLAG_HIGHEST="-O3"
49621        C_O_FLAG_HI="-O3"
49622        C_O_FLAG_NORM="-O2"
49623        C_O_FLAG_SIZE="-Os"
49624      fi
49625      C_O_FLAG_DEBUG="-O0"
49626      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49627        C_O_FLAG_DEBUG_JVM=""
49628      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49629        C_O_FLAG_DEBUG_JVM="-O0"
49630      fi
49631      C_O_FLAG_NONE="-O0"
49632    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49633      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49634      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49635      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49636      C_O_FLAG_NORM="-O2"
49637      C_O_FLAG_DEBUG="-qnoopt"
49638      # FIXME: Value below not verified.
49639      C_O_FLAG_DEBUG_JVM=""
49640      C_O_FLAG_NONE="-qnoopt"
49641    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49642      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49643      C_O_FLAG_HIGHEST="-O2"
49644      C_O_FLAG_HI="-O1"
49645      C_O_FLAG_NORM="-O1"
49646      C_O_FLAG_DEBUG="-Od"
49647      C_O_FLAG_DEBUG_JVM=""
49648      C_O_FLAG_NONE="-Od"
49649      C_O_FLAG_SIZE="-Os"
49650    fi
49651    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49652    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49653    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49654    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49655    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49656    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49657    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49658    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49659  fi
49660
49661  # Adjust optimization flags according to debug level.
49662  case $DEBUG_LEVEL in
49663    release )
49664      # no adjustment
49665      ;;
49666    fastdebug )
49667      # Not quite so much optimization
49668      C_O_FLAG_HI="$C_O_FLAG_NORM"
49669      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49670      ;;
49671    slowdebug )
49672      # Disable optimization
49673      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49674      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49675      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49676      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49677      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49678      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49679      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49680      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49681      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49682      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49683      ;;
49684  esac
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705# Check whether --with-abi-profile was given.
49706if test "${with_abi_profile+set}" = set; then :
49707  withval=$with_abi_profile;
49708fi
49709
49710
49711  if test "x$with_abi_profile" != x; then
49712    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49713        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49714      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49715    fi
49716
49717    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49719$as_echo_n "checking for ABI profle... " >&6; }
49720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49721$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49722
49723    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49724      ARM_FLOAT_TYPE=vfp-sflt
49725      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49726    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49727      ARM_FLOAT_TYPE=vfp-hflt
49728      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49729    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49730      ARM_FLOAT_TYPE=sflt
49731      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49732    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49733      ARM_FLOAT_TYPE=vfp-sflt
49734      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49735    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49736      ARM_FLOAT_TYPE=vfp-hflt
49737      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49738    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49739      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49740      ARM_FLOAT_TYPE=
49741      ARM_ARCH_TYPE_FLAGS=
49742    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49743      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49744      ARM_FLOAT_TYPE=
49745      ARM_ARCH_TYPE_FLAGS=
49746    else
49747      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49748    fi
49749
49750    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49751      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49752    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49753      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49754    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49755      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49756    fi
49757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49758$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49760$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49761
49762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49763$as_echo_n "checking for arch type flags... " >&6; }
49764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49765$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49766
49767    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49768    # autoconf target triplet.
49769     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49770    # Sanity check that it is a known ABI.
49771    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49772        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49773        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49774          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49775$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49776    fi
49777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49778$as_echo_n "checking for ABI property name... " >&6; }
49779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49780$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49781
49782
49783    # Pass these on to the open part of configure as if they were set using
49784    # --with-extra-c[xx]flags.
49785    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49786    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49787    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49788    # FIXME: This should not really be set using extra_cflags.
49789    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49790        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49791        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49792    fi
49793    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49794    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49795    # And pass the architecture flags to the linker as well
49796    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49797  fi
49798
49799  # When building with an abi profile, the name of that profile is appended on the
49800  # bundle platform, which is used in bundle names.
49801  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49802    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49803  fi
49804
49805
49806  # Special extras...
49807  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49808    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49809      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49810      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49811    fi
49812    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49813    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49814  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49815    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49816    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49817  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49818    CXXSTD_CXXFLAG="-std=gnu++98"
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861    # Execute function body
49862
49863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49864$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49865  supports=yes
49866
49867  saved_cxxflags="$CXXFLAGS"
49868  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49869  ac_ext=cpp
49870ac_cpp='$CXXCPP $CPPFLAGS'
49871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49874
49875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49876/* end confdefs.h.  */
49877int i;
49878_ACEOF
49879if ac_fn_cxx_try_compile "$LINENO"; then :
49880
49881else
49882  supports=no
49883fi
49884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49885  ac_ext=cpp
49886ac_cpp='$CXXCPP $CPPFLAGS'
49887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49890
49891  CXXFLAGS="$saved_cxxflags"
49892
49893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49894$as_echo "$supports" >&6; }
49895  if test "x$supports" = "xyes" ; then
49896    :
49897
49898  else
49899    :
49900    CXXSTD_CXXFLAG=""
49901  fi
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49915    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49916
49917  fi
49918  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49919    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49920    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49921  fi
49922
49923  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49924    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49925    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49926  fi
49927
49928  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49929  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49930  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49931
49932  ###############################################################################
49933  #
49934  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49935  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49936  #
49937
49938  # Setup compiler/platform specific flags into
49939  #    CFLAGS_JDK    - C Compiler flags
49940  #    CXXFLAGS_JDK  - C++ Compiler flags
49941  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49942  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49943    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49944    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49945    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49946    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49947      # Force compatibility with i586 on 32 bit intel platforms.
49948      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49949      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49950    fi
49951    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49952        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49953    case $OPENJDK_TARGET_CPU_ARCH in
49954      arm )
49955        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49956        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49957        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49958        ;;
49959      ppc )
49960        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49961        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49962        ;;
49963      s390 )
49964        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49965        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49966        ;;
49967      * )
49968        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49969        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49970        ;;
49971    esac
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026    # Execute function body
50027
50028  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50029  REFERENCE_VERSION=6
50030
50031  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50032    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50033  fi
50034
50035  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50036    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50037  fi
50038
50039  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50040  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50041
50042  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50043    :
50044
50045  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50046  # runs afoul of the more aggressive versions of these optimisations.
50047  # Notably, value range propagation now assumes that the this pointer of C++
50048  # member functions is non-null.
50049  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50050        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50051        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50052$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50053  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50054  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50055
50056  else
50057    :
50058
50059  fi
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50075    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50076
50077    # Restrict the debug information created by Clang to avoid
50078    # too big object files and speed the build up a little bit
50079    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50080    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50081    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50082      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50083        # Force compatibility with i586 on 32 bit intel platforms.
50084        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50085        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50086      fi
50087      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50088      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50089          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50090      case $OPENJDK_TARGET_CPU_ARCH in
50091        ppc )
50092          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50093          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50094          ;;
50095        * )
50096          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50097          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50098          ;;
50099      esac
50100    fi
50101  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50102    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50103    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50104    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50105      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50106    fi
50107
50108    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50109    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50110  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50111    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50112    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50113    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50114  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50115    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50116        -MD -Zc:wchar_t- -W3 -wd4800 \
50117        -DWIN32_LEAN_AND_MEAN \
50118        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50119        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50120        -DWIN32 -DIAL"
50121    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50122      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50123    else
50124      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50125    fi
50126    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50127    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50128    # studio.
50129    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50130      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50131      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50132      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50133    fi
50134  fi
50135
50136  ###############################################################################
50137
50138  # Adjust flags according to debug level.
50139  case $DEBUG_LEVEL in
50140    fastdebug | slowdebug )
50141      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50142      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50143      ;;
50144    release )
50145      ;;
50146    * )
50147      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50148      ;;
50149  esac
50150
50151  # Set some common defines. These works for all compilers, but assume
50152  # -D is universally accepted.
50153
50154  # Setup endianness
50155  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50156    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50157    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50158    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50159    #   Note: -Dmacro         is the same as    #define macro 1
50160    #         -Dmacro=        is the same as    #define macro
50161    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50162      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50163    else
50164      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50165    fi
50166  else
50167    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50168    # are defined in the system?
50169    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50170      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50171    else
50172      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50173    fi
50174  fi
50175
50176  # Setup target OS define. Use OS target name but in upper case.
50177  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50178  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50179
50180  # Setup target CPU
50181  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50182      $OPENJDK_TARGET_ADD_LP64 \
50183      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50184
50185  # Setup debug/release defines
50186  if test "x$DEBUG_LEVEL" = xrelease; then
50187    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50188    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50189      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50190    fi
50191  else
50192    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50193  fi
50194
50195  # Set some additional per-OS defines.
50196  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50197    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50198    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50199        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50200  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50201    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50202    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50203        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50204  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50205    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50206    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50207    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50208    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50209        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50210        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50211        -fno-omit-frame-pointer"
50212  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50213    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50214    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50215    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50216        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50217        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50218  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50219    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50220  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50221    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50222    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50223  fi
50224
50225  # Set some additional per-CPU defines.
50226  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50227    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50228  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50229    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50230  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50231    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50232      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50233      # fixes `relocation truncated to fit' error for gcc 4.1.
50234      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50235      # Use ppc64 instructions, but schedule for power5
50236      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50237    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50238      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50239    fi
50240  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50241    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50242      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50243      # Little endian machine uses ELFv2 ABI.
50244      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50245      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50246      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50247    fi
50248  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50249    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50250      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50251    fi
50252  fi
50253
50254  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50255    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50256  fi
50257
50258  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50259    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50260      # Solaris does not have _LP64=1 in the old build.
50261      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50262      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50263    fi
50264  fi
50265
50266  # Set JVM_CFLAGS warning handling
50267  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50268    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50269        -Wunused-value -Woverloaded-virtual"
50270
50271    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326    # Execute function body
50327
50328  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50329  REFERENCE_VERSION=4.8
50330
50331  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50332    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50333  fi
50334
50335  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50336    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50337  fi
50338
50339  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50340  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50341
50342  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50343    :
50344
50345            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50346            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50347
50348
50349  else
50350    :
50351
50352  fi
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367    fi
50368    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50369      # Non-zero builds have stricter warnings
50370      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50371    else
50372      if test "x$TOOLCHAIN_TYPE" = xclang; then
50373        # Some versions of llvm do not like -Wundef
50374        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50375      fi
50376    fi
50377  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50378    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50379        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50380  fi
50381
50382  # Additional macosx handling
50383  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50384    # Setting these parameters makes it an error to link to macosx APIs that are
50385    # newer than the given OS version and makes the linked binaries compatible
50386    # even if built on a newer version of the OS.
50387    # The expected format is X.Y.Z
50388    MACOSX_VERSION_MIN=10.7.0
50389
50390
50391    # The macro takes the version with no dots, ex: 1070
50392    # Let the flags variables get resolved in make for easier override on make
50393    # command line.
50394    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50395    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50396  fi
50397
50398  # Setup some hard coded includes
50399  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50400      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50401      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50402      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50403      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50404      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50405      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50406
50407  # The shared libraries are compiled using the picflag.
50408  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50409      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50410  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50411      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50412
50413  # Executable flags
50414  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50415  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50416
50417
50418
50419
50420
50421
50422  # Setup LDFLAGS et al.
50423  #
50424
50425  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50426    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50427    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50428    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50429    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50430      LDFLAGS_SAFESH="-safeseh"
50431      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50432      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50433      # NOTE: Old build added -machine. Probably not needed.
50434      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50435    else
50436      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50437    fi
50438  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50439      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50440      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50441        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50442        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50443    fi
50444  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50445    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50446    # We have previously set HAS_GNU_HASH if this is the case
50447    if test -n "$HAS_GNU_HASH"; then
50448      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50449      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50450      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50451    fi
50452      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50453        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50454    fi
50455    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50456      # And since we now know that the linker is gnu, then add -z defs, to forbid
50457      # undefined symbols in object files.
50458      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50459      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50460      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50461      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50462      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50463      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50464        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50465      fi
50466      case $DEBUG_LEVEL in
50467        release )
50468          # tell linker to optimize libraries.
50469          # Should this be supplied to the OSS linker as well?
50470          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50471          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50472          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50473          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50474            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50475          fi
50476          ;;
50477        slowdebug )
50478          # Hotspot always let the linker optimize
50479          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50480          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50481            # do relocations at load
50482            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50483            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50484            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50485          fi
50486          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50487            # mark relocations read only
50488            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50489            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50490            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50491          fi
50492          ;;
50493        fastdebug )
50494          # Hotspot always let the linker optimize
50495          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50496          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50497            # mark relocations read only
50498            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50499            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50500            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50501          fi
50502          ;;
50503        * )
50504          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50505          ;;
50506        esac
50507    fi
50508  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50509    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50510    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50511    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50512    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50513    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50514    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50515      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50516    fi
50517  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50518    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50519    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50520    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50521  fi
50522
50523  # Customize LDFLAGS for executables
50524
50525  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50526
50527  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50528    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50529      LDFLAGS_STACK_SIZE=1048576
50530    else
50531      LDFLAGS_STACK_SIZE=327680
50532    fi
50533    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50534  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50535    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50536  fi
50537
50538  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50539
50540  # Customize LDFLAGS for libs
50541  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50542
50543  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50544  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50545    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50546        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50547    JDKLIB_LIBS=""
50548  else
50549    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50550        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50551
50552    if test "xTARGET" = "xTARGET"; then
50553      # On some platforms (mac) the linker warns about non existing -L dirs.
50554      # For any of the variants server, client or minimal, the dir matches the
50555      # variant name. The "main" variant should be used for linking. For the
50556      # rest, the dir is just server.
50557      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50558          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50559        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50560            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50561      else
50562        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50563            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50564      fi
50565    elif test "xTARGET" = "xBUILD"; then
50566      # When building a buildjdk, it's always only the server variant
50567      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50568          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50569    fi
50570
50571    JDKLIB_LIBS="-ljava -ljvm"
50572    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50573      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50574    fi
50575
50576  fi
50577
50578LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50579
50580  # Set JVM_LIBS (per os)
50581  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50582    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50583  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50584    # FIXME: This hard-coded path is not really proper.
50585    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50586      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50587    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50588      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50589    fi
50590    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50591        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50592  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50593    JVM_LIBS="$JVM_LIBS -lm"
50594  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50595    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50596  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50597    JVM_LIBS="$JVM_LIBS -lm"
50598  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50599    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50600        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50601        wsock32.lib winmm.lib version.lib psapi.lib"
50602    fi
50603
50604  # Set JVM_ASFLAGS
50605  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50606    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50607      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50608    fi
50609  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50610    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50611  fi
50612
50613  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629  # Special extras...
50630  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50631    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50632      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50633      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50634    fi
50635    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50636    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50637  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50638    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50639    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50640  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50641    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684    # Execute function body
50685
50686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50687$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50688  supports=yes
50689
50690  saved_cxxflags="$CXXFLAGS"
50691  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50692  ac_ext=cpp
50693ac_cpp='$CXXCPP $CPPFLAGS'
50694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50697
50698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50699/* end confdefs.h.  */
50700int i;
50701_ACEOF
50702if ac_fn_cxx_try_compile "$LINENO"; then :
50703
50704else
50705  supports=no
50706fi
50707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50708  ac_ext=cpp
50709ac_cpp='$CXXCPP $CPPFLAGS'
50710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50713
50714  CXXFLAGS="$saved_cxxflags"
50715
50716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50717$as_echo "$supports" >&6; }
50718  if test "x$supports" = "xyes" ; then
50719    :
50720
50721  else
50722    :
50723    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50724  fi
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50738    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50739
50740  fi
50741  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50742    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50743    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50744  fi
50745
50746  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50747    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50748    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50749  fi
50750
50751  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50752  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50753  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50754
50755  ###############################################################################
50756  #
50757  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50758  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50759  #
50760
50761  # Setup compiler/platform specific flags into
50762  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50763  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50764  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50765  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50766    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50767    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50768    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50769    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50770      # Force compatibility with i586 on 32 bit intel platforms.
50771      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50772      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50773    fi
50774    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50775        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50776    case $OPENJDK_BUILD_CPU_ARCH in
50777      arm )
50778        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50779        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50780        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50781        ;;
50782      ppc )
50783        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50784        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50785        ;;
50786      s390 )
50787        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50788        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50789        ;;
50790      * )
50791        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50792        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50793        ;;
50794    esac
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848
50849    # Execute function body
50850
50851  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50852  REFERENCE_VERSION=6
50853
50854  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50855    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50856  fi
50857
50858  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50859    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50860  fi
50861
50862  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50863  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50864
50865  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50866    :
50867
50868  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50869  # runs afoul of the more aggressive versions of these optimisations.
50870  # Notably, value range propagation now assumes that the this pointer of C++
50871  # member functions is non-null.
50872  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50873        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50874        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50875$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50876  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50877  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50878
50879  else
50880    :
50881
50882  fi
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50898    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50899
50900    # Restrict the debug information created by Clang to avoid
50901    # too big object files and speed the build up a little bit
50902    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50903    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50904    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50905      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50906        # Force compatibility with i586 on 32 bit intel platforms.
50907        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50908        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50909      fi
50910      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50911      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50912          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50913      case $OPENJDK_BUILD_CPU_ARCH in
50914        ppc )
50915          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50916          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50917          ;;
50918        * )
50919          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50920          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50921          ;;
50922      esac
50923    fi
50924  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50925    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50926    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50927    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50928      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50929    fi
50930
50931    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50932    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50933  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50934    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50935    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50936    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50937  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50938    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50939        -MD -Zc:wchar_t- -W3 -wd4800 \
50940        -DWIN32_LEAN_AND_MEAN \
50941        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50942        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50943        -DWIN32 -DIAL"
50944    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50945      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50946    else
50947      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50948    fi
50949    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50950    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50951    # studio.
50952    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50953      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50954      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50956    fi
50957  fi
50958
50959  ###############################################################################
50960
50961  # Adjust flags according to debug level.
50962  case $DEBUG_LEVEL in
50963    fastdebug | slowdebug )
50964      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50965      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50966      ;;
50967    release )
50968      ;;
50969    * )
50970      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50971      ;;
50972  esac
50973
50974  # Set some common defines. These works for all compilers, but assume
50975  # -D is universally accepted.
50976
50977  # Setup endianness
50978  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50979    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50980    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50981    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50982    #   Note: -Dmacro         is the same as    #define macro 1
50983    #         -Dmacro=        is the same as    #define macro
50984    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50985      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50986    else
50987      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50988    fi
50989  else
50990    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50991    # are defined in the system?
50992    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50993      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50994    else
50995      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50996    fi
50997  fi
50998
50999  # Setup target OS define. Use OS target name but in upper case.
51000  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51001  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51002
51003  # Setup target CPU
51004  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51005      $OPENJDK_BUILD_ADD_LP64 \
51006      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51007
51008  # Setup debug/release defines
51009  if test "x$DEBUG_LEVEL" = xrelease; then
51010    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51011    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51012      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51013    fi
51014  else
51015    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51016  fi
51017
51018  # Set some additional per-OS defines.
51019  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51020    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51021    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51022        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51023  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51024    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51025    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51026        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51027  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51028    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51029    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51030    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51031    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51032        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51033        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51034        -fno-omit-frame-pointer"
51035  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51036    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51037    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51038    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51039        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51040        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51041  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51042    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51043  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51044    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51045    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51046  fi
51047
51048  # Set some additional per-CPU defines.
51049  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51050    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51051  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51052    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51053  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51054    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51055      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51056      # fixes `relocation truncated to fit' error for gcc 4.1.
51057      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51058      # Use ppc64 instructions, but schedule for power5
51059      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51060    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51061      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51062    fi
51063  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51064    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51065      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51066      # Little endian machine uses ELFv2 ABI.
51067      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51068      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51069      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51070    fi
51071  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51072    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51073      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51074    fi
51075  fi
51076
51077  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51078    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51079  fi
51080
51081  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51082    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51083      # Solaris does not have _LP64=1 in the old build.
51084      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51085      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51086    fi
51087  fi
51088
51089  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51090  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51091    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51092        -Wunused-value -Woverloaded-virtual"
51093
51094    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149    # Execute function body
51150
51151  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51152  REFERENCE_VERSION=4.8
51153
51154  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51155    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51156  fi
51157
51158  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51159    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51160  fi
51161
51162  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51163  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51164
51165  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51166    :
51167
51168            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51169            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51170
51171
51172  else
51173    :
51174
51175  fi
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190    fi
51191    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51192      # Non-zero builds have stricter warnings
51193      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51194    else
51195      if test "x$TOOLCHAIN_TYPE" = xclang; then
51196        # Some versions of llvm do not like -Wundef
51197        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51198      fi
51199    fi
51200  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51201    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51202        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51203  fi
51204
51205  # Additional macosx handling
51206  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51207    # Setting these parameters makes it an error to link to macosx APIs that are
51208    # newer than the given OS version and makes the linked binaries compatible
51209    # even if built on a newer version of the OS.
51210    # The expected format is X.Y.Z
51211    MACOSX_VERSION_MIN=10.7.0
51212
51213
51214    # The macro takes the version with no dots, ex: 1070
51215    # Let the flags variables get resolved in make for easier override on make
51216    # command line.
51217    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)"
51218    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51219  fi
51220
51221  # Setup some hard coded includes
51222  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51223      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51224      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51225      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51226      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51227      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51228      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51229
51230  # The shared libraries are compiled using the picflag.
51231  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51232      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51233  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51234      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51235
51236  # Executable flags
51237  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51238  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51239
51240
51241
51242
51243
51244
51245  # Setup LDFLAGS et al.
51246  #
51247
51248  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51249    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51250    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51251    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51252    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51253      LDFLAGS_SAFESH="-safeseh"
51254      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51255      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51256      # NOTE: Old build added -machine. Probably not needed.
51257      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51258    else
51259      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51260    fi
51261  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51262      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51263      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51264        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51265        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51266    fi
51267  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51268    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51269    # We have previously set HAS_GNU_HASH if this is the case
51270    if test -n "$HAS_GNU_HASH"; then
51271      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51272      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51273      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51274    fi
51275      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51276        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51277    fi
51278    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51279      # And since we now know that the linker is gnu, then add -z defs, to forbid
51280      # undefined symbols in object files.
51281      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51282      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51283      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51284      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51285      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51286      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51287        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51288      fi
51289      case $DEBUG_LEVEL in
51290        release )
51291          # tell linker to optimize libraries.
51292          # Should this be supplied to the OSS linker as well?
51293          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51294          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51295          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51296          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51297            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51298          fi
51299          ;;
51300        slowdebug )
51301          # Hotspot always let the linker optimize
51302          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51303          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51304            # do relocations at load
51305            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51306            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51307            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51308          fi
51309          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51310            # mark relocations read only
51311            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51312            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51313            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51314          fi
51315          ;;
51316        fastdebug )
51317          # Hotspot always let the linker optimize
51318          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51319          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51320            # mark relocations read only
51321            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51322            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51323            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51324          fi
51325          ;;
51326        * )
51327          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51328          ;;
51329        esac
51330    fi
51331  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51332    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51333    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51334    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51335    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51336    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51337    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51338      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51339    fi
51340  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51341    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51342    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51343    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51344  fi
51345
51346  # Customize LDFLAGS for executables
51347
51348  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51349
51350  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51351    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51352      LDFLAGS_STACK_SIZE=1048576
51353    else
51354      LDFLAGS_STACK_SIZE=327680
51355    fi
51356    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51357  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51358    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51359  fi
51360
51361  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51362
51363  # Customize LDFLAGS for libs
51364  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51365
51366  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51367  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51368    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51369        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51370    OPENJDK_BUILD_JDKLIB_LIBS=""
51371  else
51372    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51373        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51374
51375    if test "xBUILD" = "xTARGET"; then
51376      # On some platforms (mac) the linker warns about non existing -L dirs.
51377      # For any of the variants server, client or minimal, the dir matches the
51378      # variant name. The "main" variant should be used for linking. For the
51379      # rest, the dir is just server.
51380      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51381          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51382        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51383            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51384      else
51385        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51386            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51387      fi
51388    elif test "xBUILD" = "xBUILD"; then
51389      # When building a buildjdk, it's always only the server variant
51390      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51391          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51392    fi
51393
51394    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51395    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51396      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51397    fi
51398
51399  fi
51400
51401OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51402
51403  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51404  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51405    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51406  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51407    # FIXME: This hard-coded path is not really proper.
51408    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51409      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51410    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51411      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51412    fi
51413    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51414        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51415  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51416    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51417  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51418    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51419  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51420    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51421  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51422    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51423        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51424        wsock32.lib winmm.lib version.lib psapi.lib"
51425    fi
51426
51427  # Set OPENJDK_BUILD_JVM_ASFLAGS
51428  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51429    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51430      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51431    fi
51432  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51433    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51434  fi
51435
51436  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452  # Tests are only ever compiled for TARGET
51453  # Flags for compiling test libraries
51454  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51455  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51456
51457  # Flags for compiling test executables
51458  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51459  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51460
51461
51462
51463
51464
51465
51466  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51467  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51468
51469
51470
51471
51472
51473
51474  # Some Zero and Shark settings.
51475  # ZERO_ARCHFLAG tells the compiler which mode to build for
51476  case "${OPENJDK_TARGET_CPU}" in
51477    s390)
51478      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51479      ;;
51480    *)
51481      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51482  esac
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525    # Execute function body
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574    # Execute function body
51575
51576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51577$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51578  supports=yes
51579
51580  saved_cflags="$CFLAGS"
51581  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51582  ac_ext=c
51583ac_cpp='$CPP $CPPFLAGS'
51584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51586ac_compiler_gnu=$ac_cv_c_compiler_gnu
51587
51588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51589/* end confdefs.h.  */
51590int i;
51591_ACEOF
51592if ac_fn_c_try_compile "$LINENO"; then :
51593
51594else
51595  supports=no
51596fi
51597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51598  ac_ext=cpp
51599ac_cpp='$CXXCPP $CPPFLAGS'
51600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51603
51604  CFLAGS="$saved_cflags"
51605
51606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51607$as_echo "$supports" >&6; }
51608  if test "x$supports" = "xyes" ; then
51609    :
51610    C_COMP_SUPPORTS="yes"
51611  else
51612    :
51613    C_COMP_SUPPORTS="no"
51614  fi
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674    # Execute function body
51675
51676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51677$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51678  supports=yes
51679
51680  saved_cxxflags="$CXXFLAGS"
51681  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51682  ac_ext=cpp
51683ac_cpp='$CXXCPP $CPPFLAGS'
51684ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51685ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51686ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51687
51688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51689/* end confdefs.h.  */
51690int i;
51691_ACEOF
51692if ac_fn_cxx_try_compile "$LINENO"; then :
51693
51694else
51695  supports=no
51696fi
51697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51698  ac_ext=cpp
51699ac_cpp='$CXXCPP $CPPFLAGS'
51700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51703
51704  CXXFLAGS="$saved_cxxflags"
51705
51706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51707$as_echo "$supports" >&6; }
51708  if test "x$supports" = "xyes" ; then
51709    :
51710    CXX_COMP_SUPPORTS="yes"
51711  else
51712    :
51713    CXX_COMP_SUPPORTS="no"
51714  fi
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51729$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51730  supports=no
51731  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51732
51733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51734$as_echo "$supports" >&6; }
51735  if test "x$supports" = "xyes" ; then
51736    :
51737
51738  else
51739    :
51740    ZERO_ARCHFLAG=""
51741  fi
51742
51743
51744
51745
51746
51747
51748
51749
51750  # Check that the compiler supports -mX (or -qX on AIX) flags
51751  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799    # Execute function body
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848    # Execute function body
51849
51850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51851$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51852  supports=yes
51853
51854  saved_cflags="$CFLAGS"
51855  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51856  ac_ext=c
51857ac_cpp='$CPP $CPPFLAGS'
51858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51860ac_compiler_gnu=$ac_cv_c_compiler_gnu
51861
51862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51863/* end confdefs.h.  */
51864int i;
51865_ACEOF
51866if ac_fn_c_try_compile "$LINENO"; then :
51867
51868else
51869  supports=no
51870fi
51871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51872  ac_ext=cpp
51873ac_cpp='$CXXCPP $CPPFLAGS'
51874ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51875ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51876ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51877
51878  CFLAGS="$saved_cflags"
51879
51880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51881$as_echo "$supports" >&6; }
51882  if test "x$supports" = "xyes" ; then
51883    :
51884    C_COMP_SUPPORTS="yes"
51885  else
51886    :
51887    C_COMP_SUPPORTS="no"
51888  fi
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948    # Execute function body
51949
51950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51951$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51952  supports=yes
51953
51954  saved_cxxflags="$CXXFLAGS"
51955  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51956  ac_ext=cpp
51957ac_cpp='$CXXCPP $CPPFLAGS'
51958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51961
51962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51963/* end confdefs.h.  */
51964int i;
51965_ACEOF
51966if ac_fn_cxx_try_compile "$LINENO"; then :
51967
51968else
51969  supports=no
51970fi
51971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51972  ac_ext=cpp
51973ac_cpp='$CXXCPP $CPPFLAGS'
51974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51977
51978  CXXFLAGS="$saved_cxxflags"
51979
51980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51981$as_echo "$supports" >&6; }
51982  if test "x$supports" = "xyes" ; then
51983    :
51984    CXX_COMP_SUPPORTS="yes"
51985  else
51986    :
51987    CXX_COMP_SUPPORTS="no"
51988  fi
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52003$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52004  supports=no
52005  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52006
52007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52008$as_echo "$supports" >&6; }
52009  if test "x$supports" = "xyes" ; then
52010    :
52011    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52012  else
52013    :
52014    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52015  fi
52016
52017
52018
52019
52020
52021
52022
52023
52024  # Check whether --enable-warnings-as-errors was given.
52025if test "${enable_warnings_as_errors+set}" = set; then :
52026  enableval=$enable_warnings_as_errors;
52027fi
52028
52029
52030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52031$as_echo_n "checking if native warnings are errors... " >&6; }
52032  if test "x$enable_warnings_as_errors" = "xyes"; then
52033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52034$as_echo "yes (explicitly set)" >&6; }
52035    WARNINGS_AS_ERRORS=true
52036  elif test "x$enable_warnings_as_errors" = "xno"; then
52037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52038$as_echo "no" >&6; }
52039    WARNINGS_AS_ERRORS=false
52040  elif test "x$enable_warnings_as_errors" = "x"; then
52041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52042$as_echo "yes (default)" >&6; }
52043    WARNINGS_AS_ERRORS=true
52044  else
52045    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52046  fi
52047
52048  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52049    # Set legacy hotspot variable
52050    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52051  else
52052    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52053  fi
52054
52055
52056
52057
52058  case "${TOOLCHAIN_TYPE}" in
52059    microsoft)
52060      DISABLE_WARNING_PREFIX="-wd"
52061      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52062      ;;
52063    solstudio)
52064      DISABLE_WARNING_PREFIX="-erroff="
52065      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52066      ;;
52067    gcc)
52068      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116    # Execute function body
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165    # Execute function body
52166
52167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52168$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52169  supports=yes
52170
52171  saved_cflags="$CFLAGS"
52172  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52173  ac_ext=c
52174ac_cpp='$CPP $CPPFLAGS'
52175ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52176ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52177ac_compiler_gnu=$ac_cv_c_compiler_gnu
52178
52179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52180/* end confdefs.h.  */
52181int i;
52182_ACEOF
52183if ac_fn_c_try_compile "$LINENO"; then :
52184
52185else
52186  supports=no
52187fi
52188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52189  ac_ext=cpp
52190ac_cpp='$CXXCPP $CPPFLAGS'
52191ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52192ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52193ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52194
52195  CFLAGS="$saved_cflags"
52196
52197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52198$as_echo "$supports" >&6; }
52199  if test "x$supports" = "xyes" ; then
52200    :
52201    C_COMP_SUPPORTS="yes"
52202  else
52203    :
52204    C_COMP_SUPPORTS="no"
52205  fi
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265    # Execute function body
52266
52267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52268$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52269  supports=yes
52270
52271  saved_cxxflags="$CXXFLAGS"
52272  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52273  ac_ext=cpp
52274ac_cpp='$CXXCPP $CPPFLAGS'
52275ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52276ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52277ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52278
52279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52280/* end confdefs.h.  */
52281int i;
52282_ACEOF
52283if ac_fn_cxx_try_compile "$LINENO"; then :
52284
52285else
52286  supports=no
52287fi
52288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52289  ac_ext=cpp
52290ac_cpp='$CXXCPP $CPPFLAGS'
52291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52294
52295  CXXFLAGS="$saved_cxxflags"
52296
52297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52298$as_echo "$supports" >&6; }
52299  if test "x$supports" = "xyes" ; then
52300    :
52301    CXX_COMP_SUPPORTS="yes"
52302  else
52303    :
52304    CXX_COMP_SUPPORTS="no"
52305  fi
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52320$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52321  supports=no
52322  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52323
52324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52325$as_echo "$supports" >&6; }
52326  if test "x$supports" = "xyes" ; then
52327    :
52328    GCC_CAN_DISABLE_WARNINGS=true
52329  else
52330    :
52331    GCC_CAN_DISABLE_WARNINGS=false
52332
52333  fi
52334
52335
52336
52337
52338
52339
52340      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52341        DISABLE_WARNING_PREFIX="-Wno-"
52342      else
52343        DISABLE_WARNING_PREFIX=
52344      fi
52345      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52346      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52347      # CFLAGS since any target specific flags will likely not work with the
52348      # build compiler
52349      CC_OLD="$CC"
52350      CXX_OLD="$CXX"
52351      CC="$BUILD_CC"
52352      CXX="$BUILD_CXX"
52353      CFLAGS_OLD="$CFLAGS"
52354      CFLAGS=""
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402    # Execute function body
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
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451    # Execute function body
52452
52453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52454$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52455  supports=yes
52456
52457  saved_cflags="$CFLAGS"
52458  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52459  ac_ext=c
52460ac_cpp='$CPP $CPPFLAGS'
52461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52463ac_compiler_gnu=$ac_cv_c_compiler_gnu
52464
52465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52466/* end confdefs.h.  */
52467int i;
52468_ACEOF
52469if ac_fn_c_try_compile "$LINENO"; then :
52470
52471else
52472  supports=no
52473fi
52474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52475  ac_ext=cpp
52476ac_cpp='$CXXCPP $CPPFLAGS'
52477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52480
52481  CFLAGS="$saved_cflags"
52482
52483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52484$as_echo "$supports" >&6; }
52485  if test "x$supports" = "xyes" ; then
52486    :
52487    C_COMP_SUPPORTS="yes"
52488  else
52489    :
52490    C_COMP_SUPPORTS="no"
52491  fi
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551    # Execute function body
52552
52553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52554$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52555  supports=yes
52556
52557  saved_cxxflags="$CXXFLAGS"
52558  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52559  ac_ext=cpp
52560ac_cpp='$CXXCPP $CPPFLAGS'
52561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52564
52565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52566/* end confdefs.h.  */
52567int i;
52568_ACEOF
52569if ac_fn_cxx_try_compile "$LINENO"; then :
52570
52571else
52572  supports=no
52573fi
52574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52575  ac_ext=cpp
52576ac_cpp='$CXXCPP $CPPFLAGS'
52577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52580
52581  CXXFLAGS="$saved_cxxflags"
52582
52583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52584$as_echo "$supports" >&6; }
52585  if test "x$supports" = "xyes" ; then
52586    :
52587    CXX_COMP_SUPPORTS="yes"
52588  else
52589    :
52590    CXX_COMP_SUPPORTS="no"
52591  fi
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52606$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52607  supports=no
52608  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52609
52610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52611$as_echo "$supports" >&6; }
52612  if test "x$supports" = "xyes" ; then
52613    :
52614    BUILD_CC_CAN_DISABLE_WARNINGS=true
52615  else
52616    :
52617    BUILD_CC_CAN_DISABLE_WARNINGS=false
52618
52619  fi
52620
52621
52622
52623
52624
52625
52626      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52627        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52628      else
52629        BUILD_CC_DISABLE_WARNING_PREFIX=
52630      fi
52631      CC="$CC_OLD"
52632      CXX="$CXX_OLD"
52633      CFLAGS="$CFLAGS_OLD"
52634      ;;
52635    clang)
52636      DISABLE_WARNING_PREFIX="-Wno-"
52637      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52638      ;;
52639    xlc)
52640      DISABLE_WARNING_PREFIX="-qsuppress="
52641      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52642      ;;
52643  esac
52644
52645
52646
52647
52648
52649# Setup debug symbols (need objcopy from the toolchain for that)
52650
52651  #
52652  # NATIVE_DEBUG_SYMBOLS
52653  # This must be done after the toolchain is setup, since we're looking at objcopy.
52654  #
52655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52656$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52657
52658# Check whether --with-native-debug-symbols was given.
52659if test "${with_native_debug_symbols+set}" = set; then :
52660  withval=$with_native_debug_symbols;
52661        if test "x$OPENJDK_TARGET_OS" = xaix; then
52662          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52663            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52664          fi
52665        fi
52666
52667else
52668
52669        if test "x$OPENJDK_TARGET_OS" = xaix; then
52670          # AIX doesn't support 'zipped' so use 'internal' as default
52671          with_native_debug_symbols="internal"
52672        else
52673          if test "x$STATIC_BUILD" = xtrue; then
52674            with_native_debug_symbols="none"
52675          else
52676            with_native_debug_symbols="zipped"
52677          fi
52678        fi
52679
52680fi
52681
52682  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52684$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52685
52686  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52687
52688    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52689      if test "x$OBJCOPY" = x; then
52690        # enabling of enable-debug-symbols and can't find objcopy
52691        # this is an error
52692        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52693      fi
52694    fi
52695
52696    COMPILE_WITH_DEBUG_SYMBOLS=true
52697    COPY_DEBUG_SYMBOLS=true
52698    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52699  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52700    COMPILE_WITH_DEBUG_SYMBOLS=false
52701    COPY_DEBUG_SYMBOLS=false
52702    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52703  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52704    COMPILE_WITH_DEBUG_SYMBOLS=true
52705    COPY_DEBUG_SYMBOLS=false
52706    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52707  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52708
52709    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52710      if test "x$OBJCOPY" = x; then
52711        # enabling of enable-debug-symbols and can't find objcopy
52712        # this is an error
52713        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52714      fi
52715    fi
52716
52717    COMPILE_WITH_DEBUG_SYMBOLS=true
52718    COPY_DEBUG_SYMBOLS=true
52719    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52720  else
52721    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52722  fi
52723
52724  # --enable-debug-symbols is deprecated.
52725  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52726
52727  # Check whether --enable-debug-symbols was given.
52728if test "${enable_debug_symbols+set}" = set; then :
52729  enableval=$enable_debug_symbols;
52730fi
52731
52732  if test "x$enable_debug_symbols" != x; then
52733    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52734$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52735
52736    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52737      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52738$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52739    fi
52740
52741  fi
52742
52743
52744  # --enable-zip-debug-info is deprecated.
52745  # Please use --with-native-debug-symbols=zipped .
52746
52747  # Check whether --enable-zip-debug-info was given.
52748if test "${enable_zip_debug_info+set}" = set; then :
52749  enableval=$enable_zip_debug_info;
52750fi
52751
52752  if test "x$enable_zip_debug_info" != x; then
52753    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52754$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52755
52756    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52757      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52758$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52759    fi
52760
52761  fi
52762
52763
52764
52765
52766
52767
52768
52769  # Check whether --enable-native-coverage was given.
52770if test "${enable_native_coverage+set}" = set; then :
52771  enableval=$enable_native_coverage;
52772fi
52773
52774  GCOV_ENABLED="false"
52775  if test "x$enable_native_coverage" = "xyes"; then
52776    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52778$as_echo_n "checking if native coverage is enabled... " >&6; }
52779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52780$as_echo "yes" >&6; }
52781      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52782      GCOV_LDFLAGS="-fprofile-arcs"
52783      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52784      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52785      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52786      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52787      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52788      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52789      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52790      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52791      GCOV_ENABLED="true"
52792    else
52793      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52794    fi
52795  elif test "x$enable_native_coverage" = "xno"; then
52796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52797$as_echo_n "checking if native coverage is enabled... " >&6; }
52798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52799$as_echo "no" >&6; }
52800  elif test "x$enable_native_coverage" != "x"; then
52801    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52802  fi
52803
52804
52805
52806
52807# Need toolchain to setup dtrace
52808
52809  # Test for dtrace dependencies
52810  # Check whether --enable-dtrace was given.
52811if test "${enable_dtrace+set}" = set; then :
52812  enableval=$enable_dtrace;
52813fi
52814
52815
52816  DTRACE_DEP_MISSING=false
52817
52818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52819$as_echo_n "checking for dtrace tool... " >&6; }
52820  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52822$as_echo "$DTRACE" >&6; }
52823  else
52824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52825$as_echo "not found, cannot build dtrace" >&6; }
52826    DTRACE_DEP_MISSING=true
52827  fi
52828
52829  for ac_header in sys/sdt.h
52830do :
52831  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52832if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52833  cat >>confdefs.h <<_ACEOF
52834#define HAVE_SYS_SDT_H 1
52835_ACEOF
52836 DTRACE_HEADERS_OK=yes
52837else
52838  DTRACE_HEADERS_OK=no
52839fi
52840
52841done
52842
52843  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52844    DTRACE_DEP_MISSING=true
52845  fi
52846
52847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52848$as_echo_n "checking if dtrace should be built... " >&6; }
52849  if test "x$enable_dtrace" = "xyes"; then
52850    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52852$as_echo "no, missing dependencies" >&6; }
52853
52854  # Print a helpful message on how to acquire the necessary build dependency.
52855  # dtrace is the help tag: freetype, cups, alsa etc
52856  MISSING_DEPENDENCY=dtrace
52857
52858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52859    cygwin_help $MISSING_DEPENDENCY
52860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52861    msys_help $MISSING_DEPENDENCY
52862  else
52863    PKGHANDLER_COMMAND=
52864
52865    case $PKGHANDLER in
52866      apt-get)
52867        apt_help     $MISSING_DEPENDENCY ;;
52868      yum)
52869        yum_help     $MISSING_DEPENDENCY ;;
52870      brew)
52871        brew_help    $MISSING_DEPENDENCY ;;
52872      port)
52873        port_help    $MISSING_DEPENDENCY ;;
52874      pkgutil)
52875        pkgutil_help $MISSING_DEPENDENCY ;;
52876      pkgadd)
52877        pkgadd_help  $MISSING_DEPENDENCY ;;
52878    esac
52879
52880    if test "x$PKGHANDLER_COMMAND" != x; then
52881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52882    fi
52883  fi
52884
52885      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52886    else
52887      INCLUDE_DTRACE=true
52888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52889$as_echo "yes, forced" >&6; }
52890    fi
52891  elif test "x$enable_dtrace" = "xno"; then
52892    INCLUDE_DTRACE=false
52893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52894$as_echo "no, forced" >&6; }
52895  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52896    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52897      INCLUDE_DTRACE=false
52898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52899$as_echo "no, missing dependencies" >&6; }
52900    else
52901      INCLUDE_DTRACE=true
52902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52903$as_echo "yes, dependencies present" >&6; }
52904    fi
52905  else
52906    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52907  fi
52908
52909
52910
52911  # Check whether --enable-aot was given.
52912if test "${enable_aot+set}" = set; then :
52913  enableval=$enable_aot;
52914fi
52915
52916
52917  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52918    ENABLE_AOT="true"
52919  elif test "x$enable_aot" = "xyes"; then
52920    ENABLE_AOT="true"
52921  elif test "x$enable_aot" = "xno"; then
52922    ENABLE_AOT="false"
52923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52924$as_echo_n "checking if aot should be enabled... " >&6; }
52925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52926$as_echo "no, forced" >&6; }
52927  else
52928    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52929  fi
52930
52931  if test "x$ENABLE_AOT" = "xtrue"; then
52932    # Only enable AOT on linux-X64.
52933    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52934      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52935        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52936          ENABLE_AOT="true"
52937        else
52938          ENABLE_AOT="false"
52939          if test "x$enable_aot" = "xyes"; then
52940            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52941          fi
52942        fi
52943      else
52944        ENABLE_AOT="false"
52945        if test "x$enable_aot" = "xyes"; then
52946          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52947        fi
52948      fi
52949    else
52950      ENABLE_AOT="false"
52951      if test "x$enable_aot" = "xyes"; then
52952        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52953      fi
52954    fi
52955  fi
52956
52957
52958
52959
52960  # Check whether --enable-hotspot-gtest was given.
52961if test "${enable_hotspot_gtest+set}" = set; then :
52962  enableval=$enable_hotspot_gtest;
52963fi
52964
52965
52966  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52967    GTEST_DIR_EXISTS="true"
52968  else
52969    GTEST_DIR_EXISTS="false"
52970  fi
52971
52972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52973$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52974  if test "x$enable_hotspot_gtest" = "xyes"; then
52975    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52977$as_echo "yes, forced" >&6; }
52978      BUILD_GTEST="true"
52979    else
52980      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52981    fi
52982  elif test "x$enable_hotspot_gtest" = "xno"; then
52983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52984$as_echo "no, forced" >&6; }
52985    BUILD_GTEST="false"
52986  elif test "x$enable_hotspot_gtest" = "x"; then
52987    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52988      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52989$as_echo "yes" >&6; }
52990      BUILD_GTEST="true"
52991    else
52992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52993$as_echo "no" >&6; }
52994      BUILD_GTEST="false"
52995    fi
52996  else
52997    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52998  fi
52999
53000
53001
53002
53003###############################################################################
53004#
53005# Check dependencies for external and internal libraries.
53006#
53007###############################################################################
53008
53009# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53010
53011  # When using cygwin or msys, we need a wrapper binary that renames
53012  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53013  # @files and rewrites these too! This wrapper binary is
53014  # called fixpath.
53015  FIXPATH=
53016  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53018$as_echo_n "checking if fixpath can be created... " >&6; }
53019    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53020    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53021    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53022    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53023      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53024      FIXPATH="$FIXPATH_BIN -c"
53025    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53026      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53027      # @ was chosen as separator to minimize risk of other tools messing around with it
53028      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53029          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53030      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53031      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53032    fi
53033    FIXPATH_SRC_W="$FIXPATH_SRC"
53034    FIXPATH_BIN_W="$FIXPATH_BIN"
53035
53036  unix_path="$FIXPATH_SRC_W"
53037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53038    windows_path=`$CYGPATH -m "$unix_path"`
53039    FIXPATH_SRC_W="$windows_path"
53040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53041    windows_path=`cmd //c echo $unix_path`
53042    FIXPATH_SRC_W="$windows_path"
53043  fi
53044
53045
53046  unix_path="$FIXPATH_BIN_W"
53047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53048    windows_path=`$CYGPATH -m "$unix_path"`
53049    FIXPATH_BIN_W="$windows_path"
53050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53051    windows_path=`cmd //c echo $unix_path`
53052    FIXPATH_BIN_W="$windows_path"
53053  fi
53054
53055    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53056    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53057    cd $FIXPATH_DIR
53058    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53059    cd $CURDIR
53060
53061    if test ! -x $FIXPATH_BIN; then
53062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53063$as_echo "no" >&6; }
53064      cat $FIXPATH_DIR/fixpath1.log
53065      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53066    fi
53067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53068$as_echo "yes" >&6; }
53069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53070$as_echo_n "checking if fixpath.exe works... " >&6; }
53071    cd $FIXPATH_DIR
53072    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53073        > $FIXPATH_DIR/fixpath2.log 2>&1
53074    cd $CURDIR
53075    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53077$as_echo "no" >&6; }
53078      cat $FIXPATH_DIR/fixpath2.log
53079      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53080    fi
53081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53082$as_echo "yes" >&6; }
53083
53084    FIXPATH_DETACH_FLAG="--detach"
53085  fi
53086
53087
53088
53089
53090
53091
53092  # Check if X11 is needed
53093  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53094    # No X11 support on windows or macosx
53095    NEEDS_LIB_X11=false
53096  else
53097    # All other instances need X11, even if building headless only, libawt still
53098    # needs X11 headers.
53099    NEEDS_LIB_X11=true
53100  fi
53101
53102  # Check if cups is needed
53103  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53104    # Windows have a separate print system
53105    NEEDS_LIB_CUPS=false
53106  else
53107    NEEDS_LIB_CUPS=true
53108  fi
53109
53110  # A custom hook may have set this already
53111  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53112    NEEDS_LIB_FREETYPE=true
53113  fi
53114
53115  # Check if alsa is needed
53116  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53117    NEEDS_LIB_ALSA=true
53118  else
53119    NEEDS_LIB_ALSA=false
53120  fi
53121
53122  # Check if ffi is needed
53123  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53124    NEEDS_LIB_FFI=true
53125  else
53126    NEEDS_LIB_FFI=false
53127  fi
53128
53129
53130  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53131  # dynamic build is configured on command line.
53132
53133# Check whether --with-stdc++lib was given.
53134if test "${with_stdc__lib+set}" = set; then :
53135  withval=$with_stdc__lib;
53136        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53137                && test "x$with_stdc__lib" != xdefault; then
53138          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53139        fi
53140
53141else
53142  with_stdc__lib=default
53143
53144fi
53145
53146
53147  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53148    # Test if stdc++ can be linked statically.
53149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53150$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53151    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53152    ac_ext=cpp
53153ac_cpp='$CXXCPP $CPPFLAGS'
53154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53157
53158    OLD_LIBS="$LIBS"
53159    LIBS="$STATIC_STDCXX_FLAGS"
53160    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53161/* end confdefs.h.  */
53162
53163int
53164main ()
53165{
53166return 0;
53167  ;
53168  return 0;
53169}
53170_ACEOF
53171if ac_fn_cxx_try_link "$LINENO"; then :
53172  has_static_libstdcxx=yes
53173else
53174  has_static_libstdcxx=no
53175fi
53176rm -f core conftest.err conftest.$ac_objext \
53177    conftest$ac_exeext conftest.$ac_ext
53178    LIBS="$OLD_LIBS"
53179    ac_ext=cpp
53180ac_cpp='$CXXCPP $CPPFLAGS'
53181ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53182ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53183ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53184
53185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53186$as_echo "$has_static_libstdcxx" >&6; }
53187
53188    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53189      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53190    fi
53191
53192    # If dynamic was requested, it's available since it would fail above otherwise.
53193    # If dynamic wasn't requested, go with static unless it isn't available.
53194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53195$as_echo_n "checking how to link with libstdc++... " >&6; }
53196    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53197        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53199$as_echo "dynamic" >&6; }
53200    else
53201      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53202      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53203      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53204      # just use the same setting as for the TARGET toolchain.
53205      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53207$as_echo "static" >&6; }
53208    fi
53209  fi
53210
53211  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53212  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53213    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53214  fi
53215
53216
53217
53218  # Setup Windows runtime dlls
53219  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53220
53221
53222# Check whether --with-msvcr-dll was given.
53223if test "${with_msvcr_dll+set}" = set; then :
53224  withval=$with_msvcr_dll;
53225fi
53226
53227
53228  if test "x$with_msvcr_dll" != x; then
53229    # If given explicitly by user, do not probe. If not present, fail directly.
53230
53231  DLL_NAME="$MSVCR_NAME"
53232  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53233  METHOD="--with-msvcr-dll"
53234  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53236$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53237
53238    # Need to check if the found msvcr is correct architecture
53239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53240$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53241    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53243      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53244      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53245      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53246        CORRECT_MSVCR_ARCH="PE32 executable"
53247      else
53248        CORRECT_MSVCR_ARCH="PE32+ executable"
53249      fi
53250    else
53251      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53252        CORRECT_MSVCR_ARCH=386
53253      else
53254        CORRECT_MSVCR_ARCH=x86-64
53255      fi
53256    fi
53257    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53259$as_echo "ok" >&6; }
53260      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53261
53262  # Only process if variable expands to non-empty
53263
53264  if test "x$MSVC_DLL" != x; then
53265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53266
53267  # Input might be given as Windows format, start by converting to
53268  # unix format.
53269  path="$MSVC_DLL"
53270  new_path=`$CYGPATH -u "$path"`
53271
53272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53275  # "foo.exe" is OK but "foo" is an error.
53276  #
53277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53278  # It is also a way to make sure we got the proper file name for the real test later on.
53279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53280  if test "x$test_shortpath" = x; then
53281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53282$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53283    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53284  fi
53285
53286  # Call helper function which possibly converts this using DOS-style short mode.
53287  # If so, the updated path is stored in $new_path.
53288
53289  input_path="$new_path"
53290  # Check if we need to convert this using DOS-style short mode. If the path
53291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53292  # take no chances and rewrite it.
53293  # Note: m4 eats our [], so we need to use [ and ] instead.
53294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53295  if test "x$has_forbidden_chars" != x; then
53296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53300      # Going to short mode and back again did indeed matter. Since short mode is
53301      # case insensitive, let's make it lowercase to improve readability.
53302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53303      # Now convert it back to Unix-style (cygpath)
53304      input_path=`$CYGPATH -u "$shortmode_path"`
53305      new_path="$input_path"
53306    fi
53307  fi
53308
53309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53310  if test "x$test_cygdrive_prefix" = x; then
53311    # As a simple fix, exclude /usr/bin since it's not a real path.
53312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53314      # a path prefixed by /cygdrive for fixpath to work.
53315      new_path="$CYGWIN_ROOT_PATH$input_path"
53316    fi
53317  fi
53318
53319
53320  if test "x$path" != "x$new_path"; then
53321    MSVC_DLL="$new_path"
53322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53323$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53324  fi
53325
53326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53327
53328  path="$MSVC_DLL"
53329  has_colon=`$ECHO $path | $GREP ^.:`
53330  new_path="$path"
53331  if test "x$has_colon" = x; then
53332    # Not in mixed or Windows style, start by that.
53333    new_path=`cmd //c echo $path`
53334  fi
53335
53336
53337  input_path="$new_path"
53338  # Check if we need to convert this using DOS-style short mode. If the path
53339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53340  # take no chances and rewrite it.
53341  # Note: m4 eats our [], so we need to use [ and ] instead.
53342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53343  if test "x$has_forbidden_chars" != x; then
53344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53346  fi
53347
53348
53349  windows_path="$new_path"
53350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53351    unix_path=`$CYGPATH -u "$windows_path"`
53352    new_path="$unix_path"
53353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53355    new_path="$unix_path"
53356  fi
53357
53358  if test "x$path" != "x$new_path"; then
53359    MSVC_DLL="$new_path"
53360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53361$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53362  fi
53363
53364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53366
53367    else
53368      # We're on a unix platform. Hooray! :)
53369      path="$MSVC_DLL"
53370      has_space=`$ECHO "$path" | $GREP " "`
53371      if test "x$has_space" != x; then
53372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53373$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53375      fi
53376
53377      # Use eval to expand a potential ~
53378      eval path="$path"
53379      if test ! -f "$path" && test ! -d "$path"; then
53380        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53381      fi
53382
53383      if test -d "$path"; then
53384        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53385      else
53386        dir="`$DIRNAME "$path"`"
53387        base="`$BASENAME "$path"`"
53388        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53389      fi
53390    fi
53391  fi
53392
53393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53394$as_echo_n "checking for $DLL_NAME... " >&6; }
53395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53396$as_echo "$MSVC_DLL" >&6; }
53397    else
53398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53399$as_echo "incorrect, ignoring" >&6; }
53400      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53401$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53402    fi
53403  fi
53404
53405    if test "x$MSVC_DLL" = x; then
53406      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53407    fi
53408    MSVCR_DLL="$MSVC_DLL"
53409  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53410
53411  DLL_NAME="$MSVCR_NAME"
53412  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53413  METHOD="devkit"
53414  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53415    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53416$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53417
53418    # Need to check if the found msvcr is correct architecture
53419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53420$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53421    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53422    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53423      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53424      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53425      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53426        CORRECT_MSVCR_ARCH="PE32 executable"
53427      else
53428        CORRECT_MSVCR_ARCH="PE32+ executable"
53429      fi
53430    else
53431      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53432        CORRECT_MSVCR_ARCH=386
53433      else
53434        CORRECT_MSVCR_ARCH=x86-64
53435      fi
53436    fi
53437    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53439$as_echo "ok" >&6; }
53440      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53441
53442  # Only process if variable expands to non-empty
53443
53444  if test "x$MSVC_DLL" != x; then
53445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53446
53447  # Input might be given as Windows format, start by converting to
53448  # unix format.
53449  path="$MSVC_DLL"
53450  new_path=`$CYGPATH -u "$path"`
53451
53452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53455  # "foo.exe" is OK but "foo" is an error.
53456  #
53457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53458  # It is also a way to make sure we got the proper file name for the real test later on.
53459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53460  if test "x$test_shortpath" = x; then
53461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53462$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53463    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53464  fi
53465
53466  # Call helper function which possibly converts this using DOS-style short mode.
53467  # If so, the updated path is stored in $new_path.
53468
53469  input_path="$new_path"
53470  # Check if we need to convert this using DOS-style short mode. If the path
53471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53472  # take no chances and rewrite it.
53473  # Note: m4 eats our [], so we need to use [ and ] instead.
53474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53475  if test "x$has_forbidden_chars" != x; then
53476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53480      # Going to short mode and back again did indeed matter. Since short mode is
53481      # case insensitive, let's make it lowercase to improve readability.
53482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53483      # Now convert it back to Unix-style (cygpath)
53484      input_path=`$CYGPATH -u "$shortmode_path"`
53485      new_path="$input_path"
53486    fi
53487  fi
53488
53489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53490  if test "x$test_cygdrive_prefix" = x; then
53491    # As a simple fix, exclude /usr/bin since it's not a real path.
53492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53494      # a path prefixed by /cygdrive for fixpath to work.
53495      new_path="$CYGWIN_ROOT_PATH$input_path"
53496    fi
53497  fi
53498
53499
53500  if test "x$path" != "x$new_path"; then
53501    MSVC_DLL="$new_path"
53502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53503$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53504  fi
53505
53506    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53507
53508  path="$MSVC_DLL"
53509  has_colon=`$ECHO $path | $GREP ^.:`
53510  new_path="$path"
53511  if test "x$has_colon" = x; then
53512    # Not in mixed or Windows style, start by that.
53513    new_path=`cmd //c echo $path`
53514  fi
53515
53516
53517  input_path="$new_path"
53518  # Check if we need to convert this using DOS-style short mode. If the path
53519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53520  # take no chances and rewrite it.
53521  # Note: m4 eats our [], so we need to use [ and ] instead.
53522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53523  if test "x$has_forbidden_chars" != x; then
53524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53526  fi
53527
53528
53529  windows_path="$new_path"
53530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53531    unix_path=`$CYGPATH -u "$windows_path"`
53532    new_path="$unix_path"
53533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53535    new_path="$unix_path"
53536  fi
53537
53538  if test "x$path" != "x$new_path"; then
53539    MSVC_DLL="$new_path"
53540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53541$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53542  fi
53543
53544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53546
53547    else
53548      # We're on a unix platform. Hooray! :)
53549      path="$MSVC_DLL"
53550      has_space=`$ECHO "$path" | $GREP " "`
53551      if test "x$has_space" != x; then
53552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53553$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53554        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53555      fi
53556
53557      # Use eval to expand a potential ~
53558      eval path="$path"
53559      if test ! -f "$path" && test ! -d "$path"; then
53560        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53561      fi
53562
53563      if test -d "$path"; then
53564        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53565      else
53566        dir="`$DIRNAME "$path"`"
53567        base="`$BASENAME "$path"`"
53568        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53569      fi
53570    fi
53571  fi
53572
53573      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53574$as_echo_n "checking for $DLL_NAME... " >&6; }
53575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53576$as_echo "$MSVC_DLL" >&6; }
53577    else
53578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53579$as_echo "incorrect, ignoring" >&6; }
53580      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53581$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53582    fi
53583  fi
53584
53585    if test "x$MSVC_DLL" = x; then
53586      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53587    fi
53588    MSVCR_DLL="$MSVC_DLL"
53589  else
53590
53591  DLL_NAME="${MSVCR_NAME}"
53592  MSVC_DLL=
53593
53594  if test "x$MSVC_DLL" = x; then
53595    # Probe: Using well-known location from Visual Studio 10.0
53596    if test "x$VCINSTALLDIR" != x; then
53597      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53598
53599  windows_path="$CYGWIN_VC_INSTALL_DIR"
53600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53601    unix_path=`$CYGPATH -u "$windows_path"`
53602    CYGWIN_VC_INSTALL_DIR="$unix_path"
53603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53605    CYGWIN_VC_INSTALL_DIR="$unix_path"
53606  fi
53607
53608      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53609        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53610      else
53611        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53612      fi
53613      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53614
53615  DLL_NAME="$DLL_NAME"
53616  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53617  METHOD="well-known location in VCINSTALLDIR"
53618  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53619    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53620$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53621
53622    # Need to check if the found msvcr is correct architecture
53623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53624$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53625    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53627      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53628      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53629      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53630        CORRECT_MSVCR_ARCH="PE32 executable"
53631      else
53632        CORRECT_MSVCR_ARCH="PE32+ executable"
53633      fi
53634    else
53635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53636        CORRECT_MSVCR_ARCH=386
53637      else
53638        CORRECT_MSVCR_ARCH=x86-64
53639      fi
53640    fi
53641    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53643$as_echo "ok" >&6; }
53644      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53645
53646  # Only process if variable expands to non-empty
53647
53648  if test "x$MSVC_DLL" != x; then
53649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53650
53651  # Input might be given as Windows format, start by converting to
53652  # unix format.
53653  path="$MSVC_DLL"
53654  new_path=`$CYGPATH -u "$path"`
53655
53656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53659  # "foo.exe" is OK but "foo" is an error.
53660  #
53661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53662  # It is also a way to make sure we got the proper file name for the real test later on.
53663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53664  if test "x$test_shortpath" = x; then
53665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53666$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53667    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53668  fi
53669
53670  # Call helper function which possibly converts this using DOS-style short mode.
53671  # If so, the updated path is stored in $new_path.
53672
53673  input_path="$new_path"
53674  # Check if we need to convert this using DOS-style short mode. If the path
53675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53676  # take no chances and rewrite it.
53677  # Note: m4 eats our [], so we need to use [ and ] instead.
53678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53679  if test "x$has_forbidden_chars" != x; then
53680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53684      # Going to short mode and back again did indeed matter. Since short mode is
53685      # case insensitive, let's make it lowercase to improve readability.
53686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53687      # Now convert it back to Unix-style (cygpath)
53688      input_path=`$CYGPATH -u "$shortmode_path"`
53689      new_path="$input_path"
53690    fi
53691  fi
53692
53693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53694  if test "x$test_cygdrive_prefix" = x; then
53695    # As a simple fix, exclude /usr/bin since it's not a real path.
53696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53698      # a path prefixed by /cygdrive for fixpath to work.
53699      new_path="$CYGWIN_ROOT_PATH$input_path"
53700    fi
53701  fi
53702
53703
53704  if test "x$path" != "x$new_path"; then
53705    MSVC_DLL="$new_path"
53706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53707$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53708  fi
53709
53710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53711
53712  path="$MSVC_DLL"
53713  has_colon=`$ECHO $path | $GREP ^.:`
53714  new_path="$path"
53715  if test "x$has_colon" = x; then
53716    # Not in mixed or Windows style, start by that.
53717    new_path=`cmd //c echo $path`
53718  fi
53719
53720
53721  input_path="$new_path"
53722  # Check if we need to convert this using DOS-style short mode. If the path
53723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53724  # take no chances and rewrite it.
53725  # Note: m4 eats our [], so we need to use [ and ] instead.
53726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53727  if test "x$has_forbidden_chars" != x; then
53728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53730  fi
53731
53732
53733  windows_path="$new_path"
53734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53735    unix_path=`$CYGPATH -u "$windows_path"`
53736    new_path="$unix_path"
53737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53739    new_path="$unix_path"
53740  fi
53741
53742  if test "x$path" != "x$new_path"; then
53743    MSVC_DLL="$new_path"
53744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53745$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53746  fi
53747
53748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53750
53751    else
53752      # We're on a unix platform. Hooray! :)
53753      path="$MSVC_DLL"
53754      has_space=`$ECHO "$path" | $GREP " "`
53755      if test "x$has_space" != x; then
53756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53757$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53759      fi
53760
53761      # Use eval to expand a potential ~
53762      eval path="$path"
53763      if test ! -f "$path" && test ! -d "$path"; then
53764        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53765      fi
53766
53767      if test -d "$path"; then
53768        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53769      else
53770        dir="`$DIRNAME "$path"`"
53771        base="`$BASENAME "$path"`"
53772        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53773      fi
53774    fi
53775  fi
53776
53777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53778$as_echo_n "checking for $DLL_NAME... " >&6; }
53779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53780$as_echo "$MSVC_DLL" >&6; }
53781    else
53782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53783$as_echo "incorrect, ignoring" >&6; }
53784      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53785$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53786    fi
53787  fi
53788
53789    fi
53790  fi
53791
53792  if test "x$MSVC_DLL" = x; then
53793    # Probe: Check in the Boot JDK directory.
53794    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53795
53796  DLL_NAME="$DLL_NAME"
53797  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53798  METHOD="well-known location in Boot JDK"
53799  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53800    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53801$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53802
53803    # Need to check if the found msvcr is correct architecture
53804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53805$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53806    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53808      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53809      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53810      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53811        CORRECT_MSVCR_ARCH="PE32 executable"
53812      else
53813        CORRECT_MSVCR_ARCH="PE32+ executable"
53814      fi
53815    else
53816      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53817        CORRECT_MSVCR_ARCH=386
53818      else
53819        CORRECT_MSVCR_ARCH=x86-64
53820      fi
53821    fi
53822    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53824$as_echo "ok" >&6; }
53825      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53826
53827  # Only process if variable expands to non-empty
53828
53829  if test "x$MSVC_DLL" != x; then
53830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53831
53832  # Input might be given as Windows format, start by converting to
53833  # unix format.
53834  path="$MSVC_DLL"
53835  new_path=`$CYGPATH -u "$path"`
53836
53837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53840  # "foo.exe" is OK but "foo" is an error.
53841  #
53842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53843  # It is also a way to make sure we got the proper file name for the real test later on.
53844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53845  if test "x$test_shortpath" = x; then
53846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53848    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53849  fi
53850
53851  # Call helper function which possibly converts this using DOS-style short mode.
53852  # If so, the updated path is stored in $new_path.
53853
53854  input_path="$new_path"
53855  # Check if we need to convert this using DOS-style short mode. If the path
53856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53857  # take no chances and rewrite it.
53858  # Note: m4 eats our [], so we need to use [ and ] instead.
53859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53860  if test "x$has_forbidden_chars" != x; then
53861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53865      # Going to short mode and back again did indeed matter. Since short mode is
53866      # case insensitive, let's make it lowercase to improve readability.
53867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53868      # Now convert it back to Unix-style (cygpath)
53869      input_path=`$CYGPATH -u "$shortmode_path"`
53870      new_path="$input_path"
53871    fi
53872  fi
53873
53874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53875  if test "x$test_cygdrive_prefix" = x; then
53876    # As a simple fix, exclude /usr/bin since it's not a real path.
53877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53879      # a path prefixed by /cygdrive for fixpath to work.
53880      new_path="$CYGWIN_ROOT_PATH$input_path"
53881    fi
53882  fi
53883
53884
53885  if test "x$path" != "x$new_path"; then
53886    MSVC_DLL="$new_path"
53887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53888$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53889  fi
53890
53891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53892
53893  path="$MSVC_DLL"
53894  has_colon=`$ECHO $path | $GREP ^.:`
53895  new_path="$path"
53896  if test "x$has_colon" = x; then
53897    # Not in mixed or Windows style, start by that.
53898    new_path=`cmd //c echo $path`
53899  fi
53900
53901
53902  input_path="$new_path"
53903  # Check if we need to convert this using DOS-style short mode. If the path
53904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53905  # take no chances and rewrite it.
53906  # Note: m4 eats our [], so we need to use [ and ] instead.
53907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53908  if test "x$has_forbidden_chars" != x; then
53909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53911  fi
53912
53913
53914  windows_path="$new_path"
53915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53916    unix_path=`$CYGPATH -u "$windows_path"`
53917    new_path="$unix_path"
53918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53920    new_path="$unix_path"
53921  fi
53922
53923  if test "x$path" != "x$new_path"; then
53924    MSVC_DLL="$new_path"
53925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53926$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53927  fi
53928
53929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53931
53932    else
53933      # We're on a unix platform. Hooray! :)
53934      path="$MSVC_DLL"
53935      has_space=`$ECHO "$path" | $GREP " "`
53936      if test "x$has_space" != x; then
53937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53938$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53940      fi
53941
53942      # Use eval to expand a potential ~
53943      eval path="$path"
53944      if test ! -f "$path" && test ! -d "$path"; then
53945        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53946      fi
53947
53948      if test -d "$path"; then
53949        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53950      else
53951        dir="`$DIRNAME "$path"`"
53952        base="`$BASENAME "$path"`"
53953        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53954      fi
53955    fi
53956  fi
53957
53958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53959$as_echo_n "checking for $DLL_NAME... " >&6; }
53960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53961$as_echo "$MSVC_DLL" >&6; }
53962    else
53963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53964$as_echo "incorrect, ignoring" >&6; }
53965      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53966$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53967    fi
53968  fi
53969
53970  fi
53971
53972  if test "x$MSVC_DLL" = x; then
53973    # Probe: Look in the Windows system32 directory
53974    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53975
53976  windows_path="$CYGWIN_SYSTEMROOT"
53977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53978    unix_path=`$CYGPATH -u "$windows_path"`
53979    CYGWIN_SYSTEMROOT="$unix_path"
53980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53982    CYGWIN_SYSTEMROOT="$unix_path"
53983  fi
53984
53985    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53986
53987  DLL_NAME="$DLL_NAME"
53988  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53989  METHOD="well-known location in SYSTEMROOT"
53990  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53991    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53992$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53993
53994    # Need to check if the found msvcr is correct architecture
53995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53996$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53997    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53999      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54000      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54001      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54002        CORRECT_MSVCR_ARCH="PE32 executable"
54003      else
54004        CORRECT_MSVCR_ARCH="PE32+ executable"
54005      fi
54006    else
54007      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54008        CORRECT_MSVCR_ARCH=386
54009      else
54010        CORRECT_MSVCR_ARCH=x86-64
54011      fi
54012    fi
54013    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54015$as_echo "ok" >&6; }
54016      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54017
54018  # Only process if variable expands to non-empty
54019
54020  if test "x$MSVC_DLL" != x; then
54021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54022
54023  # Input might be given as Windows format, start by converting to
54024  # unix format.
54025  path="$MSVC_DLL"
54026  new_path=`$CYGPATH -u "$path"`
54027
54028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54031  # "foo.exe" is OK but "foo" is an error.
54032  #
54033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54034  # It is also a way to make sure we got the proper file name for the real test later on.
54035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54036  if test "x$test_shortpath" = x; then
54037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54038$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54039    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54040  fi
54041
54042  # Call helper function which possibly converts this using DOS-style short mode.
54043  # If so, the updated path is stored in $new_path.
54044
54045  input_path="$new_path"
54046  # Check if we need to convert this using DOS-style short mode. If the path
54047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54048  # take no chances and rewrite it.
54049  # Note: m4 eats our [], so we need to use [ and ] instead.
54050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54051  if test "x$has_forbidden_chars" != x; then
54052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54056      # Going to short mode and back again did indeed matter. Since short mode is
54057      # case insensitive, let's make it lowercase to improve readability.
54058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54059      # Now convert it back to Unix-style (cygpath)
54060      input_path=`$CYGPATH -u "$shortmode_path"`
54061      new_path="$input_path"
54062    fi
54063  fi
54064
54065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54066  if test "x$test_cygdrive_prefix" = x; then
54067    # As a simple fix, exclude /usr/bin since it's not a real path.
54068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54070      # a path prefixed by /cygdrive for fixpath to work.
54071      new_path="$CYGWIN_ROOT_PATH$input_path"
54072    fi
54073  fi
54074
54075
54076  if test "x$path" != "x$new_path"; then
54077    MSVC_DLL="$new_path"
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54079$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54080  fi
54081
54082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54083
54084  path="$MSVC_DLL"
54085  has_colon=`$ECHO $path | $GREP ^.:`
54086  new_path="$path"
54087  if test "x$has_colon" = x; then
54088    # Not in mixed or Windows style, start by that.
54089    new_path=`cmd //c echo $path`
54090  fi
54091
54092
54093  input_path="$new_path"
54094  # Check if we need to convert this using DOS-style short mode. If the path
54095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54096  # take no chances and rewrite it.
54097  # Note: m4 eats our [], so we need to use [ and ] instead.
54098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54099  if test "x$has_forbidden_chars" != x; then
54100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54102  fi
54103
54104
54105  windows_path="$new_path"
54106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54107    unix_path=`$CYGPATH -u "$windows_path"`
54108    new_path="$unix_path"
54109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54111    new_path="$unix_path"
54112  fi
54113
54114  if test "x$path" != "x$new_path"; then
54115    MSVC_DLL="$new_path"
54116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54117$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54118  fi
54119
54120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54122
54123    else
54124      # We're on a unix platform. Hooray! :)
54125      path="$MSVC_DLL"
54126      has_space=`$ECHO "$path" | $GREP " "`
54127      if test "x$has_space" != x; then
54128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54129$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54131      fi
54132
54133      # Use eval to expand a potential ~
54134      eval path="$path"
54135      if test ! -f "$path" && test ! -d "$path"; then
54136        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54137      fi
54138
54139      if test -d "$path"; then
54140        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54141      else
54142        dir="`$DIRNAME "$path"`"
54143        base="`$BASENAME "$path"`"
54144        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54145      fi
54146    fi
54147  fi
54148
54149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54150$as_echo_n "checking for $DLL_NAME... " >&6; }
54151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54152$as_echo "$MSVC_DLL" >&6; }
54153    else
54154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54155$as_echo "incorrect, ignoring" >&6; }
54156      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54157$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54158    fi
54159  fi
54160
54161  fi
54162
54163  if test "x$MSVC_DLL" = x; then
54164    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54165    if test "x$VS100COMNTOOLS" != x; then
54166      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54167
54168  windows_path="$CYGWIN_VS_TOOLS_DIR"
54169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54170    unix_path=`$CYGPATH -u "$windows_path"`
54171    CYGWIN_VS_TOOLS_DIR="$unix_path"
54172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54174    CYGWIN_VS_TOOLS_DIR="$unix_path"
54175  fi
54176
54177      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54178        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54179	    | $GREP -i /x64/ | $HEAD --lines 1`
54180      else
54181        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54182	    | $GREP -i /x86/ | $HEAD --lines 1`
54183      fi
54184
54185  DLL_NAME="$DLL_NAME"
54186  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54187  METHOD="search of VS100COMNTOOLS"
54188  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54190$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54191
54192    # Need to check if the found msvcr is correct architecture
54193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54194$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54195    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54197      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54198      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54199      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54200        CORRECT_MSVCR_ARCH="PE32 executable"
54201      else
54202        CORRECT_MSVCR_ARCH="PE32+ executable"
54203      fi
54204    else
54205      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54206        CORRECT_MSVCR_ARCH=386
54207      else
54208        CORRECT_MSVCR_ARCH=x86-64
54209      fi
54210    fi
54211    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54213$as_echo "ok" >&6; }
54214      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54215
54216  # Only process if variable expands to non-empty
54217
54218  if test "x$MSVC_DLL" != x; then
54219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54220
54221  # Input might be given as Windows format, start by converting to
54222  # unix format.
54223  path="$MSVC_DLL"
54224  new_path=`$CYGPATH -u "$path"`
54225
54226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54229  # "foo.exe" is OK but "foo" is an error.
54230  #
54231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54232  # It is also a way to make sure we got the proper file name for the real test later on.
54233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54234  if test "x$test_shortpath" = x; then
54235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54236$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54237    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54238  fi
54239
54240  # Call helper function which possibly converts this using DOS-style short mode.
54241  # If so, the updated path is stored in $new_path.
54242
54243  input_path="$new_path"
54244  # Check if we need to convert this using DOS-style short mode. If the path
54245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54246  # take no chances and rewrite it.
54247  # Note: m4 eats our [], so we need to use [ and ] instead.
54248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54249  if test "x$has_forbidden_chars" != x; then
54250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54254      # Going to short mode and back again did indeed matter. Since short mode is
54255      # case insensitive, let's make it lowercase to improve readability.
54256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54257      # Now convert it back to Unix-style (cygpath)
54258      input_path=`$CYGPATH -u "$shortmode_path"`
54259      new_path="$input_path"
54260    fi
54261  fi
54262
54263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54264  if test "x$test_cygdrive_prefix" = x; then
54265    # As a simple fix, exclude /usr/bin since it's not a real path.
54266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54268      # a path prefixed by /cygdrive for fixpath to work.
54269      new_path="$CYGWIN_ROOT_PATH$input_path"
54270    fi
54271  fi
54272
54273
54274  if test "x$path" != "x$new_path"; then
54275    MSVC_DLL="$new_path"
54276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54277$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54278  fi
54279
54280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54281
54282  path="$MSVC_DLL"
54283  has_colon=`$ECHO $path | $GREP ^.:`
54284  new_path="$path"
54285  if test "x$has_colon" = x; then
54286    # Not in mixed or Windows style, start by that.
54287    new_path=`cmd //c echo $path`
54288  fi
54289
54290
54291  input_path="$new_path"
54292  # Check if we need to convert this using DOS-style short mode. If the path
54293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54294  # take no chances and rewrite it.
54295  # Note: m4 eats our [], so we need to use [ and ] instead.
54296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54297  if test "x$has_forbidden_chars" != x; then
54298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54300  fi
54301
54302
54303  windows_path="$new_path"
54304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54305    unix_path=`$CYGPATH -u "$windows_path"`
54306    new_path="$unix_path"
54307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54309    new_path="$unix_path"
54310  fi
54311
54312  if test "x$path" != "x$new_path"; then
54313    MSVC_DLL="$new_path"
54314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54315$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54316  fi
54317
54318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54320
54321    else
54322      # We're on a unix platform. Hooray! :)
54323      path="$MSVC_DLL"
54324      has_space=`$ECHO "$path" | $GREP " "`
54325      if test "x$has_space" != x; then
54326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54327$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54329      fi
54330
54331      # Use eval to expand a potential ~
54332      eval path="$path"
54333      if test ! -f "$path" && test ! -d "$path"; then
54334        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54335      fi
54336
54337      if test -d "$path"; then
54338        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54339      else
54340        dir="`$DIRNAME "$path"`"
54341        base="`$BASENAME "$path"`"
54342        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54343      fi
54344    fi
54345  fi
54346
54347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54348$as_echo_n "checking for $DLL_NAME... " >&6; }
54349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54350$as_echo "$MSVC_DLL" >&6; }
54351    else
54352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54353$as_echo "incorrect, ignoring" >&6; }
54354      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54355$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54356    fi
54357  fi
54358
54359    fi
54360  fi
54361
54362  if test "x$MSVC_DLL" = x; then
54363    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54364    # (This was the original behaviour; kept since it might turn something up)
54365    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54366      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54367        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54368	    | $GREP x64 | $HEAD --lines 1`
54369      else
54370        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54371	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54372        if test "x$POSSIBLE_MSVC_DLL" = x; then
54373          # We're grasping at straws now...
54374          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54375	      | $HEAD --lines 1`
54376        fi
54377      fi
54378
54379
54380  DLL_NAME="$DLL_NAME"
54381  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54382  METHOD="search of VCINSTALLDIR"
54383  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54384    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54385$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54386
54387    # Need to check if the found msvcr is correct architecture
54388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54389$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54390    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54392      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54393      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54394      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54395        CORRECT_MSVCR_ARCH="PE32 executable"
54396      else
54397        CORRECT_MSVCR_ARCH="PE32+ executable"
54398      fi
54399    else
54400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54401        CORRECT_MSVCR_ARCH=386
54402      else
54403        CORRECT_MSVCR_ARCH=x86-64
54404      fi
54405    fi
54406    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54408$as_echo "ok" >&6; }
54409      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54410
54411  # Only process if variable expands to non-empty
54412
54413  if test "x$MSVC_DLL" != x; then
54414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54415
54416  # Input might be given as Windows format, start by converting to
54417  # unix format.
54418  path="$MSVC_DLL"
54419  new_path=`$CYGPATH -u "$path"`
54420
54421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54424  # "foo.exe" is OK but "foo" is an error.
54425  #
54426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54427  # It is also a way to make sure we got the proper file name for the real test later on.
54428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54429  if test "x$test_shortpath" = x; then
54430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54432    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54433  fi
54434
54435  # Call helper function which possibly converts this using DOS-style short mode.
54436  # If so, the updated path is stored in $new_path.
54437
54438  input_path="$new_path"
54439  # Check if we need to convert this using DOS-style short mode. If the path
54440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54441  # take no chances and rewrite it.
54442  # Note: m4 eats our [], so we need to use [ and ] instead.
54443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54444  if test "x$has_forbidden_chars" != x; then
54445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54449      # Going to short mode and back again did indeed matter. Since short mode is
54450      # case insensitive, let's make it lowercase to improve readability.
54451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54452      # Now convert it back to Unix-style (cygpath)
54453      input_path=`$CYGPATH -u "$shortmode_path"`
54454      new_path="$input_path"
54455    fi
54456  fi
54457
54458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54459  if test "x$test_cygdrive_prefix" = x; then
54460    # As a simple fix, exclude /usr/bin since it's not a real path.
54461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54463      # a path prefixed by /cygdrive for fixpath to work.
54464      new_path="$CYGWIN_ROOT_PATH$input_path"
54465    fi
54466  fi
54467
54468
54469  if test "x$path" != "x$new_path"; then
54470    MSVC_DLL="$new_path"
54471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54472$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54473  fi
54474
54475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54476
54477  path="$MSVC_DLL"
54478  has_colon=`$ECHO $path | $GREP ^.:`
54479  new_path="$path"
54480  if test "x$has_colon" = x; then
54481    # Not in mixed or Windows style, start by that.
54482    new_path=`cmd //c echo $path`
54483  fi
54484
54485
54486  input_path="$new_path"
54487  # Check if we need to convert this using DOS-style short mode. If the path
54488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54489  # take no chances and rewrite it.
54490  # Note: m4 eats our [], so we need to use [ and ] instead.
54491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54492  if test "x$has_forbidden_chars" != x; then
54493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54495  fi
54496
54497
54498  windows_path="$new_path"
54499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54500    unix_path=`$CYGPATH -u "$windows_path"`
54501    new_path="$unix_path"
54502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54504    new_path="$unix_path"
54505  fi
54506
54507  if test "x$path" != "x$new_path"; then
54508    MSVC_DLL="$new_path"
54509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54510$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54511  fi
54512
54513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54515
54516    else
54517      # We're on a unix platform. Hooray! :)
54518      path="$MSVC_DLL"
54519      has_space=`$ECHO "$path" | $GREP " "`
54520      if test "x$has_space" != x; then
54521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54524      fi
54525
54526      # Use eval to expand a potential ~
54527      eval path="$path"
54528      if test ! -f "$path" && test ! -d "$path"; then
54529        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54530      fi
54531
54532      if test -d "$path"; then
54533        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54534      else
54535        dir="`$DIRNAME "$path"`"
54536        base="`$BASENAME "$path"`"
54537        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54538      fi
54539    fi
54540  fi
54541
54542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54543$as_echo_n "checking for $DLL_NAME... " >&6; }
54544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54545$as_echo "$MSVC_DLL" >&6; }
54546    else
54547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54548$as_echo "incorrect, ignoring" >&6; }
54549      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54550$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54551    fi
54552  fi
54553
54554    fi
54555  fi
54556
54557  if test "x$MSVC_DLL" = x; then
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54559$as_echo_n "checking for $DLL_NAME... " >&6; }
54560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54561$as_echo "no" >&6; }
54562    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54563  fi
54564
54565    MSVCR_DLL="$MSVC_DLL"
54566  fi
54567
54568
54569
54570# Check whether --with-msvcp-dll was given.
54571if test "${with_msvcp_dll+set}" = set; then :
54572  withval=$with_msvcp_dll;
54573fi
54574
54575
54576  if test "x$MSVCP_NAME" != "x"; then
54577    if test "x$with_msvcp_dll" != x; then
54578      # If given explicitly by user, do not probe. If not present, fail directly.
54579
54580  DLL_NAME="$MSVCP_NAME"
54581  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54582  METHOD="--with-msvcp-dll"
54583  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54584    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54585$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54586
54587    # Need to check if the found msvcr is correct architecture
54588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54589$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54590    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54592      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54593      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54595        CORRECT_MSVCR_ARCH="PE32 executable"
54596      else
54597        CORRECT_MSVCR_ARCH="PE32+ executable"
54598      fi
54599    else
54600      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54601        CORRECT_MSVCR_ARCH=386
54602      else
54603        CORRECT_MSVCR_ARCH=x86-64
54604      fi
54605    fi
54606    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54608$as_echo "ok" >&6; }
54609      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54610
54611  # Only process if variable expands to non-empty
54612
54613  if test "x$MSVC_DLL" != x; then
54614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54615
54616  # Input might be given as Windows format, start by converting to
54617  # unix format.
54618  path="$MSVC_DLL"
54619  new_path=`$CYGPATH -u "$path"`
54620
54621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54624  # "foo.exe" is OK but "foo" is an error.
54625  #
54626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54627  # It is also a way to make sure we got the proper file name for the real test later on.
54628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54629  if test "x$test_shortpath" = x; then
54630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54631$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54632    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54633  fi
54634
54635  # Call helper function which possibly converts this using DOS-style short mode.
54636  # If so, the updated path is stored in $new_path.
54637
54638  input_path="$new_path"
54639  # Check if we need to convert this using DOS-style short mode. If the path
54640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54641  # take no chances and rewrite it.
54642  # Note: m4 eats our [], so we need to use [ and ] instead.
54643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54644  if test "x$has_forbidden_chars" != x; then
54645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54649      # Going to short mode and back again did indeed matter. Since short mode is
54650      # case insensitive, let's make it lowercase to improve readability.
54651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54652      # Now convert it back to Unix-style (cygpath)
54653      input_path=`$CYGPATH -u "$shortmode_path"`
54654      new_path="$input_path"
54655    fi
54656  fi
54657
54658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54659  if test "x$test_cygdrive_prefix" = x; then
54660    # As a simple fix, exclude /usr/bin since it's not a real path.
54661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54663      # a path prefixed by /cygdrive for fixpath to work.
54664      new_path="$CYGWIN_ROOT_PATH$input_path"
54665    fi
54666  fi
54667
54668
54669  if test "x$path" != "x$new_path"; then
54670    MSVC_DLL="$new_path"
54671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54672$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54673  fi
54674
54675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54676
54677  path="$MSVC_DLL"
54678  has_colon=`$ECHO $path | $GREP ^.:`
54679  new_path="$path"
54680  if test "x$has_colon" = x; then
54681    # Not in mixed or Windows style, start by that.
54682    new_path=`cmd //c echo $path`
54683  fi
54684
54685
54686  input_path="$new_path"
54687  # Check if we need to convert this using DOS-style short mode. If the path
54688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54689  # take no chances and rewrite it.
54690  # Note: m4 eats our [], so we need to use [ and ] instead.
54691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54692  if test "x$has_forbidden_chars" != x; then
54693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54695  fi
54696
54697
54698  windows_path="$new_path"
54699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54700    unix_path=`$CYGPATH -u "$windows_path"`
54701    new_path="$unix_path"
54702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54704    new_path="$unix_path"
54705  fi
54706
54707  if test "x$path" != "x$new_path"; then
54708    MSVC_DLL="$new_path"
54709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54710$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54711  fi
54712
54713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54715
54716    else
54717      # We're on a unix platform. Hooray! :)
54718      path="$MSVC_DLL"
54719      has_space=`$ECHO "$path" | $GREP " "`
54720      if test "x$has_space" != x; then
54721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54722$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54724      fi
54725
54726      # Use eval to expand a potential ~
54727      eval path="$path"
54728      if test ! -f "$path" && test ! -d "$path"; then
54729        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54730      fi
54731
54732      if test -d "$path"; then
54733        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54734      else
54735        dir="`$DIRNAME "$path"`"
54736        base="`$BASENAME "$path"`"
54737        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54738      fi
54739    fi
54740  fi
54741
54742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54743$as_echo_n "checking for $DLL_NAME... " >&6; }
54744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54745$as_echo "$MSVC_DLL" >&6; }
54746    else
54747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54748$as_echo "incorrect, ignoring" >&6; }
54749      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54750$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54751    fi
54752  fi
54753
54754      if test "x$MSVC_DLL" = x; then
54755        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54756      fi
54757      MSVCP_DLL="$MSVC_DLL"
54758    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54759
54760  DLL_NAME="$MSVCP_NAME"
54761  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54762  METHOD="devkit"
54763  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54765$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54766
54767    # Need to check if the found msvcr is correct architecture
54768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54769$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54770    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54772      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54773      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54775        CORRECT_MSVCR_ARCH="PE32 executable"
54776      else
54777        CORRECT_MSVCR_ARCH="PE32+ executable"
54778      fi
54779    else
54780      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54781        CORRECT_MSVCR_ARCH=386
54782      else
54783        CORRECT_MSVCR_ARCH=x86-64
54784      fi
54785    fi
54786    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54788$as_echo "ok" >&6; }
54789      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54790
54791  # Only process if variable expands to non-empty
54792
54793  if test "x$MSVC_DLL" != x; then
54794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54795
54796  # Input might be given as Windows format, start by converting to
54797  # unix format.
54798  path="$MSVC_DLL"
54799  new_path=`$CYGPATH -u "$path"`
54800
54801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54804  # "foo.exe" is OK but "foo" is an error.
54805  #
54806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54807  # It is also a way to make sure we got the proper file name for the real test later on.
54808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54809  if test "x$test_shortpath" = x; then
54810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54811$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54812    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54813  fi
54814
54815  # Call helper function which possibly converts this using DOS-style short mode.
54816  # If so, the updated path is stored in $new_path.
54817
54818  input_path="$new_path"
54819  # Check if we need to convert this using DOS-style short mode. If the path
54820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54821  # take no chances and rewrite it.
54822  # Note: m4 eats our [], so we need to use [ and ] instead.
54823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54824  if test "x$has_forbidden_chars" != x; then
54825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54829      # Going to short mode and back again did indeed matter. Since short mode is
54830      # case insensitive, let's make it lowercase to improve readability.
54831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54832      # Now convert it back to Unix-style (cygpath)
54833      input_path=`$CYGPATH -u "$shortmode_path"`
54834      new_path="$input_path"
54835    fi
54836  fi
54837
54838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54839  if test "x$test_cygdrive_prefix" = x; then
54840    # As a simple fix, exclude /usr/bin since it's not a real path.
54841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54843      # a path prefixed by /cygdrive for fixpath to work.
54844      new_path="$CYGWIN_ROOT_PATH$input_path"
54845    fi
54846  fi
54847
54848
54849  if test "x$path" != "x$new_path"; then
54850    MSVC_DLL="$new_path"
54851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54852$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54853  fi
54854
54855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54856
54857  path="$MSVC_DLL"
54858  has_colon=`$ECHO $path | $GREP ^.:`
54859  new_path="$path"
54860  if test "x$has_colon" = x; then
54861    # Not in mixed or Windows style, start by that.
54862    new_path=`cmd //c echo $path`
54863  fi
54864
54865
54866  input_path="$new_path"
54867  # Check if we need to convert this using DOS-style short mode. If the path
54868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54869  # take no chances and rewrite it.
54870  # Note: m4 eats our [], so we need to use [ and ] instead.
54871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54872  if test "x$has_forbidden_chars" != x; then
54873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54875  fi
54876
54877
54878  windows_path="$new_path"
54879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54880    unix_path=`$CYGPATH -u "$windows_path"`
54881    new_path="$unix_path"
54882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54884    new_path="$unix_path"
54885  fi
54886
54887  if test "x$path" != "x$new_path"; then
54888    MSVC_DLL="$new_path"
54889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54890$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54891  fi
54892
54893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54895
54896    else
54897      # We're on a unix platform. Hooray! :)
54898      path="$MSVC_DLL"
54899      has_space=`$ECHO "$path" | $GREP " "`
54900      if test "x$has_space" != x; then
54901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54902$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54904      fi
54905
54906      # Use eval to expand a potential ~
54907      eval path="$path"
54908      if test ! -f "$path" && test ! -d "$path"; then
54909        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54910      fi
54911
54912      if test -d "$path"; then
54913        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54914      else
54915        dir="`$DIRNAME "$path"`"
54916        base="`$BASENAME "$path"`"
54917        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54918      fi
54919    fi
54920  fi
54921
54922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54923$as_echo_n "checking for $DLL_NAME... " >&6; }
54924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54925$as_echo "$MSVC_DLL" >&6; }
54926    else
54927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54928$as_echo "incorrect, ignoring" >&6; }
54929      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54930$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54931    fi
54932  fi
54933
54934      if test "x$MSVC_DLL" = x; then
54935        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54936      fi
54937      MSVCP_DLL="$MSVC_DLL"
54938    else
54939
54940  DLL_NAME="${MSVCP_NAME}"
54941  MSVC_DLL=
54942
54943  if test "x$MSVC_DLL" = x; then
54944    # Probe: Using well-known location from Visual Studio 10.0
54945    if test "x$VCINSTALLDIR" != x; then
54946      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54947
54948  windows_path="$CYGWIN_VC_INSTALL_DIR"
54949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54950    unix_path=`$CYGPATH -u "$windows_path"`
54951    CYGWIN_VC_INSTALL_DIR="$unix_path"
54952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54954    CYGWIN_VC_INSTALL_DIR="$unix_path"
54955  fi
54956
54957      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54958        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54959      else
54960        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54961      fi
54962      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54963
54964  DLL_NAME="$DLL_NAME"
54965  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54966  METHOD="well-known location in VCINSTALLDIR"
54967  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54969$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54970
54971    # Need to check if the found msvcr is correct architecture
54972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54973$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54974    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54976      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54977      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54979        CORRECT_MSVCR_ARCH="PE32 executable"
54980      else
54981        CORRECT_MSVCR_ARCH="PE32+ executable"
54982      fi
54983    else
54984      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54985        CORRECT_MSVCR_ARCH=386
54986      else
54987        CORRECT_MSVCR_ARCH=x86-64
54988      fi
54989    fi
54990    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54992$as_echo "ok" >&6; }
54993      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54994
54995  # Only process if variable expands to non-empty
54996
54997  if test "x$MSVC_DLL" != x; then
54998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54999
55000  # Input might be given as Windows format, start by converting to
55001  # unix format.
55002  path="$MSVC_DLL"
55003  new_path=`$CYGPATH -u "$path"`
55004
55005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55008  # "foo.exe" is OK but "foo" is an error.
55009  #
55010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55011  # It is also a way to make sure we got the proper file name for the real test later on.
55012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55013  if test "x$test_shortpath" = x; then
55014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55015$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55016    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55017  fi
55018
55019  # Call helper function which possibly converts this using DOS-style short mode.
55020  # If so, the updated path is stored in $new_path.
55021
55022  input_path="$new_path"
55023  # Check if we need to convert this using DOS-style short mode. If the path
55024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55025  # take no chances and rewrite it.
55026  # Note: m4 eats our [], so we need to use [ and ] instead.
55027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55028  if test "x$has_forbidden_chars" != x; then
55029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55033      # Going to short mode and back again did indeed matter. Since short mode is
55034      # case insensitive, let's make it lowercase to improve readability.
55035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55036      # Now convert it back to Unix-style (cygpath)
55037      input_path=`$CYGPATH -u "$shortmode_path"`
55038      new_path="$input_path"
55039    fi
55040  fi
55041
55042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55043  if test "x$test_cygdrive_prefix" = x; then
55044    # As a simple fix, exclude /usr/bin since it's not a real path.
55045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55047      # a path prefixed by /cygdrive for fixpath to work.
55048      new_path="$CYGWIN_ROOT_PATH$input_path"
55049    fi
55050  fi
55051
55052
55053  if test "x$path" != "x$new_path"; then
55054    MSVC_DLL="$new_path"
55055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55056$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55057  fi
55058
55059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55060
55061  path="$MSVC_DLL"
55062  has_colon=`$ECHO $path | $GREP ^.:`
55063  new_path="$path"
55064  if test "x$has_colon" = x; then
55065    # Not in mixed or Windows style, start by that.
55066    new_path=`cmd //c echo $path`
55067  fi
55068
55069
55070  input_path="$new_path"
55071  # Check if we need to convert this using DOS-style short mode. If the path
55072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55073  # take no chances and rewrite it.
55074  # Note: m4 eats our [], so we need to use [ and ] instead.
55075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55076  if test "x$has_forbidden_chars" != x; then
55077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55079  fi
55080
55081
55082  windows_path="$new_path"
55083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55084    unix_path=`$CYGPATH -u "$windows_path"`
55085    new_path="$unix_path"
55086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55088    new_path="$unix_path"
55089  fi
55090
55091  if test "x$path" != "x$new_path"; then
55092    MSVC_DLL="$new_path"
55093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55094$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55095  fi
55096
55097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55099
55100    else
55101      # We're on a unix platform. Hooray! :)
55102      path="$MSVC_DLL"
55103      has_space=`$ECHO "$path" | $GREP " "`
55104      if test "x$has_space" != x; then
55105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55108      fi
55109
55110      # Use eval to expand a potential ~
55111      eval path="$path"
55112      if test ! -f "$path" && test ! -d "$path"; then
55113        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55114      fi
55115
55116      if test -d "$path"; then
55117        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55118      else
55119        dir="`$DIRNAME "$path"`"
55120        base="`$BASENAME "$path"`"
55121        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55122      fi
55123    fi
55124  fi
55125
55126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55127$as_echo_n "checking for $DLL_NAME... " >&6; }
55128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55129$as_echo "$MSVC_DLL" >&6; }
55130    else
55131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55132$as_echo "incorrect, ignoring" >&6; }
55133      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55134$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55135    fi
55136  fi
55137
55138    fi
55139  fi
55140
55141  if test "x$MSVC_DLL" = x; then
55142    # Probe: Check in the Boot JDK directory.
55143    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55144
55145  DLL_NAME="$DLL_NAME"
55146  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55147  METHOD="well-known location in Boot JDK"
55148  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55150$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55151
55152    # Need to check if the found msvcr is correct architecture
55153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55154$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55155    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55157      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55158      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55159      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55160        CORRECT_MSVCR_ARCH="PE32 executable"
55161      else
55162        CORRECT_MSVCR_ARCH="PE32+ executable"
55163      fi
55164    else
55165      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55166        CORRECT_MSVCR_ARCH=386
55167      else
55168        CORRECT_MSVCR_ARCH=x86-64
55169      fi
55170    fi
55171    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55173$as_echo "ok" >&6; }
55174      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55175
55176  # Only process if variable expands to non-empty
55177
55178  if test "x$MSVC_DLL" != x; then
55179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55180
55181  # Input might be given as Windows format, start by converting to
55182  # unix format.
55183  path="$MSVC_DLL"
55184  new_path=`$CYGPATH -u "$path"`
55185
55186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55189  # "foo.exe" is OK but "foo" is an error.
55190  #
55191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55192  # It is also a way to make sure we got the proper file name for the real test later on.
55193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55194  if test "x$test_shortpath" = x; then
55195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55196$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55197    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55198  fi
55199
55200  # Call helper function which possibly converts this using DOS-style short mode.
55201  # If so, the updated path is stored in $new_path.
55202
55203  input_path="$new_path"
55204  # Check if we need to convert this using DOS-style short mode. If the path
55205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55206  # take no chances and rewrite it.
55207  # Note: m4 eats our [], so we need to use [ and ] instead.
55208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55209  if test "x$has_forbidden_chars" != x; then
55210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55214      # Going to short mode and back again did indeed matter. Since short mode is
55215      # case insensitive, let's make it lowercase to improve readability.
55216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55217      # Now convert it back to Unix-style (cygpath)
55218      input_path=`$CYGPATH -u "$shortmode_path"`
55219      new_path="$input_path"
55220    fi
55221  fi
55222
55223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55224  if test "x$test_cygdrive_prefix" = x; then
55225    # As a simple fix, exclude /usr/bin since it's not a real path.
55226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55228      # a path prefixed by /cygdrive for fixpath to work.
55229      new_path="$CYGWIN_ROOT_PATH$input_path"
55230    fi
55231  fi
55232
55233
55234  if test "x$path" != "x$new_path"; then
55235    MSVC_DLL="$new_path"
55236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55237$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55238  fi
55239
55240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55241
55242  path="$MSVC_DLL"
55243  has_colon=`$ECHO $path | $GREP ^.:`
55244  new_path="$path"
55245  if test "x$has_colon" = x; then
55246    # Not in mixed or Windows style, start by that.
55247    new_path=`cmd //c echo $path`
55248  fi
55249
55250
55251  input_path="$new_path"
55252  # Check if we need to convert this using DOS-style short mode. If the path
55253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55254  # take no chances and rewrite it.
55255  # Note: m4 eats our [], so we need to use [ and ] instead.
55256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55257  if test "x$has_forbidden_chars" != x; then
55258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55260  fi
55261
55262
55263  windows_path="$new_path"
55264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55265    unix_path=`$CYGPATH -u "$windows_path"`
55266    new_path="$unix_path"
55267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55269    new_path="$unix_path"
55270  fi
55271
55272  if test "x$path" != "x$new_path"; then
55273    MSVC_DLL="$new_path"
55274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55275$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55276  fi
55277
55278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55280
55281    else
55282      # We're on a unix platform. Hooray! :)
55283      path="$MSVC_DLL"
55284      has_space=`$ECHO "$path" | $GREP " "`
55285      if test "x$has_space" != x; then
55286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55287$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55289      fi
55290
55291      # Use eval to expand a potential ~
55292      eval path="$path"
55293      if test ! -f "$path" && test ! -d "$path"; then
55294        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55295      fi
55296
55297      if test -d "$path"; then
55298        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55299      else
55300        dir="`$DIRNAME "$path"`"
55301        base="`$BASENAME "$path"`"
55302        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55303      fi
55304    fi
55305  fi
55306
55307      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55308$as_echo_n "checking for $DLL_NAME... " >&6; }
55309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55310$as_echo "$MSVC_DLL" >&6; }
55311    else
55312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55313$as_echo "incorrect, ignoring" >&6; }
55314      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55315$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55316    fi
55317  fi
55318
55319  fi
55320
55321  if test "x$MSVC_DLL" = x; then
55322    # Probe: Look in the Windows system32 directory
55323    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55324
55325  windows_path="$CYGWIN_SYSTEMROOT"
55326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55327    unix_path=`$CYGPATH -u "$windows_path"`
55328    CYGWIN_SYSTEMROOT="$unix_path"
55329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55331    CYGWIN_SYSTEMROOT="$unix_path"
55332  fi
55333
55334    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55335
55336  DLL_NAME="$DLL_NAME"
55337  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55338  METHOD="well-known location in SYSTEMROOT"
55339  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55341$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55342
55343    # Need to check if the found msvcr is correct architecture
55344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55345$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55346    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55348      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55349      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55350      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55351        CORRECT_MSVCR_ARCH="PE32 executable"
55352      else
55353        CORRECT_MSVCR_ARCH="PE32+ executable"
55354      fi
55355    else
55356      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55357        CORRECT_MSVCR_ARCH=386
55358      else
55359        CORRECT_MSVCR_ARCH=x86-64
55360      fi
55361    fi
55362    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55364$as_echo "ok" >&6; }
55365      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55366
55367  # Only process if variable expands to non-empty
55368
55369  if test "x$MSVC_DLL" != x; then
55370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55371
55372  # Input might be given as Windows format, start by converting to
55373  # unix format.
55374  path="$MSVC_DLL"
55375  new_path=`$CYGPATH -u "$path"`
55376
55377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55380  # "foo.exe" is OK but "foo" is an error.
55381  #
55382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55383  # It is also a way to make sure we got the proper file name for the real test later on.
55384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55385  if test "x$test_shortpath" = x; then
55386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55387$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55388    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55389  fi
55390
55391  # Call helper function which possibly converts this using DOS-style short mode.
55392  # If so, the updated path is stored in $new_path.
55393
55394  input_path="$new_path"
55395  # Check if we need to convert this using DOS-style short mode. If the path
55396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55397  # take no chances and rewrite it.
55398  # Note: m4 eats our [], so we need to use [ and ] instead.
55399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55400  if test "x$has_forbidden_chars" != x; then
55401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55405      # Going to short mode and back again did indeed matter. Since short mode is
55406      # case insensitive, let's make it lowercase to improve readability.
55407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55408      # Now convert it back to Unix-style (cygpath)
55409      input_path=`$CYGPATH -u "$shortmode_path"`
55410      new_path="$input_path"
55411    fi
55412  fi
55413
55414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55415  if test "x$test_cygdrive_prefix" = x; then
55416    # As a simple fix, exclude /usr/bin since it's not a real path.
55417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55419      # a path prefixed by /cygdrive for fixpath to work.
55420      new_path="$CYGWIN_ROOT_PATH$input_path"
55421    fi
55422  fi
55423
55424
55425  if test "x$path" != "x$new_path"; then
55426    MSVC_DLL="$new_path"
55427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55429  fi
55430
55431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55432
55433  path="$MSVC_DLL"
55434  has_colon=`$ECHO $path | $GREP ^.:`
55435  new_path="$path"
55436  if test "x$has_colon" = x; then
55437    # Not in mixed or Windows style, start by that.
55438    new_path=`cmd //c echo $path`
55439  fi
55440
55441
55442  input_path="$new_path"
55443  # Check if we need to convert this using DOS-style short mode. If the path
55444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55445  # take no chances and rewrite it.
55446  # Note: m4 eats our [], so we need to use [ and ] instead.
55447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55448  if test "x$has_forbidden_chars" != x; then
55449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55451  fi
55452
55453
55454  windows_path="$new_path"
55455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55456    unix_path=`$CYGPATH -u "$windows_path"`
55457    new_path="$unix_path"
55458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55460    new_path="$unix_path"
55461  fi
55462
55463  if test "x$path" != "x$new_path"; then
55464    MSVC_DLL="$new_path"
55465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55466$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55467  fi
55468
55469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55471
55472    else
55473      # We're on a unix platform. Hooray! :)
55474      path="$MSVC_DLL"
55475      has_space=`$ECHO "$path" | $GREP " "`
55476      if test "x$has_space" != x; then
55477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55478$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55480      fi
55481
55482      # Use eval to expand a potential ~
55483      eval path="$path"
55484      if test ! -f "$path" && test ! -d "$path"; then
55485        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55486      fi
55487
55488      if test -d "$path"; then
55489        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55490      else
55491        dir="`$DIRNAME "$path"`"
55492        base="`$BASENAME "$path"`"
55493        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55494      fi
55495    fi
55496  fi
55497
55498      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55499$as_echo_n "checking for $DLL_NAME... " >&6; }
55500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55501$as_echo "$MSVC_DLL" >&6; }
55502    else
55503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55504$as_echo "incorrect, ignoring" >&6; }
55505      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55506$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55507    fi
55508  fi
55509
55510  fi
55511
55512  if test "x$MSVC_DLL" = x; then
55513    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55514    if test "x$VS100COMNTOOLS" != x; then
55515      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55516
55517  windows_path="$CYGWIN_VS_TOOLS_DIR"
55518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55519    unix_path=`$CYGPATH -u "$windows_path"`
55520    CYGWIN_VS_TOOLS_DIR="$unix_path"
55521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55523    CYGWIN_VS_TOOLS_DIR="$unix_path"
55524  fi
55525
55526      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55527        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55528	    | $GREP -i /x64/ | $HEAD --lines 1`
55529      else
55530        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55531	    | $GREP -i /x86/ | $HEAD --lines 1`
55532      fi
55533
55534  DLL_NAME="$DLL_NAME"
55535  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55536  METHOD="search of VS100COMNTOOLS"
55537  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55538    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55539$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55540
55541    # Need to check if the found msvcr is correct architecture
55542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55543$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55544    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55546      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55547      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55548      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55549        CORRECT_MSVCR_ARCH="PE32 executable"
55550      else
55551        CORRECT_MSVCR_ARCH="PE32+ executable"
55552      fi
55553    else
55554      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55555        CORRECT_MSVCR_ARCH=386
55556      else
55557        CORRECT_MSVCR_ARCH=x86-64
55558      fi
55559    fi
55560    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55562$as_echo "ok" >&6; }
55563      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55564
55565  # Only process if variable expands to non-empty
55566
55567  if test "x$MSVC_DLL" != x; then
55568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55569
55570  # Input might be given as Windows format, start by converting to
55571  # unix format.
55572  path="$MSVC_DLL"
55573  new_path=`$CYGPATH -u "$path"`
55574
55575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55578  # "foo.exe" is OK but "foo" is an error.
55579  #
55580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55581  # It is also a way to make sure we got the proper file name for the real test later on.
55582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55583  if test "x$test_shortpath" = x; then
55584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55585$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55586    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55587  fi
55588
55589  # Call helper function which possibly converts this using DOS-style short mode.
55590  # If so, the updated path is stored in $new_path.
55591
55592  input_path="$new_path"
55593  # Check if we need to convert this using DOS-style short mode. If the path
55594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55595  # take no chances and rewrite it.
55596  # Note: m4 eats our [], so we need to use [ and ] instead.
55597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55598  if test "x$has_forbidden_chars" != x; then
55599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55603      # Going to short mode and back again did indeed matter. Since short mode is
55604      # case insensitive, let's make it lowercase to improve readability.
55605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55606      # Now convert it back to Unix-style (cygpath)
55607      input_path=`$CYGPATH -u "$shortmode_path"`
55608      new_path="$input_path"
55609    fi
55610  fi
55611
55612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55613  if test "x$test_cygdrive_prefix" = x; then
55614    # As a simple fix, exclude /usr/bin since it's not a real path.
55615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55617      # a path prefixed by /cygdrive for fixpath to work.
55618      new_path="$CYGWIN_ROOT_PATH$input_path"
55619    fi
55620  fi
55621
55622
55623  if test "x$path" != "x$new_path"; then
55624    MSVC_DLL="$new_path"
55625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55626$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55627  fi
55628
55629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55630
55631  path="$MSVC_DLL"
55632  has_colon=`$ECHO $path | $GREP ^.:`
55633  new_path="$path"
55634  if test "x$has_colon" = x; then
55635    # Not in mixed or Windows style, start by that.
55636    new_path=`cmd //c echo $path`
55637  fi
55638
55639
55640  input_path="$new_path"
55641  # Check if we need to convert this using DOS-style short mode. If the path
55642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55643  # take no chances and rewrite it.
55644  # Note: m4 eats our [], so we need to use [ and ] instead.
55645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55646  if test "x$has_forbidden_chars" != x; then
55647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55649  fi
55650
55651
55652  windows_path="$new_path"
55653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55654    unix_path=`$CYGPATH -u "$windows_path"`
55655    new_path="$unix_path"
55656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55658    new_path="$unix_path"
55659  fi
55660
55661  if test "x$path" != "x$new_path"; then
55662    MSVC_DLL="$new_path"
55663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55664$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55665  fi
55666
55667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55669
55670    else
55671      # We're on a unix platform. Hooray! :)
55672      path="$MSVC_DLL"
55673      has_space=`$ECHO "$path" | $GREP " "`
55674      if test "x$has_space" != x; then
55675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55676$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55678      fi
55679
55680      # Use eval to expand a potential ~
55681      eval path="$path"
55682      if test ! -f "$path" && test ! -d "$path"; then
55683        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55684      fi
55685
55686      if test -d "$path"; then
55687        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55688      else
55689        dir="`$DIRNAME "$path"`"
55690        base="`$BASENAME "$path"`"
55691        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55692      fi
55693    fi
55694  fi
55695
55696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55697$as_echo_n "checking for $DLL_NAME... " >&6; }
55698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55699$as_echo "$MSVC_DLL" >&6; }
55700    else
55701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55702$as_echo "incorrect, ignoring" >&6; }
55703      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55704$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55705    fi
55706  fi
55707
55708    fi
55709  fi
55710
55711  if test "x$MSVC_DLL" = x; then
55712    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55713    # (This was the original behaviour; kept since it might turn something up)
55714    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55715      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55716        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55717	    | $GREP x64 | $HEAD --lines 1`
55718      else
55719        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55720	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55721        if test "x$POSSIBLE_MSVC_DLL" = x; then
55722          # We're grasping at straws now...
55723          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55724	      | $HEAD --lines 1`
55725        fi
55726      fi
55727
55728
55729  DLL_NAME="$DLL_NAME"
55730  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55731  METHOD="search of VCINSTALLDIR"
55732  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55733    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55734$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55735
55736    # Need to check if the found msvcr is correct architecture
55737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55738$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55739    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55741      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55742      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55743      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55744        CORRECT_MSVCR_ARCH="PE32 executable"
55745      else
55746        CORRECT_MSVCR_ARCH="PE32+ executable"
55747      fi
55748    else
55749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55750        CORRECT_MSVCR_ARCH=386
55751      else
55752        CORRECT_MSVCR_ARCH=x86-64
55753      fi
55754    fi
55755    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55757$as_echo "ok" >&6; }
55758      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55759
55760  # Only process if variable expands to non-empty
55761
55762  if test "x$MSVC_DLL" != x; then
55763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55764
55765  # Input might be given as Windows format, start by converting to
55766  # unix format.
55767  path="$MSVC_DLL"
55768  new_path=`$CYGPATH -u "$path"`
55769
55770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55773  # "foo.exe" is OK but "foo" is an error.
55774  #
55775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55776  # It is also a way to make sure we got the proper file name for the real test later on.
55777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55778  if test "x$test_shortpath" = x; then
55779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55780$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55781    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55782  fi
55783
55784  # Call helper function which possibly converts this using DOS-style short mode.
55785  # If so, the updated path is stored in $new_path.
55786
55787  input_path="$new_path"
55788  # Check if we need to convert this using DOS-style short mode. If the path
55789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55790  # take no chances and rewrite it.
55791  # Note: m4 eats our [], so we need to use [ and ] instead.
55792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55793  if test "x$has_forbidden_chars" != x; then
55794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55798      # Going to short mode and back again did indeed matter. Since short mode is
55799      # case insensitive, let's make it lowercase to improve readability.
55800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55801      # Now convert it back to Unix-style (cygpath)
55802      input_path=`$CYGPATH -u "$shortmode_path"`
55803      new_path="$input_path"
55804    fi
55805  fi
55806
55807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55808  if test "x$test_cygdrive_prefix" = x; then
55809    # As a simple fix, exclude /usr/bin since it's not a real path.
55810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55812      # a path prefixed by /cygdrive for fixpath to work.
55813      new_path="$CYGWIN_ROOT_PATH$input_path"
55814    fi
55815  fi
55816
55817
55818  if test "x$path" != "x$new_path"; then
55819    MSVC_DLL="$new_path"
55820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55821$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55822  fi
55823
55824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55825
55826  path="$MSVC_DLL"
55827  has_colon=`$ECHO $path | $GREP ^.:`
55828  new_path="$path"
55829  if test "x$has_colon" = x; then
55830    # Not in mixed or Windows style, start by that.
55831    new_path=`cmd //c echo $path`
55832  fi
55833
55834
55835  input_path="$new_path"
55836  # Check if we need to convert this using DOS-style short mode. If the path
55837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55838  # take no chances and rewrite it.
55839  # Note: m4 eats our [], so we need to use [ and ] instead.
55840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55841  if test "x$has_forbidden_chars" != x; then
55842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55844  fi
55845
55846
55847  windows_path="$new_path"
55848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55849    unix_path=`$CYGPATH -u "$windows_path"`
55850    new_path="$unix_path"
55851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55853    new_path="$unix_path"
55854  fi
55855
55856  if test "x$path" != "x$new_path"; then
55857    MSVC_DLL="$new_path"
55858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55859$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55860  fi
55861
55862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55864
55865    else
55866      # We're on a unix platform. Hooray! :)
55867      path="$MSVC_DLL"
55868      has_space=`$ECHO "$path" | $GREP " "`
55869      if test "x$has_space" != x; then
55870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55871$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55873      fi
55874
55875      # Use eval to expand a potential ~
55876      eval path="$path"
55877      if test ! -f "$path" && test ! -d "$path"; then
55878        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55879      fi
55880
55881      if test -d "$path"; then
55882        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55883      else
55884        dir="`$DIRNAME "$path"`"
55885        base="`$BASENAME "$path"`"
55886        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55887      fi
55888    fi
55889  fi
55890
55891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55892$as_echo_n "checking for $DLL_NAME... " >&6; }
55893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55894$as_echo "$MSVC_DLL" >&6; }
55895    else
55896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55897$as_echo "incorrect, ignoring" >&6; }
55898      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55899$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55900    fi
55901  fi
55902
55903    fi
55904  fi
55905
55906  if test "x$MSVC_DLL" = x; then
55907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55908$as_echo_n "checking for $DLL_NAME... " >&6; }
55909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55910$as_echo "no" >&6; }
55911    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55912  fi
55913
55914      MSVCP_DLL="$MSVC_DLL"
55915    fi
55916
55917  fi
55918
55919  fi
55920
55921
55922  if test "x$NEEDS_LIB_X11" = xfalse; then
55923    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55924      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55925$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55926    fi
55927    X_CFLAGS=
55928    X_LIBS=
55929  else
55930
55931    if test "x${with_x}" = xno; then
55932      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55933    fi
55934
55935    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55936      # The user has specified a X11 base directory. Use it for includes and
55937      # libraries, unless explicitly overridden.
55938      if test "x$x_includes" = xNONE; then
55939        x_includes="${with_x}/include"
55940      fi
55941      if test "x$x_libraries" = xNONE; then
55942        x_libraries="${with_x}/lib"
55943      fi
55944    else
55945      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55946      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55947      # --x-libraries for the sysroot, if that seems to be correct.
55948      if test "x$SYSROOT" != "x"; then
55949        if test "x$x_includes" = xNONE; then
55950          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55951            x_includes="$SYSROOT/usr/X11R6/include"
55952          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55953            x_includes="$SYSROOT/usr/include"
55954          fi
55955        fi
55956        if test "x$x_libraries" = xNONE; then
55957          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55958            x_libraries="$SYSROOT/usr/X11R6/lib"
55959          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55960            x_libraries="$SYSROOT/usr/lib64"
55961          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55962            x_libraries="$SYSROOT/usr/lib"
55963          fi
55964        fi
55965      fi
55966    fi
55967
55968    # Now let autoconf do it's magic
55969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55970$as_echo_n "checking for X... " >&6; }
55971
55972
55973# Check whether --with-x was given.
55974if test "${with_x+set}" = set; then :
55975  withval=$with_x;
55976fi
55977
55978# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55979if test "x$with_x" = xno; then
55980  # The user explicitly disabled X.
55981  have_x=disabled
55982else
55983  case $x_includes,$x_libraries in #(
55984    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55985    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55986  $as_echo_n "(cached) " >&6
55987else
55988  # One or both of the vars are not set, and there is no cached value.
55989ac_x_includes=no ac_x_libraries=no
55990rm -f -r conftest.dir
55991if mkdir conftest.dir; then
55992  cd conftest.dir
55993  cat >Imakefile <<'_ACEOF'
55994incroot:
55995	@echo incroot='${INCROOT}'
55996usrlibdir:
55997	@echo usrlibdir='${USRLIBDIR}'
55998libdir:
55999	@echo libdir='${LIBDIR}'
56000_ACEOF
56001  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56002    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56003    for ac_var in incroot usrlibdir libdir; do
56004      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56005    done
56006    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56007    for ac_extension in a so sl dylib la dll; do
56008      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56009	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56010	ac_im_usrlibdir=$ac_im_libdir; break
56011      fi
56012    done
56013    # Screen out bogus values from the imake configuration.  They are
56014    # bogus both because they are the default anyway, and because
56015    # using them would break gcc on systems where it needs fixed includes.
56016    case $ac_im_incroot in
56017	/usr/include) ac_x_includes= ;;
56018	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56019    esac
56020    case $ac_im_usrlibdir in
56021	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56022	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56023    esac
56024  fi
56025  cd ..
56026  rm -f -r conftest.dir
56027fi
56028
56029# Standard set of common directories for X headers.
56030# Check X11 before X11Rn because it is often a symlink to the current release.
56031ac_x_header_dirs='
56032/usr/X11/include
56033/usr/X11R7/include
56034/usr/X11R6/include
56035/usr/X11R5/include
56036/usr/X11R4/include
56037
56038/usr/include/X11
56039/usr/include/X11R7
56040/usr/include/X11R6
56041/usr/include/X11R5
56042/usr/include/X11R4
56043
56044/usr/local/X11/include
56045/usr/local/X11R7/include
56046/usr/local/X11R6/include
56047/usr/local/X11R5/include
56048/usr/local/X11R4/include
56049
56050/usr/local/include/X11
56051/usr/local/include/X11R7
56052/usr/local/include/X11R6
56053/usr/local/include/X11R5
56054/usr/local/include/X11R4
56055
56056/usr/X386/include
56057/usr/x386/include
56058/usr/XFree86/include/X11
56059
56060/usr/include
56061/usr/local/include
56062/usr/unsupported/include
56063/usr/athena/include
56064/usr/local/x11r5/include
56065/usr/lpp/Xamples/include
56066
56067/usr/openwin/include
56068/usr/openwin/share/include'
56069
56070if test "$ac_x_includes" = no; then
56071  # Guess where to find include files, by looking for Xlib.h.
56072  # First, try using that file with no special directory specified.
56073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56074/* end confdefs.h.  */
56075#include <X11/Xlib.h>
56076_ACEOF
56077if ac_fn_cxx_try_cpp "$LINENO"; then :
56078  # We can compile using X headers with no special include directory.
56079ac_x_includes=
56080else
56081  for ac_dir in $ac_x_header_dirs; do
56082  if test -r "$ac_dir/X11/Xlib.h"; then
56083    ac_x_includes=$ac_dir
56084    break
56085  fi
56086done
56087fi
56088rm -f conftest.err conftest.i conftest.$ac_ext
56089fi # $ac_x_includes = no
56090
56091if test "$ac_x_libraries" = no; then
56092  # Check for the libraries.
56093  # See if we find them without any special options.
56094  # Don't add to $LIBS permanently.
56095  ac_save_LIBS=$LIBS
56096  LIBS="-lX11 $LIBS"
56097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56098/* end confdefs.h.  */
56099#include <X11/Xlib.h>
56100int
56101main ()
56102{
56103XrmInitialize ()
56104  ;
56105  return 0;
56106}
56107_ACEOF
56108if ac_fn_cxx_try_link "$LINENO"; then :
56109  LIBS=$ac_save_LIBS
56110# We can link X programs with no special library path.
56111ac_x_libraries=
56112else
56113  LIBS=$ac_save_LIBS
56114for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56115do
56116  # Don't even attempt the hair of trying to link an X program!
56117  for ac_extension in a so sl dylib la dll; do
56118    if test -r "$ac_dir/libX11.$ac_extension"; then
56119      ac_x_libraries=$ac_dir
56120      break 2
56121    fi
56122  done
56123done
56124fi
56125rm -f core conftest.err conftest.$ac_objext \
56126    conftest$ac_exeext conftest.$ac_ext
56127fi # $ac_x_libraries = no
56128
56129case $ac_x_includes,$ac_x_libraries in #(
56130  no,* | *,no | *\'*)
56131    # Didn't find X, or a directory has "'" in its name.
56132    ac_cv_have_x="have_x=no";; #(
56133  *)
56134    # Record where we found X for the cache.
56135    ac_cv_have_x="have_x=yes\
56136	ac_x_includes='$ac_x_includes'\
56137	ac_x_libraries='$ac_x_libraries'"
56138esac
56139fi
56140;; #(
56141    *) have_x=yes;;
56142  esac
56143  eval "$ac_cv_have_x"
56144fi # $with_x != no
56145
56146if test "$have_x" != yes; then
56147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56148$as_echo "$have_x" >&6; }
56149  no_x=yes
56150else
56151  # If each of the values was on the command line, it overrides each guess.
56152  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56153  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56154  # Update the cache value to reflect the command line values.
56155  ac_cv_have_x="have_x=yes\
56156	ac_x_includes='$x_includes'\
56157	ac_x_libraries='$x_libraries'"
56158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56159$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56160fi
56161
56162    if test "$no_x" = yes; then
56163  # Not all programs may use this symbol, but it does not hurt to define it.
56164
56165$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56166
56167  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56168else
56169  if test -n "$x_includes"; then
56170    X_CFLAGS="$X_CFLAGS -I$x_includes"
56171  fi
56172
56173  # It would also be nice to do this for all -L options, not just this one.
56174  if test -n "$x_libraries"; then
56175    X_LIBS="$X_LIBS -L$x_libraries"
56176    # For Solaris; some versions of Sun CC require a space after -R and
56177    # others require no space.  Words are not sufficient . . . .
56178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56179$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56180    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56181    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56182    ac_cxx_werror_flag=yes
56183    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56184/* end confdefs.h.  */
56185
56186int
56187main ()
56188{
56189
56190  ;
56191  return 0;
56192}
56193_ACEOF
56194if ac_fn_cxx_try_link "$LINENO"; then :
56195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56196$as_echo "no" >&6; }
56197       X_LIBS="$X_LIBS -R$x_libraries"
56198else
56199  LIBS="$ac_xsave_LIBS -R $x_libraries"
56200       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56201/* end confdefs.h.  */
56202
56203int
56204main ()
56205{
56206
56207  ;
56208  return 0;
56209}
56210_ACEOF
56211if ac_fn_cxx_try_link "$LINENO"; then :
56212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56213$as_echo "yes" >&6; }
56214	  X_LIBS="$X_LIBS -R $x_libraries"
56215else
56216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56217$as_echo "neither works" >&6; }
56218fi
56219rm -f core conftest.err conftest.$ac_objext \
56220    conftest$ac_exeext conftest.$ac_ext
56221fi
56222rm -f core conftest.err conftest.$ac_objext \
56223    conftest$ac_exeext conftest.$ac_ext
56224    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56225    LIBS=$ac_xsave_LIBS
56226  fi
56227
56228  # Check for system-dependent libraries X programs must link with.
56229  # Do this before checking for the system-independent R6 libraries
56230  # (-lICE), since we may need -lsocket or whatever for X linking.
56231
56232  if test "$ISC" = yes; then
56233    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56234  else
56235    # Martyn Johnson says this is needed for Ultrix, if the X
56236    # libraries were built with DECnet support.  And Karl Berry says
56237    # the Alpha needs dnet_stub (dnet does not exist).
56238    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56239    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56240/* end confdefs.h.  */
56241
56242/* Override any GCC internal prototype to avoid an error.
56243   Use char because int might match the return type of a GCC
56244   builtin and then its argument prototype would still apply.  */
56245#ifdef __cplusplus
56246extern "C"
56247#endif
56248char XOpenDisplay ();
56249int
56250main ()
56251{
56252return XOpenDisplay ();
56253  ;
56254  return 0;
56255}
56256_ACEOF
56257if ac_fn_cxx_try_link "$LINENO"; then :
56258
56259else
56260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56261$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56262if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56263  $as_echo_n "(cached) " >&6
56264else
56265  ac_check_lib_save_LIBS=$LIBS
56266LIBS="-ldnet  $LIBS"
56267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56268/* end confdefs.h.  */
56269
56270/* Override any GCC internal prototype to avoid an error.
56271   Use char because int might match the return type of a GCC
56272   builtin and then its argument prototype would still apply.  */
56273#ifdef __cplusplus
56274extern "C"
56275#endif
56276char dnet_ntoa ();
56277int
56278main ()
56279{
56280return dnet_ntoa ();
56281  ;
56282  return 0;
56283}
56284_ACEOF
56285if ac_fn_cxx_try_link "$LINENO"; then :
56286  ac_cv_lib_dnet_dnet_ntoa=yes
56287else
56288  ac_cv_lib_dnet_dnet_ntoa=no
56289fi
56290rm -f core conftest.err conftest.$ac_objext \
56291    conftest$ac_exeext conftest.$ac_ext
56292LIBS=$ac_check_lib_save_LIBS
56293fi
56294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56295$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56296if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56297  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56298fi
56299
56300    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56302$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56303if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56304  $as_echo_n "(cached) " >&6
56305else
56306  ac_check_lib_save_LIBS=$LIBS
56307LIBS="-ldnet_stub  $LIBS"
56308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56309/* end confdefs.h.  */
56310
56311/* Override any GCC internal prototype to avoid an error.
56312   Use char because int might match the return type of a GCC
56313   builtin and then its argument prototype would still apply.  */
56314#ifdef __cplusplus
56315extern "C"
56316#endif
56317char dnet_ntoa ();
56318int
56319main ()
56320{
56321return dnet_ntoa ();
56322  ;
56323  return 0;
56324}
56325_ACEOF
56326if ac_fn_cxx_try_link "$LINENO"; then :
56327  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56328else
56329  ac_cv_lib_dnet_stub_dnet_ntoa=no
56330fi
56331rm -f core conftest.err conftest.$ac_objext \
56332    conftest$ac_exeext conftest.$ac_ext
56333LIBS=$ac_check_lib_save_LIBS
56334fi
56335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56336$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56337if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56338  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56339fi
56340
56341    fi
56342fi
56343rm -f core conftest.err conftest.$ac_objext \
56344    conftest$ac_exeext conftest.$ac_ext
56345    LIBS="$ac_xsave_LIBS"
56346
56347    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56348    # to get the SysV transport functions.
56349    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56350    # needs -lnsl.
56351    # The nsl library prevents programs from opening the X display
56352    # on Irix 5.2, according to T.E. Dickey.
56353    # The functions gethostbyname, getservbyname, and inet_addr are
56354    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56355    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56356if test "x$ac_cv_func_gethostbyname" = xyes; then :
56357
56358fi
56359
56360    if test $ac_cv_func_gethostbyname = no; then
56361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56362$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56363if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56364  $as_echo_n "(cached) " >&6
56365else
56366  ac_check_lib_save_LIBS=$LIBS
56367LIBS="-lnsl  $LIBS"
56368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56369/* end confdefs.h.  */
56370
56371/* Override any GCC internal prototype to avoid an error.
56372   Use char because int might match the return type of a GCC
56373   builtin and then its argument prototype would still apply.  */
56374#ifdef __cplusplus
56375extern "C"
56376#endif
56377char gethostbyname ();
56378int
56379main ()
56380{
56381return gethostbyname ();
56382  ;
56383  return 0;
56384}
56385_ACEOF
56386if ac_fn_cxx_try_link "$LINENO"; then :
56387  ac_cv_lib_nsl_gethostbyname=yes
56388else
56389  ac_cv_lib_nsl_gethostbyname=no
56390fi
56391rm -f core conftest.err conftest.$ac_objext \
56392    conftest$ac_exeext conftest.$ac_ext
56393LIBS=$ac_check_lib_save_LIBS
56394fi
56395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56396$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56397if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56398  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56399fi
56400
56401      if test $ac_cv_lib_nsl_gethostbyname = no; then
56402	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56403$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56404if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56405  $as_echo_n "(cached) " >&6
56406else
56407  ac_check_lib_save_LIBS=$LIBS
56408LIBS="-lbsd  $LIBS"
56409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56410/* end confdefs.h.  */
56411
56412/* Override any GCC internal prototype to avoid an error.
56413   Use char because int might match the return type of a GCC
56414   builtin and then its argument prototype would still apply.  */
56415#ifdef __cplusplus
56416extern "C"
56417#endif
56418char gethostbyname ();
56419int
56420main ()
56421{
56422return gethostbyname ();
56423  ;
56424  return 0;
56425}
56426_ACEOF
56427if ac_fn_cxx_try_link "$LINENO"; then :
56428  ac_cv_lib_bsd_gethostbyname=yes
56429else
56430  ac_cv_lib_bsd_gethostbyname=no
56431fi
56432rm -f core conftest.err conftest.$ac_objext \
56433    conftest$ac_exeext conftest.$ac_ext
56434LIBS=$ac_check_lib_save_LIBS
56435fi
56436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56437$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56438if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56439  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56440fi
56441
56442      fi
56443    fi
56444
56445    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56446    # socket/setsockopt and other routines are undefined under SCO ODT
56447    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56448    # on later versions), says Simon Leinen: it contains gethostby*
56449    # variants that don't use the name server (or something).  -lsocket
56450    # must be given before -lnsl if both are needed.  We assume that
56451    # if connect needs -lnsl, so does gethostbyname.
56452    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56453if test "x$ac_cv_func_connect" = xyes; then :
56454
56455fi
56456
56457    if test $ac_cv_func_connect = no; then
56458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56459$as_echo_n "checking for connect in -lsocket... " >&6; }
56460if ${ac_cv_lib_socket_connect+:} false; then :
56461  $as_echo_n "(cached) " >&6
56462else
56463  ac_check_lib_save_LIBS=$LIBS
56464LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56466/* end confdefs.h.  */
56467
56468/* Override any GCC internal prototype to avoid an error.
56469   Use char because int might match the return type of a GCC
56470   builtin and then its argument prototype would still apply.  */
56471#ifdef __cplusplus
56472extern "C"
56473#endif
56474char connect ();
56475int
56476main ()
56477{
56478return connect ();
56479  ;
56480  return 0;
56481}
56482_ACEOF
56483if ac_fn_cxx_try_link "$LINENO"; then :
56484  ac_cv_lib_socket_connect=yes
56485else
56486  ac_cv_lib_socket_connect=no
56487fi
56488rm -f core conftest.err conftest.$ac_objext \
56489    conftest$ac_exeext conftest.$ac_ext
56490LIBS=$ac_check_lib_save_LIBS
56491fi
56492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56493$as_echo "$ac_cv_lib_socket_connect" >&6; }
56494if test "x$ac_cv_lib_socket_connect" = xyes; then :
56495  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56496fi
56497
56498    fi
56499
56500    # Guillermo Gomez says -lposix is necessary on A/UX.
56501    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56502if test "x$ac_cv_func_remove" = xyes; then :
56503
56504fi
56505
56506    if test $ac_cv_func_remove = no; then
56507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56508$as_echo_n "checking for remove in -lposix... " >&6; }
56509if ${ac_cv_lib_posix_remove+:} false; then :
56510  $as_echo_n "(cached) " >&6
56511else
56512  ac_check_lib_save_LIBS=$LIBS
56513LIBS="-lposix  $LIBS"
56514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56515/* end confdefs.h.  */
56516
56517/* Override any GCC internal prototype to avoid an error.
56518   Use char because int might match the return type of a GCC
56519   builtin and then its argument prototype would still apply.  */
56520#ifdef __cplusplus
56521extern "C"
56522#endif
56523char remove ();
56524int
56525main ()
56526{
56527return remove ();
56528  ;
56529  return 0;
56530}
56531_ACEOF
56532if ac_fn_cxx_try_link "$LINENO"; then :
56533  ac_cv_lib_posix_remove=yes
56534else
56535  ac_cv_lib_posix_remove=no
56536fi
56537rm -f core conftest.err conftest.$ac_objext \
56538    conftest$ac_exeext conftest.$ac_ext
56539LIBS=$ac_check_lib_save_LIBS
56540fi
56541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56542$as_echo "$ac_cv_lib_posix_remove" >&6; }
56543if test "x$ac_cv_lib_posix_remove" = xyes; then :
56544  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56545fi
56546
56547    fi
56548
56549    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56550    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56551if test "x$ac_cv_func_shmat" = xyes; then :
56552
56553fi
56554
56555    if test $ac_cv_func_shmat = no; then
56556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56557$as_echo_n "checking for shmat in -lipc... " >&6; }
56558if ${ac_cv_lib_ipc_shmat+:} false; then :
56559  $as_echo_n "(cached) " >&6
56560else
56561  ac_check_lib_save_LIBS=$LIBS
56562LIBS="-lipc  $LIBS"
56563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56564/* end confdefs.h.  */
56565
56566/* Override any GCC internal prototype to avoid an error.
56567   Use char because int might match the return type of a GCC
56568   builtin and then its argument prototype would still apply.  */
56569#ifdef __cplusplus
56570extern "C"
56571#endif
56572char shmat ();
56573int
56574main ()
56575{
56576return shmat ();
56577  ;
56578  return 0;
56579}
56580_ACEOF
56581if ac_fn_cxx_try_link "$LINENO"; then :
56582  ac_cv_lib_ipc_shmat=yes
56583else
56584  ac_cv_lib_ipc_shmat=no
56585fi
56586rm -f core conftest.err conftest.$ac_objext \
56587    conftest$ac_exeext conftest.$ac_ext
56588LIBS=$ac_check_lib_save_LIBS
56589fi
56590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56591$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56592if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56593  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56594fi
56595
56596    fi
56597  fi
56598
56599  # Check for libraries that X11R6 Xt/Xaw programs need.
56600  ac_save_LDFLAGS=$LDFLAGS
56601  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56602  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56603  # check for ICE first), but we must link in the order -lSM -lICE or
56604  # we get undefined symbols.  So assume we have SM if we have ICE.
56605  # These have to be linked with before -lX11, unlike the other
56606  # libraries we check for below, so use a different variable.
56607  # John Interrante, Karl Berry
56608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56609$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56610if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56611  $as_echo_n "(cached) " >&6
56612else
56613  ac_check_lib_save_LIBS=$LIBS
56614LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56616/* end confdefs.h.  */
56617
56618/* Override any GCC internal prototype to avoid an error.
56619   Use char because int might match the return type of a GCC
56620   builtin and then its argument prototype would still apply.  */
56621#ifdef __cplusplus
56622extern "C"
56623#endif
56624char IceConnectionNumber ();
56625int
56626main ()
56627{
56628return IceConnectionNumber ();
56629  ;
56630  return 0;
56631}
56632_ACEOF
56633if ac_fn_cxx_try_link "$LINENO"; then :
56634  ac_cv_lib_ICE_IceConnectionNumber=yes
56635else
56636  ac_cv_lib_ICE_IceConnectionNumber=no
56637fi
56638rm -f core conftest.err conftest.$ac_objext \
56639    conftest$ac_exeext conftest.$ac_ext
56640LIBS=$ac_check_lib_save_LIBS
56641fi
56642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56643$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56644if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56645  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56646fi
56647
56648  LDFLAGS=$ac_save_LDFLAGS
56649
56650fi
56651
56652
56653    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56654    # this doesn't make sense so we remove it.
56655    if test "x$COMPILE_TYPE" = xcross; then
56656      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56657    fi
56658
56659    if test "x$no_x" = xyes; then
56660
56661  # Print a helpful message on how to acquire the necessary build dependency.
56662  # x11 is the help tag: freetype, cups, alsa etc
56663  MISSING_DEPENDENCY=x11
56664
56665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56666    cygwin_help $MISSING_DEPENDENCY
56667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56668    msys_help $MISSING_DEPENDENCY
56669  else
56670    PKGHANDLER_COMMAND=
56671
56672    case $PKGHANDLER in
56673      apt-get)
56674        apt_help     $MISSING_DEPENDENCY ;;
56675      yum)
56676        yum_help     $MISSING_DEPENDENCY ;;
56677      brew)
56678        brew_help    $MISSING_DEPENDENCY ;;
56679      port)
56680        port_help    $MISSING_DEPENDENCY ;;
56681      pkgutil)
56682        pkgutil_help $MISSING_DEPENDENCY ;;
56683      pkgadd)
56684        pkgadd_help  $MISSING_DEPENDENCY ;;
56685    esac
56686
56687    if test "x$PKGHANDLER_COMMAND" != x; then
56688      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56689    fi
56690  fi
56691
56692      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56693    fi
56694
56695    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56696      OPENWIN_HOME="/usr/openwin"
56697      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56698      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56699          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56700    fi
56701
56702    ac_ext=c
56703ac_cpp='$CPP $CPPFLAGS'
56704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56706ac_compiler_gnu=$ac_cv_c_compiler_gnu
56707
56708    OLD_CFLAGS="$CFLAGS"
56709    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56710
56711    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56712    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56713do :
56714  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56715ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56716          # include <X11/Xlib.h>
56717          # include <X11/Xutil.h>
56718
56719
56720"
56721if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56722  cat >>confdefs.h <<_ACEOF
56723#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56724_ACEOF
56725 X11_HEADERS_OK=yes
56726else
56727  X11_HEADERS_OK=no; break
56728fi
56729
56730done
56731
56732
56733    if test "x$X11_HEADERS_OK" = xno; then
56734
56735  # Print a helpful message on how to acquire the necessary build dependency.
56736  # x11 is the help tag: freetype, cups, alsa etc
56737  MISSING_DEPENDENCY=x11
56738
56739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56740    cygwin_help $MISSING_DEPENDENCY
56741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56742    msys_help $MISSING_DEPENDENCY
56743  else
56744    PKGHANDLER_COMMAND=
56745
56746    case $PKGHANDLER in
56747      apt-get)
56748        apt_help     $MISSING_DEPENDENCY ;;
56749      yum)
56750        yum_help     $MISSING_DEPENDENCY ;;
56751      brew)
56752        brew_help    $MISSING_DEPENDENCY ;;
56753      port)
56754        port_help    $MISSING_DEPENDENCY ;;
56755      pkgutil)
56756        pkgutil_help $MISSING_DEPENDENCY ;;
56757      pkgadd)
56758        pkgadd_help  $MISSING_DEPENDENCY ;;
56759    esac
56760
56761    if test "x$PKGHANDLER_COMMAND" != x; then
56762      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56763    fi
56764  fi
56765
56766      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56767    fi
56768
56769    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56770    # defined in libawt_xawt.
56771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56772$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56773    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56774/* end confdefs.h.  */
56775#include <X11/extensions/Xrender.h>
56776int
56777main ()
56778{
56779XLinearGradient x;
56780  ;
56781  return 0;
56782}
56783_ACEOF
56784if ac_fn_c_try_compile "$LINENO"; then :
56785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56786$as_echo "yes" >&6; }
56787else
56788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56789$as_echo "no" >&6; }
56790         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56791fi
56792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56793
56794    CFLAGS="$OLD_CFLAGS"
56795    ac_ext=cpp
56796ac_cpp='$CXXCPP $CPPFLAGS'
56797ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56798ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56799ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56800
56801  fi # NEEDS_LIB_X11
56802
56803
56804
56805
56806
56807
56808# Check whether --with-cups was given.
56809if test "${with_cups+set}" = set; then :
56810  withval=$with_cups;
56811fi
56812
56813
56814# Check whether --with-cups-include was given.
56815if test "${with_cups_include+set}" = set; then :
56816  withval=$with_cups_include;
56817fi
56818
56819
56820  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56821    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56822        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56823      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56824$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56825    fi
56826    CUPS_CFLAGS=
56827  else
56828    CUPS_FOUND=no
56829
56830    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56831      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56832    fi
56833
56834    if test "x${with_cups}" != x; then
56835      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56836$as_echo_n "checking for cups headers... " >&6; }
56837      if test -s "${with_cups}/include/cups/cups.h"; then
56838        CUPS_CFLAGS="-I${with_cups}/include"
56839        CUPS_FOUND=yes
56840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56841$as_echo "$CUPS_FOUND" >&6; }
56842      else
56843        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56844      fi
56845    fi
56846    if test "x${with_cups_include}" != x; then
56847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56848$as_echo_n "checking for cups headers... " >&6; }
56849      if test -s "${with_cups_include}/cups/cups.h"; then
56850        CUPS_CFLAGS="-I${with_cups_include}"
56851        CUPS_FOUND=yes
56852        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56853$as_echo "$CUPS_FOUND" >&6; }
56854      else
56855        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56856      fi
56857    fi
56858    if test "x$CUPS_FOUND" = xno; then
56859      # Are the cups headers installed in the default /usr/include location?
56860      for ac_header in cups/cups.h cups/ppd.h
56861do :
56862  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56863ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56864if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56865  cat >>confdefs.h <<_ACEOF
56866#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56867_ACEOF
56868
56869          CUPS_FOUND=yes
56870          CUPS_CFLAGS=
56871          DEFAULT_CUPS=yes
56872
56873fi
56874
56875done
56876
56877    fi
56878    if test "x$CUPS_FOUND" = xno; then
56879
56880  # Print a helpful message on how to acquire the necessary build dependency.
56881  # cups is the help tag: freetype, cups, alsa etc
56882  MISSING_DEPENDENCY=cups
56883
56884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56885    cygwin_help $MISSING_DEPENDENCY
56886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56887    msys_help $MISSING_DEPENDENCY
56888  else
56889    PKGHANDLER_COMMAND=
56890
56891    case $PKGHANDLER in
56892      apt-get)
56893        apt_help     $MISSING_DEPENDENCY ;;
56894      yum)
56895        yum_help     $MISSING_DEPENDENCY ;;
56896      brew)
56897        brew_help    $MISSING_DEPENDENCY ;;
56898      port)
56899        port_help    $MISSING_DEPENDENCY ;;
56900      pkgutil)
56901        pkgutil_help $MISSING_DEPENDENCY ;;
56902      pkgadd)
56903        pkgadd_help  $MISSING_DEPENDENCY ;;
56904    esac
56905
56906    if test "x$PKGHANDLER_COMMAND" != x; then
56907      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56908    fi
56909  fi
56910
56911      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56912    fi
56913  fi
56914
56915
56916
56917
56918
56919# Check whether --with-freetype was given.
56920if test "${with_freetype+set}" = set; then :
56921  withval=$with_freetype;
56922fi
56923
56924
56925# Check whether --with-freetype-include was given.
56926if test "${with_freetype_include+set}" = set; then :
56927  withval=$with_freetype_include;
56928fi
56929
56930
56931# Check whether --with-freetype-lib was given.
56932if test "${with_freetype_lib+set}" = set; then :
56933  withval=$with_freetype_lib;
56934fi
56935
56936
56937# Check whether --with-freetype-src was given.
56938if test "${with_freetype_src+set}" = set; then :
56939  withval=$with_freetype_src;
56940fi
56941
56942  # Check whether --enable-freetype-bundling was given.
56943if test "${enable_freetype_bundling+set}" = set; then :
56944  enableval=$enable_freetype_bundling;
56945fi
56946
56947
56948  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56949  FREETYPE_BASE_NAME=freetype
56950  FREETYPE_CFLAGS=
56951  FREETYPE_LIBS=
56952  FREETYPE_BUNDLE_LIB_PATH=
56953
56954  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56955    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56956        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56957        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56958        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56959      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56960$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56961    fi
56962    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56963      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56964$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56965    fi
56966  else
56967    # freetype is needed to build; go get it!
56968
56969    BUNDLE_FREETYPE="$enable_freetype_bundling"
56970
56971    if  test "x$with_freetype_src" != x; then
56972      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56973        # Try to build freetype if --with-freetype-src was given on Windows
56974
56975  FREETYPE_SRC_PATH="$with_freetype_src"
56976  BUILD_FREETYPE=yes
56977
56978  # Check if the freetype sources are acessible..
56979  if ! test -d $FREETYPE_SRC_PATH; then
56980    { $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
56981$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56982    BUILD_FREETYPE=no
56983  fi
56984  # ..and contain a vc2010 project file
56985  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56986  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56987    { $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
56988$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56989    BUILD_FREETYPE=no
56990  fi
56991  # Now check if configure found a version of 'msbuild.exe'
56992  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56993    { $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
56994$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;}
56995    BUILD_FREETYPE=no
56996  fi
56997
56998  # Ready to go..
56999  if test "x$BUILD_FREETYPE" = xyes; then
57000    # msbuild requires trailing slashes for output directories
57001    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57002    freetype_lib_path_unix="$freetype_lib_path"
57003    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57004
57005  unix_path="$vcxproj_path"
57006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57007    windows_path=`$CYGPATH -m "$unix_path"`
57008    vcxproj_path="$windows_path"
57009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57010    windows_path=`cmd //c echo $unix_path`
57011    vcxproj_path="$windows_path"
57012  fi
57013
57014
57015  unix_path="$freetype_lib_path"
57016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57017    windows_path=`$CYGPATH -m "$unix_path"`
57018    freetype_lib_path="$windows_path"
57019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57020    windows_path=`cmd //c echo $unix_path`
57021    freetype_lib_path="$windows_path"
57022  fi
57023
57024
57025  unix_path="$freetype_obj_path"
57026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57027    windows_path=`$CYGPATH -m "$unix_path"`
57028    freetype_obj_path="$windows_path"
57029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57030    windows_path=`cmd //c echo $unix_path`
57031    freetype_obj_path="$windows_path"
57032  fi
57033
57034    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57035      freetype_platform=x64
57036    else
57037      freetype_platform=win32
57038    fi
57039
57040    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57041    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57042    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57043    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57044    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57045$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57046
57047    # First we try to build the freetype.dll
57048    $ECHO -e "@echo off\n"\
57049        "$MSBUILD $vcxproj_path "\
57050        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57051        "/p:Configuration=\"Release Multithreaded\" "\
57052        "/p:Platform=$freetype_platform "\
57053        "/p:ConfigurationType=DynamicLibrary "\
57054        "/p:TargetName=freetype "\
57055        "/p:OutDir=\"$freetype_lib_path\" "\
57056        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57057    cmd /c freetype.bat
57058
57059    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57060      # If that succeeds we also build freetype.lib
57061      $ECHO -e "@echo off\n"\
57062          "$MSBUILD $vcxproj_path "\
57063          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57064          "/p:Configuration=\"Release Multithreaded\" "\
57065          "/p:Platform=$freetype_platform "\
57066          "/p:ConfigurationType=StaticLibrary "\
57067          "/p:TargetName=freetype "\
57068          "/p:OutDir=\"$freetype_lib_path\" "\
57069          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57070      cmd /c freetype.bat
57071
57072      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57073        # Once we build both, lib and dll, set freetype lib and include path appropriately
57074        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57075        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57076        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57077$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57078      else
57079        BUILD_FREETYPE=no
57080      fi
57081    else
57082      BUILD_FREETYPE=no
57083    fi
57084  fi
57085
57086        if test "x$BUILD_FREETYPE" = xyes; then
57087          # Okay, we built it. Check that it works.
57088
57089  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57090  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57091  METHOD="--with-freetype-src"
57092
57093  # Let's start with an optimistic view of the world :-)
57094  FOUND_FREETYPE=yes
57095
57096  # First look for the canonical freetype main include file ft2build.h.
57097  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57098    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57099    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57100    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57101      # Fail.
57102      FOUND_FREETYPE=no
57103    fi
57104  fi
57105
57106  if test "x$FOUND_FREETYPE" = xyes; then
57107    # Include file found, let's continue the sanity check.
57108    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57109$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57110
57111    # Reset to default value
57112    FREETYPE_BASE_NAME=freetype
57113    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57114    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57115      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57116          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57117        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57118        # for the .6 version explicitly.
57119        FREETYPE_BASE_NAME=freetype.6
57120        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57121        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57122$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57123      else
57124        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57126        FOUND_FREETYPE=no
57127      fi
57128    else
57129      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57130        # On Windows, we will need both .lib and .dll file.
57131        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57132          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57133$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57134          FOUND_FREETYPE=no
57135        fi
57136      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57137          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57138        # Found lib in isa dir, use that instead.
57139        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57140        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57141$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57142      fi
57143    fi
57144  fi
57145
57146  if test "x$FOUND_FREETYPE" = xyes; then
57147
57148  # Only process if variable expands to non-empty
57149
57150  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57152
57153  # Input might be given as Windows format, start by converting to
57154  # unix format.
57155  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57156  new_path=`$CYGPATH -u "$path"`
57157
57158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57161  # "foo.exe" is OK but "foo" is an error.
57162  #
57163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57164  # It is also a way to make sure we got the proper file name for the real test later on.
57165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57166  if test "x$test_shortpath" = x; then
57167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57170  fi
57171
57172  # Call helper function which possibly converts this using DOS-style short mode.
57173  # If so, the updated path is stored in $new_path.
57174
57175  input_path="$new_path"
57176  # Check if we need to convert this using DOS-style short mode. If the path
57177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57178  # take no chances and rewrite it.
57179  # Note: m4 eats our [], so we need to use [ and ] instead.
57180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57181  if test "x$has_forbidden_chars" != x; then
57182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57186      # Going to short mode and back again did indeed matter. Since short mode is
57187      # case insensitive, let's make it lowercase to improve readability.
57188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57189      # Now convert it back to Unix-style (cygpath)
57190      input_path=`$CYGPATH -u "$shortmode_path"`
57191      new_path="$input_path"
57192    fi
57193  fi
57194
57195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57196  if test "x$test_cygdrive_prefix" = x; then
57197    # As a simple fix, exclude /usr/bin since it's not a real path.
57198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57200      # a path prefixed by /cygdrive for fixpath to work.
57201      new_path="$CYGWIN_ROOT_PATH$input_path"
57202    fi
57203  fi
57204
57205
57206  if test "x$path" != "x$new_path"; then
57207    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57210  fi
57211
57212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57213
57214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57215  has_colon=`$ECHO $path | $GREP ^.:`
57216  new_path="$path"
57217  if test "x$has_colon" = x; then
57218    # Not in mixed or Windows style, start by that.
57219    new_path=`cmd //c echo $path`
57220  fi
57221
57222
57223  input_path="$new_path"
57224  # Check if we need to convert this using DOS-style short mode. If the path
57225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57226  # take no chances and rewrite it.
57227  # Note: m4 eats our [], so we need to use [ and ] instead.
57228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57229  if test "x$has_forbidden_chars" != x; then
57230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57232  fi
57233
57234
57235  windows_path="$new_path"
57236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57237    unix_path=`$CYGPATH -u "$windows_path"`
57238    new_path="$unix_path"
57239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57241    new_path="$unix_path"
57242  fi
57243
57244  if test "x$path" != "x$new_path"; then
57245    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57248  fi
57249
57250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57252
57253    else
57254      # We're on a unix platform. Hooray! :)
57255      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57256      has_space=`$ECHO "$path" | $GREP " "`
57257      if test "x$has_space" != x; then
57258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57261      fi
57262
57263      # Use eval to expand a potential ~
57264      eval path="$path"
57265      if test ! -f "$path" && test ! -d "$path"; then
57266        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57267      fi
57268
57269      if test -d "$path"; then
57270        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57271      else
57272        dir="`$DIRNAME "$path"`"
57273        base="`$BASENAME "$path"`"
57274        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57275      fi
57276    fi
57277  fi
57278
57279
57280  # Only process if variable expands to non-empty
57281
57282  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57284
57285  # Input might be given as Windows format, start by converting to
57286  # unix format.
57287  path="$POTENTIAL_FREETYPE_LIB_PATH"
57288  new_path=`$CYGPATH -u "$path"`
57289
57290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57293  # "foo.exe" is OK but "foo" is an error.
57294  #
57295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57296  # It is also a way to make sure we got the proper file name for the real test later on.
57297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57298  if test "x$test_shortpath" = x; then
57299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57301    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57302  fi
57303
57304  # Call helper function which possibly converts this using DOS-style short mode.
57305  # If so, the updated path is stored in $new_path.
57306
57307  input_path="$new_path"
57308  # Check if we need to convert this using DOS-style short mode. If the path
57309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57310  # take no chances and rewrite it.
57311  # Note: m4 eats our [], so we need to use [ and ] instead.
57312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57313  if test "x$has_forbidden_chars" != x; then
57314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57318      # Going to short mode and back again did indeed matter. Since short mode is
57319      # case insensitive, let's make it lowercase to improve readability.
57320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57321      # Now convert it back to Unix-style (cygpath)
57322      input_path=`$CYGPATH -u "$shortmode_path"`
57323      new_path="$input_path"
57324    fi
57325  fi
57326
57327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57328  if test "x$test_cygdrive_prefix" = x; then
57329    # As a simple fix, exclude /usr/bin since it's not a real path.
57330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57332      # a path prefixed by /cygdrive for fixpath to work.
57333      new_path="$CYGWIN_ROOT_PATH$input_path"
57334    fi
57335  fi
57336
57337
57338  if test "x$path" != "x$new_path"; then
57339    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57342  fi
57343
57344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57345
57346  path="$POTENTIAL_FREETYPE_LIB_PATH"
57347  has_colon=`$ECHO $path | $GREP ^.:`
57348  new_path="$path"
57349  if test "x$has_colon" = x; then
57350    # Not in mixed or Windows style, start by that.
57351    new_path=`cmd //c echo $path`
57352  fi
57353
57354
57355  input_path="$new_path"
57356  # Check if we need to convert this using DOS-style short mode. If the path
57357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57358  # take no chances and rewrite it.
57359  # Note: m4 eats our [], so we need to use [ and ] instead.
57360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57361  if test "x$has_forbidden_chars" != x; then
57362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57364  fi
57365
57366
57367  windows_path="$new_path"
57368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57369    unix_path=`$CYGPATH -u "$windows_path"`
57370    new_path="$unix_path"
57371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57373    new_path="$unix_path"
57374  fi
57375
57376  if test "x$path" != "x$new_path"; then
57377    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57380  fi
57381
57382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57384
57385    else
57386      # We're on a unix platform. Hooray! :)
57387      path="$POTENTIAL_FREETYPE_LIB_PATH"
57388      has_space=`$ECHO "$path" | $GREP " "`
57389      if test "x$has_space" != x; then
57390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57393      fi
57394
57395      # Use eval to expand a potential ~
57396      eval path="$path"
57397      if test ! -f "$path" && test ! -d "$path"; then
57398        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57399      fi
57400
57401      if test -d "$path"; then
57402        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57403      else
57404        dir="`$DIRNAME "$path"`"
57405        base="`$BASENAME "$path"`"
57406        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57407      fi
57408    fi
57409  fi
57410
57411
57412    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57414$as_echo_n "checking for freetype includes... " >&6; }
57415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57416$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57417    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57419$as_echo_n "checking for freetype libraries... " >&6; }
57420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57421$as_echo "$FREETYPE_LIB_PATH" >&6; }
57422  fi
57423
57424          if test "x$FOUND_FREETYPE" != xyes; then
57425            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57426          fi
57427        else
57428          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57429$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57430          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57431        fi
57432      else
57433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57434$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57435      fi
57436    fi
57437
57438    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57439      # User has specified settings
57440
57441      if test "x$BUNDLE_FREETYPE" = x; then
57442        # If not specified, default is to bundle freetype
57443        BUNDLE_FREETYPE=yes
57444      fi
57445
57446      if test "x$with_freetype" != x; then
57447        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57448        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57449      fi
57450
57451      # Allow --with-freetype-lib and --with-freetype-include to override
57452      if test "x$with_freetype_include" != x; then
57453        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57454      fi
57455      if test "x$with_freetype_lib" != x; then
57456        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57457      fi
57458
57459      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57460        # Okay, we got it. Check that it works.
57461
57462  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57463  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57464  METHOD="--with-freetype"
57465
57466  # Let's start with an optimistic view of the world :-)
57467  FOUND_FREETYPE=yes
57468
57469  # First look for the canonical freetype main include file ft2build.h.
57470  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57471    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57472    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57473    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57474      # Fail.
57475      FOUND_FREETYPE=no
57476    fi
57477  fi
57478
57479  if test "x$FOUND_FREETYPE" = xyes; then
57480    # Include file found, let's continue the sanity check.
57481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57482$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57483
57484    # Reset to default value
57485    FREETYPE_BASE_NAME=freetype
57486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57488      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57490        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57491        # for the .6 version explicitly.
57492        FREETYPE_BASE_NAME=freetype.6
57493        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57494        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57495$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57496      else
57497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57499        FOUND_FREETYPE=no
57500      fi
57501    else
57502      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57503        # On Windows, we will need both .lib and .dll file.
57504        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57505          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57506$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57507          FOUND_FREETYPE=no
57508        fi
57509      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57510          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57511        # Found lib in isa dir, use that instead.
57512        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57513        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57514$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57515      fi
57516    fi
57517  fi
57518
57519  if test "x$FOUND_FREETYPE" = xyes; then
57520
57521  # Only process if variable expands to non-empty
57522
57523  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57525
57526  # Input might be given as Windows format, start by converting to
57527  # unix format.
57528  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57529  new_path=`$CYGPATH -u "$path"`
57530
57531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57534  # "foo.exe" is OK but "foo" is an error.
57535  #
57536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57537  # It is also a way to make sure we got the proper file name for the real test later on.
57538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57539  if test "x$test_shortpath" = x; then
57540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57543  fi
57544
57545  # Call helper function which possibly converts this using DOS-style short mode.
57546  # If so, the updated path is stored in $new_path.
57547
57548  input_path="$new_path"
57549  # Check if we need to convert this using DOS-style short mode. If the path
57550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57551  # take no chances and rewrite it.
57552  # Note: m4 eats our [], so we need to use [ and ] instead.
57553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57554  if test "x$has_forbidden_chars" != x; then
57555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57559      # Going to short mode and back again did indeed matter. Since short mode is
57560      # case insensitive, let's make it lowercase to improve readability.
57561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57562      # Now convert it back to Unix-style (cygpath)
57563      input_path=`$CYGPATH -u "$shortmode_path"`
57564      new_path="$input_path"
57565    fi
57566  fi
57567
57568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57569  if test "x$test_cygdrive_prefix" = x; then
57570    # As a simple fix, exclude /usr/bin since it's not a real path.
57571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57573      # a path prefixed by /cygdrive for fixpath to work.
57574      new_path="$CYGWIN_ROOT_PATH$input_path"
57575    fi
57576  fi
57577
57578
57579  if test "x$path" != "x$new_path"; then
57580    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57583  fi
57584
57585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57586
57587  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57588  has_colon=`$ECHO $path | $GREP ^.:`
57589  new_path="$path"
57590  if test "x$has_colon" = x; then
57591    # Not in mixed or Windows style, start by that.
57592    new_path=`cmd //c echo $path`
57593  fi
57594
57595
57596  input_path="$new_path"
57597  # Check if we need to convert this using DOS-style short mode. If the path
57598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57599  # take no chances and rewrite it.
57600  # Note: m4 eats our [], so we need to use [ and ] instead.
57601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57602  if test "x$has_forbidden_chars" != x; then
57603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57605  fi
57606
57607
57608  windows_path="$new_path"
57609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57610    unix_path=`$CYGPATH -u "$windows_path"`
57611    new_path="$unix_path"
57612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57614    new_path="$unix_path"
57615  fi
57616
57617  if test "x$path" != "x$new_path"; then
57618    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57621  fi
57622
57623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57625
57626    else
57627      # We're on a unix platform. Hooray! :)
57628      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57629      has_space=`$ECHO "$path" | $GREP " "`
57630      if test "x$has_space" != x; then
57631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57634      fi
57635
57636      # Use eval to expand a potential ~
57637      eval path="$path"
57638      if test ! -f "$path" && test ! -d "$path"; then
57639        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57640      fi
57641
57642      if test -d "$path"; then
57643        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57644      else
57645        dir="`$DIRNAME "$path"`"
57646        base="`$BASENAME "$path"`"
57647        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57648      fi
57649    fi
57650  fi
57651
57652
57653  # Only process if variable expands to non-empty
57654
57655  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57657
57658  # Input might be given as Windows format, start by converting to
57659  # unix format.
57660  path="$POTENTIAL_FREETYPE_LIB_PATH"
57661  new_path=`$CYGPATH -u "$path"`
57662
57663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57666  # "foo.exe" is OK but "foo" is an error.
57667  #
57668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57669  # It is also a way to make sure we got the proper file name for the real test later on.
57670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57671  if test "x$test_shortpath" = x; then
57672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57674    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57675  fi
57676
57677  # Call helper function which possibly converts this using DOS-style short mode.
57678  # If so, the updated path is stored in $new_path.
57679
57680  input_path="$new_path"
57681  # Check if we need to convert this using DOS-style short mode. If the path
57682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57683  # take no chances and rewrite it.
57684  # Note: m4 eats our [], so we need to use [ and ] instead.
57685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57686  if test "x$has_forbidden_chars" != x; then
57687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57691      # Going to short mode and back again did indeed matter. Since short mode is
57692      # case insensitive, let's make it lowercase to improve readability.
57693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57694      # Now convert it back to Unix-style (cygpath)
57695      input_path=`$CYGPATH -u "$shortmode_path"`
57696      new_path="$input_path"
57697    fi
57698  fi
57699
57700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57701  if test "x$test_cygdrive_prefix" = x; then
57702    # As a simple fix, exclude /usr/bin since it's not a real path.
57703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57705      # a path prefixed by /cygdrive for fixpath to work.
57706      new_path="$CYGWIN_ROOT_PATH$input_path"
57707    fi
57708  fi
57709
57710
57711  if test "x$path" != "x$new_path"; then
57712    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57715  fi
57716
57717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57718
57719  path="$POTENTIAL_FREETYPE_LIB_PATH"
57720  has_colon=`$ECHO $path | $GREP ^.:`
57721  new_path="$path"
57722  if test "x$has_colon" = x; then
57723    # Not in mixed or Windows style, start by that.
57724    new_path=`cmd //c echo $path`
57725  fi
57726
57727
57728  input_path="$new_path"
57729  # Check if we need to convert this using DOS-style short mode. If the path
57730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57731  # take no chances and rewrite it.
57732  # Note: m4 eats our [], so we need to use [ and ] instead.
57733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57734  if test "x$has_forbidden_chars" != x; then
57735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57737  fi
57738
57739
57740  windows_path="$new_path"
57741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57742    unix_path=`$CYGPATH -u "$windows_path"`
57743    new_path="$unix_path"
57744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57746    new_path="$unix_path"
57747  fi
57748
57749  if test "x$path" != "x$new_path"; then
57750    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57753  fi
57754
57755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57757
57758    else
57759      # We're on a unix platform. Hooray! :)
57760      path="$POTENTIAL_FREETYPE_LIB_PATH"
57761      has_space=`$ECHO "$path" | $GREP " "`
57762      if test "x$has_space" != x; then
57763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57766      fi
57767
57768      # Use eval to expand a potential ~
57769      eval path="$path"
57770      if test ! -f "$path" && test ! -d "$path"; then
57771        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57772      fi
57773
57774      if test -d "$path"; then
57775        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57776      else
57777        dir="`$DIRNAME "$path"`"
57778        base="`$BASENAME "$path"`"
57779        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57780      fi
57781    fi
57782  fi
57783
57784
57785    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57787$as_echo_n "checking for freetype includes... " >&6; }
57788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57789$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57790    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57792$as_echo_n "checking for freetype libraries... " >&6; }
57793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57794$as_echo "$FREETYPE_LIB_PATH" >&6; }
57795  fi
57796
57797        if test "x$FOUND_FREETYPE" != xyes; then
57798          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57799        fi
57800      else
57801        # User specified only one of lib or include. This is an error.
57802        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57803          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57804$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57805          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57806        else
57807          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57808$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57809          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57810        fi
57811      fi
57812    else
57813      # User did not specify settings, but we need freetype. Try to locate it.
57814
57815      if test "x$BUNDLE_FREETYPE" = x; then
57816        # If not specified, default is to bundle freetype only on windows
57817        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57818          BUNDLE_FREETYPE=yes
57819        else
57820          BUNDLE_FREETYPE=no
57821        fi
57822      fi
57823
57824      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57825      if test "x$SYSROOT" = x; then
57826        if test "x$FOUND_FREETYPE" != xyes; then
57827          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57828          if test "x$PKG_CONFIG" != x; then
57829
57830pkg_failed=no
57831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57832$as_echo_n "checking for FREETYPE... " >&6; }
57833
57834if test -n "$FREETYPE_CFLAGS"; then
57835    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57836 elif test -n "$PKG_CONFIG"; then
57837    if test -n "$PKG_CONFIG" && \
57838    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57839  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57840  ac_status=$?
57841  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57842  test $ac_status = 0; }; then
57843  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57844else
57845  pkg_failed=yes
57846fi
57847 else
57848    pkg_failed=untried
57849fi
57850if test -n "$FREETYPE_LIBS"; then
57851    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57852 elif test -n "$PKG_CONFIG"; then
57853    if test -n "$PKG_CONFIG" && \
57854    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57855  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57856  ac_status=$?
57857  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57858  test $ac_status = 0; }; then
57859  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57860else
57861  pkg_failed=yes
57862fi
57863 else
57864    pkg_failed=untried
57865fi
57866
57867
57868
57869if test $pkg_failed = yes; then
57870
57871if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57872        _pkg_short_errors_supported=yes
57873else
57874        _pkg_short_errors_supported=no
57875fi
57876        if test $_pkg_short_errors_supported = yes; then
57877	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57878        else
57879	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57880        fi
57881	# Put the nasty error message in config.log where it belongs
57882	echo "$FREETYPE_PKG_ERRORS" >&5
57883
57884	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57885$as_echo "no" >&6; }
57886                FOUND_FREETYPE=no
57887elif test $pkg_failed = untried; then
57888	FOUND_FREETYPE=no
57889else
57890	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57891	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57893$as_echo "yes" >&6; }
57894	FOUND_FREETYPE=yes
57895fi
57896            if test "x$FOUND_FREETYPE" = xyes; then
57897              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57898              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57899              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57900              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57901                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57902              fi
57903              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57904              if test "x$BUNDLE_FREETYPE" = xyes; then
57905                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57906$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57907                FOUND_FREETYPE=no
57908              else
57909                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57910$as_echo_n "checking for freetype... " >&6; }
57911                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57912$as_echo "yes (using pkg-config)" >&6; }
57913              fi
57914            fi
57915          fi
57916        fi
57917      fi
57918
57919      if test "x$FOUND_FREETYPE" != xyes; then
57920        # Check in well-known locations
57921        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57922          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57923
57924  windows_path="$FREETYPE_BASE_DIR"
57925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57926    unix_path=`$CYGPATH -u "$windows_path"`
57927    FREETYPE_BASE_DIR="$unix_path"
57928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57930    FREETYPE_BASE_DIR="$unix_path"
57931  fi
57932
57933
57934  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57935  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57936  METHOD="well-known location"
57937
57938  # Let's start with an optimistic view of the world :-)
57939  FOUND_FREETYPE=yes
57940
57941  # First look for the canonical freetype main include file ft2build.h.
57942  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57943    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57944    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57945    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57946      # Fail.
57947      FOUND_FREETYPE=no
57948    fi
57949  fi
57950
57951  if test "x$FOUND_FREETYPE" = xyes; then
57952    # Include file found, let's continue the sanity check.
57953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57954$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57955
57956    # Reset to default value
57957    FREETYPE_BASE_NAME=freetype
57958    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57959    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57960      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57961          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57962        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57963        # for the .6 version explicitly.
57964        FREETYPE_BASE_NAME=freetype.6
57965        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57966        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57967$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57968      else
57969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57970$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57971        FOUND_FREETYPE=no
57972      fi
57973    else
57974      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57975        # On Windows, we will need both .lib and .dll file.
57976        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57977          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57979          FOUND_FREETYPE=no
57980        fi
57981      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57982          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57983        # Found lib in isa dir, use that instead.
57984        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57985        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57986$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57987      fi
57988    fi
57989  fi
57990
57991  if test "x$FOUND_FREETYPE" = xyes; then
57992
57993  # Only process if variable expands to non-empty
57994
57995  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57997
57998  # Input might be given as Windows format, start by converting to
57999  # unix format.
58000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58001  new_path=`$CYGPATH -u "$path"`
58002
58003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58006  # "foo.exe" is OK but "foo" is an error.
58007  #
58008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58009  # It is also a way to make sure we got the proper file name for the real test later on.
58010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58011  if test "x$test_shortpath" = x; then
58012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58014    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58015  fi
58016
58017  # Call helper function which possibly converts this using DOS-style short mode.
58018  # If so, the updated path is stored in $new_path.
58019
58020  input_path="$new_path"
58021  # Check if we need to convert this using DOS-style short mode. If the path
58022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58023  # take no chances and rewrite it.
58024  # Note: m4 eats our [], so we need to use [ and ] instead.
58025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58026  if test "x$has_forbidden_chars" != x; then
58027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58031      # Going to short mode and back again did indeed matter. Since short mode is
58032      # case insensitive, let's make it lowercase to improve readability.
58033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58034      # Now convert it back to Unix-style (cygpath)
58035      input_path=`$CYGPATH -u "$shortmode_path"`
58036      new_path="$input_path"
58037    fi
58038  fi
58039
58040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58041  if test "x$test_cygdrive_prefix" = x; then
58042    # As a simple fix, exclude /usr/bin since it's not a real path.
58043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58045      # a path prefixed by /cygdrive for fixpath to work.
58046      new_path="$CYGWIN_ROOT_PATH$input_path"
58047    fi
58048  fi
58049
58050
58051  if test "x$path" != "x$new_path"; then
58052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58055  fi
58056
58057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58058
58059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58060  has_colon=`$ECHO $path | $GREP ^.:`
58061  new_path="$path"
58062  if test "x$has_colon" = x; then
58063    # Not in mixed or Windows style, start by that.
58064    new_path=`cmd //c echo $path`
58065  fi
58066
58067
58068  input_path="$new_path"
58069  # Check if we need to convert this using DOS-style short mode. If the path
58070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58071  # take no chances and rewrite it.
58072  # Note: m4 eats our [], so we need to use [ and ] instead.
58073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58074  if test "x$has_forbidden_chars" != x; then
58075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58077  fi
58078
58079
58080  windows_path="$new_path"
58081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58082    unix_path=`$CYGPATH -u "$windows_path"`
58083    new_path="$unix_path"
58084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58086    new_path="$unix_path"
58087  fi
58088
58089  if test "x$path" != "x$new_path"; then
58090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58093  fi
58094
58095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58097
58098    else
58099      # We're on a unix platform. Hooray! :)
58100      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58101      has_space=`$ECHO "$path" | $GREP " "`
58102      if test "x$has_space" != x; then
58103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58106      fi
58107
58108      # Use eval to expand a potential ~
58109      eval path="$path"
58110      if test ! -f "$path" && test ! -d "$path"; then
58111        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58112      fi
58113
58114      if test -d "$path"; then
58115        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58116      else
58117        dir="`$DIRNAME "$path"`"
58118        base="`$BASENAME "$path"`"
58119        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58120      fi
58121    fi
58122  fi
58123
58124
58125  # Only process if variable expands to non-empty
58126
58127  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58129
58130  # Input might be given as Windows format, start by converting to
58131  # unix format.
58132  path="$POTENTIAL_FREETYPE_LIB_PATH"
58133  new_path=`$CYGPATH -u "$path"`
58134
58135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58138  # "foo.exe" is OK but "foo" is an error.
58139  #
58140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58141  # It is also a way to make sure we got the proper file name for the real test later on.
58142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58143  if test "x$test_shortpath" = x; then
58144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58146    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58147  fi
58148
58149  # Call helper function which possibly converts this using DOS-style short mode.
58150  # If so, the updated path is stored in $new_path.
58151
58152  input_path="$new_path"
58153  # Check if we need to convert this using DOS-style short mode. If the path
58154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58155  # take no chances and rewrite it.
58156  # Note: m4 eats our [], so we need to use [ and ] instead.
58157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58158  if test "x$has_forbidden_chars" != x; then
58159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58163      # Going to short mode and back again did indeed matter. Since short mode is
58164      # case insensitive, let's make it lowercase to improve readability.
58165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58166      # Now convert it back to Unix-style (cygpath)
58167      input_path=`$CYGPATH -u "$shortmode_path"`
58168      new_path="$input_path"
58169    fi
58170  fi
58171
58172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58173  if test "x$test_cygdrive_prefix" = x; then
58174    # As a simple fix, exclude /usr/bin since it's not a real path.
58175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58177      # a path prefixed by /cygdrive for fixpath to work.
58178      new_path="$CYGWIN_ROOT_PATH$input_path"
58179    fi
58180  fi
58181
58182
58183  if test "x$path" != "x$new_path"; then
58184    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58186$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58187  fi
58188
58189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58190
58191  path="$POTENTIAL_FREETYPE_LIB_PATH"
58192  has_colon=`$ECHO $path | $GREP ^.:`
58193  new_path="$path"
58194  if test "x$has_colon" = x; then
58195    # Not in mixed or Windows style, start by that.
58196    new_path=`cmd //c echo $path`
58197  fi
58198
58199
58200  input_path="$new_path"
58201  # Check if we need to convert this using DOS-style short mode. If the path
58202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58203  # take no chances and rewrite it.
58204  # Note: m4 eats our [], so we need to use [ and ] instead.
58205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58206  if test "x$has_forbidden_chars" != x; then
58207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58209  fi
58210
58211
58212  windows_path="$new_path"
58213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58214    unix_path=`$CYGPATH -u "$windows_path"`
58215    new_path="$unix_path"
58216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58218    new_path="$unix_path"
58219  fi
58220
58221  if test "x$path" != "x$new_path"; then
58222    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58225  fi
58226
58227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58229
58230    else
58231      # We're on a unix platform. Hooray! :)
58232      path="$POTENTIAL_FREETYPE_LIB_PATH"
58233      has_space=`$ECHO "$path" | $GREP " "`
58234      if test "x$has_space" != x; then
58235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58238      fi
58239
58240      # Use eval to expand a potential ~
58241      eval path="$path"
58242      if test ! -f "$path" && test ! -d "$path"; then
58243        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58244      fi
58245
58246      if test -d "$path"; then
58247        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58248      else
58249        dir="`$DIRNAME "$path"`"
58250        base="`$BASENAME "$path"`"
58251        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58252      fi
58253    fi
58254  fi
58255
58256
58257    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58259$as_echo_n "checking for freetype includes... " >&6; }
58260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58261$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58262    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58264$as_echo_n "checking for freetype libraries... " >&6; }
58265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58266$as_echo "$FREETYPE_LIB_PATH" >&6; }
58267  fi
58268
58269          if test "x$FOUND_FREETYPE" != xyes; then
58270            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58271
58272  windows_path="$FREETYPE_BASE_DIR"
58273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58274    unix_path=`$CYGPATH -u "$windows_path"`
58275    FREETYPE_BASE_DIR="$unix_path"
58276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58278    FREETYPE_BASE_DIR="$unix_path"
58279  fi
58280
58281
58282  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58283  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58284  METHOD="well-known location"
58285
58286  # Let's start with an optimistic view of the world :-)
58287  FOUND_FREETYPE=yes
58288
58289  # First look for the canonical freetype main include file ft2build.h.
58290  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58291    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58292    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58293    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58294      # Fail.
58295      FOUND_FREETYPE=no
58296    fi
58297  fi
58298
58299  if test "x$FOUND_FREETYPE" = xyes; then
58300    # Include file found, let's continue the sanity check.
58301    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58302$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58303
58304    # Reset to default value
58305    FREETYPE_BASE_NAME=freetype
58306    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58307    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58308      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58309          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58310        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58311        # for the .6 version explicitly.
58312        FREETYPE_BASE_NAME=freetype.6
58313        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58314        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58315$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58316      else
58317        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58318$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58319        FOUND_FREETYPE=no
58320      fi
58321    else
58322      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58323        # On Windows, we will need both .lib and .dll file.
58324        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58325          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58326$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58327          FOUND_FREETYPE=no
58328        fi
58329      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58330          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58331        # Found lib in isa dir, use that instead.
58332        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58333        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58334$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58335      fi
58336    fi
58337  fi
58338
58339  if test "x$FOUND_FREETYPE" = xyes; then
58340
58341  # Only process if variable expands to non-empty
58342
58343  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58345
58346  # Input might be given as Windows format, start by converting to
58347  # unix format.
58348  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58349  new_path=`$CYGPATH -u "$path"`
58350
58351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58354  # "foo.exe" is OK but "foo" is an error.
58355  #
58356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58357  # It is also a way to make sure we got the proper file name for the real test later on.
58358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58359  if test "x$test_shortpath" = x; then
58360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58361$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58362    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58363  fi
58364
58365  # Call helper function which possibly converts this using DOS-style short mode.
58366  # If so, the updated path is stored in $new_path.
58367
58368  input_path="$new_path"
58369  # Check if we need to convert this using DOS-style short mode. If the path
58370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58371  # take no chances and rewrite it.
58372  # Note: m4 eats our [], so we need to use [ and ] instead.
58373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58374  if test "x$has_forbidden_chars" != x; then
58375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58379      # Going to short mode and back again did indeed matter. Since short mode is
58380      # case insensitive, let's make it lowercase to improve readability.
58381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58382      # Now convert it back to Unix-style (cygpath)
58383      input_path=`$CYGPATH -u "$shortmode_path"`
58384      new_path="$input_path"
58385    fi
58386  fi
58387
58388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58389  if test "x$test_cygdrive_prefix" = x; then
58390    # As a simple fix, exclude /usr/bin since it's not a real path.
58391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58393      # a path prefixed by /cygdrive for fixpath to work.
58394      new_path="$CYGWIN_ROOT_PATH$input_path"
58395    fi
58396  fi
58397
58398
58399  if test "x$path" != "x$new_path"; then
58400    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58402$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58403  fi
58404
58405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58406
58407  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58408  has_colon=`$ECHO $path | $GREP ^.:`
58409  new_path="$path"
58410  if test "x$has_colon" = x; then
58411    # Not in mixed or Windows style, start by that.
58412    new_path=`cmd //c echo $path`
58413  fi
58414
58415
58416  input_path="$new_path"
58417  # Check if we need to convert this using DOS-style short mode. If the path
58418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58419  # take no chances and rewrite it.
58420  # Note: m4 eats our [], so we need to use [ and ] instead.
58421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58422  if test "x$has_forbidden_chars" != x; then
58423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58425  fi
58426
58427
58428  windows_path="$new_path"
58429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58430    unix_path=`$CYGPATH -u "$windows_path"`
58431    new_path="$unix_path"
58432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58434    new_path="$unix_path"
58435  fi
58436
58437  if test "x$path" != "x$new_path"; then
58438    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58440$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58441  fi
58442
58443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58445
58446    else
58447      # We're on a unix platform. Hooray! :)
58448      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58449      has_space=`$ECHO "$path" | $GREP " "`
58450      if test "x$has_space" != x; then
58451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58454      fi
58455
58456      # Use eval to expand a potential ~
58457      eval path="$path"
58458      if test ! -f "$path" && test ! -d "$path"; then
58459        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58460      fi
58461
58462      if test -d "$path"; then
58463        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58464      else
58465        dir="`$DIRNAME "$path"`"
58466        base="`$BASENAME "$path"`"
58467        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58468      fi
58469    fi
58470  fi
58471
58472
58473  # Only process if variable expands to non-empty
58474
58475  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58477
58478  # Input might be given as Windows format, start by converting to
58479  # unix format.
58480  path="$POTENTIAL_FREETYPE_LIB_PATH"
58481  new_path=`$CYGPATH -u "$path"`
58482
58483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58486  # "foo.exe" is OK but "foo" is an error.
58487  #
58488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58489  # It is also a way to make sure we got the proper file name for the real test later on.
58490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58491  if test "x$test_shortpath" = x; then
58492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58494    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58495  fi
58496
58497  # Call helper function which possibly converts this using DOS-style short mode.
58498  # If so, the updated path is stored in $new_path.
58499
58500  input_path="$new_path"
58501  # Check if we need to convert this using DOS-style short mode. If the path
58502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58503  # take no chances and rewrite it.
58504  # Note: m4 eats our [], so we need to use [ and ] instead.
58505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58506  if test "x$has_forbidden_chars" != x; then
58507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58511      # Going to short mode and back again did indeed matter. Since short mode is
58512      # case insensitive, let's make it lowercase to improve readability.
58513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58514      # Now convert it back to Unix-style (cygpath)
58515      input_path=`$CYGPATH -u "$shortmode_path"`
58516      new_path="$input_path"
58517    fi
58518  fi
58519
58520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58521  if test "x$test_cygdrive_prefix" = x; then
58522    # As a simple fix, exclude /usr/bin since it's not a real path.
58523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58525      # a path prefixed by /cygdrive for fixpath to work.
58526      new_path="$CYGWIN_ROOT_PATH$input_path"
58527    fi
58528  fi
58529
58530
58531  if test "x$path" != "x$new_path"; then
58532    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58535  fi
58536
58537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58538
58539  path="$POTENTIAL_FREETYPE_LIB_PATH"
58540  has_colon=`$ECHO $path | $GREP ^.:`
58541  new_path="$path"
58542  if test "x$has_colon" = x; then
58543    # Not in mixed or Windows style, start by that.
58544    new_path=`cmd //c echo $path`
58545  fi
58546
58547
58548  input_path="$new_path"
58549  # Check if we need to convert this using DOS-style short mode. If the path
58550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58551  # take no chances and rewrite it.
58552  # Note: m4 eats our [], so we need to use [ and ] instead.
58553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58554  if test "x$has_forbidden_chars" != x; then
58555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58557  fi
58558
58559
58560  windows_path="$new_path"
58561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58562    unix_path=`$CYGPATH -u "$windows_path"`
58563    new_path="$unix_path"
58564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58566    new_path="$unix_path"
58567  fi
58568
58569  if test "x$path" != "x$new_path"; then
58570    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58573  fi
58574
58575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58577
58578    else
58579      # We're on a unix platform. Hooray! :)
58580      path="$POTENTIAL_FREETYPE_LIB_PATH"
58581      has_space=`$ECHO "$path" | $GREP " "`
58582      if test "x$has_space" != x; then
58583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58584$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58586      fi
58587
58588      # Use eval to expand a potential ~
58589      eval path="$path"
58590      if test ! -f "$path" && test ! -d "$path"; then
58591        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58592      fi
58593
58594      if test -d "$path"; then
58595        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58596      else
58597        dir="`$DIRNAME "$path"`"
58598        base="`$BASENAME "$path"`"
58599        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58600      fi
58601    fi
58602  fi
58603
58604
58605    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58607$as_echo_n "checking for freetype includes... " >&6; }
58608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58609$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58610    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58612$as_echo_n "checking for freetype libraries... " >&6; }
58613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58614$as_echo "$FREETYPE_LIB_PATH" >&6; }
58615  fi
58616
58617          fi
58618          if test "x$FOUND_FREETYPE" != xyes; then
58619            FREETYPE_BASE_DIR="$HOME/freetype"
58620
58621  windows_path="$FREETYPE_BASE_DIR"
58622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58623    unix_path=`$CYGPATH -u "$windows_path"`
58624    FREETYPE_BASE_DIR="$unix_path"
58625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58627    FREETYPE_BASE_DIR="$unix_path"
58628  fi
58629
58630            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58631
58632  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58633  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58634  METHOD="well-known location"
58635
58636  # Let's start with an optimistic view of the world :-)
58637  FOUND_FREETYPE=yes
58638
58639  # First look for the canonical freetype main include file ft2build.h.
58640  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58641    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58642    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58643    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58644      # Fail.
58645      FOUND_FREETYPE=no
58646    fi
58647  fi
58648
58649  if test "x$FOUND_FREETYPE" = xyes; then
58650    # Include file found, let's continue the sanity check.
58651    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58652$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58653
58654    # Reset to default value
58655    FREETYPE_BASE_NAME=freetype
58656    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58657    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58658      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58659          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58660        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58661        # for the .6 version explicitly.
58662        FREETYPE_BASE_NAME=freetype.6
58663        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58664        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58665$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58666      else
58667        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58669        FOUND_FREETYPE=no
58670      fi
58671    else
58672      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58673        # On Windows, we will need both .lib and .dll file.
58674        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58675          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58676$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58677          FOUND_FREETYPE=no
58678        fi
58679      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58680          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58681        # Found lib in isa dir, use that instead.
58682        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58683        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58684$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58685      fi
58686    fi
58687  fi
58688
58689  if test "x$FOUND_FREETYPE" = xyes; then
58690
58691  # Only process if variable expands to non-empty
58692
58693  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58695
58696  # Input might be given as Windows format, start by converting to
58697  # unix format.
58698  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58699  new_path=`$CYGPATH -u "$path"`
58700
58701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58704  # "foo.exe" is OK but "foo" is an error.
58705  #
58706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58707  # It is also a way to make sure we got the proper file name for the real test later on.
58708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58709  if test "x$test_shortpath" = x; then
58710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58711$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58712    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58713  fi
58714
58715  # Call helper function which possibly converts this using DOS-style short mode.
58716  # If so, the updated path is stored in $new_path.
58717
58718  input_path="$new_path"
58719  # Check if we need to convert this using DOS-style short mode. If the path
58720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58721  # take no chances and rewrite it.
58722  # Note: m4 eats our [], so we need to use [ and ] instead.
58723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58724  if test "x$has_forbidden_chars" != x; then
58725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58729      # Going to short mode and back again did indeed matter. Since short mode is
58730      # case insensitive, let's make it lowercase to improve readability.
58731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58732      # Now convert it back to Unix-style (cygpath)
58733      input_path=`$CYGPATH -u "$shortmode_path"`
58734      new_path="$input_path"
58735    fi
58736  fi
58737
58738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58739  if test "x$test_cygdrive_prefix" = x; then
58740    # As a simple fix, exclude /usr/bin since it's not a real path.
58741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58743      # a path prefixed by /cygdrive for fixpath to work.
58744      new_path="$CYGWIN_ROOT_PATH$input_path"
58745    fi
58746  fi
58747
58748
58749  if test "x$path" != "x$new_path"; then
58750    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58753  fi
58754
58755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58756
58757  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58758  has_colon=`$ECHO $path | $GREP ^.:`
58759  new_path="$path"
58760  if test "x$has_colon" = x; then
58761    # Not in mixed or Windows style, start by that.
58762    new_path=`cmd //c echo $path`
58763  fi
58764
58765
58766  input_path="$new_path"
58767  # Check if we need to convert this using DOS-style short mode. If the path
58768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58769  # take no chances and rewrite it.
58770  # Note: m4 eats our [], so we need to use [ and ] instead.
58771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58772  if test "x$has_forbidden_chars" != x; then
58773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58775  fi
58776
58777
58778  windows_path="$new_path"
58779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58780    unix_path=`$CYGPATH -u "$windows_path"`
58781    new_path="$unix_path"
58782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58784    new_path="$unix_path"
58785  fi
58786
58787  if test "x$path" != "x$new_path"; then
58788    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58790$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58791  fi
58792
58793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58795
58796    else
58797      # We're on a unix platform. Hooray! :)
58798      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58799      has_space=`$ECHO "$path" | $GREP " "`
58800      if test "x$has_space" != x; then
58801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58802$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58804      fi
58805
58806      # Use eval to expand a potential ~
58807      eval path="$path"
58808      if test ! -f "$path" && test ! -d "$path"; then
58809        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58810      fi
58811
58812      if test -d "$path"; then
58813        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58814      else
58815        dir="`$DIRNAME "$path"`"
58816        base="`$BASENAME "$path"`"
58817        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58818      fi
58819    fi
58820  fi
58821
58822
58823  # Only process if variable expands to non-empty
58824
58825  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58827
58828  # Input might be given as Windows format, start by converting to
58829  # unix format.
58830  path="$POTENTIAL_FREETYPE_LIB_PATH"
58831  new_path=`$CYGPATH -u "$path"`
58832
58833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58836  # "foo.exe" is OK but "foo" is an error.
58837  #
58838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58839  # It is also a way to make sure we got the proper file name for the real test later on.
58840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58841  if test "x$test_shortpath" = x; then
58842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58844    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58845  fi
58846
58847  # Call helper function which possibly converts this using DOS-style short mode.
58848  # If so, the updated path is stored in $new_path.
58849
58850  input_path="$new_path"
58851  # Check if we need to convert this using DOS-style short mode. If the path
58852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58853  # take no chances and rewrite it.
58854  # Note: m4 eats our [], so we need to use [ and ] instead.
58855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58856  if test "x$has_forbidden_chars" != x; then
58857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58861      # Going to short mode and back again did indeed matter. Since short mode is
58862      # case insensitive, let's make it lowercase to improve readability.
58863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58864      # Now convert it back to Unix-style (cygpath)
58865      input_path=`$CYGPATH -u "$shortmode_path"`
58866      new_path="$input_path"
58867    fi
58868  fi
58869
58870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58871  if test "x$test_cygdrive_prefix" = x; then
58872    # As a simple fix, exclude /usr/bin since it's not a real path.
58873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58875      # a path prefixed by /cygdrive for fixpath to work.
58876      new_path="$CYGWIN_ROOT_PATH$input_path"
58877    fi
58878  fi
58879
58880
58881  if test "x$path" != "x$new_path"; then
58882    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58885  fi
58886
58887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58888
58889  path="$POTENTIAL_FREETYPE_LIB_PATH"
58890  has_colon=`$ECHO $path | $GREP ^.:`
58891  new_path="$path"
58892  if test "x$has_colon" = x; then
58893    # Not in mixed or Windows style, start by that.
58894    new_path=`cmd //c echo $path`
58895  fi
58896
58897
58898  input_path="$new_path"
58899  # Check if we need to convert this using DOS-style short mode. If the path
58900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58901  # take no chances and rewrite it.
58902  # Note: m4 eats our [], so we need to use [ and ] instead.
58903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58904  if test "x$has_forbidden_chars" != x; then
58905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58907  fi
58908
58909
58910  windows_path="$new_path"
58911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58912    unix_path=`$CYGPATH -u "$windows_path"`
58913    new_path="$unix_path"
58914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58916    new_path="$unix_path"
58917  fi
58918
58919  if test "x$path" != "x$new_path"; then
58920    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58923  fi
58924
58925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58927
58928    else
58929      # We're on a unix platform. Hooray! :)
58930      path="$POTENTIAL_FREETYPE_LIB_PATH"
58931      has_space=`$ECHO "$path" | $GREP " "`
58932      if test "x$has_space" != x; then
58933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58936      fi
58937
58938      # Use eval to expand a potential ~
58939      eval path="$path"
58940      if test ! -f "$path" && test ! -d "$path"; then
58941        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58942      fi
58943
58944      if test -d "$path"; then
58945        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58946      else
58947        dir="`$DIRNAME "$path"`"
58948        base="`$BASENAME "$path"`"
58949        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58950      fi
58951    fi
58952  fi
58953
58954
58955    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58957$as_echo_n "checking for freetype includes... " >&6; }
58958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58959$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58960    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58962$as_echo_n "checking for freetype libraries... " >&6; }
58963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58964$as_echo "$FREETYPE_LIB_PATH" >&6; }
58965  fi
58966
58967            else
58968
58969  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58970  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58971  METHOD="well-known location"
58972
58973  # Let's start with an optimistic view of the world :-)
58974  FOUND_FREETYPE=yes
58975
58976  # First look for the canonical freetype main include file ft2build.h.
58977  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58978    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58979    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58980    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58981      # Fail.
58982      FOUND_FREETYPE=no
58983    fi
58984  fi
58985
58986  if test "x$FOUND_FREETYPE" = xyes; then
58987    # Include file found, let's continue the sanity check.
58988    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58989$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58990
58991    # Reset to default value
58992    FREETYPE_BASE_NAME=freetype
58993    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58994    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58995      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58996          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58997        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58998        # for the .6 version explicitly.
58999        FREETYPE_BASE_NAME=freetype.6
59000        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59001        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59002$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59003      else
59004        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59005$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59006        FOUND_FREETYPE=no
59007      fi
59008    else
59009      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59010        # On Windows, we will need both .lib and .dll file.
59011        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59012          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59013$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59014          FOUND_FREETYPE=no
59015        fi
59016      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59017          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59018        # Found lib in isa dir, use that instead.
59019        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59020        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59021$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59022      fi
59023    fi
59024  fi
59025
59026  if test "x$FOUND_FREETYPE" = xyes; then
59027
59028  # Only process if variable expands to non-empty
59029
59030  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59032
59033  # Input might be given as Windows format, start by converting to
59034  # unix format.
59035  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59036  new_path=`$CYGPATH -u "$path"`
59037
59038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59041  # "foo.exe" is OK but "foo" is an error.
59042  #
59043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59044  # It is also a way to make sure we got the proper file name for the real test later on.
59045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59046  if test "x$test_shortpath" = x; then
59047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59048$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59049    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59050  fi
59051
59052  # Call helper function which possibly converts this using DOS-style short mode.
59053  # If so, the updated path is stored in $new_path.
59054
59055  input_path="$new_path"
59056  # Check if we need to convert this using DOS-style short mode. If the path
59057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59058  # take no chances and rewrite it.
59059  # Note: m4 eats our [], so we need to use [ and ] instead.
59060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59061  if test "x$has_forbidden_chars" != x; then
59062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59066      # Going to short mode and back again did indeed matter. Since short mode is
59067      # case insensitive, let's make it lowercase to improve readability.
59068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59069      # Now convert it back to Unix-style (cygpath)
59070      input_path=`$CYGPATH -u "$shortmode_path"`
59071      new_path="$input_path"
59072    fi
59073  fi
59074
59075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59076  if test "x$test_cygdrive_prefix" = x; then
59077    # As a simple fix, exclude /usr/bin since it's not a real path.
59078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59080      # a path prefixed by /cygdrive for fixpath to work.
59081      new_path="$CYGWIN_ROOT_PATH$input_path"
59082    fi
59083  fi
59084
59085
59086  if test "x$path" != "x$new_path"; then
59087    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59089$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59090  fi
59091
59092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59093
59094  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59095  has_colon=`$ECHO $path | $GREP ^.:`
59096  new_path="$path"
59097  if test "x$has_colon" = x; then
59098    # Not in mixed or Windows style, start by that.
59099    new_path=`cmd //c echo $path`
59100  fi
59101
59102
59103  input_path="$new_path"
59104  # Check if we need to convert this using DOS-style short mode. If the path
59105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59106  # take no chances and rewrite it.
59107  # Note: m4 eats our [], so we need to use [ and ] instead.
59108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59109  if test "x$has_forbidden_chars" != x; then
59110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59112  fi
59113
59114
59115  windows_path="$new_path"
59116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59117    unix_path=`$CYGPATH -u "$windows_path"`
59118    new_path="$unix_path"
59119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59121    new_path="$unix_path"
59122  fi
59123
59124  if test "x$path" != "x$new_path"; then
59125    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59128  fi
59129
59130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59132
59133    else
59134      # We're on a unix platform. Hooray! :)
59135      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59136      has_space=`$ECHO "$path" | $GREP " "`
59137      if test "x$has_space" != x; then
59138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59141      fi
59142
59143      # Use eval to expand a potential ~
59144      eval path="$path"
59145      if test ! -f "$path" && test ! -d "$path"; then
59146        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59147      fi
59148
59149      if test -d "$path"; then
59150        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59151      else
59152        dir="`$DIRNAME "$path"`"
59153        base="`$BASENAME "$path"`"
59154        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59155      fi
59156    fi
59157  fi
59158
59159
59160  # Only process if variable expands to non-empty
59161
59162  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59164
59165  # Input might be given as Windows format, start by converting to
59166  # unix format.
59167  path="$POTENTIAL_FREETYPE_LIB_PATH"
59168  new_path=`$CYGPATH -u "$path"`
59169
59170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59173  # "foo.exe" is OK but "foo" is an error.
59174  #
59175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59176  # It is also a way to make sure we got the proper file name for the real test later on.
59177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59178  if test "x$test_shortpath" = x; then
59179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59180$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59181    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59182  fi
59183
59184  # Call helper function which possibly converts this using DOS-style short mode.
59185  # If so, the updated path is stored in $new_path.
59186
59187  input_path="$new_path"
59188  # Check if we need to convert this using DOS-style short mode. If the path
59189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59190  # take no chances and rewrite it.
59191  # Note: m4 eats our [], so we need to use [ and ] instead.
59192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59193  if test "x$has_forbidden_chars" != x; then
59194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59198      # Going to short mode and back again did indeed matter. Since short mode is
59199      # case insensitive, let's make it lowercase to improve readability.
59200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59201      # Now convert it back to Unix-style (cygpath)
59202      input_path=`$CYGPATH -u "$shortmode_path"`
59203      new_path="$input_path"
59204    fi
59205  fi
59206
59207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59208  if test "x$test_cygdrive_prefix" = x; then
59209    # As a simple fix, exclude /usr/bin since it's not a real path.
59210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59212      # a path prefixed by /cygdrive for fixpath to work.
59213      new_path="$CYGWIN_ROOT_PATH$input_path"
59214    fi
59215  fi
59216
59217
59218  if test "x$path" != "x$new_path"; then
59219    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59221$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59222  fi
59223
59224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59225
59226  path="$POTENTIAL_FREETYPE_LIB_PATH"
59227  has_colon=`$ECHO $path | $GREP ^.:`
59228  new_path="$path"
59229  if test "x$has_colon" = x; then
59230    # Not in mixed or Windows style, start by that.
59231    new_path=`cmd //c echo $path`
59232  fi
59233
59234
59235  input_path="$new_path"
59236  # Check if we need to convert this using DOS-style short mode. If the path
59237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59238  # take no chances and rewrite it.
59239  # Note: m4 eats our [], so we need to use [ and ] instead.
59240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59241  if test "x$has_forbidden_chars" != x; then
59242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59244  fi
59245
59246
59247  windows_path="$new_path"
59248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59249    unix_path=`$CYGPATH -u "$windows_path"`
59250    new_path="$unix_path"
59251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59253    new_path="$unix_path"
59254  fi
59255
59256  if test "x$path" != "x$new_path"; then
59257    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59259$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59260  fi
59261
59262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59264
59265    else
59266      # We're on a unix platform. Hooray! :)
59267      path="$POTENTIAL_FREETYPE_LIB_PATH"
59268      has_space=`$ECHO "$path" | $GREP " "`
59269      if test "x$has_space" != x; then
59270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59273      fi
59274
59275      # Use eval to expand a potential ~
59276      eval path="$path"
59277      if test ! -f "$path" && test ! -d "$path"; then
59278        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59279      fi
59280
59281      if test -d "$path"; then
59282        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59283      else
59284        dir="`$DIRNAME "$path"`"
59285        base="`$BASENAME "$path"`"
59286        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59287      fi
59288    fi
59289  fi
59290
59291
59292    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59294$as_echo_n "checking for freetype includes... " >&6; }
59295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59296$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59297    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59299$as_echo_n "checking for freetype libraries... " >&6; }
59300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59301$as_echo "$FREETYPE_LIB_PATH" >&6; }
59302  fi
59303
59304            fi
59305            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59306                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59307              # Source is available, as a last resort try to build freetype in default location
59308
59309  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59310  BUILD_FREETYPE=yes
59311
59312  # Check if the freetype sources are acessible..
59313  if ! test -d $FREETYPE_SRC_PATH; then
59314    { $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
59315$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59316    BUILD_FREETYPE=no
59317  fi
59318  # ..and contain a vc2010 project file
59319  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59320  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59321    { $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
59322$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59323    BUILD_FREETYPE=no
59324  fi
59325  # Now check if configure found a version of 'msbuild.exe'
59326  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59327    { $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
59328$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;}
59329    BUILD_FREETYPE=no
59330  fi
59331
59332  # Ready to go..
59333  if test "x$BUILD_FREETYPE" = xyes; then
59334    # msbuild requires trailing slashes for output directories
59335    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59336    freetype_lib_path_unix="$freetype_lib_path"
59337    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59338
59339  unix_path="$vcxproj_path"
59340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59341    windows_path=`$CYGPATH -m "$unix_path"`
59342    vcxproj_path="$windows_path"
59343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59344    windows_path=`cmd //c echo $unix_path`
59345    vcxproj_path="$windows_path"
59346  fi
59347
59348
59349  unix_path="$freetype_lib_path"
59350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59351    windows_path=`$CYGPATH -m "$unix_path"`
59352    freetype_lib_path="$windows_path"
59353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59354    windows_path=`cmd //c echo $unix_path`
59355    freetype_lib_path="$windows_path"
59356  fi
59357
59358
59359  unix_path="$freetype_obj_path"
59360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59361    windows_path=`$CYGPATH -m "$unix_path"`
59362    freetype_obj_path="$windows_path"
59363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59364    windows_path=`cmd //c echo $unix_path`
59365    freetype_obj_path="$windows_path"
59366  fi
59367
59368    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59369      freetype_platform=x64
59370    else
59371      freetype_platform=win32
59372    fi
59373
59374    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59375    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59376    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59377    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59378    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59379$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59380
59381    # First we try to build the freetype.dll
59382    $ECHO -e "@echo off\n"\
59383        "$MSBUILD $vcxproj_path "\
59384        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59385        "/p:Configuration=\"Release Multithreaded\" "\
59386        "/p:Platform=$freetype_platform "\
59387        "/p:ConfigurationType=DynamicLibrary "\
59388        "/p:TargetName=freetype "\
59389        "/p:OutDir=\"$freetype_lib_path\" "\
59390        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59391    cmd /c freetype.bat
59392
59393    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59394      # If that succeeds we also build freetype.lib
59395      $ECHO -e "@echo off\n"\
59396          "$MSBUILD $vcxproj_path "\
59397          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59398          "/p:Configuration=\"Release Multithreaded\" "\
59399          "/p:Platform=$freetype_platform "\
59400          "/p:ConfigurationType=StaticLibrary "\
59401          "/p:TargetName=freetype "\
59402          "/p:OutDir=\"$freetype_lib_path\" "\
59403          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59404      cmd /c freetype.bat
59405
59406      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59407        # Once we build both, lib and dll, set freetype lib and include path appropriately
59408        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59409        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59410        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59411$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59412      else
59413        BUILD_FREETYPE=no
59414      fi
59415    else
59416      BUILD_FREETYPE=no
59417    fi
59418  fi
59419
59420              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59421
59422  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59423  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59424  METHOD="well-known location"
59425
59426  # Let's start with an optimistic view of the world :-)
59427  FOUND_FREETYPE=yes
59428
59429  # First look for the canonical freetype main include file ft2build.h.
59430  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59431    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59432    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59433    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59434      # Fail.
59435      FOUND_FREETYPE=no
59436    fi
59437  fi
59438
59439  if test "x$FOUND_FREETYPE" = xyes; then
59440    # Include file found, let's continue the sanity check.
59441    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59442$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59443
59444    # Reset to default value
59445    FREETYPE_BASE_NAME=freetype
59446    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59447    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59448      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59449          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59450        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59451        # for the .6 version explicitly.
59452        FREETYPE_BASE_NAME=freetype.6
59453        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59454        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59455$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59456      else
59457        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59459        FOUND_FREETYPE=no
59460      fi
59461    else
59462      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59463        # On Windows, we will need both .lib and .dll file.
59464        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59465          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59466$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59467          FOUND_FREETYPE=no
59468        fi
59469      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59470          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59471        # Found lib in isa dir, use that instead.
59472        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59473        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59474$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59475      fi
59476    fi
59477  fi
59478
59479  if test "x$FOUND_FREETYPE" = xyes; then
59480
59481  # Only process if variable expands to non-empty
59482
59483  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59485
59486  # Input might be given as Windows format, start by converting to
59487  # unix format.
59488  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59489  new_path=`$CYGPATH -u "$path"`
59490
59491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59494  # "foo.exe" is OK but "foo" is an error.
59495  #
59496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59497  # It is also a way to make sure we got the proper file name for the real test later on.
59498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59499  if test "x$test_shortpath" = x; then
59500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59501$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59502    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59503  fi
59504
59505  # Call helper function which possibly converts this using DOS-style short mode.
59506  # If so, the updated path is stored in $new_path.
59507
59508  input_path="$new_path"
59509  # Check if we need to convert this using DOS-style short mode. If the path
59510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59511  # take no chances and rewrite it.
59512  # Note: m4 eats our [], so we need to use [ and ] instead.
59513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59514  if test "x$has_forbidden_chars" != x; then
59515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59519      # Going to short mode and back again did indeed matter. Since short mode is
59520      # case insensitive, let's make it lowercase to improve readability.
59521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59522      # Now convert it back to Unix-style (cygpath)
59523      input_path=`$CYGPATH -u "$shortmode_path"`
59524      new_path="$input_path"
59525    fi
59526  fi
59527
59528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59529  if test "x$test_cygdrive_prefix" = x; then
59530    # As a simple fix, exclude /usr/bin since it's not a real path.
59531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59533      # a path prefixed by /cygdrive for fixpath to work.
59534      new_path="$CYGWIN_ROOT_PATH$input_path"
59535    fi
59536  fi
59537
59538
59539  if test "x$path" != "x$new_path"; then
59540    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59542$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59543  fi
59544
59545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59546
59547  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59548  has_colon=`$ECHO $path | $GREP ^.:`
59549  new_path="$path"
59550  if test "x$has_colon" = x; then
59551    # Not in mixed or Windows style, start by that.
59552    new_path=`cmd //c echo $path`
59553  fi
59554
59555
59556  input_path="$new_path"
59557  # Check if we need to convert this using DOS-style short mode. If the path
59558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59559  # take no chances and rewrite it.
59560  # Note: m4 eats our [], so we need to use [ and ] instead.
59561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59562  if test "x$has_forbidden_chars" != x; then
59563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59565  fi
59566
59567
59568  windows_path="$new_path"
59569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59570    unix_path=`$CYGPATH -u "$windows_path"`
59571    new_path="$unix_path"
59572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59574    new_path="$unix_path"
59575  fi
59576
59577  if test "x$path" != "x$new_path"; then
59578    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59580$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59581  fi
59582
59583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59585
59586    else
59587      # We're on a unix platform. Hooray! :)
59588      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59589      has_space=`$ECHO "$path" | $GREP " "`
59590      if test "x$has_space" != x; then
59591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59594      fi
59595
59596      # Use eval to expand a potential ~
59597      eval path="$path"
59598      if test ! -f "$path" && test ! -d "$path"; then
59599        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59600      fi
59601
59602      if test -d "$path"; then
59603        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59604      else
59605        dir="`$DIRNAME "$path"`"
59606        base="`$BASENAME "$path"`"
59607        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59608      fi
59609    fi
59610  fi
59611
59612
59613  # Only process if variable expands to non-empty
59614
59615  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59617
59618  # Input might be given as Windows format, start by converting to
59619  # unix format.
59620  path="$POTENTIAL_FREETYPE_LIB_PATH"
59621  new_path=`$CYGPATH -u "$path"`
59622
59623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59626  # "foo.exe" is OK but "foo" is an error.
59627  #
59628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59629  # It is also a way to make sure we got the proper file name for the real test later on.
59630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59631  if test "x$test_shortpath" = x; then
59632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59634    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59635  fi
59636
59637  # Call helper function which possibly converts this using DOS-style short mode.
59638  # If so, the updated path is stored in $new_path.
59639
59640  input_path="$new_path"
59641  # Check if we need to convert this using DOS-style short mode. If the path
59642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59643  # take no chances and rewrite it.
59644  # Note: m4 eats our [], so we need to use [ and ] instead.
59645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59646  if test "x$has_forbidden_chars" != x; then
59647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59651      # Going to short mode and back again did indeed matter. Since short mode is
59652      # case insensitive, let's make it lowercase to improve readability.
59653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59654      # Now convert it back to Unix-style (cygpath)
59655      input_path=`$CYGPATH -u "$shortmode_path"`
59656      new_path="$input_path"
59657    fi
59658  fi
59659
59660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59661  if test "x$test_cygdrive_prefix" = x; then
59662    # As a simple fix, exclude /usr/bin since it's not a real path.
59663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59665      # a path prefixed by /cygdrive for fixpath to work.
59666      new_path="$CYGWIN_ROOT_PATH$input_path"
59667    fi
59668  fi
59669
59670
59671  if test "x$path" != "x$new_path"; then
59672    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59675  fi
59676
59677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59678
59679  path="$POTENTIAL_FREETYPE_LIB_PATH"
59680  has_colon=`$ECHO $path | $GREP ^.:`
59681  new_path="$path"
59682  if test "x$has_colon" = x; then
59683    # Not in mixed or Windows style, start by that.
59684    new_path=`cmd //c echo $path`
59685  fi
59686
59687
59688  input_path="$new_path"
59689  # Check if we need to convert this using DOS-style short mode. If the path
59690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59691  # take no chances and rewrite it.
59692  # Note: m4 eats our [], so we need to use [ and ] instead.
59693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59694  if test "x$has_forbidden_chars" != x; then
59695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59697  fi
59698
59699
59700  windows_path="$new_path"
59701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59702    unix_path=`$CYGPATH -u "$windows_path"`
59703    new_path="$unix_path"
59704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59706    new_path="$unix_path"
59707  fi
59708
59709  if test "x$path" != "x$new_path"; then
59710    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59713  fi
59714
59715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59717
59718    else
59719      # We're on a unix platform. Hooray! :)
59720      path="$POTENTIAL_FREETYPE_LIB_PATH"
59721      has_space=`$ECHO "$path" | $GREP " "`
59722      if test "x$has_space" != x; then
59723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59726      fi
59727
59728      # Use eval to expand a potential ~
59729      eval path="$path"
59730      if test ! -f "$path" && test ! -d "$path"; then
59731        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59732      fi
59733
59734      if test -d "$path"; then
59735        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59736      else
59737        dir="`$DIRNAME "$path"`"
59738        base="`$BASENAME "$path"`"
59739        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59740      fi
59741    fi
59742  fi
59743
59744
59745    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59747$as_echo_n "checking for freetype includes... " >&6; }
59748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59749$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59750    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59752$as_echo_n "checking for freetype libraries... " >&6; }
59753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59754$as_echo "$FREETYPE_LIB_PATH" >&6; }
59755  fi
59756
59757              else
59758
59759  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59760  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59761  METHOD="well-known location"
59762
59763  # Let's start with an optimistic view of the world :-)
59764  FOUND_FREETYPE=yes
59765
59766  # First look for the canonical freetype main include file ft2build.h.
59767  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59768    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59769    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59770    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59771      # Fail.
59772      FOUND_FREETYPE=no
59773    fi
59774  fi
59775
59776  if test "x$FOUND_FREETYPE" = xyes; then
59777    # Include file found, let's continue the sanity check.
59778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59779$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59780
59781    # Reset to default value
59782    FREETYPE_BASE_NAME=freetype
59783    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59784    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59785      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59786          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59787        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59788        # for the .6 version explicitly.
59789        FREETYPE_BASE_NAME=freetype.6
59790        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59791        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59792$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59793      else
59794        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59795$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59796        FOUND_FREETYPE=no
59797      fi
59798    else
59799      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59800        # On Windows, we will need both .lib and .dll file.
59801        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59802          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59803$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59804          FOUND_FREETYPE=no
59805        fi
59806      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59807          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59808        # Found lib in isa dir, use that instead.
59809        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59810        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59811$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59812      fi
59813    fi
59814  fi
59815
59816  if test "x$FOUND_FREETYPE" = xyes; then
59817
59818  # Only process if variable expands to non-empty
59819
59820  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59822
59823  # Input might be given as Windows format, start by converting to
59824  # unix format.
59825  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59826  new_path=`$CYGPATH -u "$path"`
59827
59828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59831  # "foo.exe" is OK but "foo" is an error.
59832  #
59833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59834  # It is also a way to make sure we got the proper file name for the real test later on.
59835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59836  if test "x$test_shortpath" = x; then
59837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59838$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59839    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59840  fi
59841
59842  # Call helper function which possibly converts this using DOS-style short mode.
59843  # If so, the updated path is stored in $new_path.
59844
59845  input_path="$new_path"
59846  # Check if we need to convert this using DOS-style short mode. If the path
59847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59848  # take no chances and rewrite it.
59849  # Note: m4 eats our [], so we need to use [ and ] instead.
59850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59851  if test "x$has_forbidden_chars" != x; then
59852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59856      # Going to short mode and back again did indeed matter. Since short mode is
59857      # case insensitive, let's make it lowercase to improve readability.
59858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59859      # Now convert it back to Unix-style (cygpath)
59860      input_path=`$CYGPATH -u "$shortmode_path"`
59861      new_path="$input_path"
59862    fi
59863  fi
59864
59865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59866  if test "x$test_cygdrive_prefix" = x; then
59867    # As a simple fix, exclude /usr/bin since it's not a real path.
59868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59870      # a path prefixed by /cygdrive for fixpath to work.
59871      new_path="$CYGWIN_ROOT_PATH$input_path"
59872    fi
59873  fi
59874
59875
59876  if test "x$path" != "x$new_path"; then
59877    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59879$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59880  fi
59881
59882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59883
59884  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59885  has_colon=`$ECHO $path | $GREP ^.:`
59886  new_path="$path"
59887  if test "x$has_colon" = x; then
59888    # Not in mixed or Windows style, start by that.
59889    new_path=`cmd //c echo $path`
59890  fi
59891
59892
59893  input_path="$new_path"
59894  # Check if we need to convert this using DOS-style short mode. If the path
59895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59896  # take no chances and rewrite it.
59897  # Note: m4 eats our [], so we need to use [ and ] instead.
59898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59899  if test "x$has_forbidden_chars" != x; then
59900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59902  fi
59903
59904
59905  windows_path="$new_path"
59906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59907    unix_path=`$CYGPATH -u "$windows_path"`
59908    new_path="$unix_path"
59909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59911    new_path="$unix_path"
59912  fi
59913
59914  if test "x$path" != "x$new_path"; then
59915    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59918  fi
59919
59920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59922
59923    else
59924      # We're on a unix platform. Hooray! :)
59925      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59926      has_space=`$ECHO "$path" | $GREP " "`
59927      if test "x$has_space" != x; then
59928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59931      fi
59932
59933      # Use eval to expand a potential ~
59934      eval path="$path"
59935      if test ! -f "$path" && test ! -d "$path"; then
59936        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59937      fi
59938
59939      if test -d "$path"; then
59940        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59941      else
59942        dir="`$DIRNAME "$path"`"
59943        base="`$BASENAME "$path"`"
59944        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59945      fi
59946    fi
59947  fi
59948
59949
59950  # Only process if variable expands to non-empty
59951
59952  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59954
59955  # Input might be given as Windows format, start by converting to
59956  # unix format.
59957  path="$POTENTIAL_FREETYPE_LIB_PATH"
59958  new_path=`$CYGPATH -u "$path"`
59959
59960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59963  # "foo.exe" is OK but "foo" is an error.
59964  #
59965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59966  # It is also a way to make sure we got the proper file name for the real test later on.
59967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59968  if test "x$test_shortpath" = x; then
59969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59972  fi
59973
59974  # Call helper function which possibly converts this using DOS-style short mode.
59975  # If so, the updated path is stored in $new_path.
59976
59977  input_path="$new_path"
59978  # Check if we need to convert this using DOS-style short mode. If the path
59979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59980  # take no chances and rewrite it.
59981  # Note: m4 eats our [], so we need to use [ and ] instead.
59982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59983  if test "x$has_forbidden_chars" != x; then
59984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59988      # Going to short mode and back again did indeed matter. Since short mode is
59989      # case insensitive, let's make it lowercase to improve readability.
59990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59991      # Now convert it back to Unix-style (cygpath)
59992      input_path=`$CYGPATH -u "$shortmode_path"`
59993      new_path="$input_path"
59994    fi
59995  fi
59996
59997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59998  if test "x$test_cygdrive_prefix" = x; then
59999    # As a simple fix, exclude /usr/bin since it's not a real path.
60000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60002      # a path prefixed by /cygdrive for fixpath to work.
60003      new_path="$CYGWIN_ROOT_PATH$input_path"
60004    fi
60005  fi
60006
60007
60008  if test "x$path" != "x$new_path"; then
60009    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60012  fi
60013
60014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60015
60016  path="$POTENTIAL_FREETYPE_LIB_PATH"
60017  has_colon=`$ECHO $path | $GREP ^.:`
60018  new_path="$path"
60019  if test "x$has_colon" = x; then
60020    # Not in mixed or Windows style, start by that.
60021    new_path=`cmd //c echo $path`
60022  fi
60023
60024
60025  input_path="$new_path"
60026  # Check if we need to convert this using DOS-style short mode. If the path
60027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60028  # take no chances and rewrite it.
60029  # Note: m4 eats our [], so we need to use [ and ] instead.
60030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60031  if test "x$has_forbidden_chars" != x; then
60032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60034  fi
60035
60036
60037  windows_path="$new_path"
60038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60039    unix_path=`$CYGPATH -u "$windows_path"`
60040    new_path="$unix_path"
60041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60043    new_path="$unix_path"
60044  fi
60045
60046  if test "x$path" != "x$new_path"; then
60047    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60050  fi
60051
60052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60054
60055    else
60056      # We're on a unix platform. Hooray! :)
60057      path="$POTENTIAL_FREETYPE_LIB_PATH"
60058      has_space=`$ECHO "$path" | $GREP " "`
60059      if test "x$has_space" != x; then
60060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60063      fi
60064
60065      # Use eval to expand a potential ~
60066      eval path="$path"
60067      if test ! -f "$path" && test ! -d "$path"; then
60068        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60069      fi
60070
60071      if test -d "$path"; then
60072        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60073      else
60074        dir="`$DIRNAME "$path"`"
60075        base="`$BASENAME "$path"`"
60076        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60077      fi
60078    fi
60079  fi
60080
60081
60082    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60084$as_echo_n "checking for freetype includes... " >&6; }
60085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60086$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60087    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60089$as_echo_n "checking for freetype libraries... " >&6; }
60090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60091$as_echo "$FREETYPE_LIB_PATH" >&6; }
60092  fi
60093
60094              fi
60095            fi
60096          fi
60097        else
60098          FREETYPE_BASE_DIR="$SYSROOT/usr"
60099
60100  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60101  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60102  METHOD="well-known location"
60103
60104  # Let's start with an optimistic view of the world :-)
60105  FOUND_FREETYPE=yes
60106
60107  # First look for the canonical freetype main include file ft2build.h.
60108  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60109    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60110    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60111    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60112      # Fail.
60113      FOUND_FREETYPE=no
60114    fi
60115  fi
60116
60117  if test "x$FOUND_FREETYPE" = xyes; then
60118    # Include file found, let's continue the sanity check.
60119    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60120$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60121
60122    # Reset to default value
60123    FREETYPE_BASE_NAME=freetype
60124    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60125    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60126      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60127          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60128        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60129        # for the .6 version explicitly.
60130        FREETYPE_BASE_NAME=freetype.6
60131        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60132        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60133$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60134      else
60135        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60137        FOUND_FREETYPE=no
60138      fi
60139    else
60140      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60141        # On Windows, we will need both .lib and .dll file.
60142        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60143          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60144$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60145          FOUND_FREETYPE=no
60146        fi
60147      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60148          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60149        # Found lib in isa dir, use that instead.
60150        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60151        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60152$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60153      fi
60154    fi
60155  fi
60156
60157  if test "x$FOUND_FREETYPE" = xyes; then
60158
60159  # Only process if variable expands to non-empty
60160
60161  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60163
60164  # Input might be given as Windows format, start by converting to
60165  # unix format.
60166  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60167  new_path=`$CYGPATH -u "$path"`
60168
60169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60172  # "foo.exe" is OK but "foo" is an error.
60173  #
60174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60175  # It is also a way to make sure we got the proper file name for the real test later on.
60176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60177  if test "x$test_shortpath" = x; then
60178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60180    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60181  fi
60182
60183  # Call helper function which possibly converts this using DOS-style short mode.
60184  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60197      # Going to short mode and back again did indeed matter. Since short mode is
60198      # case insensitive, let's make it lowercase to improve readability.
60199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60200      # Now convert it back to Unix-style (cygpath)
60201      input_path=`$CYGPATH -u "$shortmode_path"`
60202      new_path="$input_path"
60203    fi
60204  fi
60205
60206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60207  if test "x$test_cygdrive_prefix" = x; then
60208    # As a simple fix, exclude /usr/bin since it's not a real path.
60209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60211      # a path prefixed by /cygdrive for fixpath to work.
60212      new_path="$CYGWIN_ROOT_PATH$input_path"
60213    fi
60214  fi
60215
60216
60217  if test "x$path" != "x$new_path"; then
60218    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60221  fi
60222
60223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60224
60225  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60226  has_colon=`$ECHO $path | $GREP ^.:`
60227  new_path="$path"
60228  if test "x$has_colon" = x; then
60229    # Not in mixed or Windows style, start by that.
60230    new_path=`cmd //c echo $path`
60231  fi
60232
60233
60234  input_path="$new_path"
60235  # Check if we need to convert this using DOS-style short mode. If the path
60236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60237  # take no chances and rewrite it.
60238  # Note: m4 eats our [], so we need to use [ and ] instead.
60239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60240  if test "x$has_forbidden_chars" != x; then
60241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60243  fi
60244
60245
60246  windows_path="$new_path"
60247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60248    unix_path=`$CYGPATH -u "$windows_path"`
60249    new_path="$unix_path"
60250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60252    new_path="$unix_path"
60253  fi
60254
60255  if test "x$path" != "x$new_path"; then
60256    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60259  fi
60260
60261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60263
60264    else
60265      # We're on a unix platform. Hooray! :)
60266      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60267      has_space=`$ECHO "$path" | $GREP " "`
60268      if test "x$has_space" != x; then
60269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60272      fi
60273
60274      # Use eval to expand a potential ~
60275      eval path="$path"
60276      if test ! -f "$path" && test ! -d "$path"; then
60277        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60278      fi
60279
60280      if test -d "$path"; then
60281        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60282      else
60283        dir="`$DIRNAME "$path"`"
60284        base="`$BASENAME "$path"`"
60285        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60286      fi
60287    fi
60288  fi
60289
60290
60291  # Only process if variable expands to non-empty
60292
60293  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60295
60296  # Input might be given as Windows format, start by converting to
60297  # unix format.
60298  path="$POTENTIAL_FREETYPE_LIB_PATH"
60299  new_path=`$CYGPATH -u "$path"`
60300
60301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60304  # "foo.exe" is OK but "foo" is an error.
60305  #
60306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60307  # It is also a way to make sure we got the proper file name for the real test later on.
60308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60309  if test "x$test_shortpath" = x; then
60310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60312    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60313  fi
60314
60315  # Call helper function which possibly converts this using DOS-style short mode.
60316  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60329      # Going to short mode and back again did indeed matter. Since short mode is
60330      # case insensitive, let's make it lowercase to improve readability.
60331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60332      # Now convert it back to Unix-style (cygpath)
60333      input_path=`$CYGPATH -u "$shortmode_path"`
60334      new_path="$input_path"
60335    fi
60336  fi
60337
60338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60339  if test "x$test_cygdrive_prefix" = x; then
60340    # As a simple fix, exclude /usr/bin since it's not a real path.
60341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60343      # a path prefixed by /cygdrive for fixpath to work.
60344      new_path="$CYGWIN_ROOT_PATH$input_path"
60345    fi
60346  fi
60347
60348
60349  if test "x$path" != "x$new_path"; then
60350    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60352$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60353  fi
60354
60355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60356
60357  path="$POTENTIAL_FREETYPE_LIB_PATH"
60358  has_colon=`$ECHO $path | $GREP ^.:`
60359  new_path="$path"
60360  if test "x$has_colon" = x; then
60361    # Not in mixed or Windows style, start by that.
60362    new_path=`cmd //c echo $path`
60363  fi
60364
60365
60366  input_path="$new_path"
60367  # Check if we need to convert this using DOS-style short mode. If the path
60368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60369  # take no chances and rewrite it.
60370  # Note: m4 eats our [], so we need to use [ and ] instead.
60371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60372  if test "x$has_forbidden_chars" != x; then
60373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60375  fi
60376
60377
60378  windows_path="$new_path"
60379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60380    unix_path=`$CYGPATH -u "$windows_path"`
60381    new_path="$unix_path"
60382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60384    new_path="$unix_path"
60385  fi
60386
60387  if test "x$path" != "x$new_path"; then
60388    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60390$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60391  fi
60392
60393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60395
60396    else
60397      # We're on a unix platform. Hooray! :)
60398      path="$POTENTIAL_FREETYPE_LIB_PATH"
60399      has_space=`$ECHO "$path" | $GREP " "`
60400      if test "x$has_space" != x; then
60401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60402$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60404      fi
60405
60406      # Use eval to expand a potential ~
60407      eval path="$path"
60408      if test ! -f "$path" && test ! -d "$path"; then
60409        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60410      fi
60411
60412      if test -d "$path"; then
60413        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60414      else
60415        dir="`$DIRNAME "$path"`"
60416        base="`$BASENAME "$path"`"
60417        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60418      fi
60419    fi
60420  fi
60421
60422
60423    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60425$as_echo_n "checking for freetype includes... " >&6; }
60426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60427$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60428    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60430$as_echo_n "checking for freetype libraries... " >&6; }
60431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60432$as_echo "$FREETYPE_LIB_PATH" >&6; }
60433  fi
60434
60435
60436          if test "x$FOUND_FREETYPE" != xyes; then
60437            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60438
60439  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60440  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60441  METHOD="well-known location"
60442
60443  # Let's start with an optimistic view of the world :-)
60444  FOUND_FREETYPE=yes
60445
60446  # First look for the canonical freetype main include file ft2build.h.
60447  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60448    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60449    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60450    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60451      # Fail.
60452      FOUND_FREETYPE=no
60453    fi
60454  fi
60455
60456  if test "x$FOUND_FREETYPE" = xyes; then
60457    # Include file found, let's continue the sanity check.
60458    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60459$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60460
60461    # Reset to default value
60462    FREETYPE_BASE_NAME=freetype
60463    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60464    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60465      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60466          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60467        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60468        # for the .6 version explicitly.
60469        FREETYPE_BASE_NAME=freetype.6
60470        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60471        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60472$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60473      else
60474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60476        FOUND_FREETYPE=no
60477      fi
60478    else
60479      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60480        # On Windows, we will need both .lib and .dll file.
60481        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60482          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60484          FOUND_FREETYPE=no
60485        fi
60486      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60487          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60488        # Found lib in isa dir, use that instead.
60489        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60490        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60491$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60492      fi
60493    fi
60494  fi
60495
60496  if test "x$FOUND_FREETYPE" = xyes; then
60497
60498  # Only process if variable expands to non-empty
60499
60500  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60502
60503  # Input might be given as Windows format, start by converting to
60504  # unix format.
60505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60506  new_path=`$CYGPATH -u "$path"`
60507
60508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60511  # "foo.exe" is OK but "foo" is an error.
60512  #
60513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60514  # It is also a way to make sure we got the proper file name for the real test later on.
60515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60516  if test "x$test_shortpath" = x; then
60517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60520  fi
60521
60522  # Call helper function which possibly converts this using DOS-style short mode.
60523  # If so, the updated path is stored in $new_path.
60524
60525  input_path="$new_path"
60526  # Check if we need to convert this using DOS-style short mode. If the path
60527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60528  # take no chances and rewrite it.
60529  # Note: m4 eats our [], so we need to use [ and ] instead.
60530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60531  if test "x$has_forbidden_chars" != x; then
60532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60536      # Going to short mode and back again did indeed matter. Since short mode is
60537      # case insensitive, let's make it lowercase to improve readability.
60538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60539      # Now convert it back to Unix-style (cygpath)
60540      input_path=`$CYGPATH -u "$shortmode_path"`
60541      new_path="$input_path"
60542    fi
60543  fi
60544
60545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60546  if test "x$test_cygdrive_prefix" = x; then
60547    # As a simple fix, exclude /usr/bin since it's not a real path.
60548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60550      # a path prefixed by /cygdrive for fixpath to work.
60551      new_path="$CYGWIN_ROOT_PATH$input_path"
60552    fi
60553  fi
60554
60555
60556  if test "x$path" != "x$new_path"; then
60557    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60560  fi
60561
60562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60563
60564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60565  has_colon=`$ECHO $path | $GREP ^.:`
60566  new_path="$path"
60567  if test "x$has_colon" = x; then
60568    # Not in mixed or Windows style, start by that.
60569    new_path=`cmd //c echo $path`
60570  fi
60571
60572
60573  input_path="$new_path"
60574  # Check if we need to convert this using DOS-style short mode. If the path
60575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60576  # take no chances and rewrite it.
60577  # Note: m4 eats our [], so we need to use [ and ] instead.
60578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60579  if test "x$has_forbidden_chars" != x; then
60580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60582  fi
60583
60584
60585  windows_path="$new_path"
60586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60587    unix_path=`$CYGPATH -u "$windows_path"`
60588    new_path="$unix_path"
60589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60591    new_path="$unix_path"
60592  fi
60593
60594  if test "x$path" != "x$new_path"; then
60595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60598  fi
60599
60600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60602
60603    else
60604      # We're on a unix platform. Hooray! :)
60605      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60606      has_space=`$ECHO "$path" | $GREP " "`
60607      if test "x$has_space" != x; then
60608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60611      fi
60612
60613      # Use eval to expand a potential ~
60614      eval path="$path"
60615      if test ! -f "$path" && test ! -d "$path"; then
60616        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60617      fi
60618
60619      if test -d "$path"; then
60620        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60621      else
60622        dir="`$DIRNAME "$path"`"
60623        base="`$BASENAME "$path"`"
60624        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60625      fi
60626    fi
60627  fi
60628
60629
60630  # Only process if variable expands to non-empty
60631
60632  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60634
60635  # Input might be given as Windows format, start by converting to
60636  # unix format.
60637  path="$POTENTIAL_FREETYPE_LIB_PATH"
60638  new_path=`$CYGPATH -u "$path"`
60639
60640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60643  # "foo.exe" is OK but "foo" is an error.
60644  #
60645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60646  # It is also a way to make sure we got the proper file name for the real test later on.
60647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60648  if test "x$test_shortpath" = x; then
60649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60652  fi
60653
60654  # Call helper function which possibly converts this using DOS-style short mode.
60655  # If so, the updated path is stored in $new_path.
60656
60657  input_path="$new_path"
60658  # Check if we need to convert this using DOS-style short mode. If the path
60659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60660  # take no chances and rewrite it.
60661  # Note: m4 eats our [], so we need to use [ and ] instead.
60662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60663  if test "x$has_forbidden_chars" != x; then
60664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60668      # Going to short mode and back again did indeed matter. Since short mode is
60669      # case insensitive, let's make it lowercase to improve readability.
60670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60671      # Now convert it back to Unix-style (cygpath)
60672      input_path=`$CYGPATH -u "$shortmode_path"`
60673      new_path="$input_path"
60674    fi
60675  fi
60676
60677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60678  if test "x$test_cygdrive_prefix" = x; then
60679    # As a simple fix, exclude /usr/bin since it's not a real path.
60680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60682      # a path prefixed by /cygdrive for fixpath to work.
60683      new_path="$CYGWIN_ROOT_PATH$input_path"
60684    fi
60685  fi
60686
60687
60688  if test "x$path" != "x$new_path"; then
60689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60692  fi
60693
60694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60695
60696  path="$POTENTIAL_FREETYPE_LIB_PATH"
60697  has_colon=`$ECHO $path | $GREP ^.:`
60698  new_path="$path"
60699  if test "x$has_colon" = x; then
60700    # Not in mixed or Windows style, start by that.
60701    new_path=`cmd //c echo $path`
60702  fi
60703
60704
60705  input_path="$new_path"
60706  # Check if we need to convert this using DOS-style short mode. If the path
60707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60708  # take no chances and rewrite it.
60709  # Note: m4 eats our [], so we need to use [ and ] instead.
60710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60711  if test "x$has_forbidden_chars" != x; then
60712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60714  fi
60715
60716
60717  windows_path="$new_path"
60718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60719    unix_path=`$CYGPATH -u "$windows_path"`
60720    new_path="$unix_path"
60721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60723    new_path="$unix_path"
60724  fi
60725
60726  if test "x$path" != "x$new_path"; then
60727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60730  fi
60731
60732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60734
60735    else
60736      # We're on a unix platform. Hooray! :)
60737      path="$POTENTIAL_FREETYPE_LIB_PATH"
60738      has_space=`$ECHO "$path" | $GREP " "`
60739      if test "x$has_space" != x; then
60740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60743      fi
60744
60745      # Use eval to expand a potential ~
60746      eval path="$path"
60747      if test ! -f "$path" && test ! -d "$path"; then
60748        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60749      fi
60750
60751      if test -d "$path"; then
60752        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60753      else
60754        dir="`$DIRNAME "$path"`"
60755        base="`$BASENAME "$path"`"
60756        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60757      fi
60758    fi
60759  fi
60760
60761
60762    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60764$as_echo_n "checking for freetype includes... " >&6; }
60765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60766$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60767    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60769$as_echo_n "checking for freetype libraries... " >&6; }
60770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60771$as_echo "$FREETYPE_LIB_PATH" >&6; }
60772  fi
60773
60774          fi
60775          if test "x$FOUND_FREETYPE" != xyes; then
60776            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60777
60778  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60779  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60780  METHOD="well-known location"
60781
60782  # Let's start with an optimistic view of the world :-)
60783  FOUND_FREETYPE=yes
60784
60785  # First look for the canonical freetype main include file ft2build.h.
60786  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60787    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60788    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60789    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60790      # Fail.
60791      FOUND_FREETYPE=no
60792    fi
60793  fi
60794
60795  if test "x$FOUND_FREETYPE" = xyes; then
60796    # Include file found, let's continue the sanity check.
60797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60798$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60799
60800    # Reset to default value
60801    FREETYPE_BASE_NAME=freetype
60802    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60803    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60804      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60805          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60806        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60807        # for the .6 version explicitly.
60808        FREETYPE_BASE_NAME=freetype.6
60809        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60810        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60811$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60812      else
60813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60814$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60815        FOUND_FREETYPE=no
60816      fi
60817    else
60818      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60819        # On Windows, we will need both .lib and .dll file.
60820        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60821          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60822$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60823          FOUND_FREETYPE=no
60824        fi
60825      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60826          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60827        # Found lib in isa dir, use that instead.
60828        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60829        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60830$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60831      fi
60832    fi
60833  fi
60834
60835  if test "x$FOUND_FREETYPE" = xyes; then
60836
60837  # Only process if variable expands to non-empty
60838
60839  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60841
60842  # Input might be given as Windows format, start by converting to
60843  # unix format.
60844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60845  new_path=`$CYGPATH -u "$path"`
60846
60847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60850  # "foo.exe" is OK but "foo" is an error.
60851  #
60852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60853  # It is also a way to make sure we got the proper file name for the real test later on.
60854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60855  if test "x$test_shortpath" = x; then
60856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60858    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60859  fi
60860
60861  # Call helper function which possibly converts this using DOS-style short mode.
60862  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60875      # Going to short mode and back again did indeed matter. Since short mode is
60876      # case insensitive, let's make it lowercase to improve readability.
60877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60878      # Now convert it back to Unix-style (cygpath)
60879      input_path=`$CYGPATH -u "$shortmode_path"`
60880      new_path="$input_path"
60881    fi
60882  fi
60883
60884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60885  if test "x$test_cygdrive_prefix" = x; then
60886    # As a simple fix, exclude /usr/bin since it's not a real path.
60887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60889      # a path prefixed by /cygdrive for fixpath to work.
60890      new_path="$CYGWIN_ROOT_PATH$input_path"
60891    fi
60892  fi
60893
60894
60895  if test "x$path" != "x$new_path"; then
60896    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60898$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60899  fi
60900
60901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60902
60903  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60904  has_colon=`$ECHO $path | $GREP ^.:`
60905  new_path="$path"
60906  if test "x$has_colon" = x; then
60907    # Not in mixed or Windows style, start by that.
60908    new_path=`cmd //c echo $path`
60909  fi
60910
60911
60912  input_path="$new_path"
60913  # Check if we need to convert this using DOS-style short mode. If the path
60914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60915  # take no chances and rewrite it.
60916  # Note: m4 eats our [], so we need to use [ and ] instead.
60917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60918  if test "x$has_forbidden_chars" != x; then
60919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60921  fi
60922
60923
60924  windows_path="$new_path"
60925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60926    unix_path=`$CYGPATH -u "$windows_path"`
60927    new_path="$unix_path"
60928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60930    new_path="$unix_path"
60931  fi
60932
60933  if test "x$path" != "x$new_path"; then
60934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60937  fi
60938
60939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60941
60942    else
60943      # We're on a unix platform. Hooray! :)
60944      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60945      has_space=`$ECHO "$path" | $GREP " "`
60946      if test "x$has_space" != x; then
60947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60948$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60950      fi
60951
60952      # Use eval to expand a potential ~
60953      eval path="$path"
60954      if test ! -f "$path" && test ! -d "$path"; then
60955        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60956      fi
60957
60958      if test -d "$path"; then
60959        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60960      else
60961        dir="`$DIRNAME "$path"`"
60962        base="`$BASENAME "$path"`"
60963        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60964      fi
60965    fi
60966  fi
60967
60968
60969  # Only process if variable expands to non-empty
60970
60971  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60973
60974  # Input might be given as Windows format, start by converting to
60975  # unix format.
60976  path="$POTENTIAL_FREETYPE_LIB_PATH"
60977  new_path=`$CYGPATH -u "$path"`
60978
60979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60982  # "foo.exe" is OK but "foo" is an error.
60983  #
60984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60985  # It is also a way to make sure we got the proper file name for the real test later on.
60986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60987  if test "x$test_shortpath" = x; then
60988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60991  fi
60992
60993  # Call helper function which possibly converts this using DOS-style short mode.
60994  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61007      # Going to short mode and back again did indeed matter. Since short mode is
61008      # case insensitive, let's make it lowercase to improve readability.
61009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61010      # Now convert it back to Unix-style (cygpath)
61011      input_path=`$CYGPATH -u "$shortmode_path"`
61012      new_path="$input_path"
61013    fi
61014  fi
61015
61016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61017  if test "x$test_cygdrive_prefix" = x; then
61018    # As a simple fix, exclude /usr/bin since it's not a real path.
61019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61021      # a path prefixed by /cygdrive for fixpath to work.
61022      new_path="$CYGWIN_ROOT_PATH$input_path"
61023    fi
61024  fi
61025
61026
61027  if test "x$path" != "x$new_path"; then
61028    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61031  fi
61032
61033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61034
61035  path="$POTENTIAL_FREETYPE_LIB_PATH"
61036  has_colon=`$ECHO $path | $GREP ^.:`
61037  new_path="$path"
61038  if test "x$has_colon" = x; then
61039    # Not in mixed or Windows style, start by that.
61040    new_path=`cmd //c echo $path`
61041  fi
61042
61043
61044  input_path="$new_path"
61045  # Check if we need to convert this using DOS-style short mode. If the path
61046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61047  # take no chances and rewrite it.
61048  # Note: m4 eats our [], so we need to use [ and ] instead.
61049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61050  if test "x$has_forbidden_chars" != x; then
61051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61053  fi
61054
61055
61056  windows_path="$new_path"
61057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61058    unix_path=`$CYGPATH -u "$windows_path"`
61059    new_path="$unix_path"
61060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61062    new_path="$unix_path"
61063  fi
61064
61065  if test "x$path" != "x$new_path"; then
61066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61069  fi
61070
61071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61073
61074    else
61075      # We're on a unix platform. Hooray! :)
61076      path="$POTENTIAL_FREETYPE_LIB_PATH"
61077      has_space=`$ECHO "$path" | $GREP " "`
61078      if test "x$has_space" != x; then
61079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61082      fi
61083
61084      # Use eval to expand a potential ~
61085      eval path="$path"
61086      if test ! -f "$path" && test ! -d "$path"; then
61087        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61088      fi
61089
61090      if test -d "$path"; then
61091        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61092      else
61093        dir="`$DIRNAME "$path"`"
61094        base="`$BASENAME "$path"`"
61095        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61096      fi
61097    fi
61098  fi
61099
61100
61101    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61103$as_echo_n "checking for freetype includes... " >&6; }
61104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61105$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61106    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61108$as_echo_n "checking for freetype libraries... " >&6; }
61109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61110$as_echo "$FREETYPE_LIB_PATH" >&6; }
61111  fi
61112
61113          fi
61114
61115          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61116            if test "x$FOUND_FREETYPE" != xyes; then
61117              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61118              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61119
61120  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61121  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61122  METHOD="well-known location"
61123
61124  # Let's start with an optimistic view of the world :-)
61125  FOUND_FREETYPE=yes
61126
61127  # First look for the canonical freetype main include file ft2build.h.
61128  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61129    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61130    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61131    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61132      # Fail.
61133      FOUND_FREETYPE=no
61134    fi
61135  fi
61136
61137  if test "x$FOUND_FREETYPE" = xyes; then
61138    # Include file found, let's continue the sanity check.
61139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61140$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61141
61142    # Reset to default value
61143    FREETYPE_BASE_NAME=freetype
61144    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61145    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61146      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61148        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61149        # for the .6 version explicitly.
61150        FREETYPE_BASE_NAME=freetype.6
61151        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61152        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61153$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61154      else
61155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61156$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61157        FOUND_FREETYPE=no
61158      fi
61159    else
61160      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61161        # On Windows, we will need both .lib and .dll file.
61162        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61163          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61164$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61165          FOUND_FREETYPE=no
61166        fi
61167      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61168          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61169        # Found lib in isa dir, use that instead.
61170        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61171        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61172$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61173      fi
61174    fi
61175  fi
61176
61177  if test "x$FOUND_FREETYPE" = xyes; then
61178
61179  # Only process if variable expands to non-empty
61180
61181  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61183
61184  # Input might be given as Windows format, start by converting to
61185  # unix format.
61186  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61187  new_path=`$CYGPATH -u "$path"`
61188
61189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61192  # "foo.exe" is OK but "foo" is an error.
61193  #
61194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61195  # It is also a way to make sure we got the proper file name for the real test later on.
61196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61197  if test "x$test_shortpath" = x; then
61198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61201  fi
61202
61203  # Call helper function which possibly converts this using DOS-style short mode.
61204  # If so, the updated path is stored in $new_path.
61205
61206  input_path="$new_path"
61207  # Check if we need to convert this using DOS-style short mode. If the path
61208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61209  # take no chances and rewrite it.
61210  # Note: m4 eats our [], so we need to use [ and ] instead.
61211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61212  if test "x$has_forbidden_chars" != x; then
61213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61217      # Going to short mode and back again did indeed matter. Since short mode is
61218      # case insensitive, let's make it lowercase to improve readability.
61219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61220      # Now convert it back to Unix-style (cygpath)
61221      input_path=`$CYGPATH -u "$shortmode_path"`
61222      new_path="$input_path"
61223    fi
61224  fi
61225
61226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61227  if test "x$test_cygdrive_prefix" = x; then
61228    # As a simple fix, exclude /usr/bin since it's not a real path.
61229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61231      # a path prefixed by /cygdrive for fixpath to work.
61232      new_path="$CYGWIN_ROOT_PATH$input_path"
61233    fi
61234  fi
61235
61236
61237  if test "x$path" != "x$new_path"; then
61238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61241  fi
61242
61243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61244
61245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61246  has_colon=`$ECHO $path | $GREP ^.:`
61247  new_path="$path"
61248  if test "x$has_colon" = x; then
61249    # Not in mixed or Windows style, start by that.
61250    new_path=`cmd //c echo $path`
61251  fi
61252
61253
61254  input_path="$new_path"
61255  # Check if we need to convert this using DOS-style short mode. If the path
61256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61257  # take no chances and rewrite it.
61258  # Note: m4 eats our [], so we need to use [ and ] instead.
61259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61260  if test "x$has_forbidden_chars" != x; then
61261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61263  fi
61264
61265
61266  windows_path="$new_path"
61267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61268    unix_path=`$CYGPATH -u "$windows_path"`
61269    new_path="$unix_path"
61270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61272    new_path="$unix_path"
61273  fi
61274
61275  if test "x$path" != "x$new_path"; then
61276    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61279  fi
61280
61281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61283
61284    else
61285      # We're on a unix platform. Hooray! :)
61286      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61287      has_space=`$ECHO "$path" | $GREP " "`
61288      if test "x$has_space" != x; then
61289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61292      fi
61293
61294      # Use eval to expand a potential ~
61295      eval path="$path"
61296      if test ! -f "$path" && test ! -d "$path"; then
61297        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61298      fi
61299
61300      if test -d "$path"; then
61301        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61302      else
61303        dir="`$DIRNAME "$path"`"
61304        base="`$BASENAME "$path"`"
61305        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61306      fi
61307    fi
61308  fi
61309
61310
61311  # Only process if variable expands to non-empty
61312
61313  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61315
61316  # Input might be given as Windows format, start by converting to
61317  # unix format.
61318  path="$POTENTIAL_FREETYPE_LIB_PATH"
61319  new_path=`$CYGPATH -u "$path"`
61320
61321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61324  # "foo.exe" is OK but "foo" is an error.
61325  #
61326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61327  # It is also a way to make sure we got the proper file name for the real test later on.
61328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61329  if test "x$test_shortpath" = x; then
61330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61332    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61333  fi
61334
61335  # Call helper function which possibly converts this using DOS-style short mode.
61336  # If so, the updated path is stored in $new_path.
61337
61338  input_path="$new_path"
61339  # Check if we need to convert this using DOS-style short mode. If the path
61340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61341  # take no chances and rewrite it.
61342  # Note: m4 eats our [], so we need to use [ and ] instead.
61343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61344  if test "x$has_forbidden_chars" != x; then
61345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61349      # Going to short mode and back again did indeed matter. Since short mode is
61350      # case insensitive, let's make it lowercase to improve readability.
61351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61352      # Now convert it back to Unix-style (cygpath)
61353      input_path=`$CYGPATH -u "$shortmode_path"`
61354      new_path="$input_path"
61355    fi
61356  fi
61357
61358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61359  if test "x$test_cygdrive_prefix" = x; then
61360    # As a simple fix, exclude /usr/bin since it's not a real path.
61361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61363      # a path prefixed by /cygdrive for fixpath to work.
61364      new_path="$CYGWIN_ROOT_PATH$input_path"
61365    fi
61366  fi
61367
61368
61369  if test "x$path" != "x$new_path"; then
61370    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61373  fi
61374
61375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61376
61377  path="$POTENTIAL_FREETYPE_LIB_PATH"
61378  has_colon=`$ECHO $path | $GREP ^.:`
61379  new_path="$path"
61380  if test "x$has_colon" = x; then
61381    # Not in mixed or Windows style, start by that.
61382    new_path=`cmd //c echo $path`
61383  fi
61384
61385
61386  input_path="$new_path"
61387  # Check if we need to convert this using DOS-style short mode. If the path
61388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61389  # take no chances and rewrite it.
61390  # Note: m4 eats our [], so we need to use [ and ] instead.
61391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61392  if test "x$has_forbidden_chars" != x; then
61393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61395  fi
61396
61397
61398  windows_path="$new_path"
61399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61400    unix_path=`$CYGPATH -u "$windows_path"`
61401    new_path="$unix_path"
61402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61404    new_path="$unix_path"
61405  fi
61406
61407  if test "x$path" != "x$new_path"; then
61408    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61410$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61411  fi
61412
61413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61415
61416    else
61417      # We're on a unix platform. Hooray! :)
61418      path="$POTENTIAL_FREETYPE_LIB_PATH"
61419      has_space=`$ECHO "$path" | $GREP " "`
61420      if test "x$has_space" != x; then
61421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61424      fi
61425
61426      # Use eval to expand a potential ~
61427      eval path="$path"
61428      if test ! -f "$path" && test ! -d "$path"; then
61429        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61430      fi
61431
61432      if test -d "$path"; then
61433        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61434      else
61435        dir="`$DIRNAME "$path"`"
61436        base="`$BASENAME "$path"`"
61437        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61438      fi
61439    fi
61440  fi
61441
61442
61443    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61445$as_echo_n "checking for freetype includes... " >&6; }
61446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61447$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61448    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61450$as_echo_n "checking for freetype libraries... " >&6; }
61451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61452$as_echo "$FREETYPE_LIB_PATH" >&6; }
61453  fi
61454
61455            fi
61456          fi
61457
61458          if test "x$FOUND_FREETYPE" != xyes; then
61459            FREETYPE_BASE_DIR="$SYSROOT/usr"
61460            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61461
61462  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61463  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61464  METHOD="well-known location"
61465
61466  # Let's start with an optimistic view of the world :-)
61467  FOUND_FREETYPE=yes
61468
61469  # First look for the canonical freetype main include file ft2build.h.
61470  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61471    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61472    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61473    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61474      # Fail.
61475      FOUND_FREETYPE=no
61476    fi
61477  fi
61478
61479  if test "x$FOUND_FREETYPE" = xyes; then
61480    # Include file found, let's continue the sanity check.
61481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61482$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61483
61484    # Reset to default value
61485    FREETYPE_BASE_NAME=freetype
61486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61488      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61490        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61491        # for the .6 version explicitly.
61492        FREETYPE_BASE_NAME=freetype.6
61493        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61494        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61495$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61496      else
61497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61499        FOUND_FREETYPE=no
61500      fi
61501    else
61502      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61503        # On Windows, we will need both .lib and .dll file.
61504        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61505          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61506$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61507          FOUND_FREETYPE=no
61508        fi
61509      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61510          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61511        # Found lib in isa dir, use that instead.
61512        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61513        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61514$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61515      fi
61516    fi
61517  fi
61518
61519  if test "x$FOUND_FREETYPE" = xyes; then
61520
61521  # Only process if variable expands to non-empty
61522
61523  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61525
61526  # Input might be given as Windows format, start by converting to
61527  # unix format.
61528  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61529  new_path=`$CYGPATH -u "$path"`
61530
61531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61534  # "foo.exe" is OK but "foo" is an error.
61535  #
61536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61537  # It is also a way to make sure we got the proper file name for the real test later on.
61538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61539  if test "x$test_shortpath" = x; then
61540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61543  fi
61544
61545  # Call helper function which possibly converts this using DOS-style short mode.
61546  # If so, the updated path is stored in $new_path.
61547
61548  input_path="$new_path"
61549  # Check if we need to convert this using DOS-style short mode. If the path
61550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61551  # take no chances and rewrite it.
61552  # Note: m4 eats our [], so we need to use [ and ] instead.
61553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61554  if test "x$has_forbidden_chars" != x; then
61555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61559      # Going to short mode and back again did indeed matter. Since short mode is
61560      # case insensitive, let's make it lowercase to improve readability.
61561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61562      # Now convert it back to Unix-style (cygpath)
61563      input_path=`$CYGPATH -u "$shortmode_path"`
61564      new_path="$input_path"
61565    fi
61566  fi
61567
61568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61569  if test "x$test_cygdrive_prefix" = x; then
61570    # As a simple fix, exclude /usr/bin since it's not a real path.
61571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61573      # a path prefixed by /cygdrive for fixpath to work.
61574      new_path="$CYGWIN_ROOT_PATH$input_path"
61575    fi
61576  fi
61577
61578
61579  if test "x$path" != "x$new_path"; then
61580    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61583  fi
61584
61585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61586
61587  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61588  has_colon=`$ECHO $path | $GREP ^.:`
61589  new_path="$path"
61590  if test "x$has_colon" = x; then
61591    # Not in mixed or Windows style, start by that.
61592    new_path=`cmd //c echo $path`
61593  fi
61594
61595
61596  input_path="$new_path"
61597  # Check if we need to convert this using DOS-style short mode. If the path
61598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61599  # take no chances and rewrite it.
61600  # Note: m4 eats our [], so we need to use [ and ] instead.
61601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61602  if test "x$has_forbidden_chars" != x; then
61603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61605  fi
61606
61607
61608  windows_path="$new_path"
61609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61610    unix_path=`$CYGPATH -u "$windows_path"`
61611    new_path="$unix_path"
61612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61614    new_path="$unix_path"
61615  fi
61616
61617  if test "x$path" != "x$new_path"; then
61618    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61621  fi
61622
61623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61625
61626    else
61627      # We're on a unix platform. Hooray! :)
61628      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61629      has_space=`$ECHO "$path" | $GREP " "`
61630      if test "x$has_space" != x; then
61631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61634      fi
61635
61636      # Use eval to expand a potential ~
61637      eval path="$path"
61638      if test ! -f "$path" && test ! -d "$path"; then
61639        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61640      fi
61641
61642      if test -d "$path"; then
61643        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61644      else
61645        dir="`$DIRNAME "$path"`"
61646        base="`$BASENAME "$path"`"
61647        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61648      fi
61649    fi
61650  fi
61651
61652
61653  # Only process if variable expands to non-empty
61654
61655  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61657
61658  # Input might be given as Windows format, start by converting to
61659  # unix format.
61660  path="$POTENTIAL_FREETYPE_LIB_PATH"
61661  new_path=`$CYGPATH -u "$path"`
61662
61663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61666  # "foo.exe" is OK but "foo" is an error.
61667  #
61668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61669  # It is also a way to make sure we got the proper file name for the real test later on.
61670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61671  if test "x$test_shortpath" = x; then
61672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61674    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61675  fi
61676
61677  # Call helper function which possibly converts this using DOS-style short mode.
61678  # If so, the updated path is stored in $new_path.
61679
61680  input_path="$new_path"
61681  # Check if we need to convert this using DOS-style short mode. If the path
61682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61683  # take no chances and rewrite it.
61684  # Note: m4 eats our [], so we need to use [ and ] instead.
61685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61686  if test "x$has_forbidden_chars" != x; then
61687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61691      # Going to short mode and back again did indeed matter. Since short mode is
61692      # case insensitive, let's make it lowercase to improve readability.
61693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61694      # Now convert it back to Unix-style (cygpath)
61695      input_path=`$CYGPATH -u "$shortmode_path"`
61696      new_path="$input_path"
61697    fi
61698  fi
61699
61700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61701  if test "x$test_cygdrive_prefix" = x; then
61702    # As a simple fix, exclude /usr/bin since it's not a real path.
61703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61705      # a path prefixed by /cygdrive for fixpath to work.
61706      new_path="$CYGWIN_ROOT_PATH$input_path"
61707    fi
61708  fi
61709
61710
61711  if test "x$path" != "x$new_path"; then
61712    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61715  fi
61716
61717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61718
61719  path="$POTENTIAL_FREETYPE_LIB_PATH"
61720  has_colon=`$ECHO $path | $GREP ^.:`
61721  new_path="$path"
61722  if test "x$has_colon" = x; then
61723    # Not in mixed or Windows style, start by that.
61724    new_path=`cmd //c echo $path`
61725  fi
61726
61727
61728  input_path="$new_path"
61729  # Check if we need to convert this using DOS-style short mode. If the path
61730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61731  # take no chances and rewrite it.
61732  # Note: m4 eats our [], so we need to use [ and ] instead.
61733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61734  if test "x$has_forbidden_chars" != x; then
61735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61737  fi
61738
61739
61740  windows_path="$new_path"
61741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61742    unix_path=`$CYGPATH -u "$windows_path"`
61743    new_path="$unix_path"
61744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61746    new_path="$unix_path"
61747  fi
61748
61749  if test "x$path" != "x$new_path"; then
61750    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61753  fi
61754
61755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61757
61758    else
61759      # We're on a unix platform. Hooray! :)
61760      path="$POTENTIAL_FREETYPE_LIB_PATH"
61761      has_space=`$ECHO "$path" | $GREP " "`
61762      if test "x$has_space" != x; then
61763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61766      fi
61767
61768      # Use eval to expand a potential ~
61769      eval path="$path"
61770      if test ! -f "$path" && test ! -d "$path"; then
61771        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61772      fi
61773
61774      if test -d "$path"; then
61775        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61776      else
61777        dir="`$DIRNAME "$path"`"
61778        base="`$BASENAME "$path"`"
61779        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61780      fi
61781    fi
61782  fi
61783
61784
61785    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61787$as_echo_n "checking for freetype includes... " >&6; }
61788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61789$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61790    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61792$as_echo_n "checking for freetype libraries... " >&6; }
61793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61794$as_echo "$FREETYPE_LIB_PATH" >&6; }
61795  fi
61796
61797            else
61798
61799  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61800  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61801  METHOD="well-known location"
61802
61803  # Let's start with an optimistic view of the world :-)
61804  FOUND_FREETYPE=yes
61805
61806  # First look for the canonical freetype main include file ft2build.h.
61807  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61808    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61809    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61810    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61811      # Fail.
61812      FOUND_FREETYPE=no
61813    fi
61814  fi
61815
61816  if test "x$FOUND_FREETYPE" = xyes; then
61817    # Include file found, let's continue the sanity check.
61818    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61819$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61820
61821    # Reset to default value
61822    FREETYPE_BASE_NAME=freetype
61823    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61824    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61825      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61826          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61827        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61828        # for the .6 version explicitly.
61829        FREETYPE_BASE_NAME=freetype.6
61830        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61831        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61832$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61833      else
61834        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61835$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61836        FOUND_FREETYPE=no
61837      fi
61838    else
61839      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61840        # On Windows, we will need both .lib and .dll file.
61841        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61842          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61843$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61844          FOUND_FREETYPE=no
61845        fi
61846      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61847          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61848        # Found lib in isa dir, use that instead.
61849        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61850        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61851$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61852      fi
61853    fi
61854  fi
61855
61856  if test "x$FOUND_FREETYPE" = xyes; then
61857
61858  # Only process if variable expands to non-empty
61859
61860  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61862
61863  # Input might be given as Windows format, start by converting to
61864  # unix format.
61865  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61866  new_path=`$CYGPATH -u "$path"`
61867
61868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61871  # "foo.exe" is OK but "foo" is an error.
61872  #
61873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61874  # It is also a way to make sure we got the proper file name for the real test later on.
61875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61876  if test "x$test_shortpath" = x; then
61877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61879    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61880  fi
61881
61882  # Call helper function which possibly converts this using DOS-style short mode.
61883  # If so, the updated path is stored in $new_path.
61884
61885  input_path="$new_path"
61886  # Check if we need to convert this using DOS-style short mode. If the path
61887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61888  # take no chances and rewrite it.
61889  # Note: m4 eats our [], so we need to use [ and ] instead.
61890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61891  if test "x$has_forbidden_chars" != x; then
61892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61896      # Going to short mode and back again did indeed matter. Since short mode is
61897      # case insensitive, let's make it lowercase to improve readability.
61898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61899      # Now convert it back to Unix-style (cygpath)
61900      input_path=`$CYGPATH -u "$shortmode_path"`
61901      new_path="$input_path"
61902    fi
61903  fi
61904
61905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61906  if test "x$test_cygdrive_prefix" = x; then
61907    # As a simple fix, exclude /usr/bin since it's not a real path.
61908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61910      # a path prefixed by /cygdrive for fixpath to work.
61911      new_path="$CYGWIN_ROOT_PATH$input_path"
61912    fi
61913  fi
61914
61915
61916  if test "x$path" != "x$new_path"; then
61917    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61920  fi
61921
61922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61923
61924  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61925  has_colon=`$ECHO $path | $GREP ^.:`
61926  new_path="$path"
61927  if test "x$has_colon" = x; then
61928    # Not in mixed or Windows style, start by that.
61929    new_path=`cmd //c echo $path`
61930  fi
61931
61932
61933  input_path="$new_path"
61934  # Check if we need to convert this using DOS-style short mode. If the path
61935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61936  # take no chances and rewrite it.
61937  # Note: m4 eats our [], so we need to use [ and ] instead.
61938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61939  if test "x$has_forbidden_chars" != x; then
61940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61942  fi
61943
61944
61945  windows_path="$new_path"
61946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61947    unix_path=`$CYGPATH -u "$windows_path"`
61948    new_path="$unix_path"
61949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61951    new_path="$unix_path"
61952  fi
61953
61954  if test "x$path" != "x$new_path"; then
61955    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61957$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61958  fi
61959
61960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61962
61963    else
61964      # We're on a unix platform. Hooray! :)
61965      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61966      has_space=`$ECHO "$path" | $GREP " "`
61967      if test "x$has_space" != x; then
61968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61969$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61971      fi
61972
61973      # Use eval to expand a potential ~
61974      eval path="$path"
61975      if test ! -f "$path" && test ! -d "$path"; then
61976        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61977      fi
61978
61979      if test -d "$path"; then
61980        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61981      else
61982        dir="`$DIRNAME "$path"`"
61983        base="`$BASENAME "$path"`"
61984        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61985      fi
61986    fi
61987  fi
61988
61989
61990  # Only process if variable expands to non-empty
61991
61992  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61994
61995  # Input might be given as Windows format, start by converting to
61996  # unix format.
61997  path="$POTENTIAL_FREETYPE_LIB_PATH"
61998  new_path=`$CYGPATH -u "$path"`
61999
62000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62003  # "foo.exe" is OK but "foo" is an error.
62004  #
62005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62006  # It is also a way to make sure we got the proper file name for the real test later on.
62007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62008  if test "x$test_shortpath" = x; then
62009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62011    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62012  fi
62013
62014  # Call helper function which possibly converts this using DOS-style short mode.
62015  # If so, the updated path is stored in $new_path.
62016
62017  input_path="$new_path"
62018  # Check if we need to convert this using DOS-style short mode. If the path
62019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62020  # take no chances and rewrite it.
62021  # Note: m4 eats our [], so we need to use [ and ] instead.
62022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62023  if test "x$has_forbidden_chars" != x; then
62024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62028      # Going to short mode and back again did indeed matter. Since short mode is
62029      # case insensitive, let's make it lowercase to improve readability.
62030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62031      # Now convert it back to Unix-style (cygpath)
62032      input_path=`$CYGPATH -u "$shortmode_path"`
62033      new_path="$input_path"
62034    fi
62035  fi
62036
62037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62038  if test "x$test_cygdrive_prefix" = x; then
62039    # As a simple fix, exclude /usr/bin since it's not a real path.
62040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62042      # a path prefixed by /cygdrive for fixpath to work.
62043      new_path="$CYGWIN_ROOT_PATH$input_path"
62044    fi
62045  fi
62046
62047
62048  if test "x$path" != "x$new_path"; then
62049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62052  fi
62053
62054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62055
62056  path="$POTENTIAL_FREETYPE_LIB_PATH"
62057  has_colon=`$ECHO $path | $GREP ^.:`
62058  new_path="$path"
62059  if test "x$has_colon" = x; then
62060    # Not in mixed or Windows style, start by that.
62061    new_path=`cmd //c echo $path`
62062  fi
62063
62064
62065  input_path="$new_path"
62066  # Check if we need to convert this using DOS-style short mode. If the path
62067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62068  # take no chances and rewrite it.
62069  # Note: m4 eats our [], so we need to use [ and ] instead.
62070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62071  if test "x$has_forbidden_chars" != x; then
62072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62074  fi
62075
62076
62077  windows_path="$new_path"
62078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62079    unix_path=`$CYGPATH -u "$windows_path"`
62080    new_path="$unix_path"
62081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62083    new_path="$unix_path"
62084  fi
62085
62086  if test "x$path" != "x$new_path"; then
62087    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62089$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62090  fi
62091
62092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62094
62095    else
62096      # We're on a unix platform. Hooray! :)
62097      path="$POTENTIAL_FREETYPE_LIB_PATH"
62098      has_space=`$ECHO "$path" | $GREP " "`
62099      if test "x$has_space" != x; then
62100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62102        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62103      fi
62104
62105      # Use eval to expand a potential ~
62106      eval path="$path"
62107      if test ! -f "$path" && test ! -d "$path"; then
62108        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62109      fi
62110
62111      if test -d "$path"; then
62112        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62113      else
62114        dir="`$DIRNAME "$path"`"
62115        base="`$BASENAME "$path"`"
62116        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62117      fi
62118    fi
62119  fi
62120
62121
62122    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62124$as_echo_n "checking for freetype includes... " >&6; }
62125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62126$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62127    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62129$as_echo_n "checking for freetype libraries... " >&6; }
62130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62131$as_echo "$FREETYPE_LIB_PATH" >&6; }
62132  fi
62133
62134              if test "x$FOUND_FREETYPE" != xyes; then
62135
62136  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62137  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62138  METHOD="well-known location"
62139
62140  # Let's start with an optimistic view of the world :-)
62141  FOUND_FREETYPE=yes
62142
62143  # First look for the canonical freetype main include file ft2build.h.
62144  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62145    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62146    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62147    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62148      # Fail.
62149      FOUND_FREETYPE=no
62150    fi
62151  fi
62152
62153  if test "x$FOUND_FREETYPE" = xyes; then
62154    # Include file found, let's continue the sanity check.
62155    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62156$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62157
62158    # Reset to default value
62159    FREETYPE_BASE_NAME=freetype
62160    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62161    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62162      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62163          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62164        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62165        # for the .6 version explicitly.
62166        FREETYPE_BASE_NAME=freetype.6
62167        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62168        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62169$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62170      else
62171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62172$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62173        FOUND_FREETYPE=no
62174      fi
62175    else
62176      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62177        # On Windows, we will need both .lib and .dll file.
62178        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62179          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62180$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62181          FOUND_FREETYPE=no
62182        fi
62183      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62184          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62185        # Found lib in isa dir, use that instead.
62186        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62187        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62188$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62189      fi
62190    fi
62191  fi
62192
62193  if test "x$FOUND_FREETYPE" = xyes; then
62194
62195  # Only process if variable expands to non-empty
62196
62197  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62199
62200  # Input might be given as Windows format, start by converting to
62201  # unix format.
62202  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62203  new_path=`$CYGPATH -u "$path"`
62204
62205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62208  # "foo.exe" is OK but "foo" is an error.
62209  #
62210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62211  # It is also a way to make sure we got the proper file name for the real test later on.
62212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62213  if test "x$test_shortpath" = x; then
62214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62217  fi
62218
62219  # Call helper function which possibly converts this using DOS-style short mode.
62220  # If so, the updated path is stored in $new_path.
62221
62222  input_path="$new_path"
62223  # Check if we need to convert this using DOS-style short mode. If the path
62224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62225  # take no chances and rewrite it.
62226  # Note: m4 eats our [], so we need to use [ and ] instead.
62227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62228  if test "x$has_forbidden_chars" != x; then
62229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62233      # Going to short mode and back again did indeed matter. Since short mode is
62234      # case insensitive, let's make it lowercase to improve readability.
62235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62236      # Now convert it back to Unix-style (cygpath)
62237      input_path=`$CYGPATH -u "$shortmode_path"`
62238      new_path="$input_path"
62239    fi
62240  fi
62241
62242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62243  if test "x$test_cygdrive_prefix" = x; then
62244    # As a simple fix, exclude /usr/bin since it's not a real path.
62245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62247      # a path prefixed by /cygdrive for fixpath to work.
62248      new_path="$CYGWIN_ROOT_PATH$input_path"
62249    fi
62250  fi
62251
62252
62253  if test "x$path" != "x$new_path"; then
62254    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62257  fi
62258
62259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62260
62261  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62262  has_colon=`$ECHO $path | $GREP ^.:`
62263  new_path="$path"
62264  if test "x$has_colon" = x; then
62265    # Not in mixed or Windows style, start by that.
62266    new_path=`cmd //c echo $path`
62267  fi
62268
62269
62270  input_path="$new_path"
62271  # Check if we need to convert this using DOS-style short mode. If the path
62272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62273  # take no chances and rewrite it.
62274  # Note: m4 eats our [], so we need to use [ and ] instead.
62275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62276  if test "x$has_forbidden_chars" != x; then
62277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62279  fi
62280
62281
62282  windows_path="$new_path"
62283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62284    unix_path=`$CYGPATH -u "$windows_path"`
62285    new_path="$unix_path"
62286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62288    new_path="$unix_path"
62289  fi
62290
62291  if test "x$path" != "x$new_path"; then
62292    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62295  fi
62296
62297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62299
62300    else
62301      # We're on a unix platform. Hooray! :)
62302      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62303      has_space=`$ECHO "$path" | $GREP " "`
62304      if test "x$has_space" != x; then
62305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62308      fi
62309
62310      # Use eval to expand a potential ~
62311      eval path="$path"
62312      if test ! -f "$path" && test ! -d "$path"; then
62313        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62314      fi
62315
62316      if test -d "$path"; then
62317        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62318      else
62319        dir="`$DIRNAME "$path"`"
62320        base="`$BASENAME "$path"`"
62321        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62322      fi
62323    fi
62324  fi
62325
62326
62327  # Only process if variable expands to non-empty
62328
62329  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62331
62332  # Input might be given as Windows format, start by converting to
62333  # unix format.
62334  path="$POTENTIAL_FREETYPE_LIB_PATH"
62335  new_path=`$CYGPATH -u "$path"`
62336
62337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62340  # "foo.exe" is OK but "foo" is an error.
62341  #
62342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62343  # It is also a way to make sure we got the proper file name for the real test later on.
62344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62345  if test "x$test_shortpath" = x; then
62346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62347$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62348    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62349  fi
62350
62351  # Call helper function which possibly converts this using DOS-style short mode.
62352  # If so, the updated path is stored in $new_path.
62353
62354  input_path="$new_path"
62355  # Check if we need to convert this using DOS-style short mode. If the path
62356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62357  # take no chances and rewrite it.
62358  # Note: m4 eats our [], so we need to use [ and ] instead.
62359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62360  if test "x$has_forbidden_chars" != x; then
62361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62365      # Going to short mode and back again did indeed matter. Since short mode is
62366      # case insensitive, let's make it lowercase to improve readability.
62367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62368      # Now convert it back to Unix-style (cygpath)
62369      input_path=`$CYGPATH -u "$shortmode_path"`
62370      new_path="$input_path"
62371    fi
62372  fi
62373
62374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62375  if test "x$test_cygdrive_prefix" = x; then
62376    # As a simple fix, exclude /usr/bin since it's not a real path.
62377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62379      # a path prefixed by /cygdrive for fixpath to work.
62380      new_path="$CYGWIN_ROOT_PATH$input_path"
62381    fi
62382  fi
62383
62384
62385  if test "x$path" != "x$new_path"; then
62386    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62389  fi
62390
62391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62392
62393  path="$POTENTIAL_FREETYPE_LIB_PATH"
62394  has_colon=`$ECHO $path | $GREP ^.:`
62395  new_path="$path"
62396  if test "x$has_colon" = x; then
62397    # Not in mixed or Windows style, start by that.
62398    new_path=`cmd //c echo $path`
62399  fi
62400
62401
62402  input_path="$new_path"
62403  # Check if we need to convert this using DOS-style short mode. If the path
62404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62405  # take no chances and rewrite it.
62406  # Note: m4 eats our [], so we need to use [ and ] instead.
62407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62408  if test "x$has_forbidden_chars" != x; then
62409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62411  fi
62412
62413
62414  windows_path="$new_path"
62415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62416    unix_path=`$CYGPATH -u "$windows_path"`
62417    new_path="$unix_path"
62418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62420    new_path="$unix_path"
62421  fi
62422
62423  if test "x$path" != "x$new_path"; then
62424    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62426$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62427  fi
62428
62429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62431
62432    else
62433      # We're on a unix platform. Hooray! :)
62434      path="$POTENTIAL_FREETYPE_LIB_PATH"
62435      has_space=`$ECHO "$path" | $GREP " "`
62436      if test "x$has_space" != x; then
62437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62438$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62440      fi
62441
62442      # Use eval to expand a potential ~
62443      eval path="$path"
62444      if test ! -f "$path" && test ! -d "$path"; then
62445        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62446      fi
62447
62448      if test -d "$path"; then
62449        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62450      else
62451        dir="`$DIRNAME "$path"`"
62452        base="`$BASENAME "$path"`"
62453        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62454      fi
62455    fi
62456  fi
62457
62458
62459    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62461$as_echo_n "checking for freetype includes... " >&6; }
62462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62463$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62464    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62466$as_echo_n "checking for freetype libraries... " >&6; }
62467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62468$as_echo "$FREETYPE_LIB_PATH" >&6; }
62469  fi
62470
62471              fi
62472            fi
62473          fi
62474        fi
62475      fi # end check in well-known locations
62476
62477      if test "x$FOUND_FREETYPE" != xyes; then
62478
62479  # Print a helpful message on how to acquire the necessary build dependency.
62480  # freetype is the help tag: freetype, cups, alsa etc
62481  MISSING_DEPENDENCY=freetype
62482
62483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62484    cygwin_help $MISSING_DEPENDENCY
62485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62486    msys_help $MISSING_DEPENDENCY
62487  else
62488    PKGHANDLER_COMMAND=
62489
62490    case $PKGHANDLER in
62491      apt-get)
62492        apt_help     $MISSING_DEPENDENCY ;;
62493      yum)
62494        yum_help     $MISSING_DEPENDENCY ;;
62495      brew)
62496        brew_help    $MISSING_DEPENDENCY ;;
62497      port)
62498        port_help    $MISSING_DEPENDENCY ;;
62499      pkgutil)
62500        pkgutil_help $MISSING_DEPENDENCY ;;
62501      pkgadd)
62502        pkgadd_help  $MISSING_DEPENDENCY ;;
62503    esac
62504
62505    if test "x$PKGHANDLER_COMMAND" != x; then
62506      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62507    fi
62508  fi
62509
62510        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62511      fi
62512    fi # end user specified settings
62513
62514    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62515    if test "x$FREETYPE_CFLAGS" = x; then
62516
62517  # Only process if variable expands to non-empty
62518
62519  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62521
62522  # Input might be given as Windows format, start by converting to
62523  # unix format.
62524  path="$FREETYPE_INCLUDE_PATH"
62525  new_path=`$CYGPATH -u "$path"`
62526
62527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62530  # "foo.exe" is OK but "foo" is an error.
62531  #
62532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62533  # It is also a way to make sure we got the proper file name for the real test later on.
62534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62535  if test "x$test_shortpath" = x; then
62536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62537$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62538    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62539  fi
62540
62541  # Call helper function which possibly converts this using DOS-style short mode.
62542  # If so, the updated path is stored in $new_path.
62543
62544  input_path="$new_path"
62545  # Check if we need to convert this using DOS-style short mode. If the path
62546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62547  # take no chances and rewrite it.
62548  # Note: m4 eats our [], so we need to use [ and ] instead.
62549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62550  if test "x$has_forbidden_chars" != x; then
62551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62555      # Going to short mode and back again did indeed matter. Since short mode is
62556      # case insensitive, let's make it lowercase to improve readability.
62557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62558      # Now convert it back to Unix-style (cygpath)
62559      input_path=`$CYGPATH -u "$shortmode_path"`
62560      new_path="$input_path"
62561    fi
62562  fi
62563
62564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62565  if test "x$test_cygdrive_prefix" = x; then
62566    # As a simple fix, exclude /usr/bin since it's not a real path.
62567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62569      # a path prefixed by /cygdrive for fixpath to work.
62570      new_path="$CYGWIN_ROOT_PATH$input_path"
62571    fi
62572  fi
62573
62574
62575  if test "x$path" != "x$new_path"; then
62576    FREETYPE_INCLUDE_PATH="$new_path"
62577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62578$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62579  fi
62580
62581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62582
62583  path="$FREETYPE_INCLUDE_PATH"
62584  has_colon=`$ECHO $path | $GREP ^.:`
62585  new_path="$path"
62586  if test "x$has_colon" = x; then
62587    # Not in mixed or Windows style, start by that.
62588    new_path=`cmd //c echo $path`
62589  fi
62590
62591
62592  input_path="$new_path"
62593  # Check if we need to convert this using DOS-style short mode. If the path
62594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62595  # take no chances and rewrite it.
62596  # Note: m4 eats our [], so we need to use [ and ] instead.
62597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62598  if test "x$has_forbidden_chars" != x; then
62599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62601  fi
62602
62603
62604  windows_path="$new_path"
62605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62606    unix_path=`$CYGPATH -u "$windows_path"`
62607    new_path="$unix_path"
62608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62610    new_path="$unix_path"
62611  fi
62612
62613  if test "x$path" != "x$new_path"; then
62614    FREETYPE_INCLUDE_PATH="$new_path"
62615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62616$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62617  fi
62618
62619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62621
62622    else
62623      # We're on a unix platform. Hooray! :)
62624      path="$FREETYPE_INCLUDE_PATH"
62625      has_space=`$ECHO "$path" | $GREP " "`
62626      if test "x$has_space" != x; then
62627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62628$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62630      fi
62631
62632      # Use eval to expand a potential ~
62633      eval path="$path"
62634      if test ! -f "$path" && test ! -d "$path"; then
62635        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62636      fi
62637
62638      if test -d "$path"; then
62639        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62640      else
62641        dir="`$DIRNAME "$path"`"
62642        base="`$BASENAME "$path"`"
62643        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62644      fi
62645    fi
62646  fi
62647
62648      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62649        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62650      else
62651        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62652      fi
62653    fi
62654
62655    if test "x$FREETYPE_LIBS" = x; then
62656
62657  # Only process if variable expands to non-empty
62658
62659  if test "x$FREETYPE_LIB_PATH" != x; then
62660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62661
62662  # Input might be given as Windows format, start by converting to
62663  # unix format.
62664  path="$FREETYPE_LIB_PATH"
62665  new_path=`$CYGPATH -u "$path"`
62666
62667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62670  # "foo.exe" is OK but "foo" is an error.
62671  #
62672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62673  # It is also a way to make sure we got the proper file name for the real test later on.
62674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62675  if test "x$test_shortpath" = x; then
62676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62677$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62678    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62679  fi
62680
62681  # Call helper function which possibly converts this using DOS-style short mode.
62682  # If so, the updated path is stored in $new_path.
62683
62684  input_path="$new_path"
62685  # Check if we need to convert this using DOS-style short mode. If the path
62686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62687  # take no chances and rewrite it.
62688  # Note: m4 eats our [], so we need to use [ and ] instead.
62689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62690  if test "x$has_forbidden_chars" != x; then
62691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62695      # Going to short mode and back again did indeed matter. Since short mode is
62696      # case insensitive, let's make it lowercase to improve readability.
62697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62698      # Now convert it back to Unix-style (cygpath)
62699      input_path=`$CYGPATH -u "$shortmode_path"`
62700      new_path="$input_path"
62701    fi
62702  fi
62703
62704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62705  if test "x$test_cygdrive_prefix" = x; then
62706    # As a simple fix, exclude /usr/bin since it's not a real path.
62707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62709      # a path prefixed by /cygdrive for fixpath to work.
62710      new_path="$CYGWIN_ROOT_PATH$input_path"
62711    fi
62712  fi
62713
62714
62715  if test "x$path" != "x$new_path"; then
62716    FREETYPE_LIB_PATH="$new_path"
62717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62718$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62719  fi
62720
62721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62722
62723  path="$FREETYPE_LIB_PATH"
62724  has_colon=`$ECHO $path | $GREP ^.:`
62725  new_path="$path"
62726  if test "x$has_colon" = x; then
62727    # Not in mixed or Windows style, start by that.
62728    new_path=`cmd //c echo $path`
62729  fi
62730
62731
62732  input_path="$new_path"
62733  # Check if we need to convert this using DOS-style short mode. If the path
62734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62735  # take no chances and rewrite it.
62736  # Note: m4 eats our [], so we need to use [ and ] instead.
62737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62738  if test "x$has_forbidden_chars" != x; then
62739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62741  fi
62742
62743
62744  windows_path="$new_path"
62745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62746    unix_path=`$CYGPATH -u "$windows_path"`
62747    new_path="$unix_path"
62748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62750    new_path="$unix_path"
62751  fi
62752
62753  if test "x$path" != "x$new_path"; then
62754    FREETYPE_LIB_PATH="$new_path"
62755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62756$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62757  fi
62758
62759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62761
62762    else
62763      # We're on a unix platform. Hooray! :)
62764      path="$FREETYPE_LIB_PATH"
62765      has_space=`$ECHO "$path" | $GREP " "`
62766      if test "x$has_space" != x; then
62767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62768$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62770      fi
62771
62772      # Use eval to expand a potential ~
62773      eval path="$path"
62774      if test ! -f "$path" && test ! -d "$path"; then
62775        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62776      fi
62777
62778      if test -d "$path"; then
62779        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62780      else
62781        dir="`$DIRNAME "$path"`"
62782        base="`$BASENAME "$path"`"
62783        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62784      fi
62785    fi
62786  fi
62787
62788      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62789        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62790      else
62791        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62792      fi
62793    fi
62794
62795    # Try to compile it
62796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62797$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62798    ac_ext=cpp
62799ac_cpp='$CXXCPP $CPPFLAGS'
62800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62803
62804    PREV_CXXCFLAGS="$CXXFLAGS"
62805    PREV_LIBS="$LIBS"
62806    PREV_CXX="$CXX"
62807    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62808    LIBS="$LIBS $FREETYPE_LIBS"
62809    CXX="$FIXPATH $CXX"
62810    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62811/* end confdefs.h.  */
62812
62813          #include<ft2build.h>
62814          #include FT_FREETYPE_H
62815          int main () {
62816            FT_Init_FreeType(NULL);
62817            return 0;
62818          }
62819
62820_ACEOF
62821if ac_fn_cxx_try_link "$LINENO"; then :
62822
62823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62824$as_echo "yes" >&6; }
62825
62826else
62827
62828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62829$as_echo "no" >&6; }
62830          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62831$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62832          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62833$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62834
62835
62836  # Print a helpful message on how to acquire the necessary build dependency.
62837  # freetype is the help tag: freetype, cups, alsa etc
62838  MISSING_DEPENDENCY=freetype
62839
62840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62841    cygwin_help $MISSING_DEPENDENCY
62842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62843    msys_help $MISSING_DEPENDENCY
62844  else
62845    PKGHANDLER_COMMAND=
62846
62847    case $PKGHANDLER in
62848      apt-get)
62849        apt_help     $MISSING_DEPENDENCY ;;
62850      yum)
62851        yum_help     $MISSING_DEPENDENCY ;;
62852      brew)
62853        brew_help    $MISSING_DEPENDENCY ;;
62854      port)
62855        port_help    $MISSING_DEPENDENCY ;;
62856      pkgutil)
62857        pkgutil_help $MISSING_DEPENDENCY ;;
62858      pkgadd)
62859        pkgadd_help  $MISSING_DEPENDENCY ;;
62860    esac
62861
62862    if test "x$PKGHANDLER_COMMAND" != x; then
62863      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62864    fi
62865  fi
62866
62867
62868          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62869
62870
62871fi
62872rm -f core conftest.err conftest.$ac_objext \
62873    conftest$ac_exeext conftest.$ac_ext
62874    CXXCFLAGS="$PREV_CXXFLAGS"
62875    LIBS="$PREV_LIBS"
62876    CXX="$PREV_CXX"
62877    ac_ext=cpp
62878ac_cpp='$CXXCPP $CPPFLAGS'
62879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62882
62883
62884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62885$as_echo_n "checking if we should bundle freetype... " >&6; }
62886    if test "x$BUNDLE_FREETYPE" = xyes; then
62887      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62888    fi
62889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62890$as_echo "$BUNDLE_FREETYPE" >&6; }
62891
62892  fi # end freetype needed
62893
62894
62895
62896
62897
62898
62899
62900# Check whether --with-alsa was given.
62901if test "${with_alsa+set}" = set; then :
62902  withval=$with_alsa;
62903fi
62904
62905
62906# Check whether --with-alsa-include was given.
62907if test "${with_alsa_include+set}" = set; then :
62908  withval=$with_alsa_include;
62909fi
62910
62911
62912# Check whether --with-alsa-lib was given.
62913if test "${with_alsa_lib+set}" = set; then :
62914  withval=$with_alsa_lib;
62915fi
62916
62917
62918  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62919    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62920        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62921        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62922      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62923$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62924    fi
62925    ALSA_CFLAGS=
62926    ALSA_LIBS=
62927  else
62928    ALSA_FOUND=no
62929
62930    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62931      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62932    fi
62933
62934    if test "x${with_alsa}" != x; then
62935      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62936      ALSA_CFLAGS="-I${with_alsa}/include"
62937      ALSA_FOUND=yes
62938    fi
62939    if test "x${with_alsa_include}" != x; then
62940      ALSA_CFLAGS="-I${with_alsa_include}"
62941      ALSA_FOUND=yes
62942    fi
62943    if test "x${with_alsa_lib}" != x; then
62944      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62945      ALSA_FOUND=yes
62946    fi
62947    # Do not try pkg-config if we have a sysroot set.
62948    if test "x$SYSROOT" = x; then
62949      if test "x$ALSA_FOUND" = xno; then
62950
62951pkg_failed=no
62952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62953$as_echo_n "checking for ALSA... " >&6; }
62954
62955if test -n "$ALSA_CFLAGS"; then
62956    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62957 elif test -n "$PKG_CONFIG"; then
62958    if test -n "$PKG_CONFIG" && \
62959    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62960  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62961  ac_status=$?
62962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62963  test $ac_status = 0; }; then
62964  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62965else
62966  pkg_failed=yes
62967fi
62968 else
62969    pkg_failed=untried
62970fi
62971if test -n "$ALSA_LIBS"; then
62972    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62973 elif test -n "$PKG_CONFIG"; then
62974    if test -n "$PKG_CONFIG" && \
62975    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62976  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62977  ac_status=$?
62978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62979  test $ac_status = 0; }; then
62980  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62981else
62982  pkg_failed=yes
62983fi
62984 else
62985    pkg_failed=untried
62986fi
62987
62988
62989
62990if test $pkg_failed = yes; then
62991
62992if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62993        _pkg_short_errors_supported=yes
62994else
62995        _pkg_short_errors_supported=no
62996fi
62997        if test $_pkg_short_errors_supported = yes; then
62998	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62999        else
63000	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63001        fi
63002	# Put the nasty error message in config.log where it belongs
63003	echo "$ALSA_PKG_ERRORS" >&5
63004
63005	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63006$as_echo "no" >&6; }
63007                ALSA_FOUND=no
63008elif test $pkg_failed = untried; then
63009	ALSA_FOUND=no
63010else
63011	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63012	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63014$as_echo "yes" >&6; }
63015	ALSA_FOUND=yes
63016fi
63017      fi
63018    fi
63019    if test "x$ALSA_FOUND" = xno; then
63020      for ac_header in alsa/asoundlib.h
63021do :
63022  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63023if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63024  cat >>confdefs.h <<_ACEOF
63025#define HAVE_ALSA_ASOUNDLIB_H 1
63026_ACEOF
63027
63028            ALSA_FOUND=yes
63029            ALSA_CFLAGS=-Iignoreme
63030            ALSA_LIBS=-lasound
63031            DEFAULT_ALSA=yes
63032
63033else
63034  ALSA_FOUND=no
63035
63036fi
63037
63038done
63039
63040    fi
63041    if test "x$ALSA_FOUND" = xno; then
63042
63043  # Print a helpful message on how to acquire the necessary build dependency.
63044  # alsa is the help tag: freetype, cups, alsa etc
63045  MISSING_DEPENDENCY=alsa
63046
63047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63048    cygwin_help $MISSING_DEPENDENCY
63049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63050    msys_help $MISSING_DEPENDENCY
63051  else
63052    PKGHANDLER_COMMAND=
63053
63054    case $PKGHANDLER in
63055      apt-get)
63056        apt_help     $MISSING_DEPENDENCY ;;
63057      yum)
63058        yum_help     $MISSING_DEPENDENCY ;;
63059      brew)
63060        brew_help    $MISSING_DEPENDENCY ;;
63061      port)
63062        port_help    $MISSING_DEPENDENCY ;;
63063      pkgutil)
63064        pkgutil_help $MISSING_DEPENDENCY ;;
63065      pkgadd)
63066        pkgadd_help  $MISSING_DEPENDENCY ;;
63067    esac
63068
63069    if test "x$PKGHANDLER_COMMAND" != x; then
63070      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63071    fi
63072  fi
63073
63074      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63075    fi
63076  fi
63077
63078
63079
63080
63081
63082
63083# Check whether --with-libffi was given.
63084if test "${with_libffi+set}" = set; then :
63085  withval=$with_libffi;
63086fi
63087
63088
63089# Check whether --with-libffi-include was given.
63090if test "${with_libffi_include+set}" = set; then :
63091  withval=$with_libffi_include;
63092fi
63093
63094
63095# Check whether --with-libffi-lib was given.
63096if test "${with_libffi_lib+set}" = set; then :
63097  withval=$with_libffi_lib;
63098fi
63099
63100  # Check whether --enable-libffi-bundling was given.
63101if test "${enable_libffi_bundling+set}" = set; then :
63102  enableval=$enable_libffi_bundling;
63103fi
63104
63105
63106  if test "x$NEEDS_LIB_FFI" = xfalse; then
63107    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63108        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63109        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63110      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63111$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63112    fi
63113    LIBFFI_CFLAGS=
63114    LIBFFI_LIBS=
63115  else
63116    LIBFFI_FOUND=no
63117
63118    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63119      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63120    fi
63121
63122    if test "x${with_libffi}" != x; then
63123      LIBFFI_LIB_PATH="${with_libffi}/lib"
63124      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63125      LIBFFI_CFLAGS="-I${with_libffi}/include"
63126      LIBFFI_FOUND=yes
63127    fi
63128    if test "x${with_libffi_include}" != x; then
63129      LIBFFI_CFLAGS="-I${with_libffi_include}"
63130      LIBFFI_FOUND=yes
63131    fi
63132    if test "x${with_libffi_lib}" != x; then
63133      LIBFFI_LIB_PATH="${with_libffi_lib}"
63134      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63135      LIBFFI_FOUND=yes
63136    fi
63137    # Do not try pkg-config if we have a sysroot set.
63138    if test "x$SYSROOT" = x; then
63139      if test "x$LIBFFI_FOUND" = xno; then
63140        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63141
63142pkg_failed=no
63143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63144$as_echo_n "checking for LIBFFI... " >&6; }
63145
63146if test -n "$LIBFFI_CFLAGS"; then
63147    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63148 elif test -n "$PKG_CONFIG"; then
63149    if test -n "$PKG_CONFIG" && \
63150    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63151  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63152  ac_status=$?
63153  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63154  test $ac_status = 0; }; then
63155  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63156else
63157  pkg_failed=yes
63158fi
63159 else
63160    pkg_failed=untried
63161fi
63162if test -n "$LIBFFI_LIBS"; then
63163    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63164 elif test -n "$PKG_CONFIG"; then
63165    if test -n "$PKG_CONFIG" && \
63166    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63167  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63168  ac_status=$?
63169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63170  test $ac_status = 0; }; then
63171  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63172else
63173  pkg_failed=yes
63174fi
63175 else
63176    pkg_failed=untried
63177fi
63178
63179
63180
63181if test $pkg_failed = yes; then
63182
63183if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63184        _pkg_short_errors_supported=yes
63185else
63186        _pkg_short_errors_supported=no
63187fi
63188        if test $_pkg_short_errors_supported = yes; then
63189	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63190        else
63191	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63192        fi
63193	# Put the nasty error message in config.log where it belongs
63194	echo "$LIBFFI_PKG_ERRORS" >&5
63195
63196	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63197$as_echo "no" >&6; }
63198                LIBFFI_FOUND=no
63199elif test $pkg_failed = untried; then
63200	LIBFFI_FOUND=no
63201else
63202	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63203	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63205$as_echo "yes" >&6; }
63206	LIBFFI_FOUND=yes
63207fi
63208      fi
63209    fi
63210    if test "x$LIBFFI_FOUND" = xno; then
63211      for ac_header in ffi.h
63212do :
63213  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63214if test "x$ac_cv_header_ffi_h" = xyes; then :
63215  cat >>confdefs.h <<_ACEOF
63216#define HAVE_FFI_H 1
63217_ACEOF
63218
63219            LIBFFI_FOUND=yes
63220            LIBFFI_CFLAGS=
63221            LIBFFI_LIBS=-lffi
63222
63223else
63224  LIBFFI_FOUND=no
63225
63226fi
63227
63228done
63229
63230    fi
63231    if test "x$LIBFFI_FOUND" = xno; then
63232
63233  # Print a helpful message on how to acquire the necessary build dependency.
63234  # ffi is the help tag: freetype, cups, alsa etc
63235  MISSING_DEPENDENCY=ffi
63236
63237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63238    cygwin_help $MISSING_DEPENDENCY
63239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63240    msys_help $MISSING_DEPENDENCY
63241  else
63242    PKGHANDLER_COMMAND=
63243
63244    case $PKGHANDLER in
63245      apt-get)
63246        apt_help     $MISSING_DEPENDENCY ;;
63247      yum)
63248        yum_help     $MISSING_DEPENDENCY ;;
63249      brew)
63250        brew_help    $MISSING_DEPENDENCY ;;
63251      port)
63252        port_help    $MISSING_DEPENDENCY ;;
63253      pkgutil)
63254        pkgutil_help $MISSING_DEPENDENCY ;;
63255      pkgadd)
63256        pkgadd_help  $MISSING_DEPENDENCY ;;
63257    esac
63258
63259    if test "x$PKGHANDLER_COMMAND" != x; then
63260      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63261    fi
63262  fi
63263
63264      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63265    fi
63266
63267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63268$as_echo_n "checking if libffi works... " >&6; }
63269    ac_ext=c
63270ac_cpp='$CPP $CPPFLAGS'
63271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63273ac_compiler_gnu=$ac_cv_c_compiler_gnu
63274
63275    OLD_CFLAGS="$CFLAGS"
63276    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63277    OLD_LIBS="$LIBS"
63278    LIBS="$LIBS $LIBFFI_LIBS"
63279    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63280/* end confdefs.h.  */
63281#include <ffi.h>
63282int
63283main ()
63284{
63285
63286          ffi_call(NULL, NULL, NULL, NULL);
63287          return 0;
63288
63289  ;
63290  return 0;
63291}
63292_ACEOF
63293if ac_fn_c_try_link "$LINENO"; then :
63294  LIBFFI_WORKS=yes
63295else
63296  LIBFFI_WORKS=no
63297
63298fi
63299rm -f core conftest.err conftest.$ac_objext \
63300    conftest$ac_exeext conftest.$ac_ext
63301    CFLAGS="$OLD_CFLAGS"
63302    LIBS="$OLD_LIBS"
63303    ac_ext=cpp
63304ac_cpp='$CXXCPP $CPPFLAGS'
63305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63308
63309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63310$as_echo "$LIBFFI_WORKS" >&6; }
63311
63312    if test "x$LIBFFI_WORKS" = xno; then
63313
63314  # Print a helpful message on how to acquire the necessary build dependency.
63315  # ffi is the help tag: freetype, cups, alsa etc
63316  MISSING_DEPENDENCY=ffi
63317
63318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63319    cygwin_help $MISSING_DEPENDENCY
63320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63321    msys_help $MISSING_DEPENDENCY
63322  else
63323    PKGHANDLER_COMMAND=
63324
63325    case $PKGHANDLER in
63326      apt-get)
63327        apt_help     $MISSING_DEPENDENCY ;;
63328      yum)
63329        yum_help     $MISSING_DEPENDENCY ;;
63330      brew)
63331        brew_help    $MISSING_DEPENDENCY ;;
63332      port)
63333        port_help    $MISSING_DEPENDENCY ;;
63334      pkgutil)
63335        pkgutil_help $MISSING_DEPENDENCY ;;
63336      pkgadd)
63337        pkgadd_help  $MISSING_DEPENDENCY ;;
63338    esac
63339
63340    if test "x$PKGHANDLER_COMMAND" != x; then
63341      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63342    fi
63343  fi
63344
63345      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63346    fi
63347
63348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63349$as_echo_n "checking if libffi should be bundled... " >&6; }
63350    if test "x$enable_libffi_bundling" = "x"; then
63351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63352$as_echo "no" >&6; }
63353      ENABLE_LIBFFI_BUNDLING=false
63354    elif  test "x$enable_libffi_bundling" = "xno"; then
63355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63356$as_echo "no, forced" >&6; }
63357      ENABLE_LIBFFI_BUNDLING=false
63358    elif  test "x$enable_libffi_bundling" = "xyes"; then
63359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63360$as_echo "yes, forced" >&6; }
63361      ENABLE_LIBFFI_BUNDLING=true
63362    else
63363      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63364    fi
63365
63366    # Find the libffi.so.X to bundle
63367    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63369$as_echo_n "checking for libffi lib file location... " >&6; }
63370      if test "x${LIBFFI_LIB_PATH}" != x; then
63371        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63372          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63373        else
63374          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63375        fi
63376      else
63377        # If we don't have an explicit path, look in a few obvious places
63378        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63379          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63380            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63381          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63382            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63383          else
63384            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63385          fi
63386        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63387          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63388            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63389          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63390            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63391          else
63392            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63393          fi
63394        else
63395          # Fallback on the default /usr/lib dir
63396          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63397            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63398          else
63399            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63400          fi
63401        fi
63402      fi
63403      # Make sure the wildcard is evaluated
63404      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63406$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63407    fi
63408  fi
63409
63410
63411
63412
63413
63414
63415
63416  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63417    # Extract the first word of "llvm-config", so it can be a program name with args.
63418set dummy llvm-config; ac_word=$2
63419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63420$as_echo_n "checking for $ac_word... " >&6; }
63421if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63422  $as_echo_n "(cached) " >&6
63423else
63424  if test -n "$LLVM_CONFIG"; then
63425  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63426else
63427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63428for as_dir in $PATH
63429do
63430  IFS=$as_save_IFS
63431  test -z "$as_dir" && as_dir=.
63432    for ac_exec_ext in '' $ac_executable_extensions; do
63433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63434    ac_cv_prog_LLVM_CONFIG="llvm-config"
63435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63436    break 2
63437  fi
63438done
63439  done
63440IFS=$as_save_IFS
63441
63442fi
63443fi
63444LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63445if test -n "$LLVM_CONFIG"; then
63446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63447$as_echo "$LLVM_CONFIG" >&6; }
63448else
63449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63450$as_echo "no" >&6; }
63451fi
63452
63453
63454
63455    if test "x$LLVM_CONFIG" != xllvm-config; then
63456      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63457    fi
63458
63459    llvm_components="jit mcjit engine nativecodegen native"
63460    unset LLVM_CFLAGS
63461    for flag in $("$LLVM_CONFIG" --cxxflags); do
63462      if echo "${flag}" | grep -q '^-[ID]'; then
63463        if test "${flag}" != "-D_DEBUG" ; then
63464          if test "${LLVM_CFLAGS}" != "" ; then
63465            LLVM_CFLAGS="${LLVM_CFLAGS} "
63466          fi
63467          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63468        fi
63469      fi
63470    done
63471    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63472    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63473
63474    unset LLVM_LDFLAGS
63475    for flag in $("${LLVM_CONFIG}" --ldflags); do
63476      if echo "${flag}" | grep -q '^-L'; then
63477        if test "${LLVM_LDFLAGS}" != ""; then
63478          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63479        fi
63480        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63481      fi
63482    done
63483
63484    unset LLVM_LIBS
63485    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63486      if echo "${flag}" | grep -q '^-l'; then
63487        if test "${LLVM_LIBS}" != ""; then
63488          LLVM_LIBS="${LLVM_LIBS} "
63489        fi
63490        LLVM_LIBS="${LLVM_LIBS}${flag}"
63491      fi
63492    done
63493
63494    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63495    # always properly detect -ltinfo
63496    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63497
63498
63499
63500
63501  fi
63502
63503
63504
63505# Check whether --with-libjpeg was given.
63506if test "${with_libjpeg+set}" = set; then :
63507  withval=$with_libjpeg;
63508fi
63509
63510
63511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63512$as_echo_n "checking for which libjpeg to use... " >&6; }
63513  # default is bundled
63514  DEFAULT_LIBJPEG=bundled
63515  # if user didn't specify, use DEFAULT_LIBJPEG
63516  if test "x${with_libjpeg}" = "x"; then
63517    with_libjpeg=${DEFAULT_LIBJPEG}
63518  fi
63519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63520$as_echo "${with_libjpeg}" >&6; }
63521
63522  if test "x${with_libjpeg}" = "xbundled"; then
63523    USE_EXTERNAL_LIBJPEG=false
63524  elif test "x${with_libjpeg}" = "xsystem"; then
63525    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63526if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63527
63528else
63529   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63530fi
63531
63532
63533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63534$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63535if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63536  $as_echo_n "(cached) " >&6
63537else
63538  ac_check_lib_save_LIBS=$LIBS
63539LIBS="-ljpeg  $LIBS"
63540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63541/* end confdefs.h.  */
63542
63543/* Override any GCC internal prototype to avoid an error.
63544   Use char because int might match the return type of a GCC
63545   builtin and then its argument prototype would still apply.  */
63546#ifdef __cplusplus
63547extern "C"
63548#endif
63549char jpeg_CreateDecompress ();
63550int
63551main ()
63552{
63553return jpeg_CreateDecompress ();
63554  ;
63555  return 0;
63556}
63557_ACEOF
63558if ac_fn_cxx_try_link "$LINENO"; then :
63559  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63560else
63561  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63562fi
63563rm -f core conftest.err conftest.$ac_objext \
63564    conftest$ac_exeext conftest.$ac_ext
63565LIBS=$ac_check_lib_save_LIBS
63566fi
63567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63568$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63569if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63570  cat >>confdefs.h <<_ACEOF
63571#define HAVE_LIBJPEG 1
63572_ACEOF
63573
63574  LIBS="-ljpeg $LIBS"
63575
63576else
63577   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63578fi
63579
63580
63581    USE_EXTERNAL_LIBJPEG=true
63582  else
63583    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63584  fi
63585
63586
63587
63588
63589
63590# Check whether --with-giflib was given.
63591if test "${with_giflib+set}" = set; then :
63592  withval=$with_giflib;
63593fi
63594
63595
63596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63597$as_echo_n "checking for which giflib to use... " >&6; }
63598  # default is bundled
63599  DEFAULT_GIFLIB=bundled
63600  # if user didn't specify, use DEFAULT_GIFLIB
63601  if test "x${with_giflib}" = "x"; then
63602    with_giflib=${DEFAULT_GIFLIB}
63603  fi
63604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63605$as_echo "${with_giflib}" >&6; }
63606
63607  if test "x${with_giflib}" = "xbundled"; then
63608    USE_EXTERNAL_LIBGIF=false
63609  elif test "x${with_giflib}" = "xsystem"; then
63610    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63611if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63612
63613else
63614   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63615fi
63616
63617
63618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63619$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63620if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63621  $as_echo_n "(cached) " >&6
63622else
63623  ac_check_lib_save_LIBS=$LIBS
63624LIBS="-lgif  $LIBS"
63625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63626/* end confdefs.h.  */
63627
63628/* Override any GCC internal prototype to avoid an error.
63629   Use char because int might match the return type of a GCC
63630   builtin and then its argument prototype would still apply.  */
63631#ifdef __cplusplus
63632extern "C"
63633#endif
63634char DGifGetCode ();
63635int
63636main ()
63637{
63638return DGifGetCode ();
63639  ;
63640  return 0;
63641}
63642_ACEOF
63643if ac_fn_cxx_try_link "$LINENO"; then :
63644  ac_cv_lib_gif_DGifGetCode=yes
63645else
63646  ac_cv_lib_gif_DGifGetCode=no
63647fi
63648rm -f core conftest.err conftest.$ac_objext \
63649    conftest$ac_exeext conftest.$ac_ext
63650LIBS=$ac_check_lib_save_LIBS
63651fi
63652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63653$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63654if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63655  cat >>confdefs.h <<_ACEOF
63656#define HAVE_LIBGIF 1
63657_ACEOF
63658
63659  LIBS="-lgif $LIBS"
63660
63661else
63662   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63663fi
63664
63665
63666    USE_EXTERNAL_LIBGIF=true
63667  else
63668    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63669  fi
63670
63671
63672
63673
63674
63675# Check whether --with-libpng was given.
63676if test "${with_libpng+set}" = set; then :
63677  withval=$with_libpng;
63678fi
63679
63680
63681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63682$as_echo_n "checking for which libpng to use... " >&6; }
63683
63684  # default is bundled
63685  DEFAULT_LIBPNG=bundled
63686  # if user didn't specify, use DEFAULT_LIBPNG
63687  if test "x${with_libpng}" = "x"; then
63688      with_libpng=${DEFAULT_LIBPNG}
63689  fi
63690
63691  if test "x${with_libpng}" = "xbundled"; then
63692      USE_EXTERNAL_LIBPNG=false
63693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63694$as_echo "bundled" >&6; }
63695  elif test "x${with_libpng}" = "xsystem"; then
63696
63697pkg_failed=no
63698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63699$as_echo_n "checking for PNG... " >&6; }
63700
63701if test -n "$PNG_CFLAGS"; then
63702    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63703 elif test -n "$PKG_CONFIG"; then
63704    if test -n "$PKG_CONFIG" && \
63705    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63706  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63707  ac_status=$?
63708  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63709  test $ac_status = 0; }; then
63710  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63711else
63712  pkg_failed=yes
63713fi
63714 else
63715    pkg_failed=untried
63716fi
63717if test -n "$PNG_LIBS"; then
63718    pkg_cv_PNG_LIBS="$PNG_LIBS"
63719 elif test -n "$PKG_CONFIG"; then
63720    if test -n "$PKG_CONFIG" && \
63721    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63722  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63723  ac_status=$?
63724  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63725  test $ac_status = 0; }; then
63726  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63727else
63728  pkg_failed=yes
63729fi
63730 else
63731    pkg_failed=untried
63732fi
63733
63734
63735
63736if test $pkg_failed = yes; then
63737
63738if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63739        _pkg_short_errors_supported=yes
63740else
63741        _pkg_short_errors_supported=no
63742fi
63743        if test $_pkg_short_errors_supported = yes; then
63744	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63745        else
63746	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63747        fi
63748	# Put the nasty error message in config.log where it belongs
63749	echo "$PNG_PKG_ERRORS" >&5
63750
63751	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63752$as_echo "no" >&6; }
63753                 LIBPNG_FOUND=no
63754elif test $pkg_failed = untried; then
63755	 LIBPNG_FOUND=no
63756else
63757	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63758	PNG_LIBS=$pkg_cv_PNG_LIBS
63759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63760$as_echo "yes" >&6; }
63761	 LIBPNG_FOUND=yes
63762fi
63763      if test "x${LIBPNG_FOUND}" = "xyes"; then
63764          USE_EXTERNAL_LIBPNG=true
63765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63766$as_echo "system" >&6; }
63767      else
63768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63769$as_echo "system not found" >&6; }
63770          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63771      fi
63772  else
63773      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63774  fi
63775
63776
63777
63778
63779
63780# Check whether --with-zlib was given.
63781if test "${with_zlib+set}" = set; then :
63782  withval=$with_zlib;
63783fi
63784
63785
63786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63787$as_echo_n "checking for compress in -lz... " >&6; }
63788if ${ac_cv_lib_z_compress+:} false; then :
63789  $as_echo_n "(cached) " >&6
63790else
63791  ac_check_lib_save_LIBS=$LIBS
63792LIBS="-lz  $LIBS"
63793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63794/* end confdefs.h.  */
63795
63796/* Override any GCC internal prototype to avoid an error.
63797   Use char because int might match the return type of a GCC
63798   builtin and then its argument prototype would still apply.  */
63799#ifdef __cplusplus
63800extern "C"
63801#endif
63802char compress ();
63803int
63804main ()
63805{
63806return compress ();
63807  ;
63808  return 0;
63809}
63810_ACEOF
63811if ac_fn_cxx_try_link "$LINENO"; then :
63812  ac_cv_lib_z_compress=yes
63813else
63814  ac_cv_lib_z_compress=no
63815fi
63816rm -f core conftest.err conftest.$ac_objext \
63817    conftest$ac_exeext conftest.$ac_ext
63818LIBS=$ac_check_lib_save_LIBS
63819fi
63820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63821$as_echo "$ac_cv_lib_z_compress" >&6; }
63822if test "x$ac_cv_lib_z_compress" = xyes; then :
63823   ZLIB_FOUND=yes
63824else
63825   ZLIB_FOUND=no
63826fi
63827
63828
63829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63830$as_echo_n "checking for which zlib to use... " >&6; }
63831
63832  DEFAULT_ZLIB=system
63833  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63834    # On windows default is bundled...on others default is system
63835    DEFAULT_ZLIB=bundled
63836  fi
63837
63838  if test "x${ZLIB_FOUND}" != "xyes"; then
63839    # If we don't find any system...set default to bundled
63840    DEFAULT_ZLIB=bundled
63841  fi
63842
63843  # If user didn't specify, use DEFAULT_ZLIB
63844  if test "x${with_zlib}" = "x"; then
63845    with_zlib=${DEFAULT_ZLIB}
63846  fi
63847
63848  if test "x${with_zlib}" = "xbundled"; then
63849    USE_EXTERNAL_LIBZ=false
63850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63851$as_echo "bundled" >&6; }
63852  elif test "x${with_zlib}" = "xsystem"; then
63853    if test "x${ZLIB_FOUND}" = "xyes"; then
63854      USE_EXTERNAL_LIBZ=true
63855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63856$as_echo "system" >&6; }
63857    else
63858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63859$as_echo "system not found" >&6; }
63860      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63861    fi
63862  else
63863    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63864  fi
63865
63866
63867
63868
63869
63870# Check whether --with-lcms was given.
63871if test "${with_lcms+set}" = set; then :
63872  withval=$with_lcms;
63873fi
63874
63875
63876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63877$as_echo_n "checking for which lcms to use... " >&6; }
63878
63879  DEFAULT_LCMS=bundled
63880  # If user didn't specify, use DEFAULT_LCMS
63881  if test "x${with_lcms}" = "x"; then
63882      with_lcms=${DEFAULT_LCMS}
63883  fi
63884
63885  if test "x${with_lcms}" = "xbundled"; then
63886    USE_EXTERNAL_LCMS=false
63887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63888$as_echo "bundled" >&6; }
63889  elif test "x${with_lcms}" = "xsystem"; then
63890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63891$as_echo "system" >&6; }
63892
63893pkg_failed=no
63894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63895$as_echo_n "checking for LCMS... " >&6; }
63896
63897if test -n "$LCMS_CFLAGS"; then
63898    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63899 elif test -n "$PKG_CONFIG"; then
63900    if test -n "$PKG_CONFIG" && \
63901    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63902  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63903  ac_status=$?
63904  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63905  test $ac_status = 0; }; then
63906  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63907else
63908  pkg_failed=yes
63909fi
63910 else
63911    pkg_failed=untried
63912fi
63913if test -n "$LCMS_LIBS"; then
63914    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63915 elif test -n "$PKG_CONFIG"; then
63916    if test -n "$PKG_CONFIG" && \
63917    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63918  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63919  ac_status=$?
63920  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63921  test $ac_status = 0; }; then
63922  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63923else
63924  pkg_failed=yes
63925fi
63926 else
63927    pkg_failed=untried
63928fi
63929
63930
63931
63932if test $pkg_failed = yes; then
63933
63934if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63935        _pkg_short_errors_supported=yes
63936else
63937        _pkg_short_errors_supported=no
63938fi
63939        if test $_pkg_short_errors_supported = yes; then
63940	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63941        else
63942	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63943        fi
63944	# Put the nasty error message in config.log where it belongs
63945	echo "$LCMS_PKG_ERRORS" >&5
63946
63947	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63948$as_echo "no" >&6; }
63949                LCMS_FOUND=no
63950elif test $pkg_failed = untried; then
63951	LCMS_FOUND=no
63952else
63953	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63954	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63956$as_echo "yes" >&6; }
63957	LCMS_FOUND=yes
63958fi
63959    if test "x${LCMS_FOUND}" = "xyes"; then
63960      USE_EXTERNAL_LCMS=true
63961    else
63962      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63963    fi
63964  else
63965    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63966  fi
63967
63968
63969
63970
63971
63972
63973
63974
63975
63976
63977
63978  # Setup libm (the maths library)
63979  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63981$as_echo_n "checking for cos in -lm... " >&6; }
63982if ${ac_cv_lib_m_cos+:} false; then :
63983  $as_echo_n "(cached) " >&6
63984else
63985  ac_check_lib_save_LIBS=$LIBS
63986LIBS="-lm  $LIBS"
63987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63988/* end confdefs.h.  */
63989
63990/* Override any GCC internal prototype to avoid an error.
63991   Use char because int might match the return type of a GCC
63992   builtin and then its argument prototype would still apply.  */
63993#ifdef __cplusplus
63994extern "C"
63995#endif
63996char cos ();
63997int
63998main ()
63999{
64000return cos ();
64001  ;
64002  return 0;
64003}
64004_ACEOF
64005if ac_fn_cxx_try_link "$LINENO"; then :
64006  ac_cv_lib_m_cos=yes
64007else
64008  ac_cv_lib_m_cos=no
64009fi
64010rm -f core conftest.err conftest.$ac_objext \
64011    conftest$ac_exeext conftest.$ac_ext
64012LIBS=$ac_check_lib_save_LIBS
64013fi
64014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64015$as_echo "$ac_cv_lib_m_cos" >&6; }
64016if test "x$ac_cv_lib_m_cos" = xyes; then :
64017  cat >>confdefs.h <<_ACEOF
64018#define HAVE_LIBM 1
64019_ACEOF
64020
64021  LIBS="-lm $LIBS"
64022
64023else
64024
64025        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64026$as_echo "$as_me: Maths library was not found" >&6;}
64027
64028fi
64029
64030    LIBM="-lm"
64031  else
64032    LIBM=""
64033  fi
64034
64035
64036  # Setup libdl (for dynamic library loading)
64037  save_LIBS="$LIBS"
64038  LIBS=""
64039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64040$as_echo_n "checking for dlopen in -ldl... " >&6; }
64041if ${ac_cv_lib_dl_dlopen+:} false; then :
64042  $as_echo_n "(cached) " >&6
64043else
64044  ac_check_lib_save_LIBS=$LIBS
64045LIBS="-ldl  $LIBS"
64046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64047/* end confdefs.h.  */
64048
64049/* Override any GCC internal prototype to avoid an error.
64050   Use char because int might match the return type of a GCC
64051   builtin and then its argument prototype would still apply.  */
64052#ifdef __cplusplus
64053extern "C"
64054#endif
64055char dlopen ();
64056int
64057main ()
64058{
64059return dlopen ();
64060  ;
64061  return 0;
64062}
64063_ACEOF
64064if ac_fn_cxx_try_link "$LINENO"; then :
64065  ac_cv_lib_dl_dlopen=yes
64066else
64067  ac_cv_lib_dl_dlopen=no
64068fi
64069rm -f core conftest.err conftest.$ac_objext \
64070    conftest$ac_exeext conftest.$ac_ext
64071LIBS=$ac_check_lib_save_LIBS
64072fi
64073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64074$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64075if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64076  cat >>confdefs.h <<_ACEOF
64077#define HAVE_LIBDL 1
64078_ACEOF
64079
64080  LIBS="-ldl $LIBS"
64081
64082fi
64083
64084  LIBDL="$LIBS"
64085
64086  LIBS="$save_LIBS"
64087
64088  # Deprecated libraries, keep the flags for backwards compatibility
64089  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64090
64091
64092# Check whether --with-dxsdk was given.
64093if test "${with_dxsdk+set}" = set; then :
64094  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64095$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64096fi
64097
64098
64099
64100
64101# Check whether --with-dxsdk-lib was given.
64102if test "${with_dxsdk_lib+set}" = set; then :
64103  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64104$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64105fi
64106
64107
64108
64109
64110# Check whether --with-dxsdk-include was given.
64111if test "${with_dxsdk_include+set}" = set; then :
64112  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64113$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64114fi
64115
64116
64117  fi
64118
64119  # Control if libzip can use mmap. Available for purposes of overriding.
64120  LIBZIP_CAN_USE_MMAP=true
64121
64122
64123
64124  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64125    # Find the root of the Solaris Studio installation from the compiler path
64126    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64127    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64129$as_echo_n "checking for libstlport.so.1... " >&6; }
64130    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64131      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64132      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64133    fi
64134    if test -f "$STLPORT_LIB"; then
64135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64136$as_echo "yes, $STLPORT_LIB" >&6; }
64137
64138  # Only process if variable expands to non-empty
64139
64140  if test "x$STLPORT_LIB" != x; then
64141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64142
64143  # Input might be given as Windows format, start by converting to
64144  # unix format.
64145  path="$STLPORT_LIB"
64146  new_path=`$CYGPATH -u "$path"`
64147
64148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64151  # "foo.exe" is OK but "foo" is an error.
64152  #
64153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64154  # It is also a way to make sure we got the proper file name for the real test later on.
64155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64156  if test "x$test_shortpath" = x; then
64157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64158$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64159    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64160  fi
64161
64162  # Call helper function which possibly converts this using DOS-style short mode.
64163  # If so, the updated path is stored in $new_path.
64164
64165  input_path="$new_path"
64166  # Check if we need to convert this using DOS-style short mode. If the path
64167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64168  # take no chances and rewrite it.
64169  # Note: m4 eats our [], so we need to use [ and ] instead.
64170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64171  if test "x$has_forbidden_chars" != x; then
64172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64176      # Going to short mode and back again did indeed matter. Since short mode is
64177      # case insensitive, let's make it lowercase to improve readability.
64178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64179      # Now convert it back to Unix-style (cygpath)
64180      input_path=`$CYGPATH -u "$shortmode_path"`
64181      new_path="$input_path"
64182    fi
64183  fi
64184
64185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64186  if test "x$test_cygdrive_prefix" = x; then
64187    # As a simple fix, exclude /usr/bin since it's not a real path.
64188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64190      # a path prefixed by /cygdrive for fixpath to work.
64191      new_path="$CYGWIN_ROOT_PATH$input_path"
64192    fi
64193  fi
64194
64195
64196  if test "x$path" != "x$new_path"; then
64197    STLPORT_LIB="$new_path"
64198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64199$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64200  fi
64201
64202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64203
64204  path="$STLPORT_LIB"
64205  has_colon=`$ECHO $path | $GREP ^.:`
64206  new_path="$path"
64207  if test "x$has_colon" = x; then
64208    # Not in mixed or Windows style, start by that.
64209    new_path=`cmd //c echo $path`
64210  fi
64211
64212
64213  input_path="$new_path"
64214  # Check if we need to convert this using DOS-style short mode. If the path
64215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64216  # take no chances and rewrite it.
64217  # Note: m4 eats our [], so we need to use [ and ] instead.
64218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64219  if test "x$has_forbidden_chars" != x; then
64220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64222  fi
64223
64224
64225  windows_path="$new_path"
64226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64227    unix_path=`$CYGPATH -u "$windows_path"`
64228    new_path="$unix_path"
64229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64231    new_path="$unix_path"
64232  fi
64233
64234  if test "x$path" != "x$new_path"; then
64235    STLPORT_LIB="$new_path"
64236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64237$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64238  fi
64239
64240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64242
64243    else
64244      # We're on a unix platform. Hooray! :)
64245      path="$STLPORT_LIB"
64246      has_space=`$ECHO "$path" | $GREP " "`
64247      if test "x$has_space" != x; then
64248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64249$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64251      fi
64252
64253      # Use eval to expand a potential ~
64254      eval path="$path"
64255      if test ! -f "$path" && test ! -d "$path"; then
64256        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64257      fi
64258
64259      if test -d "$path"; then
64260        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64261      else
64262        dir="`$DIRNAME "$path"`"
64263        base="`$BASENAME "$path"`"
64264        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64265      fi
64266    fi
64267  fi
64268
64269    else
64270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64271$as_echo "no, not found at $STLPORT_LIB" >&6; }
64272      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64273    fi
64274
64275  fi
64276
64277
64278
64279# Check whether --with-libelf was given.
64280if test "${with_libelf+set}" = set; then :
64281  withval=$with_libelf;
64282fi
64283
64284
64285# Check whether --with-libelf-include was given.
64286if test "${with_libelf_include+set}" = set; then :
64287  withval=$with_libelf_include;
64288fi
64289
64290
64291# Check whether --with-libelf-lib was given.
64292if test "${with_libelf_lib+set}" = set; then :
64293  withval=$with_libelf_lib;
64294fi
64295
64296
64297  if test "x$ENABLE_AOT" = xfalse; then
64298    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64299        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64300        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64301      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64302$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64303    fi
64304    LIBELF_CFLAGS=
64305    LIBELF_LIBS=
64306  else
64307    LIBELF_FOUND=no
64308
64309    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64310      ENABLE_AOT="false"
64311      if test "x${enable_aot}" = xyes; then
64312        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64313      fi
64314    else
64315      if test "x${with_libelf}" != x; then
64316        ELF_LIBS="-L${with_libelf}/lib -lelf"
64317        ELF_CFLAGS="-I${with_libelf}/include"
64318        LIBELF_FOUND=yes
64319      fi
64320      if test "x${with_libelf_include}" != x; then
64321        ELF_CFLAGS="-I${with_libelf_include}"
64322        LIBELF_FOUND=yes
64323      fi
64324      if test "x${with_libelf_lib}" != x; then
64325        ELF_LIBS="-L${with_libelf_lib} -lelf"
64326        LIBELF_FOUND=yes
64327      fi
64328      # Do not try pkg-config if we have a sysroot set.
64329      if test "x$SYSROOT" = x; then
64330        if test "x$LIBELF_FOUND" = xno; then
64331          # Figure out ELF_CFLAGS and ELF_LIBS
64332
64333pkg_failed=no
64334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64335$as_echo_n "checking for ELF... " >&6; }
64336
64337if test -n "$ELF_CFLAGS"; then
64338    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64339 elif test -n "$PKG_CONFIG"; then
64340    if test -n "$PKG_CONFIG" && \
64341    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64342  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64343  ac_status=$?
64344  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64345  test $ac_status = 0; }; then
64346  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64347else
64348  pkg_failed=yes
64349fi
64350 else
64351    pkg_failed=untried
64352fi
64353if test -n "$ELF_LIBS"; then
64354    pkg_cv_ELF_LIBS="$ELF_LIBS"
64355 elif test -n "$PKG_CONFIG"; then
64356    if test -n "$PKG_CONFIG" && \
64357    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64358  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64359  ac_status=$?
64360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64361  test $ac_status = 0; }; then
64362  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64363else
64364  pkg_failed=yes
64365fi
64366 else
64367    pkg_failed=untried
64368fi
64369
64370
64371
64372if test $pkg_failed = yes; then
64373
64374if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64375        _pkg_short_errors_supported=yes
64376else
64377        _pkg_short_errors_supported=no
64378fi
64379        if test $_pkg_short_errors_supported = yes; then
64380	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64381        else
64382	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64383        fi
64384	# Put the nasty error message in config.log where it belongs
64385	echo "$ELF_PKG_ERRORS" >&5
64386
64387	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64388$as_echo "no" >&6; }
64389                LIBELF_FOUND=no
64390elif test $pkg_failed = untried; then
64391	LIBELF_FOUND=no
64392else
64393	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64394	ELF_LIBS=$pkg_cv_ELF_LIBS
64395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64396$as_echo "yes" >&6; }
64397	LIBELF_FOUND=yes
64398fi
64399        fi
64400      fi
64401      if test "x$LIBELF_FOUND" = xno; then
64402        for ac_header in libelf.h
64403do :
64404  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64405if test "x$ac_cv_header_libelf_h" = xyes; then :
64406  cat >>confdefs.h <<_ACEOF
64407#define HAVE_LIBELF_H 1
64408_ACEOF
64409
64410              LIBELF_FOUND=yes
64411              ELF_CFLAGS=
64412              ELF_LIBS=-lelf
64413
64414else
64415  LIBELF_FOUND=no
64416
64417fi
64418
64419done
64420
64421      fi
64422      if test "x$LIBELF_FOUND" = xno; then
64423        ENABLE_AOT="false"
64424
64425  # Print a helpful message on how to acquire the necessary build dependency.
64426  # elf is the help tag: freetype, cups, alsa etc
64427  MISSING_DEPENDENCY=elf
64428
64429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64430    cygwin_help $MISSING_DEPENDENCY
64431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64432    msys_help $MISSING_DEPENDENCY
64433  else
64434    PKGHANDLER_COMMAND=
64435
64436    case $PKGHANDLER in
64437      apt-get)
64438        apt_help     $MISSING_DEPENDENCY ;;
64439      yum)
64440        yum_help     $MISSING_DEPENDENCY ;;
64441      brew)
64442        brew_help    $MISSING_DEPENDENCY ;;
64443      port)
64444        port_help    $MISSING_DEPENDENCY ;;
64445      pkgutil)
64446        pkgutil_help $MISSING_DEPENDENCY ;;
64447      pkgadd)
64448        pkgadd_help  $MISSING_DEPENDENCY ;;
64449    esac
64450
64451    if test "x$PKGHANDLER_COMMAND" != x; then
64452      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64453    fi
64454  fi
64455
64456        if test "x${enable_aot}" = xyes; then
64457          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64458        else
64459          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64460$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64461        fi
64462      else
64463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64464$as_echo_n "checking if libelf works... " >&6; }
64465        ac_ext=c
64466ac_cpp='$CPP $CPPFLAGS'
64467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64469ac_compiler_gnu=$ac_cv_c_compiler_gnu
64470
64471        OLD_CFLAGS="$CFLAGS"
64472        CFLAGS="$CFLAGS $ELF_CFLAGS"
64473        OLD_LIBS="$LIBS"
64474        LIBS="$LIBS $ELF_LIBS"
64475        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64476/* end confdefs.h.  */
64477#include <libelf.h>
64478int
64479main ()
64480{
64481
64482              elf_version(0);
64483              return 0;
64484
64485  ;
64486  return 0;
64487}
64488_ACEOF
64489if ac_fn_c_try_link "$LINENO"; then :
64490  LIBELF_WORKS=yes
64491else
64492  LIBELF_WORKS=no
64493
64494fi
64495rm -f core conftest.err conftest.$ac_objext \
64496    conftest$ac_exeext conftest.$ac_ext
64497        CFLAGS="$OLD_CFLAGS"
64498        LIBS="$OLD_LIBS"
64499        ac_ext=cpp
64500ac_cpp='$CXXCPP $CPPFLAGS'
64501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64504
64505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64506$as_echo "$LIBELF_WORKS" >&6; }
64507
64508        if test "x$LIBELF_WORKS" = xno; then
64509          ENABLE_AOT="false"
64510
64511  # Print a helpful message on how to acquire the necessary build dependency.
64512  # elf is the help tag: freetype, cups, alsa etc
64513  MISSING_DEPENDENCY=elf
64514
64515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64516    cygwin_help $MISSING_DEPENDENCY
64517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64518    msys_help $MISSING_DEPENDENCY
64519  else
64520    PKGHANDLER_COMMAND=
64521
64522    case $PKGHANDLER in
64523      apt-get)
64524        apt_help     $MISSING_DEPENDENCY ;;
64525      yum)
64526        yum_help     $MISSING_DEPENDENCY ;;
64527      brew)
64528        brew_help    $MISSING_DEPENDENCY ;;
64529      port)
64530        port_help    $MISSING_DEPENDENCY ;;
64531      pkgutil)
64532        pkgutil_help $MISSING_DEPENDENCY ;;
64533      pkgadd)
64534        pkgadd_help  $MISSING_DEPENDENCY ;;
64535    esac
64536
64537    if test "x$PKGHANDLER_COMMAND" != x; then
64538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64539    fi
64540  fi
64541
64542          if test "x$enable_aot" = "xyes"; then
64543            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64544          else
64545            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64546$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64547          fi
64548        fi
64549      fi
64550    fi
64551  fi
64552
64553
64554
64555
64556
64557
64558
64559
64560
64561
64562
64563
64564
64565
64566
64567
64568
64569
64570# Hotspot setup depends on lib checks (AOT needs libelf).
64571
64572
64573  # The user can in some cases supply additional jvm features. For the custom
64574  # variant, this defines the entire variant.
64575
64576# Check whether --with-jvm-features was given.
64577if test "${with_jvm_features+set}" = set; then :
64578  withval=$with_jvm_features;
64579fi
64580
64581  if test "x$with_jvm_features" != x; then
64582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64583$as_echo_n "checking additional JVM features... " >&6; }
64584    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64586$as_echo "$JVM_FEATURES" >&6; }
64587  fi
64588
64589  # Override hotspot cpu definitions for ARM platforms
64590  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64591    HOTSPOT_TARGET_CPU=arm_32
64592    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64593    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64594    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64595  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64596    HOTSPOT_TARGET_CPU=arm_64
64597    HOTSPOT_TARGET_CPU_ARCH=arm
64598    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64599    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64600  fi
64601
64602  # Verify that dependencies are met for explicitly set features.
64603  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64604    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64605  fi
64606
64607  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64608    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64609  fi
64610
64611  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64612    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64613  fi
64614
64615  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64616    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64617  fi
64618
64619  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64620    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64621  fi
64622
64623  # Turn on additional features based on other parts of configure
64624  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64625    JVM_FEATURES="$JVM_FEATURES dtrace"
64626  else
64627    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64628      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64629    fi
64630  fi
64631
64632  if test "x$STATIC_BUILD" = "xtrue"; then
64633    JVM_FEATURES="$JVM_FEATURES static-build"
64634  else
64635    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64636      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64637    fi
64638  fi
64639
64640  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64641    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64642      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64643    fi
64644  fi
64645
64646  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64647    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64648      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64649    fi
64650  fi
64651
64652  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64653  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64654     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64655     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64656    JVM_FEATURES_jvmci="jvmci"
64657  else
64658    JVM_FEATURES_jvmci=""
64659  fi
64660
64661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64662$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64663  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64665$as_echo "yes, forced" >&6; }
64666    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64667      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64668    fi
64669    INCLUDE_GRAAL="true"
64670  else
64671    # By default enable graal build where AOT is available
64672    if test "x$ENABLE_AOT" = "xtrue"; then
64673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64674$as_echo "yes" >&6; }
64675      JVM_FEATURES_graal="graal"
64676      INCLUDE_GRAAL="true"
64677    else
64678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64679$as_echo "no" >&6; }
64680      JVM_FEATURES_graal=""
64681      INCLUDE_GRAAL="false"
64682    fi
64683  fi
64684
64685
64686
64687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64688$as_echo_n "checking if aot should be enabled... " >&6; }
64689  if test "x$ENABLE_AOT" = "xtrue"; then
64690    if test "x$enable_aot" = "xyes"; then
64691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64692$as_echo "yes, forced" >&6; }
64693    else
64694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64695$as_echo "yes" >&6; }
64696    fi
64697    JVM_FEATURES_aot="aot"
64698  else
64699    if test "x$enable_aot" = "xno"; then
64700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64701$as_echo "no, forced" >&6; }
64702    else
64703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64704$as_echo "no" >&6; }
64705    fi
64706    JVM_FEATURES_aot=""
64707  fi
64708
64709  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64710    # Default to use link time optimizations on minimal on arm
64711    JVM_FEATURES_link_time_opt="link-time-opt"
64712  else
64713    JVM_FEATURES_link_time_opt=""
64714  fi
64715
64716  # All variants but minimal (and custom) get these features
64717  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64718
64719  # Enable features depending on variant.
64720  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64721  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64722  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64723  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64724  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64725  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64726  JVM_FEATURES_custom="$JVM_FEATURES"
64727
64728
64729
64730
64731
64732
64733
64734
64735
64736  # Used for verification of Makefiles by check-jvm-feature
64737
64738
64739  # We don't support --with-jvm-interpreter anymore, use zero instead.
64740
64741
64742# Check whether --with-jvm-interpreter was given.
64743if test "${with_jvm_interpreter+set}" = set; then :
64744  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64745$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64746fi
64747
64748
64749
64750
64751###############################################################################
64752#
64753# We need to do some final tweaking, when everything else is done.
64754#
64755###############################################################################
64756
64757
64758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64759$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64760
64761  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64762    ENABLE_INTREE_EC=yes
64763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64764$as_echo "yes" >&6; }
64765  else
64766    ENABLE_INTREE_EC=no
64767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64768$as_echo "no" >&6; }
64769  fi
64770
64771
64772
64773
64774  # Check whether --enable-jtreg-failure-handler was given.
64775if test "${enable_jtreg_failure_handler+set}" = set; then :
64776  enableval=$enable_jtreg_failure_handler;
64777fi
64778
64779
64780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64781$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64782
64783  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64784    if test "x$JT_HOME" = "x"; then
64785      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64786    else
64787      BUILD_FAILURE_HANDLER=true
64788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64789$as_echo "yes, forced" >&6; }
64790    fi
64791  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64792    BUILD_FAILURE_HANDLER=false
64793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64794$as_echo "no, forced" >&6; }
64795  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64796      || test "x$enable_jtreg_failure_handler" = "x"; then
64797    if test "x$JT_HOME" = "x"; then
64798      BUILD_FAILURE_HANDLER=false
64799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64800$as_echo "no, missing jtreg" >&6; }
64801    else
64802      BUILD_FAILURE_HANDLER=true
64803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64804$as_echo "yes, jtreg present" >&6; }
64805    fi
64806  else
64807    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64808  fi
64809
64810
64811
64812
64813  # Check whether --enable-generate-classlist was given.
64814if test "${enable_generate_classlist+set}" = set; then :
64815  enableval=$enable_generate_classlist;
64816fi
64817
64818
64819  # Check if it's likely that it's possible to generate the classlist. Depending
64820  # on exact jvm configuration it could be possible anyway.
64821  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64822    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64823  else
64824    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64825  fi
64826
64827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64828$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64829  if test "x$enable_generate_classlist" = "xyes"; then
64830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64831$as_echo "yes, forced" >&6; }
64832    ENABLE_GENERATE_CLASSLIST="true"
64833    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64834      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64835$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64836    fi
64837  elif test "x$enable_generate_classlist" = "xno"; then
64838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64839$as_echo "no, forced" >&6; }
64840    ENABLE_GENERATE_CLASSLIST="false"
64841  elif test "x$enable_generate_classlist" = "x"; then
64842    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64844$as_echo "yes" >&6; }
64845      ENABLE_GENERATE_CLASSLIST="true"
64846    else
64847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64848$as_echo "no" >&6; }
64849      ENABLE_GENERATE_CLASSLIST="false"
64850    fi
64851  else
64852    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64853  fi
64854
64855
64856
64857
64858###############################################################################
64859#
64860# Configure parts of the build that only affect the build performance,
64861# not the result.
64862#
64863###############################################################################
64864
64865
64866  # How many cores do we have on this build system?
64867
64868# Check whether --with-num-cores was given.
64869if test "${with_num_cores+set}" = set; then :
64870  withval=$with_num_cores;
64871fi
64872
64873  if test "x$with_num_cores" = x; then
64874    # The number of cores were not specified, try to probe them.
64875
64876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64877$as_echo_n "checking for number of cores... " >&6; }
64878  NUM_CORES=1
64879  FOUND_CORES=no
64880
64881  if test -f /proc/cpuinfo; then
64882    # Looks like a Linux (or cygwin) system
64883    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64884    FOUND_CORES=yes
64885  elif test -x /usr/sbin/psrinfo; then
64886    # Looks like a Solaris system
64887    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64888    FOUND_CORES=yes
64889  elif test -x /usr/sbin/sysctl; then
64890    # Looks like a MacOSX system
64891    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64892    FOUND_CORES=yes
64893  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64894    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64895    FOUND_CORES=yes
64896  elif test -n "$NUMBER_OF_PROCESSORS"; then
64897    # On windows, look in the env
64898    NUM_CORES=$NUMBER_OF_PROCESSORS
64899    FOUND_CORES=yes
64900  fi
64901
64902  if test "x$FOUND_CORES" = xyes; then
64903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64904$as_echo "$NUM_CORES" >&6; }
64905  else
64906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64907$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64908    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64909$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64910  fi
64911
64912  else
64913    NUM_CORES=$with_num_cores
64914  fi
64915
64916
64917
64918  # How much memory do we have on this build system?
64919
64920# Check whether --with-memory-size was given.
64921if test "${with_memory_size+set}" = set; then :
64922  withval=$with_memory_size;
64923fi
64924
64925  if test "x$with_memory_size" = x; then
64926    # The memory size was not specified, try to probe it.
64927
64928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64929$as_echo_n "checking for memory size... " >&6; }
64930  # Default to 1024 MB
64931  MEMORY_SIZE=1024
64932  FOUND_MEM=no
64933
64934  if test -f /proc/meminfo; then
64935    # Looks like a Linux (or cygwin) system
64936    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64937    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64938    FOUND_MEM=yes
64939  elif test -x /usr/sbin/prtconf; then
64940    # Looks like a Solaris or AIX system
64941    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64942    FOUND_MEM=yes
64943  elif test -x /usr/sbin/sysctl; then
64944    # Looks like a MacOSX system
64945    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64946    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64947    FOUND_MEM=yes
64948  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64949    # Windows, but without cygwin
64950    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64951    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64952    FOUND_MEM=yes
64953  fi
64954
64955  if test "x$FOUND_MEM" = xyes; then
64956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64957$as_echo "$MEMORY_SIZE MB" >&6; }
64958  else
64959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64960$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64961    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64962$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64963  fi
64964
64965  else
64966    MEMORY_SIZE=$with_memory_size
64967  fi
64968
64969
64970
64971  # Provide a decent default number of parallel jobs for make depending on
64972  # number of cores, amount of memory and machine architecture.
64973
64974# Check whether --with-jobs was given.
64975if test "${with_jobs+set}" = set; then :
64976  withval=$with_jobs;
64977fi
64978
64979  if test "x$with_jobs" = x; then
64980    # Number of jobs was not specified, calculate.
64981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64982$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64983    # Approximate memory in GB.
64984    memory_gb=`expr $MEMORY_SIZE / 1024`
64985    # Pick the lowest of memory in gb and number of cores.
64986    if test "$memory_gb" -lt "$NUM_CORES"; then
64987      JOBS="$memory_gb"
64988    else
64989      JOBS="$NUM_CORES"
64990    fi
64991    if test "$JOBS" -eq "0"; then
64992      JOBS=1
64993    fi
64994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64995$as_echo "$JOBS" >&6; }
64996  else
64997    JOBS=$with_jobs
64998  fi
64999
65000
65001
65002  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65003
65004# Check whether --with-test-jobs was given.
65005if test "${with_test_jobs+set}" = set; then :
65006  withval=$with_test_jobs;
65007fi
65008
65009  if test "x$with_test_jobs" = x; then
65010      TEST_JOBS=0
65011  else
65012      TEST_JOBS=$with_test_jobs
65013  fi
65014
65015
65016
65017# Setup arguments for the boot jdk (after cores and memory have been setup)
65018
65019  ##############################################################################
65020  #
65021  # Specify jvm options for anything that is run with the Boot JDK.
65022  # Not all JVM:s accept the same arguments on the command line.
65023  #
65024
65025# Check whether --with-boot-jdk-jvmargs was given.
65026if test "${with_boot_jdk_jvmargs+set}" = set; then :
65027  withval=$with_boot_jdk_jvmargs;
65028fi
65029
65030
65031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65032$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65033
65034  # Disable special log output when a debug build is used as Boot JDK...
65035
65036  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65037  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65038  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65039  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65040  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65041  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65042    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65043    JVM_ARG_OK=true
65044  else
65045    $ECHO "Arg failed:" >&5
65046    $ECHO "$OUTPUT" >&5
65047    JVM_ARG_OK=false
65048  fi
65049
65050
65051  # Force en-US environment
65052
65053  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65054  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65055  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65056  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65057  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65058  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65059    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65060    JVM_ARG_OK=true
65061  else
65062    $ECHO "Arg failed:" >&5
65063    $ECHO "$OUTPUT" >&5
65064    JVM_ARG_OK=false
65065  fi
65066
65067
65068  # Apply user provided options.
65069
65070  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65071  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65072  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65073  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65074  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65075  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65076    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65077    JVM_ARG_OK=true
65078  else
65079    $ECHO "Arg failed:" >&5
65080    $ECHO "$OUTPUT" >&5
65081    JVM_ARG_OK=false
65082  fi
65083
65084
65085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65086$as_echo "$boot_jdk_jvmargs" >&6; }
65087
65088  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65089  JAVA_FLAGS=$boot_jdk_jvmargs
65090
65091
65092
65093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65094$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65095
65096  # Starting amount of heap memory.
65097
65098  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65099  $ECHO "Command: $JAVA -Xms64M -version" >&5
65100  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65101  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65102  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65103  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65104    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65105    JVM_ARG_OK=true
65106  else
65107    $ECHO "Arg failed:" >&5
65108    $ECHO "$OUTPUT" >&5
65109    JVM_ARG_OK=false
65110  fi
65111
65112  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65113
65114  # Maximum amount of heap memory and stack size.
65115  JVM_HEAP_LIMIT_32="1024"
65116  # Running a 64 bit JVM allows for and requires a bigger heap
65117  JVM_HEAP_LIMIT_64="1600"
65118  STACK_SIZE_32=768
65119  STACK_SIZE_64=1536
65120  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65121  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65122    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65123  fi
65124  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65125    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65126  fi
65127  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65128    JVM_HEAP_LIMIT_32=512
65129    JVM_HEAP_LIMIT_64=512
65130  fi
65131
65132  if test "x$BOOT_JDK_BITS" = "x32"; then
65133    STACK_SIZE=$STACK_SIZE_32
65134    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65135  else
65136    STACK_SIZE=$STACK_SIZE_64
65137    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65138  fi
65139
65140  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65141  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65142  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65143  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65144  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65145  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65146    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65147    JVM_ARG_OK=true
65148  else
65149    $ECHO "Arg failed:" >&5
65150    $ECHO "$OUTPUT" >&5
65151    JVM_ARG_OK=false
65152  fi
65153
65154
65155  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65156  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65157  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65158  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65159  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65160  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65161    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65162    JVM_ARG_OK=true
65163  else
65164    $ECHO "Arg failed:" >&5
65165    $ECHO "$OUTPUT" >&5
65166    JVM_ARG_OK=false
65167  fi
65168
65169
65170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65171$as_echo "$boot_jdk_jvmargs_big" >&6; }
65172
65173  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65174
65175
65176  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65177    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65178    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65179  else
65180    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65181    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65182  fi
65183  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65184  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65186$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65188$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65189
65190
65191  # By default, the main javac compilations use big
65192  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65193
65194
65195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65196$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65197
65198  # Use serial gc for small short lived tools if possible
65199
65200  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65201  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65202  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65203  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65204  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65206    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65207    JVM_ARG_OK=true
65208  else
65209    $ECHO "Arg failed:" >&5
65210    $ECHO "$OUTPUT" >&5
65211    JVM_ARG_OK=false
65212  fi
65213
65214
65215  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65216  $ECHO "Command: $JAVA -Xms32M -version" >&5
65217  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65218  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65219  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65220  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65221    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65222    JVM_ARG_OK=true
65223  else
65224    $ECHO "Arg failed:" >&5
65225    $ECHO "$OUTPUT" >&5
65226    JVM_ARG_OK=false
65227  fi
65228
65229
65230  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65231  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65232  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65233  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65234  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65235  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65236    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65237    JVM_ARG_OK=true
65238  else
65239    $ECHO "Arg failed:" >&5
65240    $ECHO "$OUTPUT" >&5
65241    JVM_ARG_OK=false
65242  fi
65243
65244
65245  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65246  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65247  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65248  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65249  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65250  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65251    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65252    JVM_ARG_OK=true
65253  else
65254    $ECHO "Arg failed:" >&5
65255    $ECHO "$OUTPUT" >&5
65256    JVM_ARG_OK=false
65257  fi
65258
65259
65260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65261$as_echo "$boot_jdk_jvmargs_small" >&6; }
65262
65263  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65264
65265
65266  JAVA_TOOL_FLAGS_SMALL=""
65267  for f in $JAVA_FLAGS_SMALL; do
65268    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65269  done
65270
65271
65272
65273# Setup smart javac (after cores and memory have been setup)
65274
65275
65276# Check whether --with-sjavac-server-java was given.
65277if test "${with_sjavac_server_java+set}" = set; then :
65278  withval=$with_sjavac_server_java;
65279fi
65280
65281
65282  if test "x$with_sjavac_server_java" != x; then
65283    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65284    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65285    if test "x$FOUND_VERSION" = x; then
65286      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65287    fi
65288  else
65289    SJAVAC_SERVER_JAVA="$JAVA"
65290  fi
65291
65292
65293  if test "$MEMORY_SIZE" -gt "3000"; then
65294
65295  $ECHO "Check if jvm arg is ok: -d64" >&5
65296  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65297  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65298  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65299  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65300  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65301    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65302    JVM_ARG_OK=true
65303  else
65304    $ECHO "Arg failed:" >&5
65305    $ECHO "$OUTPUT" >&5
65306    JVM_ARG_OK=false
65307  fi
65308
65309    if test "$JVM_ARG_OK" = true; then
65310      JVM_64BIT=true
65311      JVM_ARG_OK=false
65312    fi
65313  fi
65314
65315  MX_VALUE=`expr $MEMORY_SIZE / 2`
65316  if test "$JVM_64BIT" = true; then
65317    # Set ms lower than mx since more than one instance of the server might
65318    # get launched at the same time before they figure out which instance won.
65319    MS_VALUE=512
65320    if test "$MX_VALUE" -gt "2048"; then
65321      MX_VALUE=2048
65322    fi
65323  else
65324    MS_VALUE=256
65325    if test "$MX_VALUE" -gt "1500"; then
65326      MX_VALUE=1500
65327    fi
65328  fi
65329  if test "$MX_VALUE" -lt "512"; then
65330    MX_VALUE=512
65331  fi
65332
65333  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65334  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65335  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65336  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65337  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65338  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65339    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65340    JVM_ARG_OK=true
65341  else
65342    $ECHO "Arg failed:" >&5
65343    $ECHO "$OUTPUT" >&5
65344    JVM_ARG_OK=false
65345  fi
65346
65347
65348
65349  # Check whether --enable-sjavac was given.
65350if test "${enable_sjavac+set}" = set; then :
65351  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65352else
65353  ENABLE_SJAVAC="no"
65354fi
65355
65356  if test "x$JVM_ARG_OK" = "xfalse"; then
65357    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65358$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65359    ENABLE_SJAVAC="no"
65360  fi
65361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65362$as_echo_n "checking whether to use sjavac... " >&6; }
65363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65364$as_echo "$ENABLE_SJAVAC" >&6; }
65365
65366
65367  # Check whether --enable-javac-server was given.
65368if test "${enable_javac_server+set}" = set; then :
65369  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65370else
65371  ENABLE_JAVAC_SERVER="yes"
65372fi
65373
65374  if test "x$JVM_ARG_OK" = "xfalse"; then
65375    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65376$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65377    ENABLE_JAVAC_SERVER="no"
65378  fi
65379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65380$as_echo_n "checking whether to use javac server... " >&6; }
65381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65382$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65383
65384
65385  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65386    # When using a server javac, the small client instances do not need much
65387    # resources.
65388    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65389  fi
65390
65391
65392# Setup use of icecc if requested
65393
65394  # Check whether --enable-icecc was given.
65395if test "${enable_icecc+set}" = set; then :
65396  enableval=$enable_icecc;
65397fi
65398
65399
65400  if test "x${enable_icecc}" = "xyes"; then
65401
65402
65403
65404  # Publish this variable in the help.
65405
65406
65407  if [ -z "${ICECC_CMD+x}" ]; then
65408    # The variable is not set by user, try to locate tool using the code snippet
65409    for ac_prog in icecc
65410do
65411  # Extract the first word of "$ac_prog", so it can be a program name with args.
65412set dummy $ac_prog; ac_word=$2
65413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65414$as_echo_n "checking for $ac_word... " >&6; }
65415if ${ac_cv_path_ICECC_CMD+:} false; then :
65416  $as_echo_n "(cached) " >&6
65417else
65418  case $ICECC_CMD in
65419  [\\/]* | ?:[\\/]*)
65420  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65421  ;;
65422  *)
65423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65424for as_dir in $PATH
65425do
65426  IFS=$as_save_IFS
65427  test -z "$as_dir" && as_dir=.
65428    for ac_exec_ext in '' $ac_executable_extensions; do
65429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65430    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65432    break 2
65433  fi
65434done
65435  done
65436IFS=$as_save_IFS
65437
65438  ;;
65439esac
65440fi
65441ICECC_CMD=$ac_cv_path_ICECC_CMD
65442if test -n "$ICECC_CMD"; then
65443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65444$as_echo "$ICECC_CMD" >&6; }
65445else
65446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65447$as_echo "no" >&6; }
65448fi
65449
65450
65451  test -n "$ICECC_CMD" && break
65452done
65453
65454  else
65455    # The variable is set, but is it from the command line or the environment?
65456
65457    # Try to remove the string !ICECC_CMD! from our list.
65458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65460      # If it failed, the variable was not from the command line. Ignore it,
65461      # but warn the user (except for BASH, which is always set by the calling BASH).
65462      if test "xICECC_CMD" != xBASH; then
65463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65464$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65465      fi
65466      # Try to locate tool using the code snippet
65467      for ac_prog in icecc
65468do
65469  # Extract the first word of "$ac_prog", so it can be a program name with args.
65470set dummy $ac_prog; ac_word=$2
65471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65472$as_echo_n "checking for $ac_word... " >&6; }
65473if ${ac_cv_path_ICECC_CMD+:} false; then :
65474  $as_echo_n "(cached) " >&6
65475else
65476  case $ICECC_CMD in
65477  [\\/]* | ?:[\\/]*)
65478  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65479  ;;
65480  *)
65481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65482for as_dir in $PATH
65483do
65484  IFS=$as_save_IFS
65485  test -z "$as_dir" && as_dir=.
65486    for ac_exec_ext in '' $ac_executable_extensions; do
65487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65488    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65490    break 2
65491  fi
65492done
65493  done
65494IFS=$as_save_IFS
65495
65496  ;;
65497esac
65498fi
65499ICECC_CMD=$ac_cv_path_ICECC_CMD
65500if test -n "$ICECC_CMD"; then
65501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65502$as_echo "$ICECC_CMD" >&6; }
65503else
65504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65505$as_echo "no" >&6; }
65506fi
65507
65508
65509  test -n "$ICECC_CMD" && break
65510done
65511
65512    else
65513      # If it succeeded, then it was overridden by the user. We will use it
65514      # for the tool.
65515
65516      # First remove it from the list of overridden variables, so we can test
65517      # for unknown variables in the end.
65518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65519
65520      # Check if we try to supply an empty value
65521      if test "x$ICECC_CMD" = x; then
65522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65523$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65525$as_echo_n "checking for ICECC_CMD... " >&6; }
65526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65527$as_echo "disabled" >&6; }
65528      else
65529        # Check if the provided tool contains a complete path.
65530        tool_specified="$ICECC_CMD"
65531        tool_basename="${tool_specified##*/}"
65532        if test "x$tool_basename" = "x$tool_specified"; then
65533          # A command without a complete path is provided, search $PATH.
65534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65535$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65536          # Extract the first word of "$tool_basename", so it can be a program name with args.
65537set dummy $tool_basename; ac_word=$2
65538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65539$as_echo_n "checking for $ac_word... " >&6; }
65540if ${ac_cv_path_ICECC_CMD+:} false; then :
65541  $as_echo_n "(cached) " >&6
65542else
65543  case $ICECC_CMD in
65544  [\\/]* | ?:[\\/]*)
65545  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65546  ;;
65547  *)
65548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65549for as_dir in $PATH
65550do
65551  IFS=$as_save_IFS
65552  test -z "$as_dir" && as_dir=.
65553    for ac_exec_ext in '' $ac_executable_extensions; do
65554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65555    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65557    break 2
65558  fi
65559done
65560  done
65561IFS=$as_save_IFS
65562
65563  ;;
65564esac
65565fi
65566ICECC_CMD=$ac_cv_path_ICECC_CMD
65567if test -n "$ICECC_CMD"; then
65568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65569$as_echo "$ICECC_CMD" >&6; }
65570else
65571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65572$as_echo "no" >&6; }
65573fi
65574
65575
65576          if test "x$ICECC_CMD" = x; then
65577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65578          fi
65579        else
65580          # Otherwise we believe it is a complete path. Use it as it is.
65581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65582$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65584$as_echo_n "checking for ICECC_CMD... " >&6; }
65585          if test ! -x "$tool_specified"; then
65586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65587$as_echo "not found" >&6; }
65588            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65589          fi
65590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65591$as_echo "$tool_specified" >&6; }
65592        fi
65593      fi
65594    fi
65595
65596  fi
65597
65598
65599
65600  if test "x$ICECC_CMD" = x; then
65601    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65602  fi
65603
65604
65605    old_path="$PATH"
65606
65607    # Look for icecc-create-env in some known places
65608    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65609
65610
65611
65612  # Publish this variable in the help.
65613
65614
65615  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65616    # The variable is not set by user, try to locate tool using the code snippet
65617    for ac_prog in icecc-create-env
65618do
65619  # Extract the first word of "$ac_prog", so it can be a program name with args.
65620set dummy $ac_prog; ac_word=$2
65621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65622$as_echo_n "checking for $ac_word... " >&6; }
65623if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65624  $as_echo_n "(cached) " >&6
65625else
65626  case $ICECC_CREATE_ENV in
65627  [\\/]* | ?:[\\/]*)
65628  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65629  ;;
65630  *)
65631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65632for as_dir in $PATH
65633do
65634  IFS=$as_save_IFS
65635  test -z "$as_dir" && as_dir=.
65636    for ac_exec_ext in '' $ac_executable_extensions; do
65637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65638    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65640    break 2
65641  fi
65642done
65643  done
65644IFS=$as_save_IFS
65645
65646  ;;
65647esac
65648fi
65649ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65650if test -n "$ICECC_CREATE_ENV"; then
65651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65652$as_echo "$ICECC_CREATE_ENV" >&6; }
65653else
65654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65655$as_echo "no" >&6; }
65656fi
65657
65658
65659  test -n "$ICECC_CREATE_ENV" && break
65660done
65661
65662  else
65663    # The variable is set, but is it from the command line or the environment?
65664
65665    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65668      # If it failed, the variable was not from the command line. Ignore it,
65669      # but warn the user (except for BASH, which is always set by the calling BASH).
65670      if test "xICECC_CREATE_ENV" != xBASH; then
65671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65672$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65673      fi
65674      # Try to locate tool using the code snippet
65675      for ac_prog in icecc-create-env
65676do
65677  # Extract the first word of "$ac_prog", so it can be a program name with args.
65678set dummy $ac_prog; ac_word=$2
65679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65680$as_echo_n "checking for $ac_word... " >&6; }
65681if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65682  $as_echo_n "(cached) " >&6
65683else
65684  case $ICECC_CREATE_ENV in
65685  [\\/]* | ?:[\\/]*)
65686  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65687  ;;
65688  *)
65689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65690for as_dir in $PATH
65691do
65692  IFS=$as_save_IFS
65693  test -z "$as_dir" && as_dir=.
65694    for ac_exec_ext in '' $ac_executable_extensions; do
65695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65696    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65698    break 2
65699  fi
65700done
65701  done
65702IFS=$as_save_IFS
65703
65704  ;;
65705esac
65706fi
65707ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65708if test -n "$ICECC_CREATE_ENV"; then
65709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65710$as_echo "$ICECC_CREATE_ENV" >&6; }
65711else
65712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65713$as_echo "no" >&6; }
65714fi
65715
65716
65717  test -n "$ICECC_CREATE_ENV" && break
65718done
65719
65720    else
65721      # If it succeeded, then it was overridden by the user. We will use it
65722      # for the tool.
65723
65724      # First remove it from the list of overridden variables, so we can test
65725      # for unknown variables in the end.
65726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65727
65728      # Check if we try to supply an empty value
65729      if test "x$ICECC_CREATE_ENV" = x; then
65730        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65731$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65732        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65733$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65735$as_echo "disabled" >&6; }
65736      else
65737        # Check if the provided tool contains a complete path.
65738        tool_specified="$ICECC_CREATE_ENV"
65739        tool_basename="${tool_specified##*/}"
65740        if test "x$tool_basename" = "x$tool_specified"; then
65741          # A command without a complete path is provided, search $PATH.
65742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65743$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65744          # Extract the first word of "$tool_basename", so it can be a program name with args.
65745set dummy $tool_basename; ac_word=$2
65746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65747$as_echo_n "checking for $ac_word... " >&6; }
65748if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65749  $as_echo_n "(cached) " >&6
65750else
65751  case $ICECC_CREATE_ENV in
65752  [\\/]* | ?:[\\/]*)
65753  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65754  ;;
65755  *)
65756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65757for as_dir in $PATH
65758do
65759  IFS=$as_save_IFS
65760  test -z "$as_dir" && as_dir=.
65761    for ac_exec_ext in '' $ac_executable_extensions; do
65762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65763    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65765    break 2
65766  fi
65767done
65768  done
65769IFS=$as_save_IFS
65770
65771  ;;
65772esac
65773fi
65774ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65775if test -n "$ICECC_CREATE_ENV"; then
65776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65777$as_echo "$ICECC_CREATE_ENV" >&6; }
65778else
65779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65780$as_echo "no" >&6; }
65781fi
65782
65783
65784          if test "x$ICECC_CREATE_ENV" = x; then
65785            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65786          fi
65787        else
65788          # Otherwise we believe it is a complete path. Use it as it is.
65789          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65790$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65791          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65792$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65793          if test ! -x "$tool_specified"; then
65794            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65795$as_echo "not found" >&6; }
65796            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65797          fi
65798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65799$as_echo "$tool_specified" >&6; }
65800        fi
65801      fi
65802    fi
65803
65804  fi
65805
65806
65807
65808  if test "x$ICECC_CREATE_ENV" = x; then
65809    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65810  fi
65811
65812
65813    # Use icecc-create-env to create a minimal compilation environment that can
65814    # be sent to the other hosts in the icecream cluster.
65815    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65816    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65817    # Older versions of icecc does not have the --gcc parameter
65818    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65819      icecc_gcc_arg="--gcc"
65820    fi
65821    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65822
65823  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65824      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65825          ${icecc_create_env_log} 2>&1 )
65826  if test "$?" != "0"; then
65827    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65828$as_echo "$as_me: icecc-create-env output:" >&6;}
65829    cat \
65830          ${icecc_create_env_log}
65831    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65832  fi
65833
65834    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65835      # For clang, the icecc compilerwrapper is needed. It usually resides next
65836      # to icecc-create-env.
65837
65838
65839
65840  # Publish this variable in the help.
65841
65842
65843  if [ -z "${ICECC_WRAPPER+x}" ]; then
65844    # The variable is not set by user, try to locate tool using the code snippet
65845    for ac_prog in compilerwrapper
65846do
65847  # Extract the first word of "$ac_prog", so it can be a program name with args.
65848set dummy $ac_prog; ac_word=$2
65849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65850$as_echo_n "checking for $ac_word... " >&6; }
65851if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65852  $as_echo_n "(cached) " >&6
65853else
65854  case $ICECC_WRAPPER in
65855  [\\/]* | ?:[\\/]*)
65856  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65857  ;;
65858  *)
65859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65860for as_dir in $PATH
65861do
65862  IFS=$as_save_IFS
65863  test -z "$as_dir" && as_dir=.
65864    for ac_exec_ext in '' $ac_executable_extensions; do
65865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65866    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65868    break 2
65869  fi
65870done
65871  done
65872IFS=$as_save_IFS
65873
65874  ;;
65875esac
65876fi
65877ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65878if test -n "$ICECC_WRAPPER"; then
65879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65880$as_echo "$ICECC_WRAPPER" >&6; }
65881else
65882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65883$as_echo "no" >&6; }
65884fi
65885
65886
65887  test -n "$ICECC_WRAPPER" && break
65888done
65889
65890  else
65891    # The variable is set, but is it from the command line or the environment?
65892
65893    # Try to remove the string !ICECC_WRAPPER! from our list.
65894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65896      # If it failed, the variable was not from the command line. Ignore it,
65897      # but warn the user (except for BASH, which is always set by the calling BASH).
65898      if test "xICECC_WRAPPER" != xBASH; then
65899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65900$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65901      fi
65902      # Try to locate tool using the code snippet
65903      for ac_prog in compilerwrapper
65904do
65905  # Extract the first word of "$ac_prog", so it can be a program name with args.
65906set dummy $ac_prog; ac_word=$2
65907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65908$as_echo_n "checking for $ac_word... " >&6; }
65909if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65910  $as_echo_n "(cached) " >&6
65911else
65912  case $ICECC_WRAPPER in
65913  [\\/]* | ?:[\\/]*)
65914  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65915  ;;
65916  *)
65917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65918for as_dir in $PATH
65919do
65920  IFS=$as_save_IFS
65921  test -z "$as_dir" && as_dir=.
65922    for ac_exec_ext in '' $ac_executable_extensions; do
65923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65924    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65926    break 2
65927  fi
65928done
65929  done
65930IFS=$as_save_IFS
65931
65932  ;;
65933esac
65934fi
65935ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65936if test -n "$ICECC_WRAPPER"; then
65937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65938$as_echo "$ICECC_WRAPPER" >&6; }
65939else
65940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65941$as_echo "no" >&6; }
65942fi
65943
65944
65945  test -n "$ICECC_WRAPPER" && break
65946done
65947
65948    else
65949      # If it succeeded, then it was overridden by the user. We will use it
65950      # for the tool.
65951
65952      # First remove it from the list of overridden variables, so we can test
65953      # for unknown variables in the end.
65954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65955
65956      # Check if we try to supply an empty value
65957      if test "x$ICECC_WRAPPER" = x; then
65958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65959$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65961$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65963$as_echo "disabled" >&6; }
65964      else
65965        # Check if the provided tool contains a complete path.
65966        tool_specified="$ICECC_WRAPPER"
65967        tool_basename="${tool_specified##*/}"
65968        if test "x$tool_basename" = "x$tool_specified"; then
65969          # A command without a complete path is provided, search $PATH.
65970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65971$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65972          # Extract the first word of "$tool_basename", so it can be a program name with args.
65973set dummy $tool_basename; ac_word=$2
65974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65975$as_echo_n "checking for $ac_word... " >&6; }
65976if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65977  $as_echo_n "(cached) " >&6
65978else
65979  case $ICECC_WRAPPER in
65980  [\\/]* | ?:[\\/]*)
65981  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65982  ;;
65983  *)
65984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65985for as_dir in $PATH
65986do
65987  IFS=$as_save_IFS
65988  test -z "$as_dir" && as_dir=.
65989    for ac_exec_ext in '' $ac_executable_extensions; do
65990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65991    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65993    break 2
65994  fi
65995done
65996  done
65997IFS=$as_save_IFS
65998
65999  ;;
66000esac
66001fi
66002ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66003if test -n "$ICECC_WRAPPER"; then
66004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66005$as_echo "$ICECC_WRAPPER" >&6; }
66006else
66007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66008$as_echo "no" >&6; }
66009fi
66010
66011
66012          if test "x$ICECC_WRAPPER" = x; then
66013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66014          fi
66015        else
66016          # Otherwise we believe it is a complete path. Use it as it is.
66017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66018$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66020$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66021          if test ! -x "$tool_specified"; then
66022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66023$as_echo "not found" >&6; }
66024            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66025          fi
66026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66027$as_echo "$tool_specified" >&6; }
66028        fi
66029      fi
66030    fi
66031
66032  fi
66033
66034
66035
66036  if test "x$ICECC_WRAPPER" = x; then
66037    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66038  fi
66039
66040
66041
66042  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66043      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66044  if test "$?" != "0"; then
66045    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66046$as_echo "$as_me: icecc-create-env output:" >&6;}
66047    cat ${icecc_create_env_log}
66048    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66049  fi
66050
66051    else
66052      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66053    fi
66054    PATH="$old_path"
66055    # The bundle with the compiler gets a name based on checksums. Parse log file
66056    # to find it.
66057    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66058    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66059    if test ! -f ${ICECC_ENV_BUNDLE}; then
66060      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66061    fi
66062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66063$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66065$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66066    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66067
66068    if test "x${COMPILE_TYPE}" = "xcross"; then
66069      # If cross compiling, create a separate env package for the build compiler
66070      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66071      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66072      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66073
66074  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66075      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66076            ${icecc_create_env_log_build} 2>&1 )
66077  if test "$?" != "0"; then
66078    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66079$as_echo "$as_me: icecc-create-env output:" >&6;}
66080    cat \
66081            ${icecc_create_env_log_build}
66082    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66083  fi
66084
66085      elif test "x${BUILD_CC##*/}" = "xclang"; then
66086
66087  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66088      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66089  if test "$?" != "0"; then
66090    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66091$as_echo "$as_me: icecc-create-env output:" >&6;}
66092    cat ${icecc_create_env_log_build}
66093    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66094  fi
66095
66096      else
66097        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66098      fi
66099      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66100      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66101      if test ! -f ${ICECC_ENV_BUNDLE}; then
66102        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66103      fi
66104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66105$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66107$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66108      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66109          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66110    else
66111      BUILD_ICECC="${ICECC}"
66112    fi
66113
66114
66115  fi
66116
66117
66118# Can the C/C++ compiler use precompiled headers?
66119
66120
66121  ###############################################################################
66122  #
66123  # Can the C/C++ compiler use precompiled headers?
66124  #
66125  # Check whether --enable-precompiled-headers was given.
66126if test "${enable_precompiled_headers+set}" = set; then :
66127  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66128else
66129  ENABLE_PRECOMPH=yes
66130fi
66131
66132
66133  USE_PRECOMPILED_HEADER=1
66134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66135$as_echo_n "checking If precompiled header is enabled... " >&6; }
66136  if test "x$ENABLE_PRECOMPH" = xno; then
66137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66138$as_echo "no, forced" >&6; }
66139    USE_PRECOMPILED_HEADER=0
66140  elif test "x$ICECC" != "x"; then
66141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66142$as_echo "no, does not work effectively with icecc" >&6; }
66143    USE_PRECOMPILED_HEADER=0
66144  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66146$as_echo "no, does not work with Solaris Studio" >&6; }
66147    USE_PRECOMPILED_HEADER=0
66148  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66150$as_echo "no, does not work with xlc" >&6; }
66151    USE_PRECOMPILED_HEADER=0
66152  else
66153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66154$as_echo "yes" >&6; }
66155  fi
66156
66157  if test "x$ENABLE_PRECOMPH" = xyes; then
66158    # Check that the compiler actually supports precomp headers.
66159    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66160      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66161$as_echo_n "checking that precompiled headers work... " >&6; }
66162      echo "int alfa();" > conftest.h
66163      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66164      if test ! -f conftest.hpp.gch; then
66165        USE_PRECOMPILED_HEADER=0
66166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66167$as_echo "no" >&6; }
66168      else
66169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66170$as_echo "yes" >&6; }
66171      fi
66172      $RM conftest.h conftest.hpp.gch
66173    fi
66174  fi
66175
66176
66177
66178
66179# Setup use of ccache, if available
66180
66181  # Check whether --enable-ccache was given.
66182if test "${enable_ccache+set}" = set; then :
66183  enableval=$enable_ccache;
66184fi
66185
66186
66187  CCACHE_STATUS=
66188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66189$as_echo_n "checking is ccache enabled... " >&6; }
66190  if test "x$enable_ccache" = xyes; then
66191    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66193$as_echo "yes" >&6; }
66194      OLD_PATH="$PATH"
66195      if test "x$TOOLCHAIN_PATH" != x; then
66196        PATH=$TOOLCHAIN_PATH:$PATH
66197      fi
66198
66199
66200
66201  # Publish this variable in the help.
66202
66203
66204  if [ -z "${CCACHE+x}" ]; then
66205    # The variable is not set by user, try to locate tool using the code snippet
66206    for ac_prog in ccache
66207do
66208  # Extract the first word of "$ac_prog", so it can be a program name with args.
66209set dummy $ac_prog; ac_word=$2
66210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66211$as_echo_n "checking for $ac_word... " >&6; }
66212if ${ac_cv_path_CCACHE+:} false; then :
66213  $as_echo_n "(cached) " >&6
66214else
66215  case $CCACHE in
66216  [\\/]* | ?:[\\/]*)
66217  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66218  ;;
66219  *)
66220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66221for as_dir in $PATH
66222do
66223  IFS=$as_save_IFS
66224  test -z "$as_dir" && as_dir=.
66225    for ac_exec_ext in '' $ac_executable_extensions; do
66226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66227    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66229    break 2
66230  fi
66231done
66232  done
66233IFS=$as_save_IFS
66234
66235  ;;
66236esac
66237fi
66238CCACHE=$ac_cv_path_CCACHE
66239if test -n "$CCACHE"; then
66240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66241$as_echo "$CCACHE" >&6; }
66242else
66243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66244$as_echo "no" >&6; }
66245fi
66246
66247
66248  test -n "$CCACHE" && break
66249done
66250
66251  else
66252    # The variable is set, but is it from the command line or the environment?
66253
66254    # Try to remove the string !CCACHE! from our list.
66255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66257      # If it failed, the variable was not from the command line. Ignore it,
66258      # but warn the user (except for BASH, which is always set by the calling BASH).
66259      if test "xCCACHE" != xBASH; then
66260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66261$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66262      fi
66263      # Try to locate tool using the code snippet
66264      for ac_prog in ccache
66265do
66266  # Extract the first word of "$ac_prog", so it can be a program name with args.
66267set dummy $ac_prog; ac_word=$2
66268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66269$as_echo_n "checking for $ac_word... " >&6; }
66270if ${ac_cv_path_CCACHE+:} false; then :
66271  $as_echo_n "(cached) " >&6
66272else
66273  case $CCACHE in
66274  [\\/]* | ?:[\\/]*)
66275  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66276  ;;
66277  *)
66278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66279for as_dir in $PATH
66280do
66281  IFS=$as_save_IFS
66282  test -z "$as_dir" && as_dir=.
66283    for ac_exec_ext in '' $ac_executable_extensions; do
66284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66285    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66287    break 2
66288  fi
66289done
66290  done
66291IFS=$as_save_IFS
66292
66293  ;;
66294esac
66295fi
66296CCACHE=$ac_cv_path_CCACHE
66297if test -n "$CCACHE"; then
66298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66299$as_echo "$CCACHE" >&6; }
66300else
66301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66302$as_echo "no" >&6; }
66303fi
66304
66305
66306  test -n "$CCACHE" && break
66307done
66308
66309    else
66310      # If it succeeded, then it was overridden by the user. We will use it
66311      # for the tool.
66312
66313      # First remove it from the list of overridden variables, so we can test
66314      # for unknown variables in the end.
66315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66316
66317      # Check if we try to supply an empty value
66318      if test "x$CCACHE" = x; then
66319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66320$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66322$as_echo_n "checking for CCACHE... " >&6; }
66323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66324$as_echo "disabled" >&6; }
66325      else
66326        # Check if the provided tool contains a complete path.
66327        tool_specified="$CCACHE"
66328        tool_basename="${tool_specified##*/}"
66329        if test "x$tool_basename" = "x$tool_specified"; then
66330          # A command without a complete path is provided, search $PATH.
66331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66332$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66333          # Extract the first word of "$tool_basename", so it can be a program name with args.
66334set dummy $tool_basename; ac_word=$2
66335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66336$as_echo_n "checking for $ac_word... " >&6; }
66337if ${ac_cv_path_CCACHE+:} false; then :
66338  $as_echo_n "(cached) " >&6
66339else
66340  case $CCACHE in
66341  [\\/]* | ?:[\\/]*)
66342  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66343  ;;
66344  *)
66345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66346for as_dir in $PATH
66347do
66348  IFS=$as_save_IFS
66349  test -z "$as_dir" && as_dir=.
66350    for ac_exec_ext in '' $ac_executable_extensions; do
66351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66352    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66354    break 2
66355  fi
66356done
66357  done
66358IFS=$as_save_IFS
66359
66360  ;;
66361esac
66362fi
66363CCACHE=$ac_cv_path_CCACHE
66364if test -n "$CCACHE"; then
66365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66366$as_echo "$CCACHE" >&6; }
66367else
66368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66369$as_echo "no" >&6; }
66370fi
66371
66372
66373          if test "x$CCACHE" = x; then
66374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66375          fi
66376        else
66377          # Otherwise we believe it is a complete path. Use it as it is.
66378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66379$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66381$as_echo_n "checking for CCACHE... " >&6; }
66382          if test ! -x "$tool_specified"; then
66383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66384$as_echo "not found" >&6; }
66385            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66386          fi
66387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66388$as_echo "$tool_specified" >&6; }
66389        fi
66390      fi
66391    fi
66392
66393  fi
66394
66395
66396
66397  if test "x$CCACHE" = x; then
66398    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66399  fi
66400
66401
66402      PATH="$OLD_PATH"
66403      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66404      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66405    else
66406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66407$as_echo "no" >&6; }
66408      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66409$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66410    fi
66411  elif test "x$enable_ccache" = xno; then
66412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66413$as_echo "no, explicitly disabled" >&6; }
66414    CCACHE_STATUS="Disabled"
66415  elif test "x$enable_ccache" = x; then
66416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66417$as_echo "no" >&6; }
66418  else
66419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66420$as_echo "unknown" >&6; }
66421    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66422  fi
66423
66424
66425
66426# Check whether --with-ccache-dir was given.
66427if test "${with_ccache_dir+set}" = set; then :
66428  withval=$with_ccache_dir;
66429fi
66430
66431
66432  if test "x$with_ccache_dir" != x; then
66433    # When using a non home ccache directory, assume the use is to share ccache files
66434    # with other users. Thus change the umask.
66435    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66436    if test "x$CCACHE" = x; then
66437      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66438$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66439    fi
66440  fi
66441
66442  if test "x$CCACHE" != x; then
66443
66444  if test "x$CCACHE" != x; then
66445    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66446      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66447          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66448      if test "x$HAS_BAD_CCACHE" != "x"; then
66449        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66450      fi
66451    fi
66452    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66453      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66454          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66455      if test "x$HAS_BAD_CCACHE" != "x"; then
66456        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66457      fi
66458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66459$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66460      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66461      PUSHED_FLAGS="$CXXFLAGS"
66462      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66463      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66464/* end confdefs.h.  */
66465
66466int
66467main ()
66468{
66469
66470  ;
66471  return 0;
66472}
66473_ACEOF
66474if ac_fn_cxx_try_compile "$LINENO"; then :
66475  CC_KNOWS_CCACHE_TRICK=yes
66476else
66477  CC_KNOWS_CCACHE_TRICK=no
66478fi
66479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66480      CXXFLAGS="$PUSHED_FLAGS"
66481      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66483$as_echo "yes" >&6; }
66484        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66485
66486        CCACHE_SLOPPINESS=pch_defines,time_macros
66487      else
66488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66489$as_echo "no" >&6; }
66490        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66491      fi
66492    fi
66493
66494    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66495        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66496
66497    if test "x$SET_CCACHE_DIR" != x; then
66498      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66499      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66500    fi
66501  fi
66502
66503  fi
66504
66505
66506###############################################################################
66507#
66508# And now the finish...
66509#
66510###############################################################################
66511
66512# Check for some common pitfalls
66513
66514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66515    file_to_test="$SRC_ROOT/LICENSE"
66516    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66517      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
66518    fi
66519  fi
66520
66521
66522  # Did user specify any unknown variables?
66523
66524  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66525    # Replace the separating ! with spaces before presenting for end user.
66526    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66527    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66528$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66529  fi
66530
66531
66532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66533$as_echo_n "checking if build directory is on local disk... " >&6; }
66534
66535  # df -l lists only local disks; if the given directory is not found then
66536  # a non-zero exit code is given
66537  if test "x$DF" = x; then
66538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66539      # msys does not have df; use Windows "net use" instead.
66540      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66541      if test "x$IS_NETWORK_DISK" = x; then
66542        OUTPUT_DIR_IS_LOCAL="yes"
66543      else
66544        OUTPUT_DIR_IS_LOCAL="no"
66545      fi
66546    else
66547      # No df here, say it's local
66548      OUTPUT_DIR_IS_LOCAL="yes"
66549    fi
66550  else
66551    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66552      OUTPUT_DIR_IS_LOCAL="yes"
66553    else
66554      OUTPUT_DIR_IS_LOCAL="no"
66555    fi
66556  fi
66557
66558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66559$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66560
66561
66562
66563  # Check if the user has any old-style ALT_ variables set.
66564  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66565
66566  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66567  # Since we can't properly handle the dependencies for this, warn the user about the situation
66568  if test -e $OUTPUT_ROOT/spec.gmk; then
66569    IS_RECONFIGURE=yes
66570  else
66571    IS_RECONFIGURE=no
66572  fi
66573
66574
66575# At the end, call the custom hook. (Dummy macro if no custom sources available)
66576
66577
66578# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66579
66580  # Keep feature lists sorted and free of duplicates
66581  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66582  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66583  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66584  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66585  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66586  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66587  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66588
66589  # Validate features
66590  for variant in $JVM_VARIANTS; do
66591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66592$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66593    features_var_name=JVM_FEATURES_$variant
66594    JVM_FEATURES_TO_TEST=${!features_var_name}
66595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66596$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66597    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66598    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66599    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66600    if test "x$INVALID_FEATURES" != x; then
66601      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66602    fi
66603  done
66604
66605
66606# We're messing a bit with internal autoconf variables to put the config.status
66607# in the output directory instead of the current directory.
66608CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66609
66610# Create the actual output files. Now the main work of configure is done.
66611cat >confcache <<\_ACEOF
66612# This file is a shell script that caches the results of configure
66613# tests run on this system so they can be shared between configure
66614# scripts and configure runs, see configure's option --config-cache.
66615# It is not useful on other systems.  If it contains results you don't
66616# want to keep, you may remove or edit it.
66617#
66618# config.status only pays attention to the cache file if you give it
66619# the --recheck option to rerun configure.
66620#
66621# `ac_cv_env_foo' variables (set or unset) will be overridden when
66622# loading this file, other *unset* `ac_cv_foo' will be assigned the
66623# following values.
66624
66625_ACEOF
66626
66627# The following way of writing the cache mishandles newlines in values,
66628# but we know of no workaround that is simple, portable, and efficient.
66629# So, we kill variables containing newlines.
66630# Ultrix sh set writes to stderr and can't be redirected directly,
66631# and sets the high bit in the cache file unless we assign to the vars.
66632(
66633  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66634    eval ac_val=\$$ac_var
66635    case $ac_val in #(
66636    *${as_nl}*)
66637      case $ac_var in #(
66638      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66639$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66640      esac
66641      case $ac_var in #(
66642      _ | IFS | as_nl) ;; #(
66643      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66644      *) { eval $ac_var=; unset $ac_var;} ;;
66645      esac ;;
66646    esac
66647  done
66648
66649  (set) 2>&1 |
66650    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66651    *${as_nl}ac_space=\ *)
66652      # `set' does not quote correctly, so add quotes: double-quote
66653      # substitution turns \\\\ into \\, and sed turns \\ into \.
66654      sed -n \
66655	"s/'/'\\\\''/g;
66656	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66657      ;; #(
66658    *)
66659      # `set' quotes correctly as required by POSIX, so do not add quotes.
66660      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66661      ;;
66662    esac |
66663    sort
66664) |
66665  sed '
66666     /^ac_cv_env_/b end
66667     t clear
66668     :clear
66669     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66670     t end
66671     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66672     :end' >>confcache
66673if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66674  if test -w "$cache_file"; then
66675    if test "x$cache_file" != "x/dev/null"; then
66676      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66677$as_echo "$as_me: updating cache $cache_file" >&6;}
66678      if test ! -f "$cache_file" || test -h "$cache_file"; then
66679	cat confcache >"$cache_file"
66680      else
66681        case $cache_file in #(
66682        */* | ?:*)
66683	  mv -f confcache "$cache_file"$$ &&
66684	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66685        *)
66686	  mv -f confcache "$cache_file" ;;
66687	esac
66688      fi
66689    fi
66690  else
66691    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66692$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66693  fi
66694fi
66695rm -f confcache
66696
66697test "x$prefix" = xNONE && prefix=$ac_default_prefix
66698# Let make expand exec_prefix.
66699test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66700
66701# Transform confdefs.h into DEFS.
66702# Protect against shell expansion while executing Makefile rules.
66703# Protect against Makefile macro expansion.
66704#
66705# If the first sed substitution is executed (which looks for macros that
66706# take arguments), then branch to the quote section.  Otherwise,
66707# look for a macro that doesn't take arguments.
66708ac_script='
66709:mline
66710/\\$/{
66711 N
66712 s,\\\n,,
66713 b mline
66714}
66715t clear
66716:clear
66717s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66718t quote
66719s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66720t quote
66721b any
66722:quote
66723s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66724s/\[/\\&/g
66725s/\]/\\&/g
66726s/\$/$$/g
66727H
66728:any
66729${
66730	g
66731	s/^\n//
66732	s/\n/ /g
66733	p
66734}
66735'
66736DEFS=`sed -n "$ac_script" confdefs.h`
66737
66738
66739ac_libobjs=
66740ac_ltlibobjs=
66741U=
66742for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66743  # 1. Remove the extension, and $U if already installed.
66744  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66745  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66746  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66747  #    will be set to the directory where LIBOBJS objects are built.
66748  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66749  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66750done
66751LIBOBJS=$ac_libobjs
66752
66753LTLIBOBJS=$ac_ltlibobjs
66754
66755
66756
66757: "${CONFIG_STATUS=./config.status}"
66758ac_write_fail=0
66759ac_clean_files_save=$ac_clean_files
66760ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66761{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66762$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66763as_write_fail=0
66764cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66765#! $SHELL
66766# Generated by $as_me.
66767# Run this file to recreate the current configuration.
66768# Compiler output produced by configure, useful for debugging
66769# configure, is in config.log if it exists.
66770
66771debug=false
66772ac_cs_recheck=false
66773ac_cs_silent=false
66774
66775SHELL=\${CONFIG_SHELL-$SHELL}
66776export SHELL
66777_ASEOF
66778cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66779## -------------------- ##
66780## M4sh Initialization. ##
66781## -------------------- ##
66782
66783# Be more Bourne compatible
66784DUALCASE=1; export DUALCASE # for MKS sh
66785if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66786  emulate sh
66787  NULLCMD=:
66788  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66789  # is contrary to our usage.  Disable this feature.
66790  alias -g '${1+"$@"}'='"$@"'
66791  setopt NO_GLOB_SUBST
66792else
66793  case `(set -o) 2>/dev/null` in #(
66794  *posix*) :
66795    set -o posix ;; #(
66796  *) :
66797     ;;
66798esac
66799fi
66800
66801
66802as_nl='
66803'
66804export as_nl
66805# Printing a long string crashes Solaris 7 /usr/bin/printf.
66806as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66807as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66808as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66809# Prefer a ksh shell builtin over an external printf program on Solaris,
66810# but without wasting forks for bash or zsh.
66811if test -z "$BASH_VERSION$ZSH_VERSION" \
66812    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66813  as_echo='print -r --'
66814  as_echo_n='print -rn --'
66815elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66816  as_echo='printf %s\n'
66817  as_echo_n='printf %s'
66818else
66819  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66820    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66821    as_echo_n='/usr/ucb/echo -n'
66822  else
66823    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66824    as_echo_n_body='eval
66825      arg=$1;
66826      case $arg in #(
66827      *"$as_nl"*)
66828	expr "X$arg" : "X\\(.*\\)$as_nl";
66829	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66830      esac;
66831      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66832    '
66833    export as_echo_n_body
66834    as_echo_n='sh -c $as_echo_n_body as_echo'
66835  fi
66836  export as_echo_body
66837  as_echo='sh -c $as_echo_body as_echo'
66838fi
66839
66840# The user is always right.
66841if test "${PATH_SEPARATOR+set}" != set; then
66842  PATH_SEPARATOR=:
66843  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66844    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66845      PATH_SEPARATOR=';'
66846  }
66847fi
66848
66849
66850# IFS
66851# We need space, tab and new line, in precisely that order.  Quoting is
66852# there to prevent editors from complaining about space-tab.
66853# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66854# splitting by setting IFS to empty value.)
66855IFS=" ""	$as_nl"
66856
66857# Find who we are.  Look in the path if we contain no directory separator.
66858as_myself=
66859case $0 in #((
66860  *[\\/]* ) as_myself=$0 ;;
66861  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66862for as_dir in $PATH
66863do
66864  IFS=$as_save_IFS
66865  test -z "$as_dir" && as_dir=.
66866    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66867  done
66868IFS=$as_save_IFS
66869
66870     ;;
66871esac
66872# We did not find ourselves, most probably we were run as `sh COMMAND'
66873# in which case we are not to be found in the path.
66874if test "x$as_myself" = x; then
66875  as_myself=$0
66876fi
66877if test ! -f "$as_myself"; then
66878  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66879  exit 1
66880fi
66881
66882# Unset variables that we do not need and which cause bugs (e.g. in
66883# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66884# suppresses any "Segmentation fault" message there.  '((' could
66885# trigger a bug in pdksh 5.2.14.
66886for as_var in BASH_ENV ENV MAIL MAILPATH
66887do eval test x\${$as_var+set} = xset \
66888  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66889done
66890PS1='$ '
66891PS2='> '
66892PS4='+ '
66893
66894# NLS nuisances.
66895LC_ALL=C
66896export LC_ALL
66897LANGUAGE=C
66898export LANGUAGE
66899
66900# CDPATH.
66901(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66902
66903
66904# as_fn_error STATUS ERROR [LINENO LOG_FD]
66905# ----------------------------------------
66906# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66907# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66908# script with STATUS, using 1 if that was 0.
66909as_fn_error ()
66910{
66911  as_status=$1; test $as_status -eq 0 && as_status=1
66912  if test "$4"; then
66913    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66914    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66915  fi
66916  $as_echo "$as_me: error: $2" >&2
66917  as_fn_exit $as_status
66918} # as_fn_error
66919
66920
66921# as_fn_set_status STATUS
66922# -----------------------
66923# Set $? to STATUS, without forking.
66924as_fn_set_status ()
66925{
66926  return $1
66927} # as_fn_set_status
66928
66929# as_fn_exit STATUS
66930# -----------------
66931# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66932as_fn_exit ()
66933{
66934  set +e
66935  as_fn_set_status $1
66936  exit $1
66937} # as_fn_exit
66938
66939# as_fn_unset VAR
66940# ---------------
66941# Portably unset VAR.
66942as_fn_unset ()
66943{
66944  { eval $1=; unset $1;}
66945}
66946as_unset=as_fn_unset
66947# as_fn_append VAR VALUE
66948# ----------------------
66949# Append the text in VALUE to the end of the definition contained in VAR. Take
66950# advantage of any shell optimizations that allow amortized linear growth over
66951# repeated appends, instead of the typical quadratic growth present in naive
66952# implementations.
66953if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66954  eval 'as_fn_append ()
66955  {
66956    eval $1+=\$2
66957  }'
66958else
66959  as_fn_append ()
66960  {
66961    eval $1=\$$1\$2
66962  }
66963fi # as_fn_append
66964
66965# as_fn_arith ARG...
66966# ------------------
66967# Perform arithmetic evaluation on the ARGs, and store the result in the
66968# global $as_val. Take advantage of shells that can avoid forks. The arguments
66969# must be portable across $(()) and expr.
66970if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66971  eval 'as_fn_arith ()
66972  {
66973    as_val=$(( $* ))
66974  }'
66975else
66976  as_fn_arith ()
66977  {
66978    as_val=`expr "$@" || test $? -eq 1`
66979  }
66980fi # as_fn_arith
66981
66982
66983if expr a : '\(a\)' >/dev/null 2>&1 &&
66984   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66985  as_expr=expr
66986else
66987  as_expr=false
66988fi
66989
66990if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66991  as_basename=basename
66992else
66993  as_basename=false
66994fi
66995
66996if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66997  as_dirname=dirname
66998else
66999  as_dirname=false
67000fi
67001
67002as_me=`$as_basename -- "$0" ||
67003$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67004	 X"$0" : 'X\(//\)$' \| \
67005	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67006$as_echo X/"$0" |
67007    sed '/^.*\/\([^/][^/]*\)\/*$/{
67008	    s//\1/
67009	    q
67010	  }
67011	  /^X\/\(\/\/\)$/{
67012	    s//\1/
67013	    q
67014	  }
67015	  /^X\/\(\/\).*/{
67016	    s//\1/
67017	    q
67018	  }
67019	  s/.*/./; q'`
67020
67021# Avoid depending upon Character Ranges.
67022as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67023as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67024as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67025as_cr_digits='0123456789'
67026as_cr_alnum=$as_cr_Letters$as_cr_digits
67027
67028ECHO_C= ECHO_N= ECHO_T=
67029case `echo -n x` in #(((((
67030-n*)
67031  case `echo 'xy\c'` in
67032  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67033  xy)  ECHO_C='\c';;
67034  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67035       ECHO_T='	';;
67036  esac;;
67037*)
67038  ECHO_N='-n';;
67039esac
67040
67041rm -f conf$$ conf$$.exe conf$$.file
67042if test -d conf$$.dir; then
67043  rm -f conf$$.dir/conf$$.file
67044else
67045  rm -f conf$$.dir
67046  mkdir conf$$.dir 2>/dev/null
67047fi
67048if (echo >conf$$.file) 2>/dev/null; then
67049  if ln -s conf$$.file conf$$ 2>/dev/null; then
67050    as_ln_s='ln -s'
67051    # ... but there are two gotchas:
67052    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67053    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67054    # In both cases, we have to default to `cp -pR'.
67055    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67056      as_ln_s='cp -pR'
67057  elif ln conf$$.file conf$$ 2>/dev/null; then
67058    as_ln_s=ln
67059  else
67060    as_ln_s='cp -pR'
67061  fi
67062else
67063  as_ln_s='cp -pR'
67064fi
67065rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67066rmdir conf$$.dir 2>/dev/null
67067
67068
67069# as_fn_mkdir_p
67070# -------------
67071# Create "$as_dir" as a directory, including parents if necessary.
67072as_fn_mkdir_p ()
67073{
67074
67075  case $as_dir in #(
67076  -*) as_dir=./$as_dir;;
67077  esac
67078  test -d "$as_dir" || eval $as_mkdir_p || {
67079    as_dirs=
67080    while :; do
67081      case $as_dir in #(
67082      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67083      *) as_qdir=$as_dir;;
67084      esac
67085      as_dirs="'$as_qdir' $as_dirs"
67086      as_dir=`$as_dirname -- "$as_dir" ||
67087$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67088	 X"$as_dir" : 'X\(//\)[^/]' \| \
67089	 X"$as_dir" : 'X\(//\)$' \| \
67090	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67091$as_echo X"$as_dir" |
67092    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67093	    s//\1/
67094	    q
67095	  }
67096	  /^X\(\/\/\)[^/].*/{
67097	    s//\1/
67098	    q
67099	  }
67100	  /^X\(\/\/\)$/{
67101	    s//\1/
67102	    q
67103	  }
67104	  /^X\(\/\).*/{
67105	    s//\1/
67106	    q
67107	  }
67108	  s/.*/./; q'`
67109      test -d "$as_dir" && break
67110    done
67111    test -z "$as_dirs" || eval "mkdir $as_dirs"
67112  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67113
67114
67115} # as_fn_mkdir_p
67116if mkdir -p . 2>/dev/null; then
67117  as_mkdir_p='mkdir -p "$as_dir"'
67118else
67119  test -d ./-p && rmdir ./-p
67120  as_mkdir_p=false
67121fi
67122
67123
67124# as_fn_executable_p FILE
67125# -----------------------
67126# Test if FILE is an executable regular file.
67127as_fn_executable_p ()
67128{
67129  test -f "$1" && test -x "$1"
67130} # as_fn_executable_p
67131as_test_x='test -x'
67132as_executable_p=as_fn_executable_p
67133
67134# Sed expression to map a string onto a valid CPP name.
67135as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67136
67137# Sed expression to map a string onto a valid variable name.
67138as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67139
67140
67141exec 6>&1
67142## ----------------------------------- ##
67143## Main body of $CONFIG_STATUS script. ##
67144## ----------------------------------- ##
67145_ASEOF
67146test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67147
67148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67149# Save the log message, to keep $0 and so on meaningful, and to
67150# report actual input values of CONFIG_FILES etc. instead of their
67151# values after options handling.
67152ac_log="
67153This file was extended by OpenJDK $as_me jdk9, which was
67154generated by GNU Autoconf 2.69.  Invocation command line was
67155
67156  CONFIG_FILES    = $CONFIG_FILES
67157  CONFIG_HEADERS  = $CONFIG_HEADERS
67158  CONFIG_LINKS    = $CONFIG_LINKS
67159  CONFIG_COMMANDS = $CONFIG_COMMANDS
67160  $ $0 $@
67161
67162on `(hostname || uname -n) 2>/dev/null | sed 1q`
67163"
67164
67165_ACEOF
67166
67167case $ac_config_files in *"
67168"*) set x $ac_config_files; shift; ac_config_files=$*;;
67169esac
67170
67171
67172
67173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67174# Files that config.status was made for.
67175config_files="$ac_config_files"
67176
67177_ACEOF
67178
67179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67180ac_cs_usage="\
67181\`$as_me' instantiates files and other configuration actions
67182from templates according to the current configuration.  Unless the files
67183and actions are specified as TAGs, all are instantiated by default.
67184
67185Usage: $0 [OPTION]... [TAG]...
67186
67187  -h, --help       print this help, then exit
67188  -V, --version    print version number and configuration settings, then exit
67189      --config     print configuration, then exit
67190  -q, --quiet, --silent
67191                   do not print progress messages
67192  -d, --debug      don't remove temporary files
67193      --recheck    update $as_me by reconfiguring in the same conditions
67194      --file=FILE[:TEMPLATE]
67195                   instantiate the configuration file FILE
67196
67197Configuration files:
67198$config_files
67199
67200Report bugs to <build-dev@openjdk.java.net>.
67201OpenJDK home page: <http://openjdk.java.net>."
67202
67203_ACEOF
67204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67205ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67206ac_cs_version="\\
67207OpenJDK config.status jdk9
67208configured by $0, generated by GNU Autoconf 2.69,
67209  with options \\"\$ac_cs_config\\"
67210
67211Copyright (C) 2012 Free Software Foundation, Inc.
67212This config.status script is free software; the Free Software Foundation
67213gives unlimited permission to copy, distribute and modify it."
67214
67215ac_pwd='$ac_pwd'
67216srcdir='$srcdir'
67217AWK='$AWK'
67218test -n "\$AWK" || AWK=awk
67219_ACEOF
67220
67221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67222# The default lists apply if the user does not specify any file.
67223ac_need_defaults=:
67224while test $# != 0
67225do
67226  case $1 in
67227  --*=?*)
67228    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67229    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67230    ac_shift=:
67231    ;;
67232  --*=)
67233    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67234    ac_optarg=
67235    ac_shift=:
67236    ;;
67237  *)
67238    ac_option=$1
67239    ac_optarg=$2
67240    ac_shift=shift
67241    ;;
67242  esac
67243
67244  case $ac_option in
67245  # Handling of the options.
67246  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67247    ac_cs_recheck=: ;;
67248  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67249    $as_echo "$ac_cs_version"; exit ;;
67250  --config | --confi | --conf | --con | --co | --c )
67251    $as_echo "$ac_cs_config"; exit ;;
67252  --debug | --debu | --deb | --de | --d | -d )
67253    debug=: ;;
67254  --file | --fil | --fi | --f )
67255    $ac_shift
67256    case $ac_optarg in
67257    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67258    '') as_fn_error $? "missing file argument" ;;
67259    esac
67260    as_fn_append CONFIG_FILES " '$ac_optarg'"
67261    ac_need_defaults=false;;
67262  --he | --h |  --help | --hel | -h )
67263    $as_echo "$ac_cs_usage"; exit ;;
67264  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67265  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67266    ac_cs_silent=: ;;
67267
67268  # This is an error.
67269  -*) as_fn_error $? "unrecognized option: \`$1'
67270Try \`$0 --help' for more information." ;;
67271
67272  *) as_fn_append ac_config_targets " $1"
67273     ac_need_defaults=false ;;
67274
67275  esac
67276  shift
67277done
67278
67279ac_configure_extra_args=
67280
67281if $ac_cs_silent; then
67282  exec 6>/dev/null
67283  ac_configure_extra_args="$ac_configure_extra_args --silent"
67284fi
67285
67286_ACEOF
67287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67288if \$ac_cs_recheck; then
67289  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67290  shift
67291  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67292  CONFIG_SHELL='$SHELL'
67293  export CONFIG_SHELL
67294  exec "\$@"
67295fi
67296
67297_ACEOF
67298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67299exec 5>>config.log
67300{
67301  echo
67302  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67303## Running $as_me. ##
67304_ASBOX
67305  $as_echo "$ac_log"
67306} >&5
67307
67308_ACEOF
67309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67310_ACEOF
67311
67312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67313
67314# Handling of arguments.
67315for ac_config_target in $ac_config_targets
67316do
67317  case $ac_config_target in
67318    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67319    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67320    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67321    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67322    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67323
67324  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67325  esac
67326done
67327
67328
67329# If the user did not use the arguments to specify the items to instantiate,
67330# then the envvar interface is used.  Set only those that are not.
67331# We use the long form for the default assignment because of an extremely
67332# bizarre bug on SunOS 4.1.3.
67333if $ac_need_defaults; then
67334  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67335fi
67336
67337# Have a temporary directory for convenience.  Make it in the build tree
67338# simply because there is no reason against having it here, and in addition,
67339# creating and moving files from /tmp can sometimes cause problems.
67340# Hook for its removal unless debugging.
67341# Note that there is a small window in which the directory will not be cleaned:
67342# after its creation but before its name has been assigned to `$tmp'.
67343$debug ||
67344{
67345  tmp= ac_tmp=
67346  trap 'exit_status=$?
67347  : "${ac_tmp:=$tmp}"
67348  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67349' 0
67350  trap 'as_fn_exit 1' 1 2 13 15
67351}
67352# Create a (secure) tmp directory for tmp files.
67353
67354{
67355  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67356  test -d "$tmp"
67357}  ||
67358{
67359  tmp=./conf$$-$RANDOM
67360  (umask 077 && mkdir "$tmp")
67361} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67362ac_tmp=$tmp
67363
67364# Set up the scripts for CONFIG_FILES section.
67365# No need to generate them if there are no CONFIG_FILES.
67366# This happens for instance with `./config.status config.h'.
67367if test -n "$CONFIG_FILES"; then
67368
67369
67370ac_cr=`echo X | tr X '\015'`
67371# On cygwin, bash can eat \r inside `` if the user requested igncr.
67372# But we know of no other shell where ac_cr would be empty at this
67373# point, so we can use a bashism as a fallback.
67374if test "x$ac_cr" = x; then
67375  eval ac_cr=\$\'\\r\'
67376fi
67377ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67378if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67379  ac_cs_awk_cr='\\r'
67380else
67381  ac_cs_awk_cr=$ac_cr
67382fi
67383
67384echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67385_ACEOF
67386
67387
67388{
67389  echo "cat >conf$$subs.awk <<_ACEOF" &&
67390  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67391  echo "_ACEOF"
67392} >conf$$subs.sh ||
67393  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67394ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67395ac_delim='%!_!# '
67396for ac_last_try in false false false false false :; do
67397  . ./conf$$subs.sh ||
67398    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67399
67400  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67401  if test $ac_delim_n = $ac_delim_num; then
67402    break
67403  elif $ac_last_try; then
67404    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67405  else
67406    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67407  fi
67408done
67409rm -f conf$$subs.sh
67410
67411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67412cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67413_ACEOF
67414sed -n '
67415h
67416s/^/S["/; s/!.*/"]=/
67417p
67418g
67419s/^[^!]*!//
67420:repl
67421t repl
67422s/'"$ac_delim"'$//
67423t delim
67424:nl
67425h
67426s/\(.\{148\}\)..*/\1/
67427t more1
67428s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67429p
67430n
67431b repl
67432:more1
67433s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67434p
67435g
67436s/.\{148\}//
67437t nl
67438:delim
67439h
67440s/\(.\{148\}\)..*/\1/
67441t more2
67442s/["\\]/\\&/g; s/^/"/; s/$/"/
67443p
67444b
67445:more2
67446s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67447p
67448g
67449s/.\{148\}//
67450t delim
67451' <conf$$subs.awk | sed '
67452/^[^""]/{
67453  N
67454  s/\n//
67455}
67456' >>$CONFIG_STATUS || ac_write_fail=1
67457rm -f conf$$subs.awk
67458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67459_ACAWK
67460cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67461  for (key in S) S_is_set[key] = 1
67462  FS = ""
67463
67464}
67465{
67466  line = $ 0
67467  nfields = split(line, field, "@")
67468  substed = 0
67469  len = length(field[1])
67470  for (i = 2; i < nfields; i++) {
67471    key = field[i]
67472    keylen = length(key)
67473    if (S_is_set[key]) {
67474      value = S[key]
67475      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67476      len += length(value) + length(field[++i])
67477      substed = 1
67478    } else
67479      len += 1 + keylen
67480  }
67481
67482  print line
67483}
67484
67485_ACAWK
67486_ACEOF
67487cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67488if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67489  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67490else
67491  cat
67492fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67493  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67494_ACEOF
67495
67496# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67497# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67498# trailing colons and then remove the whole line if VPATH becomes empty
67499# (actually we leave an empty line to preserve line numbers).
67500if test "x$srcdir" = x.; then
67501  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67502h
67503s///
67504s/^/:/
67505s/[	 ]*$/:/
67506s/:\$(srcdir):/:/g
67507s/:\${srcdir}:/:/g
67508s/:@srcdir@:/:/g
67509s/^:*//
67510s/:*$//
67511x
67512s/\(=[	 ]*\).*/\1/
67513G
67514s/\n//
67515s/^[^=]*=[	 ]*$//
67516}'
67517fi
67518
67519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67520fi # test -n "$CONFIG_FILES"
67521
67522
67523eval set X "  :F $CONFIG_FILES      "
67524shift
67525for ac_tag
67526do
67527  case $ac_tag in
67528  :[FHLC]) ac_mode=$ac_tag; continue;;
67529  esac
67530  case $ac_mode$ac_tag in
67531  :[FHL]*:*);;
67532  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67533  :[FH]-) ac_tag=-:-;;
67534  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67535  esac
67536  ac_save_IFS=$IFS
67537  IFS=:
67538  set x $ac_tag
67539  IFS=$ac_save_IFS
67540  shift
67541  ac_file=$1
67542  shift
67543
67544  case $ac_mode in
67545  :L) ac_source=$1;;
67546  :[FH])
67547    ac_file_inputs=
67548    for ac_f
67549    do
67550      case $ac_f in
67551      -) ac_f="$ac_tmp/stdin";;
67552      *) # Look for the file first in the build tree, then in the source tree
67553	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67554	 # because $ac_f cannot contain `:'.
67555	 test -f "$ac_f" ||
67556	   case $ac_f in
67557	   [\\/$]*) false;;
67558	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67559	   esac ||
67560	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67561      esac
67562      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67563      as_fn_append ac_file_inputs " '$ac_f'"
67564    done
67565
67566    # Let's still pretend it is `configure' which instantiates (i.e., don't
67567    # use $as_me), people would be surprised to read:
67568    #    /* config.h.  Generated by config.status.  */
67569    configure_input='Generated from '`
67570	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67571	`' by configure.'
67572    if test x"$ac_file" != x-; then
67573      configure_input="$ac_file.  $configure_input"
67574      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67575$as_echo "$as_me: creating $ac_file" >&6;}
67576    fi
67577    # Neutralize special characters interpreted by sed in replacement strings.
67578    case $configure_input in #(
67579    *\&* | *\|* | *\\* )
67580       ac_sed_conf_input=`$as_echo "$configure_input" |
67581       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67582    *) ac_sed_conf_input=$configure_input;;
67583    esac
67584
67585    case $ac_tag in
67586    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67587      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67588    esac
67589    ;;
67590  esac
67591
67592  ac_dir=`$as_dirname -- "$ac_file" ||
67593$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67594	 X"$ac_file" : 'X\(//\)[^/]' \| \
67595	 X"$ac_file" : 'X\(//\)$' \| \
67596	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67597$as_echo X"$ac_file" |
67598    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67599	    s//\1/
67600	    q
67601	  }
67602	  /^X\(\/\/\)[^/].*/{
67603	    s//\1/
67604	    q
67605	  }
67606	  /^X\(\/\/\)$/{
67607	    s//\1/
67608	    q
67609	  }
67610	  /^X\(\/\).*/{
67611	    s//\1/
67612	    q
67613	  }
67614	  s/.*/./; q'`
67615  as_dir="$ac_dir"; as_fn_mkdir_p
67616  ac_builddir=.
67617
67618case "$ac_dir" in
67619.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67620*)
67621  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67622  # A ".." for each directory in $ac_dir_suffix.
67623  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67624  case $ac_top_builddir_sub in
67625  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67626  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67627  esac ;;
67628esac
67629ac_abs_top_builddir=$ac_pwd
67630ac_abs_builddir=$ac_pwd$ac_dir_suffix
67631# for backward compatibility:
67632ac_top_builddir=$ac_top_build_prefix
67633
67634case $srcdir in
67635  .)  # We are building in place.
67636    ac_srcdir=.
67637    ac_top_srcdir=$ac_top_builddir_sub
67638    ac_abs_top_srcdir=$ac_pwd ;;
67639  [\\/]* | ?:[\\/]* )  # Absolute name.
67640    ac_srcdir=$srcdir$ac_dir_suffix;
67641    ac_top_srcdir=$srcdir
67642    ac_abs_top_srcdir=$srcdir ;;
67643  *) # Relative name.
67644    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67645    ac_top_srcdir=$ac_top_build_prefix$srcdir
67646    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67647esac
67648ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67649
67650
67651  case $ac_mode in
67652  :F)
67653  #
67654  # CONFIG_FILE
67655  #
67656
67657_ACEOF
67658
67659cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67660# If the template does not know about datarootdir, expand it.
67661# FIXME: This hack should be removed a few years after 2.60.
67662ac_datarootdir_hack=; ac_datarootdir_seen=
67663ac_sed_dataroot='
67664/datarootdir/ {
67665  p
67666  q
67667}
67668/@datadir@/p
67669/@docdir@/p
67670/@infodir@/p
67671/@localedir@/p
67672/@mandir@/p'
67673case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67674*datarootdir*) ac_datarootdir_seen=yes;;
67675*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67676  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67677$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67678_ACEOF
67679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67680  ac_datarootdir_hack='
67681  s&@datadir@&$datadir&g
67682  s&@docdir@&$docdir&g
67683  s&@infodir@&$infodir&g
67684  s&@localedir@&$localedir&g
67685  s&@mandir@&$mandir&g
67686  s&\\\${datarootdir}&$datarootdir&g' ;;
67687esac
67688_ACEOF
67689
67690# Neutralize VPATH when `$srcdir' = `.'.
67691# Shell code in configure.ac might set extrasub.
67692# FIXME: do we really want to maintain this feature?
67693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67694ac_sed_extra="$ac_vpsub
67695$extrasub
67696_ACEOF
67697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67698:t
67699/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67700s|@configure_input@|$ac_sed_conf_input|;t t
67701s&@top_builddir@&$ac_top_builddir_sub&;t t
67702s&@top_build_prefix@&$ac_top_build_prefix&;t t
67703s&@srcdir@&$ac_srcdir&;t t
67704s&@abs_srcdir@&$ac_abs_srcdir&;t t
67705s&@top_srcdir@&$ac_top_srcdir&;t t
67706s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67707s&@builddir@&$ac_builddir&;t t
67708s&@abs_builddir@&$ac_abs_builddir&;t t
67709s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67710$ac_datarootdir_hack
67711"
67712eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67713  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67714
67715test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67716  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67717  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67718      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67719  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67720which seems to be undefined.  Please make sure it is defined" >&5
67721$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67722which seems to be undefined.  Please make sure it is defined" >&2;}
67723
67724  rm -f "$ac_tmp/stdin"
67725  case $ac_file in
67726  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67727  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67728  esac \
67729  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67730 ;;
67731
67732
67733
67734  esac
67735
67736done # for ac_tag
67737
67738
67739as_fn_exit 0
67740_ACEOF
67741ac_clean_files=$ac_clean_files_save
67742
67743test $ac_write_fail = 0 ||
67744  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67745
67746
67747# configure is writing to config.log, and then calls config.status.
67748# config.status does its own redirection, appending to config.log.
67749# Unfortunately, on DOS this fails, as config.log is still kept open
67750# by configure, so config.status won't be able to write to it; its
67751# output is simply discarded.  So we exec the FD to /dev/null,
67752# effectively closing config.log, so it can be properly (re)opened and
67753# appended to by config.status.  When coming back to configure, we
67754# need to make the FD available again.
67755if test "$no_create" != yes; then
67756  ac_cs_success=:
67757  ac_config_status_args=
67758  test "$silent" = yes &&
67759    ac_config_status_args="$ac_config_status_args --quiet"
67760  exec 5>/dev/null
67761  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67762  exec 5>>config.log
67763  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67764  # would make configure fail if this is the last instruction.
67765  $ac_cs_success || as_fn_exit 1
67766fi
67767if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67768  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67769$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67770fi
67771
67772
67773# After AC_OUTPUT, we need to do final work
67774
67775
67776  # Try to move config.log (generated by autoconf) to the configure-support directory.
67777  if test -e ./config.log; then
67778    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67779  fi
67780
67781  # Rotate our log file (configure.log)
67782  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67783    $RM -f "$OUTPUT_ROOT/configure.log.old"
67784  fi
67785  if test -e "$OUTPUT_ROOT/configure.log"; then
67786    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67787  fi
67788
67789  # Move configure.log from current directory to the build output root
67790  if test -e ./configure.log; then
67791    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67792  fi
67793
67794  # Make the compare script executable
67795  $CHMOD +x $OUTPUT_ROOT/compare.sh
67796
67797
67798# Finally output some useful information to the user
67799
67800  # Finally output some useful information to the user
67801
67802  printf "\n"
67803  printf "====================================================\n"
67804  if test "x$no_create" != "xyes"; then
67805    if test "x$IS_RECONFIGURE" != "xyes"; then
67806      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67807    else
67808      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67809    fi
67810  else
67811    if test "x$IS_RECONFIGURE" != "xyes"; then
67812      printf "A configuration has been successfully checked but not created\n"
67813    else
67814      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67815    fi
67816  fi
67817  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67818    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67819  else
67820    printf "using default settings.\n"
67821  fi
67822
67823  printf "\n"
67824  printf "Configuration summary:\n"
67825  printf "* Debug level:    $DEBUG_LEVEL\n"
67826  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67827  printf "* JDK variant:    $JDK_VARIANT\n"
67828  printf "* JVM variants:   $JVM_VARIANTS\n"
67829  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67830  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67831
67832  printf "\n"
67833  printf "Tools summary:\n"
67834  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67835    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67836  fi
67837  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67838  if test "x$TOOLCHAIN_VERSION" != "x"; then
67839    print_version=" $TOOLCHAIN_VERSION"
67840  fi
67841  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67842  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67843  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67844
67845  printf "\n"
67846  printf "Build performance summary:\n"
67847  printf "* Cores to use:   $JOBS\n"
67848  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67849  if test "x$CCACHE_STATUS" != "x"; then
67850    printf "* ccache status:  $CCACHE_STATUS\n"
67851  fi
67852  printf "\n"
67853
67854  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67855    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67856    printf "will result in longer build times.\n"
67857    printf "\n"
67858  fi
67859
67860  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67861    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67862    printf "These are not respected, and will be ignored. It is recommended\n"
67863    printf "that you clean your environment. The following variables are set:\n"
67864    printf "$FOUND_ALT_VARIABLES\n"
67865    printf "\n"
67866  fi
67867
67868  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67869    printf "WARNING: Your build output directory is not on a local disk.\n"
67870    printf "This will severely degrade build performance!\n"
67871    printf "It is recommended that you create an output directory on a local disk,\n"
67872    printf "and run the configure script again from that directory.\n"
67873    printf "\n"
67874  fi
67875
67876  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67877    printf "WARNING: The result of this configuration has overridden an older\n"
67878    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67879    printf "proper build. Failure to do so might result in strange build problems.\n"
67880    printf "\n"
67881  fi
67882
67883  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67884    printf "WARNING: The result of this configuration was not saved.\n"
67885    printf "You should run without '--no-create | -n' to create the configuration.\n"
67886    printf "\n"
67887  fi
67888
67889
67890
67891  # Locate config.log.
67892  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67893    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67894  elif test -e "./config.log"; then
67895    CONFIG_LOG_PATH="."
67896  fi
67897
67898  if test -e "$CONFIG_LOG_PATH/config.log"; then
67899    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67900    if test $? -eq 0; then
67901      printf "The following warnings were produced. Repeated here for convenience:\n"
67902      # We must quote sed expression (using []) to stop m4 from eating the [].
67903      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67904      printf "\n"
67905    fi
67906  fi
67907
67908